Index: doc/theses/andrew_beach_MMath/code/.gitignore
===================================================================
--- doc/theses/andrew_beach_MMath/code/.gitignore	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/.gitignore	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,7 @@
+# Ignore everything that doesn't have a dot in its name.
+# (These are the generated executables.)
+/*
+!/*.*
+
+# Java Executables:
+*.class
Index: doc/theses/andrew_beach_MMath/code/cond-catch.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/cond-catch.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cond-catch.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -19,5 +19,5 @@
 		throw_exception();
 	} catch (empty_exception * exc ; should_catch) {
-		// ...
+		asm volatile ("# catch block (conditional)");
 	}
 }
@@ -37,5 +37,5 @@
 			cond_catch();
 		} catch (empty_exception * exc) {
-			// ...
+			asm volatile ("# catch block (unconditional)");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cond-catch.cpp
===================================================================
--- doc/theses/andrew_beach_MMath/code/cond-catch.cpp	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cond-catch.cpp	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -19,7 +19,8 @@
 		throw_exception();
 	} catch (EmptyException & exc) {
-		if (should_catch) {
+		if (!should_catch) {
 			throw;
 		}
+		asm volatile ("# catch block (conditional)");
 	}
 }
@@ -39,5 +40,5 @@
 			cond_catch();
 		} catch (EmptyException &) {
-			// ...
+			asm volatile ("# catch block (unconditional)");
 		}
     }
Index: doc/theses/andrew_beach_MMath/code/cond-fixup.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/cond-fixup.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cond-fixup.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -12,5 +12,5 @@
 
 void throw_exception() {
-	throw (empty_exception){&empty_vt};
+	throwResume (empty_exception){&empty_vt};
 }
 
@@ -18,6 +18,6 @@
 	try {
 		throw_exception();
-	} catch (empty_exception * exc ; should_catch) {
-		// ...
+	} catchResume (empty_exception * exc ; should_catch) {
+		asm volatile ("# fixup block (conditional)");
 	}
 }
@@ -36,6 +36,6 @@
 		try {
 			cond_catch();
-		} catch (empty_exception * exc) {
-			// ...
+		} catchResume (empty_exception * exc) {
+			asm volatile ("# fixup block (unconditional)");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cond_catch.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/cond_catch.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/cond_catch.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python3
+
+# Conditional Match (or Re-Raise)
+
+from time import thread_time_ns
+
+
+class EmptyException(Exception):
+    pass
+
+
+should_catch = False
+
+
+def throw_exception():
+    raise EmptyException()
+
+
+def cond_catch():
+    try:
+        throw_exception()
+    except EmptyException as exc:
+        if not should_catch:
+            raise
+
+
+def main(argv):
+    times = 1
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        should_catch = 0 < int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            cond_catch();
+        except EmptyException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/cross-catch.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross-catch.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cross-catch.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -7,12 +7,11 @@
 EHM_EXCEPTION(not_raised_exception)();
 
+EHM_VIRTUAL_TABLE(not_raised_exception, not_vt);
+
 int main(int argc, char * argv[]) {
 	unsigned int times = 1;
-	unsigned int total_frames = 1;
+	bool should_throw = false;
 	if (1 < argc) {
 		times = strtol(argv[1], 0p, 10);
-	}
-	if (2 < argc) {
-		total_frames = strtol(argv[2], 0p, 10);
 	}
 
@@ -20,7 +19,10 @@
 	for (unsigned int count = 0 ; count < times ; ++count) {
 		try {
-			// ...
+			asm volatile ("# try block" : "=rm" (should_throw));
+			if (should_throw) {
+				throw (not_raised_exception){&not_vt};
+			}
 		} catch (not_raised_exception *) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cross-catch.cpp
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross-catch.cpp	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cross-catch.cpp	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -11,4 +11,5 @@
 int main(int argc, char * argv[]) {
 	unsigned int times = 1;
+	bool should_throw = false;
 	if (1 < argc) {
 		times = strtol(argv[1], nullptr, 10);
@@ -18,7 +19,10 @@
 	for (unsigned int count = 0 ; count < times ; ++count) {
 		try {
-			// ...
+			asm volatile ("# try block" : "=rm" (should_throw));
+			if (should_throw) {
+				throw NotRaisedException();
+			}
 		} catch (NotRaisedException &) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cross-finally.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross-finally.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cross-finally.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -5,20 +5,24 @@
 #include <stdlib.hfa>
 
+EHM_EXCEPTION(not_raised_exception)();
+
+EHM_VIRTUAL_TABLE(not_raised_exception, not_vt);
+
 int main(int argc, char * argv[]) {
 	unsigned int times = 1;
-	unsigned int total_frames = 1;
+	bool should_throw = false;
 	if (1 < argc) {
 		times = strtol(argv[1], 0p, 10);
-	}
-	if (2 < argc) {
-		total_frames = strtol(argv[2], 0p, 10);
 	}
 
 	Time start_time = timeHiRes();
 	for (unsigned int count = 0 ; count < times ; ++count) {
-		 try {
-			// ...
+		try {
+			asm volatile ("# try block" : "=rm" (should_throw));
+			if (should_throw) {
+				throw (not_raised_exception){&not_vt};
+			}
 		} finally {
-			// ...
+			asm volatile ("# finally block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cross-resume.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross-resume.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/cross-resume.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -20,7 +20,7 @@
 	for (unsigned int count = 0 ; count < times ; ++count) {
 		try {
-			// ...
+			asm volatile ("");
 		} catchResume (not_raised_exception *) {
-			// ...
+			asm volatile ("");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/cross_catch.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross_catch.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/cross_catch.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,30 @@
+#!/usr/bin/env python3
+
+# Cross a Try Statement with a Termination Handler
+
+from time import thread_time_ns
+
+
+class NotRaisedException(Exception):
+    pass
+
+
+def main(argv):
+    times = 1;
+    if 1 < len(argv):
+        times = int(argv[1])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            pass
+        except NotRaisedException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/cross_finally.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/cross_finally.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/cross_finally.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+
+# Cross a Try Statement With Finally Clause
+
+from time import thread_time_ns
+
+
+def main(argv):
+    times = 1;
+    total_frames = 1;
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        total_frames = int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            pass
+        finally:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/resume-detor.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/resume-detor.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/resume-detor.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -12,15 +12,15 @@
 
 void ^?{}(WithDestructor & this) {
-    // ...
+	asm volatile ("# destructor body");
 }
 
 void unwind_destructor(unsigned int frames) {
-    if (frames) {
+	if (frames) {
 
-        WithDestructor object;
-        unwind_destructor(frames - 1);
-    } else {
-        throwResume (empty_exception){&empty_vt};
-    }
+		WithDestructor object;
+		unwind_destructor(frames - 1);
+	} else {
+		throwResume (empty_exception){&empty_vt};
+	}
 }
 
@@ -36,11 +36,11 @@
 
 	Time start_time = timeHiRes();
-    for (int count = 0 ; count < times ; ++count) {
-        try {
-            unwind_destructor(total_frames);
-        } catchResume (empty_exception *) {
-            // ...
-        }
-    }
+	for (int count = 0 ; count < times ; ++count) {
+		try {
+			unwind_destructor(total_frames);
+		} catchResume (empty_exception *) {
+			asm volatile ("# fixup block");
+		}
+	}
 	Time end_time = timeHiRes();
 	sout | "Run-Time (ns): " | (end_time - start_time)`ns;
Index: doc/theses/andrew_beach_MMath/code/resume-empty.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/resume-empty.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/resume-empty.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -13,5 +13,5 @@
 		unwind_empty(frames - 1);
 	} else {
-		throw (empty_exception){&empty_vt};
+		throwResume (empty_exception){&empty_vt};
 	}
 }
@@ -31,6 +31,6 @@
 		try {
 			unwind_empty(total_frames);
-		} catch (empty_exception *) {
-			// ...
+		} catchResume (empty_exception *) {
+			asm volatile ("# fixup block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/resume-finally.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/resume-finally.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/resume-finally.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -14,5 +14,5 @@
 			unwind_finally(frames - 1);
 		} finally {
-			// ...
+			asm volatile ("# finally block");
 		}
 	} else {
@@ -36,5 +36,5 @@
 			unwind_finally(total_frames);
 		} catchResume (empty_exception *) {
-			// ...
+			asm volatile ("# fixup block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/resume-other.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/resume-other.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/resume-other.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -16,5 +16,5 @@
 			unwind_other(frames - 1);
 		} catchResume (not_raised_exception *) {
-			// ...
+			asm volatile ("# fixup block (stack)");
 		}
 	} else {
@@ -38,5 +38,5 @@
 			unwind_other(total_frames);
 		} catchResume (empty_exception *) {
-			// ...
+			asm volatile ("# fixup block (base)");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/test.sh
===================================================================
--- doc/theses/andrew_beach_MMath/code/test.sh	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/test.sh	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -18,8 +18,8 @@
 	*.cfa)
 		# Requires a symbolic link.
-		mmake "${1%.cfa}" "$1" ./cfa "$1" -o "${1%.cfa}"
+		mmake "${1%.cfa}" "$1" ./cfa -DNDEBUG -nodebug -O3 "$1" -o "${1%.cfa}"
 		;;
 	*.cpp)
-		mmake "${1%.cpp}-cpp" "$1" g++ "$1" -o "${1%.cpp}-cpp"
+		mmake "${1%.cpp}-cpp" "$1" g++ -DNDEBUG -O3 "$1" -o "${1%.cpp}-cpp"
 		;;
 	*.java)
@@ -39,9 +39,9 @@
 	exit 0
 elif [ 2 -eq "$#" ]; then
-    TEST_LANG="$1"
-    TEST_CASE="$2"
+	TEST_LANG="$1"
+	TEST_CASE="$2"
 else
-    echo "Unknown call pattern." >&2
-    exit 2
+	echo "Unknown call pattern." >&2
+	exit 2
 fi
 
@@ -58,4 +58,5 @@
 	CPP="./cond-catch-cpp $ITERATIONS 1"
 	JAVA="java CondCatch $ITERATIONS 1"
+	PYTHON="./cond_catch.py $ITERATIONS 1"
 	;;
 cond-match-none)
@@ -64,4 +65,5 @@
 	CPP="./cond-catch-cpp $ITERATIONS 0"
 	JAVA="java CondCatch $ITERATIONS 0"
+	PYTHON="./cond_catch.py $ITERATIONS 0"
 	;;
 cross-catch)
@@ -70,4 +72,5 @@
 	CPP="./cross-catch-cpp $ITERATIONS"
 	JAVA="java CrossCatch $ITERATIONS"
+	PYTHON="./cross_catch.py $ITERATIONS"
 	;;
 cross-finally)
@@ -76,4 +79,5 @@
 	CPP=unsupported
 	JAVA="java CrossFinally $ITERATIONS"
+	PYTHON="./cross_finally.py $ITERATIONS"
 	;;
 raise-detor)
@@ -82,4 +86,5 @@
 	CPP="./throw-detor-cpp $ITERATIONS $STACK_HEIGHT"
 	JAVA=unsupported
+	PYTHON=unsupported
 	;;
 raise-empty)
@@ -88,4 +93,5 @@
 	CPP="./throw-empty-cpp $ITERATIONS $STACK_HEIGHT"
 	JAVA="java ThrowEmpty $ITERATIONS $STACK_HEIGHT"
+	PYTHON="./throw_empty.py $ITERATIONS $STACK_HEIGHT"
 	;;
 raise-finally)
@@ -94,4 +100,5 @@
 	CPP=unsupported
 	JAVA="java ThrowFinally $ITERATIONS $STACK_HEIGHT"
+	PYTHON="./throw_finally.py $ITERATIONS $STACK_HEIGHT"
 	;;
 raise-other)
@@ -100,4 +107,5 @@
 	CPP="./throw-other-cpp $ITERATIONS $STACK_HEIGHT"
 	JAVA="java ThrowOther $ITERATIONS $STACK_HEIGHT"
+	PYTHON="./throw_other.py $ITERATIONS $STACK_HEIGHT"
 	;;
 *)
@@ -112,6 +120,8 @@
 cpp) echo $CPP; $CPP;;
 java) echo $JAVA; $JAVA;;
+python) echo $PYTHON; $PYTHON;;
 *)
 	echo "No such language: $TEST_LANG" >&2
 	exit 2
+	;;
 esac
Index: doc/theses/andrew_beach_MMath/code/throw-detor.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-detor.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-detor.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -12,5 +12,5 @@
 
 void ^?{}(WithDestructor & this) {
-	// ...
+	asm volatile ("# destructor body");
 }
 
@@ -39,5 +39,5 @@
 			unwind_destructor(total_frames);
 		} catch (empty_exception *) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-detor.cpp
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-detor.cpp	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-detor.cpp	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -10,5 +10,7 @@
 
 struct WithDestructor {
-	~WithDestructor() {}
+	~WithDestructor() {
+		asm volatile ("# destructor body");
+	}
 };
 
@@ -37,5 +39,5 @@
 			unwind_destructor(total_frames);
 		} catch (EmptyException &) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-empty.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-empty.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-empty.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -32,5 +32,5 @@
 			unwind_empty(total_frames);
 		} catch (empty_exception *) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-empty.cpp
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-empty.cpp	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-empty.cpp	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -32,5 +32,5 @@
 			unwind_empty(total_frames);
 		} catch (EmptyException &) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-finally.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-finally.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-finally.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -14,5 +14,5 @@
 			unwind_finally(frames - 1);
 		} finally {
-			// ...
+			asm volatile ("# finally block");
 		}
 	} else {
@@ -36,5 +36,5 @@
 			unwind_finally(total_frames);
 		} catch (empty_exception *) {
-			// ...
+			asm volatile ("# catch block");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-other.cfa
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-other.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-other.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -16,5 +16,5 @@
 			unwind_other(frames - 1);
 		} catch (not_raised_exception *) {
-			// ...
+			asm volatile ("# catch block (stack)");
 		}
 	} else {
@@ -38,5 +38,5 @@
 			unwind_other(total_frames);
 		} catch (empty_exception *) {
-			// ...
+			asm volatile ("# catch block (base)");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw-other.cpp
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw-other.cpp	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/code/throw-other.cpp	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -16,5 +16,5 @@
 			unwind_other(frames - 1);
 		} catch (NotRaisedException &) {
-			// ...
+			asm volatile ("# catch block (stack)");
 		}
 	} else {
@@ -38,5 +38,5 @@
 			unwind_other(total_frames);
 		} catch (EmptyException &) {
-			// ...
+			asm volatile ("# catch block (base)");
 		}
 	}
Index: doc/theses/andrew_beach_MMath/code/throw_empty.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw_empty.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/throw_empty.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+
+# Throw Across Empty Function
+
+from time import thread_time_ns
+
+
+class EmptyException(Exception):
+    pass
+
+
+def unwind_empty(frames):
+    if 0 < frames:
+        unwind_empty(frames - 1)
+    else:
+        raise EmptyException()
+
+
+def main(argv):
+    times = 1
+    total_frames = 1
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        total_frames = int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            unwind_empty(total_frames)
+        except EmptyException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/throw_finally.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw_finally.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/throw_finally.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,43 @@
+#!/usr/bin/env python3
+
+# Throw Across Finally
+
+from time import thread_time_ns
+
+
+class EmptyException(Exception):
+    pass
+
+
+def unwind_finally(frames):
+    if 0 < frames:
+        try:
+            unwind_finally(frames - 1)
+        finally:
+            pass
+    else:
+        raise EmptyException()
+
+
+def main(argv):
+    times = 1
+    total_frames = 1
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        total_frames = int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            unwind_finally(total_frames)
+        except EmptyException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/throw_other.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw_other.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/throw_other.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,47 @@
+#!/usr/bin/env python3
+
+# Throw Across Other Handler
+
+from time import thread_time_ns
+
+
+class EmptyException(Exception):
+    pass
+
+
+class NotRaisedException(Exception):
+    pass
+
+
+def unwind_other(frames):
+    if 0 < frames:
+        try:
+            unwind_other(frames - 1)
+        except NotRaisedException:
+            pass
+    else:
+        raise EmptyException()
+
+
+def main(argv):
+    times = 1
+    total_frames = 1
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        total_frames = int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            unwind_other(total_frames)
+        except EmptyException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/code/throw_with.py
===================================================================
--- doc/theses/andrew_beach_MMath/code/throw_with.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ doc/theses/andrew_beach_MMath/code/throw_with.py	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,50 @@
+#!/usr/bin/env python3
+
+# Throw Across With Statement (closest thing Python has to a destructor)
+
+from time import thread_time_ns
+
+
+class EmptyException(Exception):
+    pass
+
+
+class EmptyContextManager:
+
+    def __enter__(self):
+        pass
+
+    def __exit__(self, exception_type, exception_value, traceback):
+        pass
+
+
+def unwind_with(frames):
+    if 0 < frames:
+        with EmptyContextManager():
+            unwind_with(frames - 1)
+    else:
+        raise EmptyException()
+
+
+def main(argv):
+    times = 1
+    total_frames = 1
+    if 1 < len(argv):
+        times = int(argv[1])
+    if 2 < len(argv):
+        total_frames = int(argv[2])
+
+    start_time = thread_time_ns()
+    for count in range(times):
+        try:
+            unwind_with(total_frames)
+        except EmptyException:
+            pass
+
+    end_time = thread_time_ns()
+    print('Run-Time (ns):', end_time - start_time)
+
+
+if '__main__' == __name__:
+    import sys
+    main(sys.argv)
Index: doc/theses/andrew_beach_MMath/intro.tex
===================================================================
--- doc/theses/andrew_beach_MMath/intro.tex	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/andrew_beach_MMath/intro.tex	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -107,13 +107,28 @@
 
 Exception handling is not a new concept,
-with papers on the subject dating back 70s.
-
-Their were popularised by \Cpp,
+with papers on the subject dating back 70s.\cite{Goodenough}
+
+Early exceptions were often treated as signals. They carried no information
+except their identity. Ada still uses this system.
+
+The modern flag-ship for termination exceptions is \Cpp,
 which added them in its first major wave of non-object-orientated features
 in 1990.
 % https://en.cppreference.com/w/cpp/language/history
-
-Java was the next popular language to use exceptions. It is also the most
-popular language with checked exceptions.
+\Cpp has the ability to use any value of any type as an exception.
+However that seems to immediately pushed aside for classes inherited from
+\code{C++}{std::exception}.
+Although there is a special catch-all syntax it does not allow anything to
+be done with the caught value becuase nothing is known about it.
+So instead a base type is defined with some common functionality (such as
+the ability to describe the reason the exception was raised) and all
+exceptions have that functionality.
+This seems to be the standard now, as the garentied functionality is worth
+any lost flexibility from limiting it to a single type.
+
+Java was the next popular language to use exceptions.
+Its exception system largely reflects that of \Cpp, except that requires
+you throw a child type of \code{Java}{java.lang.Throwable}
+and it uses checked exceptions.
 Checked exceptions are part of the function interface they are raised from.
 This includes functions they propogate through, until a handler for that
@@ -131,35 +146,44 @@
 Resumption exceptions have been much less popular.
 Although resumption has a history as old as termination's, very few
-programming languages have implement them.
+programming languages have implemented them.
 % http://bitsavers.informatik.uni-stuttgart.de/pdf/xerox/parc/techReports/
 %   CSL-79-3_Mesa_Language_Manual_Version_5.0.pdf
-Mesa is one programming languages that did and experiance with that
-languages is quoted as being one of the reasons resumptions were not
+Mesa is one programming languages that did. Experiance with Mesa
+is quoted as being one of the reasons resumptions were not
 included in the \Cpp standard.
 % https://en.wikipedia.org/wiki/Exception_handling
-\todo{A comment about why we did include them when they are so unpopular
-might be approprate.}
-
-%\subsection
-Functional languages, tend to use solutions like the return union, but some
-exception-like constructs still appear.
-
-For instance Haskell's built in error mechanism can make the result of any
-expression, including function calls. Any expression that examines an
-error value will in-turn produce an error. This continues until the main
-function produces an error or until it is handled by one of the catch
-functions.
+Since then resumptions have been ignored in the main-stream.
+
+All of this does call into question the use of resumptions, is
+something largely rejected decades ago worth revisiting now?
+Yes, even if it was the right call at the time there have been decades
+of other developments in computer science that have changed the situation
+since then.
+Some of these developments, such as in functional programming's resumption
+equivalent: algebraic effects\cite{Zhang19}, are directly related to
+resumptions as well.
+A complete rexamination of resumptions is beyond a single paper, but it is
+enough to try them again in \CFA.
+% Especially considering how much easier they are to implement than
+% termination exceptions.
+
+%\subsection
+Functional languages tend to use other solutions for their primary error
+handling mechanism, exception-like constructs still appear.
+Termination appears in error construct, which marks the result of an
+expression as an error, the result of any expression that tries to use it as
+an error, and so on until an approprate handler is reached.
+Resumption appears in algebric effects, where a function dispatches its
+side-effects to its caller for handling.
 
 %\subsection
 More recently exceptions seem to be vanishing from newer programming
-languages.
-Rust and Go reduce this feature to panics.
-Panicing is somewhere between a termination exception and a program abort.
-Notably in Rust a panic can trigger either, a panic may unwind the stack or
-simply kill the process.
+languages, replaced by ``panic".
+In Rust a panic is just a program level abort that may be implemented by
+unwinding the stack like in termination exception handling.
 % https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
-Go's panic is much more similar to a termination exception but there is
-only a catch-all function with \code{Go}{recover()}.
-So exceptions still are appearing, just in reduced forms.
+Go's panic through is very similar to a termination except it only supports
+a catch-all by calling \code{Go}{recover()}, simplifying the interface at
+the cost of flexability.
 
 %\subsection
Index: doc/theses/mubeen_zulfiqar_MMath/allocator.tex
===================================================================
--- doc/theses/mubeen_zulfiqar_MMath/allocator.tex	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ doc/theses/mubeen_zulfiqar_MMath/allocator.tex	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -111,11 +111,241 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\section{Added Features}
-
-
-\subsection{Methods}
-Why did we need it?
-The added benefits.
-
+\section{Added Features and Methods}
+To improve the UHeapLmmm allocator (FIX ME: cite uHeapLmmm) interface and make it more user friendly, we added a few more routines to the C allocator. Also, we built a CFA (FIX ME: cite cforall) interface on top of C interface to increase the usability of the allocator.
+
+\subsection{C Interface}
+We added a few more features and routines to the allocator's C interface that can make the allocator more usable to the programmers. THese features will programmer more control on the dynamic memory allocation.
+
+\subsubsection void * aalloc( size_t dim, size_t elemSize )
+aalloc is an extension of malloc. It allows programmer to allocate a dynamic array of objects without calculating the total size of array explicitly. The only alternate of this routine in the other allocators is calloc but calloc also fills the dynamic memory with 0 which makes it slower for a programmer who only wants to dynamically allocate an array of objects without filling it with 0.
+\paragraph{Usage}
+aalloc takes two parameters.
+\begin{itemize}
+\item
+dim: number of objects in the array
+\item
+elemSize: size of the object in the array.
+\end{itemize}
+It returns address of dynamic object allocatoed on heap that can contain dim number of objects of the size elemSize. On failure, it returns NULL pointer.
+
+\subsubsection void * resize( void * oaddr, size_t size )
+resize is an extension of relloc. It allows programmer to reuse a cuurently allocated dynamic object with a new size requirement. Its alternate in the other allocators is realloc but relloc also copy the data in old object to the new object which makes it slower for the programmer who only wants to reuse an old dynamic object for a new size requirement but does not want to preserve the data in the old object to the new object.
+\paragraph{Usage}
+resize takes two parameters.
+\begin{itemize}
+\item
+oaddr: the address of the old object that needs to be resized.
+\item
+size: the new size requirement of the to which the old object needs to be resized.
+\end{itemize}
+It returns an object that is of the size given but it does not preserve the data in the old object. On failure, it returns NULL pointer.
+
+\subsubsection void * resize( void * oaddr, size_t nalign, size_t size )
+This resize is an extension of the above resize (FIX ME: cite above resize). In addition to resizing the size of of an old object, it can also realign the old object to a new alignment requirement.
+\paragraph{Usage}
+This resize takes three parameters. It takes an additional parameter of nalign as compared to the above resize (FIX ME: cite above resize).
+\begin{itemize}
+\item
+oaddr: the address of the old object that needs to be resized.
+\item
+nalign: the new alignment to which the old object needs to be realigned.
+\item
+size: the new size requirement of the to which the old object needs to be resized.
+\end{itemize}
+It returns an object with the size and alignment given in the parameters. On failure, it returns a NULL pointer.
+
+\subsubsection void * amemalign( size_t alignment, size_t dim, size_t elemSize )
+amemalign is a hybrid of memalign and aalloc. It allows programmer to allocate an aligned dynamic array of objects without calculating the total size of the array explicitly. It frees the programmer from calculating the total size of the array.
+\paragraph{Usage}
+amemalign takes three parameters.
+\begin{itemize}
+\item
+alignment: the alignment to which the dynamic array needs to be aligned.
+\item
+dim: number of objects in the array
+\item
+elemSize: size of the object in the array.
+\end{itemize}
+It returns a dynamic array of objects that has the capacity to contain dim number of objects of the size of elemSize. The returned dynamic array is aligned to the given alignment. On failure, it returns NULL pointer.
+
+\subsubsection void * cmemalign( size_t alignment, size_t dim, size_t elemSize )
+cmemalign is a hybrid of amemalign and calloc. It allows programmer to allocate an aligned dynamic array of objects that is 0 filled. The current way to do this in other allocators is to allocate an aligned object with memalign and then fill it with 0 explicitly. This routine provides both features of aligning and 0 filling, implicitly.
+\paragraph{Usage}
+cmemalign takes three parameters.
+\begin{itemize}
+\item
+alignment: the alignment to which the dynamic array needs to be aligned.
+\item
+dim: number of objects in the array
+\item
+elemSize: size of the object in the array.
+\end{itemize}
+It returns a dynamic array of objects that has the capacity to contain dim number of objects of the size of elemSize. The returned dynamic array is aligned to the given alignment and is 0 filled. On failure, it returns NULL pointer.
+
+\subsubsection size_t malloc_alignment( void * addr )
+malloc_alignment returns the alignment of a currently allocated dynamic object. It allows the programmer in memory management and personal bookkeeping. It helps the programmer in verofying the alignment of a dynamic object especially in a scenerio similar to prudcer-consumer where a producer allocates a dynamic object and the consumer needs to assure that the dynamic object was allocated with the required alignment.
+\paragraph{Usage}
+malloc_alignment takes one parameters.
+\begin{itemize}
+\item
+addr: the address of the currently allocated dynamic object.
+\end{itemize}
+malloc_alignment returns the alignment of the given dynamic object. On failure, it return the value of default alignment of the uHeapLmmm allocator.
+
+\subsubsection bool malloc_zero_fill( void * addr )
+malloc_zero_fill returns whether a currently allocated dynamic object was initially zero filled at the time of allocation. It allows the programmer in memory management and personal bookkeeping. It helps the programmer in verifying the zero filled property of a dynamic object especially in a scenerio similar to prudcer-consumer where a producer allocates a dynamic object and the consumer needs to assure that the dynamic object was zero filled at the time of allocation.
+\paragraph{Usage}
+malloc_zero_fill takes one parameters.
+\begin{itemize}
+\item
+addr: the address of the currently allocated dynamic object.
+\end{itemize}
+malloc_zero_fill returns true if the dynamic object was initially zero filled and return false otherwise. On failure, it returns false.
+
+\subsubsection size_t malloc_size( void * addr )
+malloc_size returns the allocation size of a currently allocated dynamic object. It allows the programmer in memory management and personal bookkeeping. It helps the programmer in verofying the alignment of a dynamic object especially in a scenerio similar to prudcer-consumer where a producer allocates a dynamic object and the consumer needs to assure that the dynamic object was allocated with the required size. Its current alternate in the other allocators is malloc_usable_size. But, malloc_size is different from malloc_usable_size as malloc_usabe_size returns the total data capacity of dynamic object including the extra space at the end of the dynamic object. On the other hand, malloc_size returns the size that was given to the allocator at the allocation of the dynamic object. This size is updated when an object is realloced, resized, or passed through a similar allocator routine.
+\paragraph{Usage}
+malloc_size takes one parameters.
+\begin{itemize}
+\item
+addr: the address of the currently allocated dynamic object.
+\end{itemize}
+malloc_size returns the allocation size of the given dynamic object. On failure, it return zero.
+
+\subsubsection void * realloc( void * oaddr, size_t nalign, size_t size )
+This realloc is an extension of the default realloc (FIX ME: cite default realloc). In addition to reallocating an old object and preserving the data in old object, it can also realign the old object to a new alignment requirement.
+\paragraph{Usage}
+This realloc takes three parameters. It takes an additional parameter of nalign as compared to the default realloc.
+\begin{itemize}
+\item
+oaddr: the address of the old object that needs to be reallocated.
+\item
+nalign: the new alignment to which the old object needs to be realigned.
+\item
+size: the new size requirement of the to which the old object needs to be resized.
+\end{itemize}
+It returns an object with the size and alignment given in the parameters that preserves the data in the old object. On failure, it returns a NULL pointer.
+
+\subsection{CFA Malloc Interface}
+We added some routines to the malloc interface of CFA. These routines can only be used in CFA and not in our standalone uHeapLmmm allocator as these routines use some features that are only provided by CFA and not by C. It makes the allocator even more usable to the programmers.
+CFA provides the liberty to know the returned type of a call to the allocator. So, mainly in these added routines, we removed the object size parameter from the routine as allocator can calculate the size of the object from the returned type.
+
+\subsubsection T * malloc( void )
+This malloc is a simplified polymorphic form of defualt malloc (FIX ME: cite malloc). It does not take any parameter as compared to default malloc that takes one parameter.
+\paragraph{Usage}
+This malloc takes no parameters.
+It returns a dynamic object of the size of type T. On failure, it return NULL pointer.
+
+\subsubsection T * aalloc( size_t dim )
+This aalloc is a simplified polymorphic form of above aalloc (FIX ME: cite aalloc). It takes one parameter as compared to the above aalloc that takes two parameters.
+\paragraph{Usage}
+aalloc takes one parameters.
+\begin{itemize}
+\item
+dim: required number of objects in the array.
+\end{itemize}
+It returns a dynamic object that has the capacity to contain dim number of objects, each of the size of type T. On failure, it return NULL pointer.
+
+\subsubsection T * calloc( size_t dim )
+This calloc is a simplified polymorphic form of defualt calloc (FIX ME: cite calloc). It takes one parameter as compared to the default calloc that takes two parameters.
+\paragraph{Usage}
+This calloc takes one parameter.
+\begin{itemize}
+\item
+dim: required number of objects in the array.
+\end{itemize}
+It returns a dynamic object that has the capacity to contain dim number of objects, each of the size of type T. On failure, it return NULL pointer.
+
+\subsubsection T * resize( T * ptr, size_t size )
+This resize is a simplified polymorphic form of above resize (FIX ME: cite resize with alignment). It takes two parameters as compared to the above resize that takes three parameters. It frees the programmer from explicitly mentioning the alignment of the allocation as CFA provides gives allocator the liberty to get the alignment of the returned type.
+\paragraph{Usage}
+This resize takes two parameters.
+\begin{itemize}
+\item
+ptr: address of the old object.
+\item
+size: the required size of the new object.
+\end{itemize}
+It returns a dynamic object of the size given in paramters. The returned object is aligned to the alignemtn of type T. On failure, it return NULL pointer.
+
+\subsubsection T * realloc( T * ptr, size_t size )
+This realloc is a simplified polymorphic form of defualt realloc (FIX ME: cite realloc with align). It takes two parameters as compared to the above realloc that takes three parameters. It frees the programmer from explicitly mentioning the alignment of the allocation as CFA provides gives allocator the liberty to get the alignment of the returned type.
+\paragraph{Usage}
+This realloc takes two parameters.
+\begin{itemize}
+\item
+ptr: address of the old object.
+\item
+size: the required size of the new object.
+\end{itemize}
+It returns a dynamic object of the size given in paramters that preserves the data in the given object. The returned object is aligned to the alignemtn of type T. On failure, it return NULL pointer.
+
+\subsubsection T * memalign( size_t align )
+This memalign is a simplified polymorphic form of defualt memalign (FIX ME: cite memalign). It takes one parameters as compared to the default memalign that takes two parameters.
+\paragraph{Usage}
+memalign takes one parameters.
+\begin{itemize}
+\item
+align: the required alignment of the dynamic object.
+\end{itemize}
+It returns a dynamic object of the size of type T that is aligned to given parameter align. On failure, it return NULL pointer.
+
+\subsubsection T * amemalign( size_t align, size_t dim )
+This amemalign is a simplified polymorphic form of above amemalign (FIX ME: cite amemalign). It takes two parameter as compared to the above amemalign that takes three parameters.
+\paragraph{Usage}
+amemalign takes two parameters.
+\begin{itemize}
+\item
+align: required alignment of the dynamic array.
+\item
+dim: required number of objects in the array.
+\end{itemize}
+It returns a dynamic object that has the capacity to contain dim number of objects, each of the size of type T. The returned object is aligned to the given parameter align. On failure, it return NULL pointer.
+
+\subsubsection T * cmemalign( size_t align, size_t dim  )
+This cmemalign is a simplified polymorphic form of above cmemalign (FIX ME: cite cmemalign). It takes two parameter as compared to the above cmemalign that takes three parameters.
+\paragraph{Usage}
+cmemalign takes two parameters.
+\begin{itemize}
+\item
+align: required alignment of the dynamic array.
+\item
+dim: required number of objects in the array.
+\end{itemize}
+It returns a dynamic object that has the capacity to contain dim number of objects, each of the size of type T. The returned object is aligned to the given parameter align and is zero filled. On failure, it return NULL pointer.
+
+\subsubsection T * aligned_alloc( size_t align )
+This aligned_alloc is a simplified polymorphic form of defualt aligned_alloc (FIX ME: cite aligned_alloc). It takes one parameter as compared to the default aligned_alloc that takes two parameters.
+\paragraph{Usage}
+This aligned_alloc takes one parameter.
+\begin{itemize}
+\item
+align: required alignment of the dynamic object.
+\end{itemize}
+It returns a dynamic object of the size of type T that is aligned to the given parameter. On failure, it return NULL pointer.
+
+\subsubsection int posix_memalign( T ** ptr, size_t align )
+This posix_memalign is a simplified polymorphic form of defualt posix_memalign (FIX ME: cite posix_memalign). It takes two parameters as compared to the default posix_memalign that takes three parameters.
+\paragraph{Usage}
+This posix_memalign takes two parameter.
+\begin{itemize}
+\item
+ptr: variable address to store the address of the allocated object.
+\item
+align: required alignment of the dynamic object.
+\end{itemize}
+It stores address of the dynamic object of the size of type T in given parameter ptr. This object is aligned to the given parameter. On failure, it return NULL pointer.
+
+\subsubsection T * valloc( void )
+This valloc is a simplified polymorphic form of defualt valloc (FIX ME: cite valloc). It takes no parameters as compared to the default valloc that takes one parameter.
+\paragraph{Usage}
+valloc takes no parameters.
+It returns a dynamic object of the size of type T that is aligned to the page size. On failure, it return NULL pointer.
+
+\subsubsection T * pvalloc( void )
+This pcvalloc is a simplified polymorphic form of defualt pcvalloc (FIX ME: cite pcvalloc). It takes no parameters as compared to the default pcvalloc that takes one parameter.
+\paragraph{Usage}
+pvalloc takes no parameters.
+It returns a dynamic object of the size that is calcutaed by rouding the size of type T. The returned object is also aligned to the page size. On failure, it return NULL pointer.
 
 \subsection{Alloc Interface}
Index: libcfa/src/concurrency/locks.cfa
===================================================================
--- libcfa/src/concurrency/locks.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ libcfa/src/concurrency/locks.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -120,5 +120,5 @@
 	owner = t;
 	recursion_count = ( t ? 1 : 0 );
-	wait_count--;
+	if ( t ) wait_count--;
 	unpark( t );
 }
Index: src/CompilationState.cc
===================================================================
--- src/CompilationState.cc	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/CompilationState.cc	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -9,7 +9,7 @@
 // Author           : Rob Schluntz
 // Created On       : Mon Ju1 30 10:47:01 2018
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri May  3 13:45:23 2019
-// Update Count     : 4
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:27:35 2021
+// Update Count     : 5
 //
 
@@ -23,4 +23,5 @@
 	ctorinitp = false,
 	declstatsp = false,
+	exdeclp = false,
 	exprp = false,
 	expraltp = false,
Index: src/CompilationState.h
===================================================================
--- src/CompilationState.h	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/CompilationState.h	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -9,7 +9,7 @@
 // Author           : Rob Schluntz
 // Created On       : Mon Ju1 30 10:47:01 2018
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri May  3 13:43:21 2019
-// Update Count     : 4
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:27:35 2021
+// Update Count     : 5
 //
 
@@ -22,4 +22,5 @@
 	ctorinitp,
 	declstatsp,
+	exdeclp,
 	exprp,
 	expraltp,
Index: src/ControlStruct/ExceptDecl.cc
===================================================================
--- src/ControlStruct/ExceptDecl.cc	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ src/ControlStruct/ExceptDecl.cc	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,238 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ExceptDecl.cc --
+//
+// Author           : Henry Xue
+// Created On       : Tue Jul 20 04:10:50 2021
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:10:50 2021
+// Update Count     : 1
+//
+
+#include "ExceptDecl.h"
+
+#include "Common/PassVisitor.h"  // for PassVisitor
+#include "SynTree/Mutator.h"     // for mutateAll
+#include "Virtual/Tables.h"      // for helpers
+
+namespace ControlStruct {
+
+StructDecl * ehmTypeIdStruct( const std::string & exceptionName, std::list< TypeDecl *> * parameters ) {
+	StructDecl * structDecl = new StructDecl( Virtual::typeIdType( exceptionName ) );
+	structDecl->members.push_back( new ObjectDecl(
+		"parent",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new TypeInstType( Type::Const, "__cfavir_type_info", false ) ),
+		nullptr
+	) );
+	structDecl->set_body( true );
+	if ( parameters ) {
+		structDecl->parameters = *parameters;
+	}
+	return structDecl;
+}
+
+ObjectDecl * ehmTypeIdValue( const std::string & exceptionName, std::list< Expression *> * parameters ) {
+	StructInstType * structInstType = new StructInstType( Type::Const, Virtual::typeIdType( exceptionName ) );
+	if ( parameters ) {
+		structInstType->parameters = *parameters;
+	}
+	return new ObjectDecl(
+		Virtual::typeIdName( exceptionName ),
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		structInstType,
+		new ListInit( { new SingleInit(
+			new AddressExpr( new NameExpr( "__cfatid_exception_t" ) )
+			) }, {}, true ),
+		{ new Attribute( "cfa_linkonce" ) }
+	);
+}
+
+StructDecl * ehmExceptionStructDecl( const std::string & exceptionName, std::list< TypeDecl *> * parameters ) {
+	StructDecl * structDecl = new StructDecl( exceptionName );
+	if ( parameters ) {
+		structDecl->parameters = *parameters;
+	}
+	return structDecl;
+}
+
+StructDecl * ehmVirtualTableStruct( const std::string & exceptionName, std::list< TypeDecl *> * parameters ) {
+	// _EHM_TYPE_ID_TYPE(exception_name) parameters const * __cfavir_typeid;
+	ObjectDecl * typeId = new ObjectDecl(
+		"__cfavir_typeid",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new StructInstType( Type::Const, Virtual::typeIdType( exceptionName ) ) ),
+		nullptr
+	);
+
+	// size_t size;
+	ObjectDecl * size = new ObjectDecl(
+		"size",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new TypeInstType( noQualifiers, "size_t", false ),
+		nullptr
+	);
+	
+	// void (*copy)(exception_name parameters * this, exception_name parameters * other);
+	FunctionType * copyFnType = new FunctionType( noQualifiers, false );
+	copyFnType->get_parameters().push_back( new ObjectDecl(
+		"this",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new TypeInstType( noQualifiers, exceptionName, false ) ),
+		nullptr
+	) );
+	copyFnType->get_parameters().push_back( new ObjectDecl(
+		"other",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new TypeInstType( noQualifiers, exceptionName, false ) ),
+		nullptr
+	) );
+	copyFnType->get_returnVals().push_back( new ObjectDecl(
+		"",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new VoidType( noQualifiers ),
+		nullptr
+	) );
+	ObjectDecl * copy = new ObjectDecl(
+		"copy",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers, copyFnType ),
+		nullptr
+	);
+
+	// void (*^?{})(exception_name parameters & this);
+	FunctionType * dtorFnType = new FunctionType( noQualifiers, false );
+	dtorFnType->get_parameters().push_back( new ObjectDecl(
+		"this",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new ReferenceType( noQualifiers,
+			new TypeInstType( noQualifiers, exceptionName, false ) ),
+		nullptr
+	) );
+	dtorFnType->get_returnVals().push_back( new ObjectDecl(
+		"",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new VoidType( noQualifiers ),
+		nullptr
+	) );
+	ObjectDecl * dtor = new ObjectDecl(
+		"^?{}",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers, dtorFnType ),
+		nullptr
+	);
+
+	// const char * (*msg)(exception_name parameters * this);
+	FunctionType * msgFnType = new FunctionType( noQualifiers, false );
+	msgFnType->get_parameters().push_back( new ObjectDecl(
+		"this",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new TypeInstType( noQualifiers, exceptionName, false ) ),
+		nullptr
+	) );
+	msgFnType->get_returnVals().push_back( new ObjectDecl(
+		"",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers, new BasicType( Type::Const, BasicType::Char ) ),
+		nullptr
+	) );
+	ObjectDecl * msg = new ObjectDecl(
+		"msg",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers, msgFnType ),
+		nullptr
+	);
+
+	StructDecl * structDecl = new StructDecl( Virtual::vtableTypeName( exceptionName ) );
+	structDecl->members.push_back( typeId );
+	structDecl->members.push_back( size );
+	structDecl->members.push_back( copy );
+	structDecl->members.push_back( dtor );
+	structDecl->members.push_back( msg );
+	structDecl->set_body( true );
+	if ( parameters ) {
+		structDecl->parameters = *parameters;
+	}
+	return structDecl;
+}
+
+StructDecl * ehmExceptionStruct( const std::string & exceptionName, const std::list<Declaration*> & members,
+								 std::list<TypeDecl *> * parameters ) {
+	StructDecl * structDecl = new StructDecl( exceptionName );
+	structDecl->members = members;
+	structDecl->members.push_front( new ObjectDecl(
+		"virtual_table",
+		noStorageClasses,
+		LinkageSpec::Cforall,
+		nullptr,
+		new PointerType( noQualifiers,
+			new StructInstType( Type::Const, Virtual::vtableTypeName( exceptionName ) ) ),
+		nullptr
+	) );
+	structDecl->set_body( true );
+	if ( parameters ) {
+		structDecl->parameters = *parameters;
+	}
+	return structDecl;
+}
+
+class ExceptDeclCore : public WithDeclsToAdd {
+public:
+	Declaration * postmutate( StructDecl * structDecl );
+};
+
+Declaration * ExceptDeclCore::postmutate( StructDecl * structDecl ) {
+	if ( structDecl->is_exception() ) {
+		const std::string & exceptionName = structDecl->name;
+		declsToAddBefore.push_back( ehmTypeIdStruct( exceptionName, nullptr ) );
+		declsToAddBefore.push_back( ehmTypeIdValue( exceptionName, nullptr ) );
+		declsToAddBefore.push_back( ehmExceptionStructDecl( exceptionName, nullptr ) );
+		declsToAddBefore.push_back( ehmVirtualTableStruct( exceptionName, nullptr ) );
+		return ehmExceptionStruct( exceptionName, structDecl->get_members(), nullptr );
+	}
+	return structDecl;
+}
+
+void translateExcept( std::list< Declaration *> & translationUnit ) {
+	PassVisitor<ExceptDeclCore> translator;
+	mutateAll( translationUnit, translator );
+}
+
+}
Index: src/ControlStruct/ExceptDecl.h
===================================================================
--- src/ControlStruct/ExceptDecl.h	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
+++ src/ControlStruct/ExceptDecl.h	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -0,0 +1,24 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ExceptDecl.h --
+//
+// Author           : Henry Xue
+// Created On       : Tue Jul 20 04:10:50 2021
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:10:50 2021
+// Update Count     : 1
+//
+
+#pragma once
+
+#include <list>  // for list
+
+class Declaration;
+
+namespace ControlStruct {
+	void translateExcept( std::list< Declaration *> & translationUnit );
+}
Index: src/ControlStruct/module.mk
===================================================================
--- src/ControlStruct/module.mk	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/ControlStruct/module.mk	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -10,10 +10,12 @@
 ## Author           : Richard C. Bilson
 ## Created On       : Mon Jun  1 17:49:17 2015
-## Last Modified By : Andrew Beach
-## Last Modified On : Wed Jun 28 16:15:00 2017
-## Update Count     : 4
+## Last Modified By : Henry Xue
+## Last Modified On : Tue Jul 20 04:10:50 2021
+## Update Count     : 5
 ###############################################################################
 
 SRC_CONTROLSTRUCT = \
+	ControlStruct/ExceptDecl.cc \
+	ControlStruct/ExceptDecl.h \
 	ControlStruct/ForExprMutator.cc \
 	ControlStruct/ForExprMutator.h \
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/Parser/TypeData.cc	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 15:12:51 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul 14 18:57:31 2021
-// Update Count     : 672
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:10:50 2021
+// Update Count     : 673
 //
 
@@ -778,4 +778,5 @@
 	  case AggregateDecl::Struct:
 	  case AggregateDecl::Coroutine:
+	  case AggregateDecl::Exception:
 	  case AggregateDecl::Generator:
 	  case AggregateDecl::Monitor:
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/SynTree/Declaration.h	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 12 18:35:36 2021
-// Update Count     : 159
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:10:50 2021
+// Update Count     : 160
 //
 
@@ -300,4 +300,5 @@
 
 	bool is_coroutine() { return kind == Coroutine; }
+	bool is_exception() { return kind == Exception; }
 	bool is_generator() { return kind == Generator; }
 	bool is_monitor  () { return kind == Monitor  ; }
Index: src/main.cc
===================================================================
--- src/main.cc	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ src/main.cc	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -9,7 +9,7 @@
 // Author           : Peter Buhr and Rob Schluntz
 // Created On       : Fri May 15 23:12:02 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Mar  6 15:49:00 2021
-// Update Count     : 656
+// Last Modified By : Henry Xue
+// Last Modified On : Tue Jul 20 04:27:35 2021
+// Update Count     : 658
 //
 
@@ -49,4 +49,5 @@
 #include "Common/utility.h"                 // for deleteAll, filter, printAll
 #include "Concurrency/Waitfor.h"            // for generateWaitfor
+#include "ControlStruct/ExceptDecl.h"       // for translateExcept
 #include "ControlStruct/ExceptTranslate.h"  // for translateEHM
 #include "ControlStruct/Mutate.h"           // for mutate
@@ -305,4 +306,10 @@
 		CodeTools::fillLocations( translationUnit );
 		Stats::Time::StopBlock();
+
+		PASS( "Translate Exception Declarations", ControlStruct::translateExcept( translationUnit ) );
+		if ( exdeclp ) {
+			dump( translationUnit );
+			return EXIT_SUCCESS;
+		} // if
 
 		// add the assignment statement after the initialization of a type parameter
@@ -549,4 +556,5 @@
 	// code dumps
 	{ "ast", astp, true, "print AST after parsing" },
+	{ "exdecl", exdeclp, true, "print AST after translating exception decls" },
 	{ "symevt", symtabp, true, "print AST after symbol table events" },
 	{ "altexpr", expraltp, true, "print alternatives for expressions" },
Index: tests/polymorphism.cfa
===================================================================
--- tests/polymorphism.cfa	(revision d30804ad6634e19d5abd4e2aabcc2b4b9cc9833f)
+++ tests/polymorphism.cfa	(revision 86fc350b0fed75cdbddd02c1dea171034661f0c8)
@@ -71,5 +71,5 @@
 		printf("  offset of inner float:  %ld\n", ((char *) & x_inner_float ) - ((char *) & x) );
 
-	void showStatic( thing(int) & x ) {
+	void showStatic( thing(long long int) & x ) {
 		printf("static:\n");
 		SHOW_OFFSETS
@@ -85,5 +85,5 @@
 
 	printf("=== checkPlan9offsets\n");
-	thing(int) x;
+	thing(long long int) x;
 	showStatic(x);
 	showDynamic(x);
