Index: .gitignore
===================================================================
--- .gitignore	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ .gitignore	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -12,4 +12,5 @@
 libcfa/Makefile
 src/Makefile
+version
 
 # genereted by premake
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -132,5 +132,4 @@
 CFA_PREFIX = @CFA_PREFIX@
 CFLAGS = @CFLAGS@
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
Index: configure
===================================================================
--- configure	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ configure	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -1,5 +1,5 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for cfa-cc 1.0.0.
+# Generated by GNU Autoconf 2.68 for cfa-cc 1.0.0.0.
 #
 # Report bugs to <cforall@plg.uwaterloo.ca>.
@@ -561,6 +561,6 @@
 PACKAGE_NAME='cfa-cc'
 PACKAGE_TARNAME='cfa-cc'
-PACKAGE_VERSION='1.0.0'
-PACKAGE_STRING='cfa-cc 1.0.0'
+PACKAGE_VERSION='1.0.0.0'
+PACKAGE_STRING='cfa-cc 1.0.0.0'
 PACKAGE_BUGREPORT='cforall@plg.uwaterloo.ca'
 PACKAGE_URL=''
@@ -646,5 +646,4 @@
 CFA_BACKEND_CC
 BACKEND_CC
-CONFIG_STATUS_DEPENDENCIES
 MAINT
 MAINTAINER_MODE_FALSE
@@ -1279,5 +1278,5 @@
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures cfa-cc 1.0.0 to adapt to many kinds of systems.
+\`configure' configures cfa-cc 1.0.0.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,5 +1344,5 @@
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of cfa-cc 1.0.0:";;
+     short | recursive ) echo "Configuration of cfa-cc 1.0.0.0:";;
    esac
   cat <<\_ACEOF
@@ -1449,5 +1448,5 @@
 if $ac_init_version; then
   cat <<\_ACEOF
-cfa-cc configure 1.0.0
+cfa-cc configure 1.0.0.0
 generated by GNU Autoconf 2.68
 
@@ -2037,5 +2036,5 @@
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by cfa-cc $as_me 1.0.0, which was
+It was created by cfa-cc $as_me 1.0.0.0, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
@@ -2901,5 +2900,5 @@
 # Define the identity of the package.
  PACKAGE='cfa-cc'
- VERSION='1.0.0'
+ VERSION='1.0.0.0'
 
 
@@ -2965,15 +2964,13 @@
 			# may require auto* software to be installed
 
-ver_major=`cat version | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\1/'`
-ver_minor=`cat version | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\2/'`
-ver_patch=`cat version | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\3/'`
-ver_build=`cat version | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/\4/'`
-ver_short="\"${ver_major}\""
-ver__long="\"${ver_major}.${ver_minor}\""
-ver__norm="\"${ver_major}.${ver_minor}.${ver_patch}\""
-ver__full="\"${ver_major}.${ver_minor}.${ver_patch}.${ver_build}\""
-
-CONFIG_STATUS_DEPENDENCIES='$(top_srcdir)/version'
-
+rm -f version
+echo ${PACKAGE_VERSION} > version		# file containing version number for other tools
+chmod ugo-w version
+ver_major=`cut -d '.' -f1 version`		# subdivide version number into components at periods
+ver_minor=`cut -d '.' -f2 version`
+ver_patch=`cut -d '.' -f3 version`
+ver_build=`cut -d '.' -f4 version`
+
+# AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version'])
 
 cat >>confdefs.h <<_ACEOF
@@ -2998,20 +2995,20 @@
 
 cat >>confdefs.h <<_ACEOF
-#define CFA_VERSION_SHORT ${ver_short}
+#define CFA_VERSION_SHORT "${ver_major}"
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define CFA_VERSION ${ver__long}
+#define CFA_VERSION "${ver_major}.${ver_minor}"
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define CFA_VERSION_LONG ${ver__norm}
+#define CFA_VERSION_LONG "${ver_major}.${ver_minor}.${ver_patch}"
 _ACEOF
 
 
 cat >>confdefs.h <<_ACEOF
-#define CFA_VERSION_FULL ${ver__full}
+#define CFA_VERSION_FULL "${ver_major}.${ver_minor}.${ver_patch}.${ver_build}"
 _ACEOF
 
@@ -6404,5 +6401,5 @@
 # values after options handling.
 ac_log="
-This file was extended by cfa-cc $as_me 1.0.0, which was
+This file was extended by cfa-cc $as_me 1.0.0.0, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
@@ -6470,5 +6467,5 @@
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-cfa-cc config.status 1.0.0
+cfa-cc config.status 1.0.0.0
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
Index: configure.ac
===================================================================
--- configure.ac	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ configure.ac	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -3,5 +3,5 @@
 
 AC_PREREQ([2.68])
-AC_INIT([cfa-cc],[1.0.0],[cforall@plg.uwaterloo.ca])
+AC_INIT([cfa-cc],[1.0.0.0],[cforall@plg.uwaterloo.ca])
 AC_CONFIG_AUX_DIR([automake])
 #AC_CONFIG_SRCDIR([src/main.cc])
@@ -18,22 +18,21 @@
 AM_MAINTAINER_MODE(enable)			# may require auto* software to be installed
 
-ver_major=`cat version | sed -r 's/([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)/\1/'`
-ver_minor=`cat version | sed -r 's/([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)/\2/'`
-ver_patch=`cat version | sed -r 's/([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)/\3/'`
-ver_build=`cat version | sed -r 's/([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)\.([[0-9]]+)/\4/'`
-ver_short="\"${ver_major}\""
-ver__long="\"${ver_major}.${ver_minor}\""
-ver__norm="\"${ver_major}.${ver_minor}.${ver_patch}\""
-ver__full="\"${ver_major}.${ver_minor}.${ver_patch}.${ver_build}\""
+rm -f version
+echo ${PACKAGE_VERSION} > version		# file containing version number for other tools
+chmod ugo-w version
+ver_major=`cut -d '.' -f1 version`		# subdivide version number into components at periods
+ver_minor=`cut -d '.' -f2 version`
+ver_patch=`cut -d '.' -f3 version`
+ver_build=`cut -d '.' -f4 version`
 
-AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version'])
+# AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version'])
 AC_DEFINE_UNQUOTED(CFA_VERSION_MAJOR, ${ver_major}, [Major version number.])
 AC_DEFINE_UNQUOTED(CFA_VERSION_MINOR, ${ver_minor}, [Minor version number.])
 AC_DEFINE_UNQUOTED(CFA_VERSION_PATCH, ${ver_patch}, [Patch version number.])
 AC_DEFINE_UNQUOTED(CFA_VERSION_BUILD, ${ver_build}, [Build version number.])
-AC_DEFINE_UNQUOTED(CFA_VERSION_SHORT, ${ver_short}, [Major])
-AC_DEFINE_UNQUOTED(CFA_VERSION, ${ver__long}, [Major.Minor])
-AC_DEFINE_UNQUOTED(CFA_VERSION_LONG, ${ver__norm}, [Major.Minor.Patch])
-AC_DEFINE_UNQUOTED(CFA_VERSION_FULL, ${ver__full}, [Major.Minor.Patch.Build])
+AC_DEFINE_UNQUOTED(CFA_VERSION_SHORT, ["${ver_major}"], [Major])
+AC_DEFINE_UNQUOTED(CFA_VERSION, ["${ver_major}.${ver_minor}"], [Major.Minor])
+AC_DEFINE_UNQUOTED(CFA_VERSION_LONG, ["${ver_major}.${ver_minor}.${ver_patch}"], [Major.Minor.Patch])
+AC_DEFINE_UNQUOTED(CFA_VERSION_FULL, ["${ver_major}.${ver_minor}.${ver_patch}.${ver_build}"], [Major.Minor.Patch.Build])
 
 # Installation paths
Index: doc/bibliography/cfa.bib
===================================================================
--- doc/bibliography/cfa.bib	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ doc/bibliography/cfa.bib	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -21,11 +21,20 @@
 %  tcs: Theoretical Computer Science
 @string{ieeepds="IEEE Transactions on Parallel and Distributed Systems"}
+% @string{ieeepds="IEEE Trans. Parallel Distrib. Syst."}
 @string{ieeese="IEEE Transactions on Software Engineering"}
+% @string{ieeese="IEEE Trans. Softw. Eng."}
 @string{spe="Software---\-Practice and Experience"}
+% @string{spe="Softw. Pract. Exp."}
+@string{ccpe="Concurrency and Computation: Practice and Experience"}
+% @string{ccpe="Concurrency Comput. Pract. Exp."}
 @string{sigplan="SIGPLAN Notices"}
+% @string{sigplan="SIGPLAN Not."}
 @string{joop="Journal of Object-Oriented Programming"}
+% @string{joop="J. of Object-Oriented Program."}
 @string{popl="Conference Record of the ACM Symposium on Principles of Programming Languages"}
 @string{osr="Operating Systems Review"}
 @string{pldi="Programming Language Design and Implementation"}
+@string{mathann="Mathematische Annalen"}
+% @string{mathann="Math. Ann."}
 
 % A
@@ -39,4 +48,5 @@
     booktitle	= {Parallel Programming in {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
     publisher	= {MIT Press},
+    address	= {New York},
     series	= {Scientific and Engineering Computation Series},
     year	= 1996,
@@ -120,6 +130,6 @@
     year	= 1996,
     pages	= {483-499},
-    publisher	= {Addison-Wesley Longman Publishing Co., Inc.},
-    address	= {Boston, MA, USA},
+    publisher	= {Addison-Wesley Longman Publishing},
+    address	= {Boston},
 }
 
@@ -161,5 +171,5 @@
     author	= {Gul A. Agha},
     title	= {Actors: A Model of Concurrent Computation in Distributed Systems},
-    publisher	= {MIT Press, Cambridge, Mass.},
+    publisher	= {MIT Press, Cambridge},
     year	= 1986
 }
@@ -311,5 +321,5 @@
     publisher	= {Microsoft Press},
     year	= 1997,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -325,4 +335,14 @@
     year	= 1977,
     pages	= {604-605},
+}
+
+@manual{Akka,
+    keywords	= {Akka actor model},
+    contributer	= {pabuhr@plg},
+    title	= {{A}kka {S}cala Documentation, Release 2.4.11},
+    organization= {Lightbend Inc.},
+    month	= sep,
+    year	= 2016,
+    note	= {\href{http://doc.akka.io/docs/akka/2.4/AkkaScala.pdf}{http://\-doc.akka.io/\-docs/\-akka/\-2.4/\-AkkaScala.pdf}},
 }
 
@@ -378,6 +398,6 @@
     author	= {M. Raynal},
     title	= {Algorithms for Mutual Exclusion},
-    publisher	= {The MIT Press},
-    address	= {Cambridge, Massachusetts},
+    publisher	= {MIT Press},
+    address	= {Cambridge},
     series	= {Scientific Computation Series},
     year	= 1986,
@@ -394,4 +414,5 @@
     pages	= {329-342},
     publisher	= {Springer},
+    address	= {New York},
     year	= 2005,
     volume	= 3669,
@@ -404,5 +425,5 @@
     editor	= {Richard L. Sites},
     title	= {Alpha Architecture Reference Manual},
-    publisher	= {Digital Press, One Burlington Woods Drive, Burlington, MA, U. S. A., 01803},
+    publisher	= {Digital Press, Burlington},
     year	= 1992,
 }
@@ -413,5 +434,6 @@
     editor	= {Mary Shaw},
     title	= {{ALPHARD}: Form and Content},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
+    address	= {New York},
     year	= 1981,
     comment	= {Collection of papers about Alphard.}
@@ -470,4 +492,5 @@
     editor	= {Gul Agha and Peter Wegner and Akinori Yonezawa},
     publisher	= {MIT Press},
+    address	= {New York},
     year	= 1993,
     pages	= {107-150},
@@ -495,5 +518,5 @@
     location	= {Toulouse, France},
     doi		= {http://doi.acm.org/10.1145/318773.319251},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     address	= {London, UK},
 }
@@ -504,6 +527,7 @@
     title	= {The Annotated {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Reference Manual},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1990,
-    edition	= {first},
+    edition	= {1st},
 }
 
@@ -567,6 +591,6 @@
     year	= 2008,
     isbn	= {0123705916, 9780123705914},
-    publisher	= {Morgan Kaufmann Publishers Inc.},
-    address	= {San Francisco, CA, USA},
+    publisher	= {Morgan Kaufmann Publishers},
+    address	= {San Francisco},
 }
 
@@ -747,4 +771,14 @@
 }
 
+@misc{BoostCoroutines15,
+    keywords	= {Boost Coroutine Library},
+    contributer	= {pabuhr@plg},
+    author	= {Oliver Kowalke},
+    title	= {Boost Coroutine Library},
+    year	= 2015,
+    note	= {\href{http://www.boost.org/doc/libs/1_61_0/libs/coroutine/doc/html/index.html}
+		  {{http://www.boost.org/\-doc/\-libs/1\_61\_0/\-libs/\-coroutine/\-doc/\-html/\-index.html}} [Accessed September 2016]},
+}
+
 @mastersthesis{Krischer02,
     author	= {Roy Krischer },
@@ -779,5 +813,5 @@
     editor	= {C. Dony and J. L. Knudsen and A. Romanovsky and A. Tripathi},
     booktitle	= {Advanced Topics in Exception Handling Techniques},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     series	= {Lecture Notes in Computer Science},
     volume	= 4119,
@@ -793,8 +827,9 @@
     author	= {Brian W. Kernighan and Dennis M. Ritchie},
     title	= {The {C} Programming Language},
-    publisher	= {Prentice Hall},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1988,
-    edition	= {second},
-    series	= {Prentice Hall Software Series},
+    edition	= {2nd},
+    series	= {Prentice-Hall Software Series},
     comment	= {
 	 based on draft-proposed ANSI C
@@ -807,7 +842,8 @@
     author	= {Brian W. Kernighan and Dennis M. Ritchie},
     title	= {The {C} Programming Language},
-    publisher	= {Prentice Hall},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1978,
-    edition	= {first},
+    edition	= {1st},
 }
 
@@ -835,12 +871,12 @@
 
 @manual{C++Concepts,
-	keywords = {ISO/IEC TS 19217:2015},
-	contributer = {a3moss@uwaterloo.ca},
-	key = {C++ Concepts},
-	title = {Information technology -- Programming languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Extensions for concepts},
-	organization = {International Standard ISO/IEC TS 19217:2015},
-	publisher = {International Standard Organization},
-	address = {http://www.iso.org},
-	year = 2015
+    keywords	= {ISO/IEC TS 19217:2015},
+    contributer	= {a3moss@uwaterloo.ca},
+    key		= {C++ Concepts},
+    title	= {Information technology -- Programming languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Extensions for concepts},
+    organization= {International Standard ISO/IEC TS 19217:2015},
+    publisher	= {International Standard Organization},
+    address	= {http://www.iso.org},
+    year	= 2015
 }
 
@@ -914,6 +950,7 @@
     title	= {{C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Primer},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1991,
-    edition	= {second},
+    edition	= {2nd},
     note	= {QA76.73.C15L57},
 }
@@ -925,6 +962,7 @@
     title	= {The {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming Language},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1986,
-    edition	= {first},
+    edition	= {1st},
     series	= {Addison-Wesley Series in Computer Science}
 }
@@ -936,6 +974,7 @@
     title	= {The {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming Language},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1991,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -945,7 +984,7 @@
     author	= {Bjarne Stroustrup},
     title	= {The {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Programming Language},
-    publisher	= {Addison-Wesley},
+    publisher	= {Addison Wesley Longman},
     year	= 1997,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -1002,4 +1041,5 @@
     title	= {Classics in Software Engineering},
     publisher	= {Yourdon Press},
+    address	= {New York},
     year	= 1979,
 }
@@ -1042,5 +1082,6 @@
 		Moss and J. Craig Schaffert and Robert Scheifler and Alan Snyder},
     title	= {CLU Reference Manual},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
+    address	= {New York},
     year	= 1981,
     volume	= 114,
@@ -1053,5 +1094,5 @@
     key		= {Cobol14},
     title	= {Programming Languages -- {Cobol}},
-    edition	= {second},
+    edition	= {2nd},
     organization= {International Standard ISO/IEC 1989:2014},
     publisher   = {International Standard Organization},
@@ -1106,5 +1147,5 @@
     title	= {Commentary on Standard {ML}},
     publisher	= {MIT Press},
-    address	= {Cambridge, Massachusetts, U.S.A.},
+    address	= {Cambridge},
     year	= 1991
 }
@@ -1132,5 +1173,5 @@
     year	= 1987,
     pages	= {151-170},
-    publisher	= {Springer-Verlag}
+    publisher	= {Springer}
 }
 
@@ -1138,7 +1179,8 @@
     keywords	= {common lisp},
     contributer	= {pabuhr@plg},
-    author	= {G. Steele},
+    author	= {Guy Steele},
     title	= {COMMON LISP: The Language},
     publisher	= {Digital Press},
+    address	= {New York},
     year	= 1984
 }
@@ -1183,5 +1225,5 @@
     year	= 1985,
     isbn	= {0-13-153271-5},
-    publisher	= {Prentice-Hall, Inc.},
+    publisher	= {Prentice-Hall},
     address	= {Upper Saddle River, NJ, USA},
     note	= {\href{http://www.usingcsp.com/cspbook.pdf}{http://\-www.usingcsp.com/\-cspbook.pdf}},
@@ -1202,7 +1244,7 @@
     author	= {Alfred V. Aho and Monica S. Lam and Ravi Sethi and Jeffrey D. Ullman},
     title	= {Compilers: Principles, Techniques, and Tools},
-    edition	= {second},
+    edition	= {2nd},
     year	= {2006},
-    publisher	= {Addison-Wesley Longman Publishing Co., Inc.},
+    publisher	= {Addison-Wesley Longman Publishing},
     address	= {Boston, MA, USA},
 }
@@ -1212,5 +1254,5 @@
     contributer	= {pabuhr@plg},
     author	= {David F. Bacon and Susan L. Graham and Oliver J. Sharp},
-    title	= {Compiler Transformations for High-Performance Computing},
+    title	= {Compiler Transformations for High-Performance Com\-puting},
     journal	= acmcs,
     volume	= 26,
@@ -1250,5 +1292,5 @@
     month	= sep,
     address	= {Waterloo, Ontario, Canada, N2L 3G1},
-    note	= {{\small\textsf{ftp://\-plg.uwaterloo.ca/\-pub/\-theses/\-MokThesis.ps.gz}}},
+    note	= {\href{http://plg.uwaterloo.ca/theses/MokThesis.pdf}{http://\-plg.uwaterloo.ca/\-theses/\-MokThesis.pdf}},
 }
 
@@ -1328,5 +1370,5 @@
     editor	= {P. E. Lauer},
     pages	= {165-198},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     address	= {Berlin, DE},
     year	= 1993,
@@ -1393,5 +1435,5 @@
     month	= jul,
     year	= 2015,
-    note	= {\href{http://plg.uwaterloo.ca/~usystem/pub/uSystem/u++-6.1.0.sh}{\textsf{http://plg.uwaterloo.ca/\-$\sim$usystem/\-pub/\-uSystem/\-u++-6.1.0.sh}}},
+    note	= {\href{http://plg.uwaterloo.ca/~usystem/pub/uSystem/u++-6.1.0.sh}{\textsf{http://\-plg.\-uwaterloo.\-ca/\-$\sim$usystem/\-pub/\-uSystem/\-u++-6.1.0.sh}}},
 }
 
@@ -1401,5 +1443,5 @@
     author	= {Alan Burns and Geoff Davies},
     title	= {Concurrent Programming},
-    publisher	= {Addison-Wesley},
+    publisher	= {Addison Wesley Longman},
     year	= 1993,
 }
@@ -1424,6 +1466,7 @@
     title	= {Concurrent Programming in {J}ava: Design Principles and Patterns},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1997,
-    edition	= {first},
+    edition	= {1st},
 }
 
@@ -1435,5 +1478,5 @@
     publisher	= {Oxford University Press},
     year	= 1998,
-    edition	= {first},
+    edition	= {1st},
 }
 
@@ -1444,6 +1487,7 @@
     title	= {Concurrent Programming in {J}ava: Design Principles and Patterns},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 2000,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -1453,5 +1497,6 @@
     author	= {N. H. Gehani and W. D. Roome},
     title	= {The {Concurrent C} Programming Language},
-    publisher	= {Silicon Press, NJ},
+    publisher	= {Silicon Press},
+    address	= {Summit},
     year	= 1989,
 }
@@ -1462,5 +1507,6 @@
     author	= {Gregory R. Andrews},
     title	= {Concurrent Programming: Principles and Practice},
-    publisher	= {Benjamin/Cummings Publishing Company, Inc., Redwood City, California},
+    publisher	= {Benjamin/Cummings Publish\-ing},
+    address	= {Redwood City},
     year	= 1991,
 }
@@ -1471,5 +1517,5 @@
     author	= {Peter A. Buhr and Ashif S. Harji},
     title	= {Concurrent Urban Legends},
-    journal	= {Concurrency and Computation: Practice and Experience},
+    journal	= ccpe,
     month	= aug,
     year	= 2005,
@@ -1497,5 +1543,5 @@
     publisher	= {Cambridge University Press},
     year	= 1998,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -1514,5 +1560,5 @@
     title	= {Condition Handling in the Lisp Language Family},
     booktitle	= {Exception Handling},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 2022,
     series	= {LNCS},
@@ -1527,5 +1573,5 @@
     title	= {Conformace, Genericity, Inheritance and Enhancement},
     pages	= {223-233},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     year	= 1987,
     volume	= 276,
@@ -1636,13 +1682,12 @@
 
 @unpublished{Ditchfield:conversions,
-	contributer = {a3moss@uwaterloo.ca},
-	author = {Glen Ditchfield},
-	title = {Conversions for {Cforall}},
-	note = {\href{http://plg.uwaterloo.ca/~cforall/Conversions/index.html}{http://\-plg.uwaterloo.ca/\-\textasciitilde cforall/\-Conversions/\-index.html}},
-	month = {Nov},
-	year = {2002},
-	urldate = {28 July 2016},
-}
-
+    contributer	= {a3moss@uwaterloo.ca},
+    author	= {Glen Ditchfield},
+    title	= {Conversions for {Cforall}},
+    note	= {\href{http://plg.uwaterloo.ca/~cforall/Conversions/index.html}{http://\-plg.uwaterloo.ca/\-\textasciitilde cforall/\-Conversions/\-index.html}},
+    month	= {Nov},
+    year	= {2002},
+    urldate	= {28 July 2016},
+}
 
 @techreport{Dijkstra65,
@@ -1662,5 +1707,6 @@
     author	= {Christopher D. Marlin},
     title	= {Coroutines: A Programming Methodology, a Language Design and an Implementation},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
+    address	= {New York},
     year	= 1980,
     volume	= 95,
@@ -1699,4 +1745,14 @@
     publisher	= {Benjamin Cummings},
     year	= 1991,
+}
+
+@article{Moore75,
+    keywords	= {approximation methods, integrated circuits},
+    contributer	= {pabuhr@plg},
+    author	= {Gordon E. Moore},
+    title	= {Progress in Digital Integrated Electronics},
+    journal	= {Technical Digest, International Electron Devices Meeting, IEEE},
+    year	= 1975,
+    pages	= {11-13},
 }
 
@@ -1840,5 +1896,5 @@
     title	= {The Definition of Standard {ML}},
     publisher	= {MIT Press},
-    address	= {Cambridge, Massachusetts, U.S.A.},
+    address	= {Cambridge},
     year	= 1990
 }
@@ -1870,5 +1926,5 @@
     author	= {Peter A. Buhr and David Dice and Wim H. Hesselink},
     title	= {Dekker's Mutual Exclusion Algorithm Made RW-Safe},
-    journal	= {Concurrency and Computation: Practice and Experience},
+    journal	= ccpe,
     volume	= 28,
     number	= 1,
@@ -1920,4 +1976,5 @@
     title       = {The Design and Evolution of {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
     publisher   = {Addison-Wesley},
+    address	= {Boston},
     year        = 1994
 }
@@ -1977,5 +2034,6 @@
     author	= {G. Motet and A. Mapinard and J. C. Geoffroy},
     title	= {Design of Dependable {A}da Software},
-    publisher	= {Prentice Hall},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1996,
 }
@@ -2012,4 +2070,5 @@
     title	= {Design Patterns: Elements of Reusable Object-Oriented Software},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1995,
     series	= {Professional Computing Series},
@@ -2054,5 +2113,5 @@
     author	= {Ralph E. Johnson and Brian Foote},
     title	= {Designing Reusable Classes},
-    journal	= {Journal of Object-Oriented Programming},
+    journal	= joop,
     year	= 1988,
     volume	= 1, number = 2, pages = {22-35},
@@ -2109,4 +2168,5 @@
     title	= {A Discipline of Programming},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1976,
 }
@@ -2125,4 +2185,5 @@
     title	= {Distributed Systems: Principles and Paradigms},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 2002,
 }
@@ -2253,6 +2314,7 @@
     title	= {Eiffel: The Language},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1992,
-    series	= {Prentice Hall Object-Oriented Series},
+    series	= {Prentice-Hall Object-Oriented Series},
 }
 
@@ -2388,5 +2450,5 @@
     month	= jun,
     year	= 2015,
-    note	= {\href{http://www.erlang.org/doc/pdf/otp-system-documentation.pdf}{\textsf{http://www.erlang.org/\-doc/\-pdf/\-otp-system-documentation.pdf}}},
+    note	= {\href{http://www.erlang.org/doc/pdf/otp-system-documentation.pdf}{\textsf{http://www.erlang.org/\-doc/\-pdf/\-otp-system-\-documentation.pdf}}},
 }
 
@@ -2467,4 +2529,5 @@
     booktitle	= {Advances in COMPUTERS},
     publisher	= {Academic Press},
+    address	= {London},
     volume	= 56,
     year	= 2002,
@@ -2561,15 +2624,11 @@
     title	= {Exception Handling in Parallel Computations},
     journal	= sigplan,
+    publisher	= {ACM},
+    address	= {New York, NY, USA},
     volume	= 20,
     number	= 10,
     month	= oct,
     year	= 1985,
-    issn	= {0362-1340},
     pages	= {95-104},
-    url		= {http://doi.acm.org/10.1145/382286.382385},
-    doi		= {http://doi.acm.org/10.1145/382286.382385},
-    acmid	= {382385},
-    publisher	= {ACM},
-    address	= {New York, NY, USA},
 }
 
@@ -2680,5 +2739,5 @@
     title	= {Fault Tolerance and Exception Handling in {BETA}},
     booktitle	= {Exception Handling},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 2022,
     series	= {Lecture Notes in Computer Science},
@@ -2839,5 +2898,5 @@
     title	= {A Fully Object-Oriented Exception Handling System: Rationale and Smalltalk Implementation},
     booktitle	= {Exception Handling},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 2022,
     series	= {Lecture Notes in Computer Science},
@@ -2859,7 +2918,8 @@
     series	= {The Art of Computer Programming},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1973,
     volume	= 1,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -2912,5 +2972,5 @@
     author	= {Richard M. Stallman},
     organization= {Free Software Foundation},
-    address	= {Cambridge, MA}
+    address	= {Cambridge}
 }
 
@@ -2952,5 +3012,4 @@
 }
 
-
 @article{Haskell,
     keywords	= {lazy evaluation, type class},
@@ -2973,5 +3032,5 @@
     organization= {Google},
     year	= 2009,
-    note	= {\href{http://golang.org/ref/spec}{http://golang.org/\-ref/\-spec}},
+    note	= {\href{http://golang.org/ref/spec}{http://\-golang.org/\-ref/\-spec}},
 }
 
@@ -3090,5 +3149,6 @@
     author	= {Robert E. Strom and David F. Bacon and Arthur P. Goldberg and Andy Lowry and Daniel M. Yellin and Shaula Alexander Yemini}, 
     title	= {Hermes: A Language for Distributed Computing},
-    publisher	= {Prentice Hall},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     series	= {Innovative Technology},
     year	= 1991,
@@ -3134,5 +3194,5 @@
     author	= {Peter A. Buhr and David Dice and Wim H. Hesselink},
     title	= {High-Performance {$N$}-Thread Software Solutions for Mutual Exclusion},
-    journal	= {Concurrency and Computation: Practice and Experience},
+    journal	= ccpe,
     volume	= 27,
     number	= 3,
@@ -3148,5 +3208,5 @@
     title	= {Zum Hilbertschen Aufbau der reellen Zahlen},
     publisher	= {Springer},
-    journal	= {Mathematische Annalen},
+    journal	= mathann,
     number	= 1,
     volume	= 99,
@@ -3187,4 +3247,5 @@
     title	= {The Icon Programming Language},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1983,
 }
@@ -3262,5 +3323,4 @@
     issn	= {0164-0925},
     pages	= {1270--1343},
-    doi		= {http://doi.acm.org/10.1145/1108970.1108975},
     publisher	= {ACM Press},
     address	= {New York, NY, USA},
@@ -3277,6 +3337,5 @@
     pages	= {55-59},
     issn	= {0163-5719},
-    doi		= {http://doi.acm.org/10.1145/872736.806932},
- }
+}
 
 @book{Algol68,
@@ -3361,4 +3420,5 @@
     title	= {Interacting Processes: A Multiparty Approach to Coordinated Distributed Programming},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     series	= {ACM Press Books},
     year	= 1996,
@@ -3434,4 +3494,5 @@
     title	= {Introduction to Algorithms},
     publisher	= {MIT Press/McGraw-Hill},
+    address	= {Cambridge},
     series	= {Electrical Engineering and Computer Science Series},
     year	= 1992,
@@ -3444,4 +3505,5 @@
     title	= {Introduction to Automata Theory, Languages and Computation},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1979,
 }
@@ -3476,6 +3538,7 @@
     title	= {An Introduction to Operating Systems},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1990,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -3525,5 +3588,5 @@
     title	= {Issues with Exception Hnadling in Object-Oriented Systems},
     booktitle	= {ECOOP'97},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 1241,
     series	= {Lecture Notes in Computer Science},
@@ -3553,6 +3616,7 @@
     title       = {The {Java} Language Specification},
     publisher	= {Addison-Wesley},
+    address	= {Reading},
     year        = 2000,
-    edition	= {second},
+    edition	= {2nd},
 }
 
@@ -3597,5 +3661,5 @@
     title	= {Konstruktion nichtrekursiver Funktionen},
     publisher	= {Springer},
-    journal	= {Mathematische Annalen},
+    journal	= mathann,
     number	= 111,
     volume	= 1,
@@ -3740,4 +3804,5 @@
     title	= {Lisp 1.5 Primer},
     publisher	= {Dickenson Publishing},
+    address	= {Belmont},
     year	= 1967,
 }
@@ -3937,5 +4002,5 @@
     booktitle	= {Proceedings of the European Conference on Object Oriented Programming},
     organization= {ECOOP'88},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 322,
     editor	= {S. Gjessing and K. Nygaard},
@@ -3979,4 +4044,5 @@
     title	= {Modern C++ Design: Generic Programming and Design Patterns Applied},
     publisher	= {Addison-Wesley Professional},
+    address	= {Boston},
     month	= feb,
     year	= 2001,
@@ -3990,4 +4056,5 @@
     title	= {Modern Operating Systems},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1992,
 }
@@ -4310,5 +4377,5 @@
     title	= {Nesting in an Object Oriented Language is NOT for the Birds},
     booktitle	= {Proceedings of the European Conference on Object Oriented Programming},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     volume	= 322,
     editor	= {S. Gjessing and K. Nygaard},
@@ -4437,5 +4504,5 @@
     editor	= {S. Gjessing and K. Nygaard},
     organization= {DND, The Norwegian Computer Society},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     comment	= {
 	   Objectives:
@@ -4472,4 +4539,5 @@
     title	= {Object-oriented programming; an evolutionary approach},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1986
 }
@@ -4481,4 +4549,5 @@
     title	= {Object-oriented Programming in the {BETA} Programming Language},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1993,
 }
@@ -4512,7 +4581,8 @@
     author	= {Bertrand Meyer},
     title	= {Object-oriented Software Construction},
-    publisher	= {Prentice Hall},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= {1988},
-    series	= {Prentice Hall International Series in Computer Science},
+    series	= {Prentice-Hall International Series in Computer Science},
 }
 
@@ -4541,6 +4611,7 @@
     author	= {John Galletly},
     title	= {{OCCAM} 2: Including {OCCAM} 2.1},
-    publisher	= {{UCL} (University College London) Press Ltd.},
-    edition	= {second},
+    publisher	= {{UCL} (University College London) Press},
+    address	= {London},
+    edition	= {2nd},
     year	= 1996,
 }
@@ -4602,5 +4673,5 @@
     month	= jul,
     year	= 2013,
-    note	= {\href{http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf}{\textsf{http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf}}},
+    note	= {\href{http://www.openmp.org/mp-documents/OpenMP4.0.0.pdf}{\textsf{http://\-www.openmp.org/\-mp-documents/\-OpenMP4.0.0.pdf}}},
 }
 
@@ -4611,6 +4682,7 @@
     title	= {Operating Systems},
     publisher	= {Pearson Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 2004,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -4621,6 +4693,7 @@
     title	= {Operating Systems: Internals and Design Principles},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1998,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -4631,6 +4704,7 @@
     title	= {Operating Systems: Internals and Design Principles},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 2001,
-    edition	= {fourth},
+    edition	= {4th},
 }
 
@@ -4641,6 +4715,7 @@
     title	= {Operating System Concepts},
     publisher	= {Addision-Wesley},
+    address	= {Boston},
     year	= 1991,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -4651,4 +4726,5 @@
     title	= {Operating Systems : Design and Implementation},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     series	= {Software Series},
     year	= 1987,
@@ -4661,4 +4737,5 @@
     title	= {Operating System Principles},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1973,
 }
@@ -4670,4 +4747,5 @@
     title	= {Operating System Principles},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 2003,
 }
@@ -4686,20 +4764,20 @@
 
 @article{Ganzinger80,
-	contributer = {a3moss@uwaterloo.ca},
-	author = {Ganzinger, Harald and Ripken, Knut},
-	title = {Operator Identification in {ADA}: Formal Specification, Complexity, and Concrete Implementation},
-	journal = {SIGPLAN Notices},
-	issue_date = {February 1980},
-	volume = {15},
-	number = {2},
-	month = feb,
-	year = {1980},
-	issn = {0362-1340},
-	pages = {30--42},
-	numpages = {13},
-	url = {http://doi.acm.org/10.1145/947586.947589},
-	doi = {10.1145/947586.947589},
-	publisher = {ACM},
-	address = {New York, NY, USA}
+    contributer	= {a3moss@uwaterloo.ca},
+    author	= {Ganzinger, Harald and Ripken, Knut},
+    title	= {Operator Identification in {ADA}: Formal Specification, Complexity, and Concrete Implementation},
+    journal	= {SIGPLAN Notices},
+    issue_date	= {February 1980},
+    volume	= {15},
+    number	= {2},
+    month	= feb,
+    year	= {1980},
+    issn	= {0362-1340},
+    pages	= {30--42},
+    numpages	= {13},
+    url		= {http://doi.acm.org/10.1145/947586.947589},
+    doi		= {10.1145/947586.947589},
+    publisher	= {ACM},
+    address	= {New York, NY, USA}
 }
 
@@ -4723,5 +4801,5 @@
     title	= {{OS} and {DOS} {PL/I} Reference Manual},
     organization= {International Business Machines},
-    edition	= {first},
+    edition	= {1st},
     month	= sep,
     year	= 1981,
@@ -4843,5 +4921,5 @@
     booktitle	= {Parallel Programming in {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
     publisher	= {MIT Press},
-    address	= {Cambridge, MA, USA},
+    address	= {Cambridge},
     series	= {Scientific and Engineering Computation Series},
     pages	= {507-546},
@@ -4922,5 +5000,5 @@
     publisher	= {Springer--Verlag},
     year	= 1985,
-    edition	= {third},
+    edition	= {3rd},
     note	= {Revised by Andrew B. Mickel and James F. Miner, ISO Pascal Standard}
 }
@@ -4933,5 +5011,5 @@
     publisher	= {Springer--Verlag},
     year	= 1975,
-    edition	= {first},
+    edition	= {1st},
 }
 
@@ -4955,5 +5033,5 @@
     title	= {{P}ascal/{VS} Language Reference Manual},
     organization= {International Business Machines},
-    edition	= {first},
+    edition	= {1st},
     year	= 1981,
     note	= {Manual SH20-6168-1},
@@ -5107,4 +5185,5 @@
     title	= {Principles of Concurrent Programming},
     publisher	= {Prentice-Hall International},
+    address	= {Englewood Cliffs},
     year	= 1982,
 }
@@ -5114,4 +5193,5 @@
     title	= {Principles of Programming Languages},
     publisher	= {Prentice-Hall International},
+    address	= {Englewood Cliffs},
     year	= 1981,
     series	= {Series in Computer Science}
@@ -5185,4 +5265,5 @@
     title	= {Programming with {POSIX} Threads},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     series	= {Professional Computing},
     year	= 1997,
@@ -5194,5 +5275,5 @@
     author	= {J. T. Schwartz and R. B. K. Dewar and E. Dubinsky and E. Schonberg},
     title	= {Programming with Sets: An Introduction to {SETL}},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     year	= 1986,
 }
@@ -5235,5 +5316,5 @@
     key		= {C++14},
     title	= {Programming Languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
-    edition	= {fourth},
+    edition	= {4th},
     organization= {International Standard ISO/IEC 14882:2014 (E)},
     publisher   = {International Standard Organization},
@@ -5329,7 +5410,8 @@
     author	= {Niklaus Wirth},
     title	= {Programming in Modula-2},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
+    address	= {New York},
     year	= 1988,
-    edition	= {fourth},
+    edition	= {4th},
     series	= {Texts and Monographs in Computer Science},
 }
@@ -5343,5 +5425,5 @@
     month	= feb,
     year	= 1983,
-    note	= {Published by Springer-Verlag}
+    note	= {Springer, New York},
 }
 
@@ -5351,5 +5433,5 @@
     title	= {The Programming Language {Ada}: Reference Manual},
     organization= {United States Department of Defense},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     year	= 1981
 }
@@ -5505,22 +5587,22 @@
 
 @article{Grossman06,
- keywords = {Cyclone, existential types, polymorphism, type variables},
- contributer = {a3moss@plg},
- author = {Grossman, Dan},
- title = {Quantified Types in an Imperative Language},
- journal = toplas,
- issue_date = {May 2006},
- volume = {28},
- number = {3},
- month = may,
- year = {2006},
- issn = {0164-0925},
- pages = {429--475},
- numpages = {47},
- url = {http://doi.acm.org.proxy.lib.uwaterloo.ca/10.1145/1133651.1133653},
- doi = {10.1145/1133651.1133653},
- acmid = {1133653},
- publisher = {ACM},
- address = {New York, NY, USA},
+    keywords	= {Cyclone, existential types, polymorphism, type variables},
+    contributer	= {a3moss@plg},
+    author	= {Grossman, Dan},
+    title	= {Quantified Types in an Imperative Language},
+    journal	= toplas,
+    issue_date	= {May 2006},
+    volume	= {28},
+    number	= {3},
+    month	= may,
+    year	= {2006},
+    issn	= {0164-0925},
+    pages	= {429--475},
+    numpages	= {47},
+    url		= {http://doi.acm.org.proxy.lib.uwaterloo.ca/10.1145/1133651.1133653},
+    doi		= {10.1145/1133651.1133653},
+    acmid	= {1133653},
+    publisher	= {ACM},
+    address	= {New York, NY, USA},
 }
 
@@ -5569,5 +5651,5 @@
     title	= {{A}da Reference Manual},
     edition	= {International Standard {ISO}/{IEC} {8652:1995(E)} with {COR.1:2000}},
-    organization = {Intermetrics, Inc.},
+    organization= {Intermetrics, Inc.},
     month	= dec,
     year	= 1995,
@@ -5579,5 +5661,5 @@
     contributer	= {pabuhr@plg},
     title	= {Programming languages -- {Ada}},
-    edition	= {third},
+    edition	= {3rd},
     organization= {International Standard ISO/IEC 1989:2014},
     publisher   = {International Standard Organization},
@@ -5604,4 +5686,5 @@
     series	= {The Real-Time for Java Expert Group, {\small\textsf{http://\-www.rtj.org}}},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 2000,
 }
@@ -5755,4 +5838,13 @@
 % S
 
+@manual{Scala,
+    keywords	= {Scala programming language},
+    contributer	= {pabuhr@plg},
+    title	= {{Scala} Language Specification, Version 2.11},
+    organization= {\'{E}cole Polytechnique F\'{e}d\'{e}rale de Lausanne},
+    year	= 2016,
+    note	= {\href{http://www.scala-lang.org/files/archive/spec/2.11}{http://\-www.scala-lang.org/\-files/\-archive/\-spec/\-2.11}},
+}
+
 @inproceedings{Michael04,
     keywords	= {lock free, dynamic memory allocation},
@@ -5802,5 +5894,5 @@
     pages	= {51-67},
     editor	= {G. Kahn and D. B. MacQueen and G. D. Plotkin},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     note	= {Lecture Notes in Computer Science v. 173},
 }
@@ -5852,5 +5944,5 @@
     month	= may,
     year	= 2001,
-    note	= {{\small\textsf{http://www.python.org/peps/pep-0255.html}}},
+    note	= {\href{http://www.python.org/peps/pep-0255.html}{http://\-www.python.org/\-peps/\-pep-0255.html}},
 }
 
@@ -5871,20 +5963,20 @@
 
 @article{Pennello80,
-	contributer = {a3moss@uwaterloo.ca},
-	author = {Pennello, Tom and DeRemer, Frank and Meyers, Richard},
-	title = {A Simplified Operator Identification Scheme for {Ada}},
-	journal = {SIGPLAN Notices},
-	issue_date = {July-August 1980},
-	volume = {15},
-	number = {7 and 8},
-	month = jul,
-	year = {1980},
-	issn = {0362-1340},
-	pages = {82--87},
-	numpages = {6},
-	url = {http://doi.acm.org/10.1145/947680.947688},
-	doi = {10.1145/947680.947688},
-	publisher = {ACM},
-	address = {New York, NY, USA},
+    contributer	= {a3moss@uwaterloo.ca},
+    author	= {Pennello, Tom and DeRemer, Frank and Meyers, Richard},
+    title	= {A Simplified Operator Identification Scheme for {Ada}},
+    journal	= {SIGPLAN Notices},
+    issue_date	= {July-August 1980},
+    volume	= {15},
+    number	= {7 and 8},
+    month	= jul,
+    year	= {1980},
+    issn	= {0362-1340},
+    pages	= {82--87},
+    numpages	= {6},
+    url		= {http://doi.acm.org/10.1145/947680.947688},
+    doi		= {10.1145/947680.947688},
+    publisher	= {ACM},
+    address	= {New York, NY, USA},
 }
 
@@ -5927,14 +6019,14 @@
     year	= {1980},
     address	= {Lund, Sweden},
-    edition	= {second},
+    edition	= {2nd},
 }
 
 @book{Simula67,
-    author	= "O-J Dahl and B. Myhrhaug and K. Nygaard",
-    address	= "Oslo Norway",
+    author	= {O-J Dahl and B. Myhrhaug and K. Nygaard},
+    title	= {Simula67 Common Base Language},
     month	= oct,
     year	= 1970,
-    publisher	= "Norwegian Computing Center",
-    title	= "Simula67 Common Base Language"
+    publisher	= {Norwegian Com\-puting Center},
+    address	= {Oslo Norway},
 }
 
@@ -5945,4 +6037,5 @@
     title	= {Smalltalk-80: The Language and its Implementation},
     publisher	= {Addison-Wesley},
+    address	= {Reading},
     year	= 1983
 }
@@ -5966,6 +6059,7 @@
     author	= {R. E. Griswold and J. F. Poage and I. P. Polonsky},
     title	= {The SNOBOL4 Programming Language},
-    edition	= {second},
+    edition	= {2nd},
     publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1971,
 }
@@ -6073,5 +6167,5 @@
     author	= {R. H. Campbell and A. N. Habermann},
     title	= {The Specification of Process Synchronization by Path Expressions},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     year	= 1974,
     volume	= 16,
@@ -6117,5 +6211,5 @@
     title	= {A Standard {ML} Compiler},
     booktitle	= {Functional Programming Languages and Computer Architecture},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     series	= {Lecture Notes in Computer Science},
     volume	= 274,
@@ -6172,4 +6266,5 @@
     title	= {Structured Concurrent Programming with Operating System Applications},
     publisher	= {Addison-Wesley},
+    address	= {Boston},
     year	= 1978,
 }
@@ -6320,5 +6415,6 @@
     author	= {Gadi Taubenfeld},
     title	= {Synchronization Algorithms and Concurrent Programming},
-    publisher	= {Pearson/Prentice Hall},
+    publisher	= {Pearson/Prentice-Hall},
+    address	= {Harlow, England},
     year	= 2006,
 }
@@ -6380,7 +6476,8 @@
     author	= {Andrew Birrell and Mark R. Brown and Luca Cardelli and Jim Donahue and Lucille Glassman and John Gutag and Jim Harning and Bill Kalsow and Roy Levin and Greg Nelson},
     title	= {Systems Programming with Modula-3},
-    publisher	= {Prentice-Hall, Inc.},
+    publisher	= {Prentice-Hall},
+    address	= {Englewood Cliffs},
     year	= 1991,
-    series	= {Prentice Hall Series in Innovative Technology}
+    series	= {Prentice-Hall Series in Innovative Technology}
 }
 
@@ -6464,5 +6561,5 @@
     pages	= {408-423},
     editor	= {B. Robinet},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     note	= {Lecture Notes in Computer Science, v. 19},
     abstract	= {
@@ -6546,5 +6643,5 @@
     publisher	= {Holt Software Associates Inc.},
     year	= 1992,
-    edition	= {third},
+    edition	= {3rd},
 }
 
@@ -6566,4 +6663,5 @@
     title	= {Tutorial: Programming Language Design},
     publisher	= {Computer Society Press},
+    address	= {Los Alamitos},
     year	= 1980
 }
@@ -6635,11 +6733,12 @@
 % U
 
-@unpublished{uC++book,
-    keywords	= {control structure, concurrency},
+@book{uC++book,
+    keywords	= {control structure, concurrency, uC++},
     contributer	= {pabuhr@plg},
     author	= {Peter A. Buhr},
-    title	= {Understanding Control Flow with Concurrent Programming using $\mu${C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
-    year	= 1999,
-    note	= {Textbook in preparation}
+    title	= {Understanding Control Flow: Concurrent Programming using $\mu${C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}}},
+    publisher	= {Springer},
+    address	= {Switzerland},
+    year	= 2016,
 }
 
@@ -6664,5 +6763,5 @@
     booktitle	= {Proceedings of the International Workshop on Memory Management},
     location	= {St. Malo, France},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
     series	= {Lecture Notes in Computer Science},
     volume	= 637,
@@ -6788,4 +6887,5 @@
     title	= {VAX-11 Architecture Reference Manual},
     publisher	= {Digital Press},
+    address	= {Bedford},
     month	= may,
     year	= 1982,
@@ -6796,4 +6896,5 @@
     title	= {{VAX/VMS} Internals and Data Structures Version 4.4},
     publisher	= {Digital Press},
+    address	= {Bedford},
     year	= 1988,
 }
@@ -6805,5 +6906,6 @@
     title	= {Verifying a Simplification of Mutual Exclusion by {L}ycklama--{H}adzilacos},
     journal	= {Acta Informatica},
-    publisher	= {Springer-Verlag},
+    publisher	= {Springer},
+    address	= {New York},
     year	= {2013},
     volume	= {50},
@@ -6871,5 +6973,5 @@
     month	= jun,
     year	= 1985,
-    note	= {\textsf{http://www.hpl.hp.com/\-techreports/\-tandem/\-TR-85.7.pdf}},
+    note	= {\href{http://www.hpl.hp.com/techreports/tandem/TR-85.7.pdf}{http://www.hpl.hp.com/\-techreports/\-tandem/\-TR-85.7.pdf}},
 }
 
Index: doc/proposals/concurrency/concurrency.tex
===================================================================
--- doc/proposals/concurrency/concurrency.tex	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ doc/proposals/concurrency/concurrency.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -1,10 +1,10 @@
 % requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
 
-% inline code ©...© (copyright symbol) emacs: C-q M-)
-% red highlighting ®...® (registered trademark symbol) emacs: C-q M-.
-% blue highlighting ß...ß (sharp s symbol) emacs: C-q M-_
-% green highlighting ¢...¢ (cent symbol) emacs: C-q M-"
-% LaTex escape §...§ (section symbol) emacs: C-q M-'
-% keyword escape ¶...¶ (pilcrow symbol) emacs: C-q M-^
+% inline code �...� (copyright symbol) emacs: C-q M-)
+% red highlighting �...� (registered trademark symbol) emacs: C-q M-.
+% blue highlighting �...� (sharp s symbol) emacs: C-q M-_
+% green highlighting �...� (cent symbol) emacs: C-q M-"
+% LaTex escape �...� (section symbol) emacs: C-q M-'
+% keyword escape �...� (pilcrow symbol) emacs: C-q M-^
 % math escape $...$ (dollar symbol)
 
@@ -14,10 +14,10 @@
 
 % Latex packages used in the document.
-\usepackage[T1]{fontenc}                                % allow Latin1 (extended ASCII) characters
+\usepackage[T1]{fontenc}					% allow Latin1 (extended ASCII) characters
 \usepackage{textcomp}
 \usepackage[latin1]{inputenc}
 \usepackage{fullpage,times,comment}
 \usepackage{epic,eepic}
-\usepackage{upquote}									% switch curled `'" to straight
+\usepackage{upquote}						% switch curled `'" to straight
 \usepackage{calc}
 \usepackage{xspace}
@@ -25,15 +25,15 @@
 \usepackage{tabularx}
 \usepackage[acronym]{glossaries}
-\usepackage{varioref}								% extended references
+\usepackage{varioref}						% extended references
 \usepackage{inconsolata}
-\usepackage{listings}									% format program code
-\usepackage[flushmargin]{footmisc}						% support label/reference in footnote
-\usepackage{latexsym}                                   % \Box glyph
-\usepackage{mathptmx}                                   % better math font with "times"
+\usepackage{listings}						% format program code
+\usepackage[flushmargin]{footmisc}				% support label/reference in footnote
+\usepackage{latexsym}						% \Box glyph
+\usepackage{mathptmx}						% better math font with "times"
 \usepackage[usenames]{color}
 \usepackage[pagewise]{lineno}
 \usepackage{fancyhdr}
 \renewcommand{\linenumberfont}{\scriptsize\sffamily}
-\input{common}                                          % bespoke macros used in the document
+\input{style}							% bespoke macros used in the document
 \usepackage[dvips,plainpages=false,pdfpagelabels,pdfpagemode=UseNone,colorlinks=true,pagebackref=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref=true,breaklinks=true]{hyperref}
 \usepackage{breakurl}
@@ -44,5 +44,5 @@
 \renewcommand{\UrlFont}{\small\sf}
 
-\setlength{\topmargin}{-0.45in}							% move running title into header
+\setlength{\topmargin}{-0.45in}				% move running title into header
 \setlength{\headsep}{0.25in}
 
@@ -86,22 +86,43 @@
 \title{Concurrency in \CFA}
 \author{Thierry Delisle \\
-Dept. of Computer Science, University of Waterloo, \\ Waterloo, Ontario, Canada
+School of Computer Science, University of Waterloo, \\ Waterloo, Ontario, Canada
 }
 
 \maketitle
+
+% ### #     # ####### ######  #######
+%  #  ##    #    #    #     # #     #
+%  #  # #   #    #    #     # #     #
+%  #  #  #  #    #    ######  #     #
+%  #  #   # #    #    #   #   #     #
+%  #  #    ##    #    #    #  #     #
+% ### #     #    #    #     # #######
+
 \section{Introduction}
-This proposal provides a minimal core concurrency API that is both simple, efficient and can be reused to build higher-level features. The simplest possible core is a thread and a lock but this low-level approach is hard to master. An easier approach for users is to support higher-level construct as the basis of the concurrency in \CFA.
-Indeed, for highly productive parallel programming high-level approaches are much more popular\cite{HPP:Study}. Examples are task based parallelism, message passing, implicit threading.
-
-There are actually two problems that need to be solved in the design of the concurrency for a language. Which concurrency tools are available to the users and which parallelism tools are available. While these two concepts are often seen together, they are in fact distinct concepts that require different sorts of tools\cite{Buhr05a}. Concurrency tools need to handle mutual exclusion and synchronization while parallelism tools are more about performance, cost and resource utilization.
+This proposal provides a minimal core concurrency API that is both simple, efficient and can be reused to build higher-level features. The simplest possible concurrency core is a thread and a lock but this low-level approach is hard to master. An easier approach for users is to support higher-level constructs as the basis of the concurrency in \CFA. Indeed, for highly productive parallel programming, high-level approaches are much more popular~\cite{HPP:Study}. Examples are task based parallelism, message passing and implicit threading.
+
+There are actually two problems that need to be solved in the design of the concurrency for a programming language. Which concurrency tools are available to the users and which parallelism tools are available. While these two concepts are often seen together, they are in fact distinct concepts that require different sorts of tools~\cite{Buhr05a}. Concurrency tools need to handle mutual exclusion and synchronization, while parallelism tools are more about performance, cost and resource utilization.
+
+%  #####  ####### #     #  #####  #     # ######  ######  ####### #     #  #####  #     #
+% #     # #     # ##    # #     # #     # #     # #     # #       ##    # #     #  #   #
+% #       #     # # #   # #       #     # #     # #     # #       # #   # #         # #
+% #       #     # #  #  # #       #     # ######  ######  #####   #  #  # #          #
+% #       #     # #   # # #       #     # #   #   #   #   #       #   # # #          #
+% #     # #     # #    ## #     # #     # #    #  #    #  #       #    ## #     #    #
+%  #####  ####### #     #  #####   #####  #     # #     # ####### #     #  #####     #
 
 \section{Concurrency}
-Several tool can be used to solve concurrency challenges. Since these challenges always appear with the use of mutable shared state, some languages and libraries simply disallow mutable shared-state (Erlang\cite{Erlang}, Haskell\cite{Haskell}, Akka (Scala)\cite{Akka}). In these paradigms, interaction among concurrent objects rely on message passing or other paradigms that often closely relate to networking concepts. However, in imperative or OO languages, these approaches entail a clear distinction between concurrent and non-concurrent paradigms (i.e. message passing versus routine call). Which in turns mean that programmers need to learn two sets of designs patterns in order to be effective. Approaches based on shared memory are more closely related to non-concurrent paradigms since they often rely on non-concurrent constructs like routine calls and objects. At a lower level these can be implemented as locks and atomic operations. However, for productivity reasons it is desireable to have a higher-level construct to be the core concurrency paradigm\cite{HPP:Study}. This project proposes Monitors\cite{Hoare74} as the core concurrency construct.
-\\
-
-Finally, an approach that is worth mentionning because it is gaining in popularity is transactionnal memory\cite{Dice10}. However, the performance and feature set is currently too restrictive to be possible to add such a paradigm to a language like C or \CC\cit, which is why it was rejected as the core paradigm for concurrency in \CFA.
+Several tool can be used to solve concurrency challenges. Since these challenges always appear with the use of mutable shared state, some languages and libraries simply disallow mutable shared-state (Erlang~\cite{Erlang}, Haskell~\cite{Haskell}, Akka (Scala)~\cite{Akka}). In these paradigms, interaction among concurrent objects relies on message passing~\cite{Thoth,Harmony,V-Kernel} or other paradigms that closely relate to networking concepts. However, in languages that use routine calls as their core abstraction mechanism, these approaches force a clear distinction between concurrent and non-concurrent paradigms (i.e. message passing versus routine call). Which in turn means that, in order to be effective, programmers need to learn two sets of designs patterns. This distinction can be hidden away in library code, but effective use of the librairy will still have to take both paradigms into account. Approaches based on shared memory are more closely related to non-concurrent paradigms since they often rely on non-concurrent constructs like routine calls and objects. At a lower level these can be implemented as locks and atomic operations. Many such mechanisms have been proposed, including semaphores~\cite{Dijkstra68b} and path expressions~\cite{Campbell74}. However, for productivity reasons it is desireable to have a higher-level construct to be the core concurrency paradigm~\cite{HPP:Study}. An approach that is worth mentionning because it is gaining in popularity is transactionnal memory~\cite{Dice10}[Check citation]. While this approach is even pursued by system languages like \CC\cit, the performance and feature set is currently too restrictive to be possible to add such a paradigm to a language like C or \CC\cit, which is why it was rejected as the core paradigm for concurrency in \CFA. One of the most natural, elegant, and efficient mechanisms for synchronization and communication, especially for shared memory systems, is the \emph{monitor}. Monitors were first proposed by Brinch Hansen~\cite{Hansen73} and later described and extended by C.A.R.~Hoare~\cite{Hoare74}. Many programming languages---e.g., Concurrent Pascal~\cite{ConcurrentPascal}, Mesa~\cite{Mesa}, Modula~\cite{Modula-2}, Turing~\cite{Turing:old}, Modula-3~\cite{Modula-3}, NeWS~\cite{NeWS}, Emerald~\cite{Emerald}, \uC~\cite{Buhr92a} and Java~\cite{Java}---provide monitors as explicit language constructs. In addition, operating-system kernels and device drivers have a monitor-like structure, although they often use lower-level primitives such as semaphores or locks to simulate monitors. For these reasons, this project proposes Monitors as the core concurrency construct.
+
+% #     # ####### #     # ### ####### ####### ######   #####
+% ##   ## #     # ##    #  #     #    #     # #     # #     #
+% # # # # #     # # #   #  #     #    #     # #     # #
+% #  #  # #     # #  #  #  #     #    #     # ######   #####
+% #     # #     # #   # #  #     #    #     # #   #         #
+% #     # #     # #    ##  #     #    #     # #    #  #     #
+% #     # ####### #     # ###    #    ####### #     #  #####
 
 \subsection{Monitors}
-A monitor is a set of routines that ensure mutual exclusion when accessing shared state. This concept is generally associated with Object-Oriented Languages like Java\cite{Java} or \uC\cite{uC++book} but does not strictly require OOP semantics. The only requirements is the ability to declare a handle to a shared object and a set of routines that act on it :
+A monitor is a set of routines that ensure mutual exclusion when accessing shared state. This concept is generally associated with Object-Oriented Languages like Java~\cite{Java} or \uC~\cite{uC++book} but does not strictly require OOP semantics. The only requirements is the ability to declare a handle to a shared object and a set of routines that act on it :
 \begin{lstlisting}
 	typedef /*some monitor type*/ monitor;
@@ -114,9 +135,16 @@
 \end{lstlisting}
 
+%  #####     #    #       #
+% #     #   # #   #       #
+% #        #   #  #       #
+% #       #     # #       #
+% #       ####### #       #
+% #     # #     # #       #
+%  #####  #     # ####### #######
+
 \subsubsection{Call semantics} \label{call}
-The above example of monitors already displays some of their intrinsic caracteristics. Indeed, it is necessary to use pass-by-reference over pass-by-value for monitor routines. This semantics is important because at their core, monitors are implicit mutual exclusion objects (locks), and these objects cannot be copied. Therefore, monitors are implicitly non-copyable.
-\\
-
-Another aspect to consider is when a monitor acquires its mutual exclusion. Indeed, a monitor may need to be passed through multiple helper routines that do not acquire the monitor mutual exclusion on entry. Examples of this can be both generic helper routines (\code{swap}, \code{sort}, etc.) or specific helper routines like the following example :
+The above monitor example displays some of their intrinsic characteristics. Indeed, it is necessary to use pass-by-reference over pass-by-value for monitor routines. This semantics is important because at their core, monitors are implicit mutual-exclusion objects (locks), and these objects cannot be copied. Therefore, monitors are implicitly non-copyable.
+
+Another aspect to consider is when a monitor acquires its mutual exclusion. For example, a monitor may need to be passed through multiple helper routines that do not acquire the monitor mutual exclusion on entry. Pass through can be both generic helper routines (\code{swap}, \code{sort}, etc.) or specific helper routines like the following to implement an atomic large counter :
 
 \begin{lstlisting}
@@ -124,18 +152,16 @@
 
 	void ?{}(counter_t & nomutex this);
-	int ++?(counter_t & mutex this);
-	void ?{}(Int * this, counter_t & mutex cnt);
+	size_t ++?(counter_t & mutex this);
+
+	//need for mutex is platform dependent here
+	void ?{}(size_t * this, counter_t & mutex cnt);
 \end{lstlisting}
 *semantics of the declaration of \code{mutex struct counter_t} are discussed in details in section \ref{data}
-\\
-
-This example is of a monitor implementing an atomic counter. Here, the constructor uses the \code{nomutex} keyword to signify that it does not acquire the coroutine mutual exclusion when constructing. This is because object not yet constructed should never be shared and therefore do not require mutual exclusion. The prefix increment operator
-uses \code{mutex} to protect the incrementing process from race conditions. Finally, we have a conversion operator from \code{counter_t} to \code{Int}. This conversion may or may not require the \code{mutex} key word depending whether or not reading an \code{Int} is an atomic operation or not.
-\\
-
-Having both \code{mutex} and \code{nomutex} keywords could be argued to be redundant based on the meaning of a routine having neither of these keywords. If there were a meaning to routine \code{void foo(counter_t & this)} then one could argue that it should be to default to the safest option : \code{mutex}. On the other hand, the option of having routine \code{void foo(counter_t & this)} mean \code{nomutex} is unsafe by default and may easily cause subtle errors. It can be argued that this is the more "normal" behavior, \code{nomutex} effectively stating explicitly that "this routine has nothing special". An other alternative is to make one of these keywords mandatory, which would provide the same semantics but without the ambiguity of supporting routine \code{void foo(counter_t & this)}. Mandatory keywords would also have the added benefice of being more clearly self-documented but at the cost of extra typing. In the end, which solution should be picked is still up for debate. For the reminder of this proposal, the explicit approach will be used for the sake of clarity.
-\\
-
-Regardless of which keyword is kept, it is important to establish when mutex/nomutex may be used depending on type parameters.
+
+Here, the constructor(\code(?{})) uses the \code{nomutex} keyword to signify that it does not acquire the monitor mutual exclusion when constructing. This semantics is because object not yet constructed should never be shared and therefore do not require mutual exclusion. The prefix increment operator uses \code{mutex} to protect the incrementing process from race conditions. Finally, there is a conversion operator from \code{counter_t} to \code{size_t}. This conversion may or may not require the \code{mutex} key word depending on whether or not reading an \code{size_t} is an atomic operation or not.
+
+Having both \code{mutex} and \code{nomutex} keywords could be argued to be redundant based on the meaning of a routine having neither of these keywords. If there were a meaning to routine \code{void foo(counter_t & this)} then one could argue that it should default to the safest option : \code{mutex}. On the other hand, the option of having routine \code{void foo(counter_t & this)} mean \code{nomutex} is unsafe by default and may easily cause subtle errors. It can be argued that this is the more "normal" behavior, \code{nomutex} effectively stating explicitly that "this routine has nothing special". Another alternative is to make having exactly one of these keywords mandatory, which would provide the same semantics but without the ambiguity of supporting routine \code{void foo(counter_t & this)}. Mandatory keywords would also have the added benefice of being self-documented but at the cost of extra typing. In the end, which solution should be picked is still up for debate. For the reminder of this proposal, the explicit approach is used for clarity.
+
+Regardless of which keyword is kept, it is important to establish when mutex/nomutex may be used as a type qualifier. Consider :
 \begin{lstlisting}
 	int f1(monitor & mutex m);
@@ -146,5 +172,13 @@
 \end{lstlisting}
 
-The problem is to indentify which object(s) should be acquired. Furthermore we also need to acquire each objects only once. In case of simple routines like \code{f1} and \code{f2} it is easy to identify an exhaustive list of objects to acquire on entering. Adding indirections (\code{f3}) still allows the compiler and programmer to indentify which object will be acquired. However, adding in arrays (\code{f4}) makes it much harder. Array lengths aren't necessarily known in C and even then making sure we only acquire objects once becomes also none trivial. This can be extended to absurd limits like \code{f5} which uses a custom graph of monitors. To keep everyone as sane as possible\cite{Chicken}, this projects imposes the requirement that a routine may only acquire one monitor per parameter and it must be the type of the parameter (ignoring potential qualifiers and indirections).
+The problem is to indentify which object(s) should be acquired. Furthermore, each object needs to be acquired only once. In case of simple routines like \code{f1} and \code{f2} it is easy to identify an exhaustive list of objects to acquire on entering. Adding indirections (\code{f3}) still allows the compiler and programmer to indentify which object is acquired. However, adding in arrays (\code{f4}) makes it much harder. Array lengths are not necessarily known in C and even then making sure we only acquire objects once becomes also none trivial. This can be extended to absurd limits like \code{f5}, which uses a graph of monitors. To keep everyone as sane as possible~\cite{Chicken}, this projects imposes the requirement that a routine may only acquire one monitor per parameter and it must be the type of the parameter (ignoring potential qualifiers and indirections). Also note that while routine \code{f3} can be supported, meaning that monitor \code{**m} will be acquired, passing an array to this routine would be type safe and result in undefined behavior. For this reason, it would also be reasonnable to disallow mutex in the context where arrays may be passed.
+
+% ######     #    #######    #
+% #     #   # #      #      # #
+% #     #  #   #     #     #   #
+% #     # #     #    #    #     #
+% #     # #######    #    #######
+% #     # #     #    #    #     #
+% ######  #     #    #    #     #
 
 \subsubsection{Data semantics} \label{data}
@@ -160,32 +194,27 @@
 
 	int ++?(counter_t & mutex this) {
-		return ++this->value;
-	}
-
+		return ++this.value;
+	}
+
+	//need for mutex is platform dependent here
 	void ?{}(int * this, counter_t & mutex cnt) {
 		*this = (int)cnt;
 	}
 \end{lstlisting}
-\begin{tabular}{ c c }
-Thread 1 & Thread 2 \\
-\begin{lstlisting}
-	void f(counter_t & mutex c) {
-		for(;;) {
-			sout | (int)c | endl;
-		}
-	}
-\end{lstlisting} &\begin{lstlisting}
-	void g(counter_t & mutex c) {
-		for(;;) {
-			++c;
-		}
-	}
-
+
+This simple counter offers an example of monitor usage. Notice how the counter is used without any explicit synchronisation and yet supports thread-safe semantics for both reading and writting :
+\begin{center}
+\begin{tabular}{c @{\hskip 0.35in} c @{\hskip 0.35in} c}
+\begin{lstlisting}
+	counter_t cnt;
+
+	thread 1 : cnt++;
+	thread 2 : cnt++;
+	thread 3 : cnt++;
+	  ...
+	thread N : cnt++;
 \end{lstlisting}
 \end{tabular}
-\\
-
-
-This simple counter offers an example of monitor usage. Notice how the counter is used without any explicit synchronisation and yet supports thread-safe semantics for both reading and writting. \\
+\end{center}
 
 These simple mutual exclusion semantics also naturally expand to multi-monitor calls.
@@ -198,5 +227,5 @@
 \end{lstlisting}
 
-This code acquires both locks before entering the critical section. In practice, writing multi-locking routines that can not lead to deadlocks can be very tricky. Having language level support for such feature is therefore a significant asset for \CFA. However, this does have significant repercussions relating to scheduling (see \ref{insched} and \ref{extsched}). Furthermore, the ability to acquire multiple monitors at the same time does incur a significant pitfall even without looking into scheduling. For example :
+This code acquires both locks before entering the critical section (Referenced as \gls{group-acquire} from now on). In practice, writing multi-locking routines that can not lead to deadlocks can be tricky. Having language support for such a feature is therefore a significant asset for \CFA. In the case presented above, \CFA guarantees that the order of aquisition will be consistent across calls to routines using the same monitors as arguments. However, since \CFA monitors use multi-acquiring locks users can effectively force the acquiring order. For example, notice which routines use \code{mutex}/\code{nomutex} and how this affects aquiring order :
 \begin{lstlisting}
 	void foo(A & mutex a, B & mutex a) {
@@ -217,13 +246,44 @@
 \end{lstlisting}
 
-Recursive mutex routine calls are allowed in \CFA but if not done carefully it can lead to nested monitor call problems\cite{Lister77}. These problems which are a specific  implementation of the lock acquiring order problem. In the example above, the user uses implicit ordering in the case of function \code{bar} but explicit ordering in the case of \code{baz}. This subtle mistake can mean that calling these two functions concurrently will lead to deadlocks, depending on the implicit ordering matching the explicit ordering. As shown on several occasion\cit, there isn't really any solutions to this problem, users simply need to be carefull when acquiring multiple monitors at the same time.
+Such a use will lead to nested monitor call problems~\cite{Lister77}, which are a specific implementation of the lock acquiring order problem. In the example above, the user uses implicit ordering in the case of function \code{foo} but explicit ordering in the case of \code{bar} and \code{baz}. This subtle mistake means that calling these routines concurrently may lead to deadlocks, depending on the implicit ordering matching the explicit ordering. As shown on several occasion\cit, solving this problems requires to :
+\begin{enumerate}
+	\item Dynamically track the monitor call order.
+	\item Implement rollback semantics.
+\end{enumerate}
+
+While the first requirement is already a significant constraint on the system, implementing a general rollback semantics in a C-like language is prohibitively complex \cit. In \CFA users simply need to be carefull when acquiring multiple monitors at the same time.
+
+% ######  ####### #######    #    ### #        #####
+% #     # #          #      # #    #  #       #     #
+% #     # #          #     #   #   #  #       #
+% #     # #####      #    #     #  #  #        #####
+% #     # #          #    #######  #  #             #
+% #     # #          #    #     #  #  #       #     #
+% ######  #######    #    #     # ### #######  #####
+%
+% 	      ######  ####### #       #     # #     # ####### ######  #     #
+% 	      #     # #     # #        #   #  ##   ## #     # #     # #     #
+% 	      #     # #     # #         # #   # # # # #     # #     # #     #
+%  #####    ######  #     # #          #    #  #  # #     # ######  #######
+% 	      #       #     # #          #    #     # #     # #   #   #     #
+% 	      #       #     # #          #    #     # #     # #    #  #     #
+% 	      #       ####### #######    #    #     # ####### #     # #     #
 
 \subsubsection{Implementation Details: Interaction with polymorphism}
-At first glance, interaction between monitors and \CFA's concept of polymorphism seem complexe to support. However, it can be reasoned that entry-point locking can solve most of the issues that could be present with polymorphism.
-
-First of all, interaction between \code{otype} polymorphism and monitors is impossible since monitors do not support copying. Therefore the main question is how to support \code{dtype} polymorphism. We must remember that monitors' main purpose is to ensure mutual exclusion when accessing shared data. This implies that mutual exclusion is only required for routines that do in fact access shared data. However, since \code{dtype} polymorphism always handle incomplete types (by definition) no \code{dtype} polymorphic routine can access shared data since the data would require knowledge about the type. Therefore the only concern when combining \code{dtype} polymorphism and monitors is to protect access to routines. With callsite-locking, this would require significant amount of work since any \code{dtype} routine could have to obtain some lock before calling a routine. However, with entry-point-locking calling a monitor routine becomes exactly the same as calling it from anywhere else.
+At first glance, interaction between monitors and \CFA's concept of polymorphism seem complex to support. However, it can be reasoned that entry-point locking can solve most of the issues that could be present with polymorphism.
+
+First of all, interaction between \code{otype} polymorphism and monitors is impossible since monitors do not support copying. Therefore, the main question is how to support \code{dtype} polymorphism. Since a monitor's main purpose is to ensure mutual exclusion when accessing shared data, this implies that mutual exclusion is only required for routines that do in fact access shared data. However, since \code{dtype} polymorphism always handles incomplete types (by definition), no \code{dtype} polymorphic routine can access shared data since the data requires knowledge about the type. Therefore the only concern when combining \code{dtype} polymorphism and monitors is to protect access to routines. \Gls{callsite-locking}\footnotemark would require a significant amount of work, since any \code{dtype} routine may have to obtain some lock before calling a routine, depending on whether or not the type passed is a monitor. However, with \gls{entry-point-locking}\footnotemark[\value{footnote}] calling a monitor routine becomes exactly the same as calling it from anywhere else.
+\footnotetext{See glossary for a definition of \gls{callsite-locking} and \gls{entry-point-locking}}
+
+% ### #     # #######         #####   #####  #     # ####### ######
+%  #  ##    #    #           #     # #     # #     # #       #     #
+%  #  # #   #    #           #       #       #     # #       #     #
+%  #  #  #  #    #            #####  #       ####### #####   #     #
+%  #  #   # #    #    ###          # #       #     # #       #     #
+%  #  #    ##    #    ###    #     # #     # #     # #       #     #
+% ### #     #    #    ###     #####   #####  #     # ####### ######
 
 \subsection{Internal scheduling} \label{insched}
-Monitors should also be able to schedule what threads access it as a mean of synchronization. Internal scheduling is one of the simple examples of such a feature. It allows users to declare condition variables and wait for them to be signaled. Here is a simple example of such a technique :
+Monitors also need to schedule waiting threads within it as a mean of synchronization. Internal scheduling is one of the simple examples of such a feature. It allows users to declare condition variables and have threads wait and signaled from them. Here is a simple example of such a technique :
 
 \begin{lstlisting}
@@ -243,6 +303,5 @@
 \end{lstlisting}
 
-Here routine \code{foo} waits on the \code{signal} from \code{bar} before making further progress, effectively ensuring a basic ordering. This semantic can easily be extended to multi-monitor calls by offering the same guarantee.
-
+Here routine \code{foo} waits for the \code{signal} from \code{bar} before making further progress, effectively ensuring a basic ordering. This semantic can easily be extended to multi-monitor calls by offering the same guarantee.
 \begin{center}
 \begin{tabular}{ c @{\hskip 0.65in} c }
@@ -250,5 +309,5 @@
 \begin{lstlisting}
 void foo(monitor & mutex a,
-         monitor & mutex b) {
+           monitor & mutex b) {
 	//...
 	wait(a.e);
@@ -259,5 +318,5 @@
 \end{lstlisting} &\begin{lstlisting}
 void bar(monitor & mutex a,
-         monitor & mutex b) {
+           monitor & mutex b) {
 	signal(a.e);
 }
@@ -269,6 +328,5 @@
 \end{tabular}
 \end{center}
-
-A direct extension of the single monitor semantics would be to release all locks when waiting and transferring ownership of all locks when signalling. However, for the purpose of synchronization it may be usefull to only release some of the locks but keep others. On the technical side, partially releasing lock is feasible but from the user perspective a choice must be made for the syntax of this feature. It is possible to do without any extra syntax by relying on order of acquisition (Note that here the use of helper routines is irrelevant, only routines the acquire mutual exclusion have an impact on internal scheduling):
+A direct extension of the single monitor semantics is to release all locks when waiting and transferring ownership of all locks when signalling. However, for the purpose of synchronization it may be usefull to only release some of the locks but keep others. It is possible to support internal scheduling and \gls{group-acquire} without any extra syntax by relying on order of acquisition. Here is an example of the different contexts in which internal scheduling can be used. (Note that here the use of helper routines is irrelevant, only routines acquire mutual exclusion have an impact on internal scheduling):
 
 \begin{center}
@@ -280,5 +338,6 @@
 
 void foo(monitor & mutex a,
-         monitor & mutex b) {
+           monitor & mutex b) {
+
 	wait(e);
 }
@@ -294,10 +353,10 @@
 
 void bar(monitor & mutex a,
-         monitor & nomutex b) {
+           monitor & nomutex b) {
 	foo(a,b);
 }
 
 void foo(monitor & mutex a,
-         monitor & mutex b) {
+           monitor & mutex b) {
 	wait(e);
 }
@@ -308,10 +367,10 @@
 
 void bar(monitor & mutex a,
-         monitor & nomutex b) {
-	foo(a,b);
+           monitor & nomutex b) {
+	baz(a,b);
 }
 
 void baz(monitor & nomutex a,
-         monitor & mutex b) {
+           monitor & mutex b) {
 	wait(e);
 }
@@ -322,149 +381,86 @@
 \end{center}
 
-This can be interpreted in two different ways :
-\begin{flushleft}
-\begin{enumerate}
-	\item \code{wait} atomically releases the monitors acquired by the inner-most routine, \underline{ignoring} nested calls.
-	\item \code{wait} atomically releases the monitors acquired by the inner-most routine, \underline{considering} nested calls.
-\end{enumerate}
-\end{flushleft}
-While the difference between these two is subtle, it has a significant impact. In the first case it means that the calls to \code{foo} would behave the same in Context 1 and 2. This semantic would also mean that the call to \code{wait} in routine \code{baz} would only release \code{monitor b}. While this may seem intuitive with these examples, it does have one significant implication, it creates a strong distinction between acquiring multiple monitors in sequence and acquiring the same monitors simulatenously, i.e. :
+Note that in \CFA, \code{condition} have no particular need to be stored inside a monitor, beyond any software engineering reasons. Context 1 is the simplest way of acquiring more than one monitor (\gls{group-acquire}), using a routine wiht multiple parameters having the \code{mutex} keyword. Context 2 also uses \gls{group-acquire} as well in routine \code{foo}. However, the routine is called by routine \code{bar} which only acquires monitor \code{a}. Since monitors can be acquired multiple times this will not cause a deadlock by itself but it does force the acquiring order to \code{a} then \code{b}. Context 3 also forces the acquiring order to be \code{a} then \code{b} but does not use \gls{group-acquire}. The previous example tries to illustrate the semantics that must be established to support releasing monitors in a \code{wait} statement. In all cases the behavior of the wait statment is to release all the locks that were acquired my the inner-most monitor call. That is \code{a & b} in context 1 and 2 and \code{b} only in context 3. Here are a few other examples of this behavior.
+
 
 \begin{center}
-\begin{tabular}{c @{\hskip 0.35in} c @{\hskip 0.35in} c}
-\begin{lstlisting}
-enterMonitor(a);
-enterMonitor(b);
-// do stuff
-leaveMonitor(b);
-leaveMonitor(a);
-\end{lstlisting} & != &\begin{lstlisting}
-enterMonitor(a);
-enterMonitor(a, b);
-// do stuff
-leaveMonitor(a, b);
-leaveMonitor(a);
+\begin{tabular}{|c|c|c|}
+\begin{lstlisting}
+condition e;
+
+//acquire a
+void foo(monitor & nomutex a,
+           monitor & mutex b) {
+	bar(a,b);
+}
+
+//acquire a
+void bar(monitor & mutex a,
+           monitor & nomutex b) {
+
+	//release a
+	//keep b
+	wait(e);
+}
+
+foo(a, b);
+\end{lstlisting} &\begin{lstlisting}
+condition e;
+
+//acquire a & b
+void foo(monitor & mutex a,
+           monitor & mutex b) {
+	bar(a,b);
+}
+
+//acquire b
+void bar(monitor & mutex a,
+           monitor & nomutex b) {
+
+   	//release b
+	//keep a
+	wait(e);
+}
+
+foo(a, b);
+\end{lstlisting} &\begin{lstlisting}
+condition e;
+
+//acquire a & b
+void foo(monitor & mutex a,
+           monitor & mutex b) {
+	bar(a,b);
+}
+
+//acquire none
+void bar(monitor & nomutex a,
+           monitor & nomutex b) {
+
+	//release a & b
+	//keep none
+	wait(e);
+}
+
+foo(a, b);
 \end{lstlisting}
 \end{tabular}
 \end{center}
-
-This is not intuitive because even if both methods display the same monitors state both inside and outside the critical section respectively, the behavior is different. Furthermore, the actual acquiring order will be exaclty the same since acquiring a monitor from inside its mutual exclusion is a no-op. This means that even if the data and the actual control flow are the same using both methods, the behavior of the \code{wait} will be different. The alternative is option 2, that is releasing acquired monitors, \underline{considering} nesting. This solves the issue of having the two acquiring method differ at the cost of making routine \code{foo} behave differently depending on from which context it is called (Context 1 or 2). Indeed in Context 2, routine \code{foo} actually behaves like routine \code{baz} rather than having the same behavior than in Context 1. The fact that both implicit approaches can be unintuitive depending on the perspective may be a sign that the explicit approach is superior. For this reason this \CFA does not support implicit monitor releasing and uses explicit semantics.
+Note the right-most example which uses a helper routine and therefore is not relevant to find which monitors will be released.
+
+These semantics imply that in order to release of subset of the monitors currently held, users must write (and name) a routine that only acquires the desired subset and simply calls wait. While users can use this method, \CFA offers the \code{wait_release}\footnote{Not sure if an overload of \code{wait} would work...} which will release only the specified monitors.
+
+Regardless of the context in which the \code{wait} statement is used, \code{signal} must used holding the same set of monitors. In all cases, signal only needs a single parameter, the condition variable that needs to be signalled. But \code{signal} needs to be called from the same monitor(s) that call to \code{wait}. Otherwise, mutual exclusion cannot be properly transferred back to the waiting monitor.
+
+Finally, an additional semantic which can be very usefull is the \code{signal_block} routine. This routine behaves like signal for all of the semantics discussed above, but with the subtelty that mutual exclusion is transferred to the waiting task immediately rather than wating for the end of the critical section.
 \\
 
-The following examples shows three alternatives of explicit wait semantics :
-\\
-
-\begin{center}
-\begin{tabular}{|c|c|c|}
-Case 1 & Case 2 & Case 3 \\
-Branding on construction & Explicit release list & Explicit ignore list \\
-\hline
-\begin{lstlisting}
-void foo(monitor & mutex a,
-         monitor & mutex b,
-	   condition & c)
-{
-	// Releases monitors
-	// branded in ctor
-	wait(c);
-}
-
-monitor a;
-monitor b;
-condition1 c1 = {a};
-condition2 c2 = {a, b};
-
-//Will release only a
-foo(a,b,c1);
-
-//Will release a and b
-foo(a,b,c2);
-\end{lstlisting} &\begin{lstlisting}
-void foo(monitor & mutex a,
-         monitor & mutex b,
-	   condition & c)
-{
-	// Releases monitor a
-	// Holds monitor b
-	waitRelease(c, [a]);
-}
-
-monitor a;
-monitor b;
-condition c;
-
-
-
-foo(a,b,c);
-
-
-
-\end{lstlisting} &\begin{lstlisting}
-void foo(monitor & mutex a,
-         monitor & mutex b,
-	   condition & c)
-{
-	// Releases monitor a
-	// Holds monitor b
-	waitHold(c, [b]);
-}
-
-monitor a;
-monitor b;
-condition c;
-
-
-
-foo(a,b,c);
-
-
-
-\end{lstlisting}
-\end{tabular}
-\end{center}
-(Note : Case 2 and 3 use tuple semantics to pass a variable length list of elements.)
-\\
-
-All these cases have their pros and cons. Case 1 is more distinct because it means programmers need to be carefull about where the condition is initialized as well as where it is used. On the other hand, it is very clear and explicitly states which monitor is released and which monitor stays acquired. This is similar to Case 2, which releases only the monitors explictly listed. However, in Case 2, calling the \code{wait} routine instead of the \code{waitRelease} routine releases all the acquired monitor. The Case 3 is an improvement on that since it releases all the monitors except those specified. The result is that the \code{wait} routine can be written as follows :
-\begin{lstlisting}
-void wait(condition & cond) {
-	waitHold(cond, []);
-}
-\end{lstlisting}
-This alternative offers nice and consistent behavior between \code{wait} and \code{waitHold}. However, one large pitfall is that mutual exclusion can now be violated by calls to library code. Indeed, even if the following example seems benign there is one significant problem :
-\begin{lstlisting}
-monitor global;
-
-extern void doStuff(); //uses global
-
-void foo(monitor & mutex m) {
-	//...
-	doStuff(); //warning can release monitor m
-	//...
-}
-
-foo(global);
-\end{lstlisting}
-
-Indeed, if Case 2 or 3 are chosen it any code can violate the mutual exclusion of the calling code by issuing calls to \code{wait} or \code{waitHold} in a nested monitor context. Case 2 can be salvaged by removing the \code{wait} routine from the API but Case 3 cannot prevent users from calling \code{waitHold(someCondition, [])}. For this reason the syntax proposed in Case 3 is rejected. Note that the syntax proposed in case 1 and 2 are not exclusive. Indeed, by supporting two types of condition both cases can be supported :
-\begin{lstlisting}
-struct condition { /*...*/ };
-
-// Second argument is a variable length tuple.
-void wait(condition & cond, [...] monitorsToRelease);
-void signal(condition & cond);
-
-struct conditionN { /*...*/ };
-
-void ?{}(conditionN* this, /*list of N monitors to release*/);
-void wait(conditionN & cond);
-void signal(conditionN & cond);
-\end{lstlisting}
-
-Regardless of the option chosen for wait semantics, signal must be symmetrical. In all cases, signal only needs a single parameter, the condition variable that needs to be signalled. But \code{signal} needs to be called from the same monitor(s) that call to \code{wait}. Otherwise, mutual exclusion cannot be properly transferred back to the waiting monitor.
-
-Finally, an additionnal semantic which can be very usefull is the \code{signalBlock} routine. This routine behaves like signal for all of the semantics discussed above, but with the subtelty that mutual exclusion is transferred to the waiting task immediately rather than wating for the end of the critical section.
-\\
-
+% ####### #     # #######         #####   #####  #     # ####### ######
+% #        #   #     #           #     # #     # #     # #       #     #
+% #         # #      #           #       #       #     # #       #     #
+% #####      #       #            #####  #       ####### #####   #     #
+% #         # #      #    ###          # #       #     # #       #     #
+% #        #   #     #    ###    #     # #     # #     # #       #     #
+% ####### #     #    #    ###     #####   #####  #     # ####### ######
+\newpage
 \subsection{External scheduling} \label{extsched}
 As one might expect, the alternative to Internal scheduling is to use External scheduling instead. This method is somewhat more robust to deadlocks since one of the threads keeps a relatively tight control on scheduling. Indeed, as the following examples will demonstrate, external scheduling allows users to wait for events from other threads without the concern of unrelated events occuring. External scheduling can generally be done either in terms of control flow (ex: \uC) or in terms of data (ex: Go). Of course, both of these paradigms have their own strenghts and weaknesses but for this project control flow semantics where chosen to stay consistent with the rest of the languages semantics. Two challenges specific to \CFA arise when trying to add external scheduling with loose object definitions and multi-monitor routines. The following example shows what a simple use \code{accept} versus \code{wait}/\code{signal} and its advantages.
@@ -496,4 +492,12 @@
 In the case of internal scheduling, the call to \code{wait} only guarantees that \code{g} was the last routine to access the monitor. This intails that the routine \code{f} may have acquired mutual exclusion several times while routine \code{h} was waiting. On the other hand, external scheduling guarantees that while routine \code{h} was waiting, no routine other than \code{g} could acquire the monitor.
 \\
+
+% #       ####### #######  #####  #######    ####### ######        #  #####
+% #       #     # #     # #     # #          #     # #     #       # #     #
+% #       #     # #     # #       #          #     # #     #       # #
+% #       #     # #     #  #####  #####      #     # ######        #  #####
+% #       #     # #     #       # #          #     # #     # #     #       #
+% #       #     # #     # #     # #          #     # #     # #     # #     #
+% ####### ####### #######  #####  #######    ####### ######   #####   #####
 
 \subsubsection{Loose object definitions}
@@ -587,4 +591,12 @@
 An other aspect to consider is what happens if multiple overloads of the same routine are used. For the time being it is assumed that multiple overloads of the same routine should be scheduled regardless of the overload used. However, this could easily be extended in the future.
 
+% #     # #     # #       ####### ###    #     # ####### #     #
+% ##   ## #     # #          #     #     ##   ## #     # ##    #
+% # # # # #     # #          #     #     # # # # #     # # #   #
+% #  #  # #     # #          #     #     #  #  # #     # #  #  #
+% #     # #     # #          #     #     #     # #     # #   # #
+% #     # #     # #          #     #     #     # #     # #    ##
+% #     #  #####  #######    #    ###    #     # ####### #     #
+
 \subsubsection{Multi-monitor scheduling}
 
@@ -629,4 +641,21 @@
 Note that the set of monitors passed to the \code{accept} statement must be entirely contained in the set of monitor already acquired in the routine. \code{accept} used in any other context is Undefined Behaviour.
 
+% ######  ####### #######    #    ### #        #####
+% #     # #          #      # #    #  #       #     #
+% #     # #          #     #   #   #  #       #
+% #     # #####      #    #     #  #  #        #####
+% #     # #          #    #######  #  #             #
+% #     # #          #    #     #  #  #       #     #
+% ######  #######    #    #     # ### #######  #####
+%
+% 		 #####  #     # ####### #     # #######  #####
+% 	      #     # #     # #       #     # #       #     #
+% 	      #     # #     # #       #     # #       #
+%    #####    #     # #     # #####   #     # #####    #####
+% 	      #   # # #     # #       #     # #             #
+% 	      #    #  #     # #       #     # #       #     #
+% 		 #### #  #####  #######  #####  #######  #####
+
+
 \subsubsection{Implementation Details: External scheduling queues}
 To support multi-monitor external scheduling means that some kind of entry-queues must be used that is aware of both monitors. However, acceptable routines must be aware of the entry queues which means they must be stored inside at least one of the monitors that will be acquired. This in turn adds the requirement a systematic algorithm of disambiguating which queue is relavant regardless of user ordering. The proposed algorithm is to fall back on monitors lock ordering and specify that the monitor that is acquired first is the lock with the relevant entry queue. This assumes that the lock acquiring order is static for the lifetime of all concerned objects but that is a reasonnable constraint. This algorithm choice has two consequences, the entry queue of the highest priority monitor is no longer a true FIFO queue and the queue of the lowest priority monitor is both required and probably unused. The queue can no longer be a FIFO queue because instead of simply containing the waiting threads in order arrival, they also contain the second mutex. Therefore, another thread with the same highest priority monitor but a different lowest priority monitor may arrive first but enter the critical section after a thread with the correct pairing. Secondly, since it may not be known at compile time which monitor will be the lowest priority monitor, every monitor needs to have the correct queues even though it is probable that half the multi-monitor queues will go unused for the entire duration of the program.
@@ -636,22 +665,37 @@
 
 \newpage
+% ######     #    ######     #    #       #       ####### #       ###  #####  #     #
+% #     #   # #   #     #   # #   #       #       #       #        #  #     # ##   ##
+% #     #  #   #  #     #  #   #  #       #       #       #        #  #       # # # #
+% ######  #     # ######  #     # #       #       #####   #        #   #####  #  #  #
+% #       ####### #   #   ####### #       #       #       #        #        # #     #
+% #       #     # #    #  #     # #       #       #       #        #  #     # #     #
+% #       #     # #     # #     # ####### ####### ####### ####### ###  #####  #     #
 \section{Parallelism}
-Historically, computer performance was about processor speeds and instructions count. However, with heat dissipation being an ever growing challenge, parallelism has become the new source of greatest performance \cite{Sutter05, Sutter05b}. In this decade, it is not longer reasonnable to create high-performance application without caring about parallelism. Indeed, parallelism is an important aspect of performance and more specifically throughput and hardware utilization. The lowest level approach of parallelism is to use \glspl{kthread}. However since these have significant costs and limitations \glspl{kthread} are now mostly used as an implementation tool rather than a user oriented one. There are several alternatives to solve these issues which all have strengths and weaknesses.
+Historically, computer performance was about processor speeds and instructions count. However, with heat dissipation being an ever growing challenge, parallelism has become the new source of greatest performance~\cite{Sutter05, Sutter05b}. In this decade, it is not longer reasonnable to create high-performance application without caring about parallelism. Indeed, parallelism is an important aspect of performance and more specifically throughput and hardware utilization. The lowest level approach of parallelism is to use \glspl{kthread}. However since these have significant costs and limitations \glspl{kthread} are now mostly used as an implementation tool rather than a user oriented one. There are several alternatives to solve these issues which all have strengths and weaknesses.
 
 \subsection{User-level threads}
 A direct improvement on the \gls{kthread} approach is to use \glspl{uthread}. These threads offer most of the same features that the operating system already provide but can be used on a much larger scale. This is the most powerfull solution as it allows all the features of multi-threading while removing several of the more expensives costs of using kernel threads. The down side is that almost none of the low-level threading complexities are hidden, users still have to think about data races, deadlocks and synchronization issues. This can be somewhat alleviated by a concurrency toolkit with strong garantees but the parallelism toolkit offers very little to reduce complexity in itself.
 
-Examples of languages that support are Java\cite{Java}, Haskell\cite{Haskell} and \uC\cite{uC++book}.
+Examples of languages that support are Java~\cite{Java}, Haskell~\cite{Haskell} and \uC~\cite{uC++book}.
 
 \subsection{Jobs and thread pools}
 The approach on the opposite end of the spectrum is to base parallelism on \glspl{job}. Indeed, \glspl{job} offer limited flexibility but at the benefit of a simpler user interface. In \gls{job} based systems users express parallelism as units of work and the dependency graph (either explicit or implicit) that tie them together. This means users need not to worry about concurrency but significantly limits the interaction that can occur between different jobs. Indeed, any \gls{job} that blocks also blocks the underlying \gls{kthread}, this effectively mean the CPU utilization, and therefore throughput, will suffer noticeably.
-The golden standard of this implementation is Intel's TBB library\cite{TBB}.
+The golden standard of this implementation is Intel's TBB library~\cite{TBB}.
 
 \subsection{Fibers : user-level threads without preemption}
 Finally, in the middle of the flexibility versus complexity spectrum lay \glspl{fiber} which offer \glspl{uthread} without the complexity of preemption. This means users don't have to worry about other \glspl{fiber} suddenly executing between two instructions which signficantly reduces complexity. However, any call to IO or other concurrency primitives can lead to context switches. Furthermore, users can also block \glspl{fiber} in the middle of their execution without blocking a full processor core. This means users still have to worry about mutual exclusion, deadlocks and race conditions in their code, raising the complexity significantly.
-An example of a language that uses fibers is Go\cite{Go}
+An example of a language that uses fibers is Go~\cite{Go}
 
 \subsection{Paradigm performance}
 While the choice between the three paradigms listed above may have significant performance implication, it is difficult to pin the performance implications of chosing a model at the language level. Indeed, in many situations one of these paradigms will show better performance but it all strongly depends on the usage. Having mostly indepent units of work to execute almost guarantess that the \gls{job} based system will have the best performance. However, add interactions between jobs and the processor utilisation might suffer. User-level threads may allow maximum ressource utilisation but context switches will be more expansive and it is also harder for users to get perfect tunning. As with every example, fibers sit somewhat in the middle of the spectrum. Furthermore, if the units of uninterrupted work are large enough the paradigm choice will be largely amorticised by the actual work done.
+
+%  #####  #######    #          ####### ######  ######
+% #     # #         # #            #    #     # #     #
+% #       #        #   #           #    #     # #     #
+% #       #####   #     # #####    #    ######  ######
+% #       #       #######          #    #     # #     #
+% #     # #       #     #          #    #     # #     #
+%  #####  #       #     #          #    ######  ######
 
 \section{\CFA 's Thread Building Blocks}
@@ -673,4 +717,12 @@
 As shown in section \ref{cfaparadigms} these different blocks being available in \CFA it is trivial to reproduce any of these paradigm.
 
+% ####### #     # ######  #######    #    ######   #####
+%    #    #     # #     # #         # #   #     # #     #
+%    #    #     # #     # #        #   #  #     # #
+%    #    ####### ######  #####   #     # #     #  #####
+%    #    #     # #   #   #       ####### #     #       #
+%    #    #     # #    #  #       #     # #     # #     #
+%    #    #     # #     # ####### #     # ######   #####
+
 \subsection{Thread Interface}
 The basic building blocks of \CFA are \glspl{cfathread}. By default these are implemented as \glspl{uthread} and as such offer a flexible and lightweight threading interface (lightweight comparatievely to \glspl{kthread}). A thread can be declared using a struct declaration prefix with the \code{thread} as follows :
@@ -680,5 +732,5 @@
 \end{lstlisting}
 
-Obviously, for this thread implementation to be usefull it must run some user code. Several other threading interfaces use some function pointer representation as the interface of threads (for example : \Csharp \cite{Csharp} and Scala \cite{Scala}). However, we consider that statically tying a \code{main} routine to a thread superseeds this approach. Since the \code{main} routine is definetely a special routine in \CFA, we can reuse the existing syntax for declaring routines with unordinary name, i.e. operator overloading. As such the \code{main} routine of a thread can be defined as such :
+Obviously, for this thread implementation to be usefull it must run some user code. Several other threading interfaces use some function pointer representation as the interface of threads (for example : \Csharp~\cite{Csharp} and Scala~\cite{Scala}). However, we consider that statically tying a \code{main} routine to a thread superseeds this approach. Since the \code{main} routine is definetely a special routine in \CFA, we can reuse the existing syntax for declaring routines with unordinary name, i.e. operator overloading. As such the \code{main} routine of a thread can be defined as such :
 \begin{lstlisting}
 	thread struct foo {};
@@ -843,10 +895,40 @@
 % \textbf{\large{Work in progress...}} Do wee need something beyond specifying the number of kernel threads?
 
+%    #    #       #
+%   # #   #       #
+%  #   #  #       #
+% #     # #       #
+% ####### #       #
+% #     # #       #
+% #     # ####### #######
 \section{Putting it all together}
 
+
+
+
+
+
+
+
+
+
+% ####### #     # ####### #     # ######  #######
+% #       #     #    #    #     # #     # #
+% #       #     #    #    #     # #     # #
+% #####   #     #    #    #     # ######  #####
+% #       #     #    #    #     # #   #   #
+% #       #     #    #    #     # #    #  #
+% #        #####     #     #####  #     # ######
 \section{Future work}
 Concurrency and parallelism is still a very active field that strongly benefits from hardware advances. As such certain features that aren't necessarily mature enough in their current state could become relevant in the lifetime of \CFA.
 \subsection{Transactions}
 
+% ####### #     # ######
+% #       ##    # #     #
+% #       # #   # #     #
+% #####   #  #  # #     #
+% #       #   # # #     #
+% #       #    ## #     #
+% ####### #     # ######
 \section*{Acknowledgements}
 
@@ -857,5 +939,5 @@
 \clearpage
 \bibliographystyle{plain}
-\bibliography{pl,local}
+\bibliography{cw92,distSharedMem,lfp92,mlw92,parallel,parallelIO,partheory,pl,pldi92,ps,realtime,techreportsPAB,visual,local}
 
 
Index: doc/proposals/concurrency/glossary.tex
===================================================================
--- doc/proposals/concurrency/glossary.tex	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ doc/proposals/concurrency/glossary.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -1,3 +1,23 @@
 \makeglossaries
+
+\longnewglossaryentry{callsite-locking}
+{name={callsite-locking}}
+{
+Locking done by the calling routine. With this technique, a routine calling a monitor routine will aquire the monitor \emph{before} making the call to the actuall routine.
+}
+
+\longnewglossaryentry{entry-point-locking}
+{name={entry-point-locking}}
+{
+Locking done by the called routine. With this technique, a monitor routine called by another routine will aquire the monitor \emph{after} entering the routine body but prior to any other code.
+}
+
+\longnewglossaryentry{group-acquire}
+{name={grouped acquiring}}
+{
+Implicitly acquiring several monitors when entering a monitor.
+}
+
+
 \longnewglossaryentry{uthread}
 {name={user-level thread}}
Index: doc/proposals/concurrency/style.tex
===================================================================
--- doc/proposals/concurrency/style.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
+++ doc/proposals/concurrency/style.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -0,0 +1,9 @@
+\input{common}                                          % bespoke macros used in the document
+
+\lstset{
+morekeywords=[2]{nomutex,mutex,thread,wait,wait_release,signal,signal_block,accept,monitor},
+keywordstyle=[2]\color{blue},				% second set of keywords for concurency
+basicstyle=\linespread{0.9}\tt\small,		% reduce line spacing and use typewriter font
+stringstyle=\sf\color{Mahogany},			% use sanserif font
+commentstyle=\itshape\color{OliveGreen},		% green and italic comments
+}%
Index: doc/proposals/concurrency/version
===================================================================
--- doc/proposals/concurrency/version	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ doc/proposals/concurrency/version	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -1,1 +1,1 @@
-0.4.95
+0.5.146
Index: doc/working/.gitignore
===================================================================
--- doc/working/.gitignore	(revision b7260842d3d46862cb3406f96e73c6e605589177)
+++ doc/working/.gitignore	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -0,0 +1,4 @@
+.declarative_resolver.tex.swp
+declarative_resolver.aux
+declarative_resolver.log
+declarative_resolver.pdf
Index: doc/working/declarative_resolver.tex
===================================================================
--- doc/working/declarative_resolver.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
+++ doc/working/declarative_resolver.tex	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -0,0 +1,172 @@
+\documentclass{article}
+
+\usepackage{amsmath}
+\usepackage{amssymb}
+
+\usepackage{listings}
+\lstset{
+  basicstyle=\ttfamily,
+  mathescape
+}
+
+\newcommand{\TODO}{\textbf{TODO:}~}
+\newcommand{\NOTE}{\textit{NOTE:}~}
+
+\newcommand{\Z}{\mathbb{Z}}
+\newcommand{\Znn}{\Z^{\oplus}}
+
+\newcommand{\conv}[2]{#1 \rightarrow #2}
+\newcommand{\C}[1]{\mathtt{#1}}
+
+\newcommand{\ls}[1]{\left[ #1 \right]}
+\newcommand{\rng}[2]{\left\{#1, \cdots #2\right\}}
+\title{Declarative Description of Expression Resolution Problem}
+\author{Aaron Moss}
+
+\begin{document}
+\maketitle
+
+\section{Inputs}
+\begin{itemize}
+\item A set of types $T$.
+\item A set of conversions $C \subset \{ \conv{from}{to} : from, to \in T \}$.
+  \begin{itemize}
+  \item $C$ is a directed acyclic graph (DAG).
+  \item \TODO There should be two of these, to separate the safe and unsafe conversions.
+  \end{itemize}
+\item A set of names $N$
+\item A set of declarations $F$. Each declaration $f \in F$ has the following properties:
+  \begin{itemize}
+  \item A name $f.name \in N$, not guaranteed to be unqiue in $F$.
+  \item A return type $f.type \in T$
+  \item A number of parameters $f.n \in \Znn$.
+  \item A list of parameter types $params = \ls{f_1, \cdots f_{f.n}}$, where each $f_i \in T$. 
+    \begin{itemize}
+    \item \TODO This should be a list of elements from $T$ to account for tuples and void-returning functions.
+    \end{itemize}
+  \item \TODO This model needs to account for polymorphic functions.
+  \end{itemize}
+\item A tree of expressions $E$, rooted at an expression $root$. Each expression $e \in E$ has the following properties:
+  \begin{itemize}
+  \item A name $e.name \in N$, not guaranteed to be unique in $E$
+  \item A number of arguments $e.n \in \Znn$
+  \item A list of arguments $args = \ls{e_1, \cdots e_{e.n}}$, where each $e_i \in E$; these arguments $e_i$ are considered the children of $e$ in the tree.
+  \end{itemize}
+\end{itemize}
+
+\section{Problem}
+An interpretation $x \in I$ has the following properties:
+\begin{itemize}
+\item An interpreted expression $x.expr \in E$.
+\item A base declaration $x.decl \in F$.
+\item A type $x.type \in T$
+\item A cost $x.cost \in \Znn$.
+  \begin{itemize}
+  \item \TODO Make this cost a tuple containing unsafe and polymorphic conversion costs later.
+  \end{itemize}
+\item A number of sub-interpretations $x.n \in \Znn$.
+\item A list of sub-interpretations $subs = \ls{x_1, \cdots x_{x.n}}$, where each $x_i \in I$.
+\end{itemize}
+
+Starting from $I = \{\}$, iteratively generate interpretations according to the following rules until a fixed point is reached:
+\begin{itemize}
+\item \textbf{Generate all interpretations, given subexpression interpretations.} \\
+      $\forall e \in E, f \in F$ such that $e.name = f.name$ and $e.n = f.n$, let $n = e.n$. \\
+      If $\forall i \in \rng{1}{n}, \exists x_i \in I$ such that $x_i.expr = e_i \land x_i.type = f_i$, \\
+      For each combination of $x_i$, generate a new interpretation $x$ as follows:
+      \begin{itemize}
+      \item $x.expr = e$.
+      \item $x.decl = f$.
+      \item $x.type = f.type$.
+      \item $x.cost = \sum_{i \in \rng{1}{n}} x_i.cost$.
+      \item $x.n = n$.
+      \end{itemize}
+
+\item \textbf{Generate conversions.} \\
+      $\forall x \in I, \forall t \in T, \exists (x.type, t) \in C$, \\
+      generate a new interpretation $x'$ as follows:
+      \begin{itemize}
+      \item $x'.type = t$.
+      \item $x'.cost = x.cost + 1$.
+      \item All other properties of $x'$ are identical to those of $x$.
+      \end{itemize}
+\end{itemize}
+
+
+Once $I$ has been completely generated, let $I' = { x \in I : x.expr = root }$.
+\begin{itemize}
+\item If $I' = \{\}$, report failure (no valid interpretation).
+\item If there exists a unqiue $x^* \in I'$ such that $x^*.cost$ is minimal in $I'$, report $x^*$ (success).
+\item Otherwise report failure (ambiguous).
+\end{itemize}
+
+\section{Example}
+
+Here is a worked example for the following C code block:
+\begin{lstlisting}
+int x;  // $x$
+void* x;  // $x'$
+
+long f(int, void*);  // $f$
+void* f(void*, int);  // $f'$
+void* f(void*, long);  // $f''$
+
+f( f( x, x ), x );  // $root:$f( $\gamma:$f( $\alpha:$x, $\beta:$x ), $\delta:$x )
+\end{lstlisting}
+
+Using the following subset of the C type system, this example includes the following set of declarations and expressions\footnote{$n$ can be inferred from the length of the appropriate list in the elements of $F$, $E$, and $I$, and has been ommitted for brevity.}:
+\begin{align*}
+  T = \{ &\C{int}, \C{long}, \C{void*} \} \\
+  C = \{ &\conv{\C{int}}{\C{long}} \} \\
+  N = \{ &\C{x}, \C{f} \} \\
+  F = \{ &x = \{ name: \C{x}, type: \C{int}, params: \ls{} \}, \\
+         &x' = \{ name: \C{x}, type: \C{void*}, params: \ls{} \}, \\
+         &f = \{ name: \C{f}, type: \C{long}, params: \ls{\C{int}, \C{void*}} \}, \\
+         &f' = \{ name: \C{f}, type: \C{void*}, params: \ls{\C{void*}, \C{int}} \}, \\
+         &f'' = \{ name: \C{f}, type: \C{void*}, params: \ls{\C{void*}, \C{long}} \} \} \\
+  E = \{ &\alpha = \{ name: \C{x}, args: \ls{} \}, \\
+         &\beta = \{ name: \C{x}, args: \ls{} \}, \\
+         &\gamma = \{ name: \C{f}, args: \ls{\alpha, \beta} \}, \\
+         &\delta = \{ name: \C{x}, args: \ls{} \}, \\
+         &root = \{ name: \C{f}, args: \ls{\gamma, \delta} \} \}
+\end{align*}
+
+Given these initial facts, the initial interpretations for the leaf expressions $\alpha$, $\beta$ \& $\delta$ can be generated from the subexpression rule:
+\begin{align}
+ \{ &expr: \alpha, decl: x, type: \C{int}, cost: 0, subs: \ls{} \} \\
+ \{ &expr: \alpha, decl: x', type: \C{void*}, cost: 0, subs: \ls{} \} \\
+ \{ &expr: \beta, decl: x, type: \C{int}, cost: 0, subs: \ls{} \} \\
+ \{ &expr: \beta, decl: x', type: \C{void*}, cost: 0, subs: \ls{} \} \\
+ \{ &expr: \delta, decl: x, type: \C{int}, cost: 0, subs: \ls{} \} \\
+ \{ &expr: \delta, decl: x', type: \C{void*}, cost: 0, subs: \ls{} \}
+\end{align}
+
+These new interpretations allow generation of further interpretations by the conversion rule and the $\conv{\C{int}}{\C{long}}$ conversion:
+\begin{align}
+\{ &expr: \alpha, decl: x, type: \C{long}, cost: 1, subs: \ls{} \} \\
+\{ &expr: \beta, decl: x, type: \C{long}, cost: 1, subs: \ls{} \} \\
+\{ &expr: \delta, decl: x, type: \C{long}, cost: 1, subs: \ls{} \}
+\end{align}
+
+Applying the subexpression rule again to this set of interpretations, we can generate interpretations for $\gamma$ [$\C{f( x, x )}$]:
+\begin{align}
+\{ &expr: \gamma, decl: f, type: \C{long}, cost: 0, subs: \ls{ (1), (4) } \} \\
+\{ &expr: \gamma, decl: f', type: \C{void*}, cost: 0, subs: \ls{ (2), (3) } \} \\
+\{ &expr: \gamma, decl: f'', type: \C{void*}, cost: 1, subs: \ls{ (2), (8) } \}
+\end{align}
+
+Since all of the new interpretations have types for which no conversions are applicable ($\C{void*}$ and $\C{long}$), the conversion rule generates no new interpretations.
+If $\C{f(x, x)}$ was the root expression, the set of candidate interpretations $I'$ would equal $\{ (10), (11), (12) \}$. Since both $(10)$ and $(11)$ have cost $0$, there is no unique minimal-cost element of this set, and the resolver would report failure due to this ambiguity.
+
+However, having generated all the interpretations of $\C{f( x, x )}$, the subexpression rule can now be applied again to generate interpretations of the $root$ expression:
+\begin{align}
+\{ &expr: root, decl: f', type: \C{void*}, cost: 0, subs: \ls{ (11), (5) } \} \\
+\{ &expr: root, decl: f'', type: \C{void*}, cost: 1, subs: \ls{ (11), (9) } \} \\
+\{ &expr: root, decl: f', type: \C{void*}, cost: 1, subs: \ls{ (12), (5) } \} \\
+\{ &expr: root, decl: f'', type: \C{void*}, cost: 2, subs: \ls{ (12), (9) } \}
+\end{align}
+
+Since again none of these new interpretations are of types with conversions defined, the conversion rule cannot be applied again; since the root expression has been resolved, no further applications of the subexpression rule are applicable either, therefore a fixed point has been reached and we have found the complete set of interpretations. If this fixed point had been reached before finding any valid interpretations of $root$ (e.g.~as would have happened if $f$ was the only declaration of $\C{f}$ in the program), the algorithm would have reported a failure with no valid interpretations.
+
+At the termination of this process, the set $I'$ of valid root interpretations is $\{ (13), (14), (15), (16)\}$; since $(13)$ has the unique minimal cost, it is the accepted interpretation of the root expression, and in this case the source $\C{f( f( x, x ), x )}$ is interpreted as $f'( f'( x', x ), x )$.
+\end{document}
Index: src/ControlStruct/LabelFixer.h
===================================================================
--- src/ControlStruct/LabelFixer.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ControlStruct/LabelFixer.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -26,5 +26,5 @@
 namespace ControlStruct {
 	/// normalizes label definitions and generates multi-level exit labels
-	class LabelFixer : public Visitor {
+	class LabelFixer final : public Visitor {
 		typedef Visitor Parent;
 	  public:
@@ -33,24 +33,26 @@
 		std::map < Label, Statement * > *resolveJumps() throw ( SemanticError );
 
+		using Visitor::visit;
+
 		// Declarations
-		virtual void visit( FunctionDecl *functionDecl );
+		virtual void visit( FunctionDecl *functionDecl ) override;
 
 		// Statements
 		void visit( Statement *stmt );
 
-		virtual void visit( CompoundStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( NullStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( ExprStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( IfStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( WhileStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( ForStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( SwitchStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( CaseStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( ReturnStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( TryStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( CatchStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( DeclStmt *stmt ) { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
-		virtual void visit( BranchStmt *branchStmt );
-		virtual void visit( UntypedExpr *untyped );
+		virtual void visit( CompoundStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( NullStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( ExprStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( IfStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( WhileStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( ForStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( SwitchStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( CaseStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( ReturnStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( TryStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( CatchStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( DeclStmt *stmt ) override { visit( (Statement *)stmt ); return Parent::visit( stmt ); }
+		virtual void visit( BranchStmt *branchStmt ) override;
+		virtual void visit( UntypedExpr *untyped ) override;
 
 		Label setLabelsDef( std::list< Label > &, Statement *definition );
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/GenPoly/Box.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -64,31 +64,34 @@
 
 		/// Adds layout-generation functions to polymorphic types
-		class LayoutFunctionBuilder : public DeclMutator {
+		class LayoutFunctionBuilder final : public DeclMutator {
 			unsigned int functionNesting;  // current level of nested functions
 		public:
 			LayoutFunctionBuilder() : functionNesting( 0 ) {}
 
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-			virtual Declaration *mutate( StructDecl *structDecl );
-			virtual Declaration *mutate( UnionDecl *unionDecl );
+			using DeclMutator::mutate;
+			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
+			virtual Declaration *mutate( StructDecl *structDecl ) override;
+			virtual Declaration *mutate( UnionDecl *unionDecl ) override;
 		};
 
 		/// Replaces polymorphic return types with out-parameters, replaces calls to polymorphic functions with adapter calls as needed, and adds appropriate type variables to the function call
-		class Pass1 : public PolyMutator {
+		class Pass1 final : public PolyMutator {
 		  public:
 			Pass1();
-			virtual Expression *mutate( ApplicationExpr *appExpr );
-			virtual Expression *mutate( AddressExpr *addrExpr );
-			virtual Expression *mutate( UntypedExpr *expr );
-			virtual DeclarationWithType* mutate( FunctionDecl *functionDecl );
-			virtual TypeDecl *mutate( TypeDecl *typeDecl );
-			virtual Expression *mutate( CommaExpr *commaExpr );
-			virtual Expression *mutate( ConditionalExpr *condExpr );
-			virtual Statement * mutate( ReturnStmt *returnStmt );
-			virtual Type *mutate( PointerType *pointerType );
-			virtual Type * mutate( FunctionType *functionType );
-
-			virtual void doBeginScope();
-			virtual void doEndScope();
+
+			using PolyMutator::mutate;
+			virtual Expression *mutate( ApplicationExpr *appExpr ) override;
+			virtual Expression *mutate( AddressExpr *addrExpr ) override;
+			virtual Expression *mutate( UntypedExpr *expr ) override;
+			virtual DeclarationWithType* mutate( FunctionDecl *functionDecl ) override;
+			virtual TypeDecl *mutate( TypeDecl *typeDecl ) override;
+			virtual Expression *mutate( CommaExpr *commaExpr ) override;
+			virtual Expression *mutate( ConditionalExpr *condExpr ) override;
+			virtual Statement * mutate( ReturnStmt *returnStmt ) override;
+			virtual Type *mutate( PointerType *pointerType ) override;
+			virtual Type * mutate( FunctionType *functionType ) override;
+
+			virtual void doBeginScope() override;
+			virtual void doEndScope() override;
 		  private:
 			/// Pass the extra type parameters from polymorphic generic arguments or return types into a function application
@@ -135,14 +138,16 @@
 		/// * Moves polymorphic returns in function types to pointer-type parameters
 		/// * adds type size and assertion parameters to parameter lists
-		class Pass2 : public PolyMutator {
+		class Pass2 final : public PolyMutator {
 		  public:
 			template< typename DeclClass >
 			DeclClass *handleDecl( DeclClass *decl, Type *type );
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-			virtual ObjectDecl *mutate( ObjectDecl *objectDecl );
-			virtual TypeDecl *mutate( TypeDecl *typeDecl );
-			virtual TypedefDecl *mutate( TypedefDecl *typedefDecl );
-			virtual Type *mutate( PointerType *pointerType );
-			virtual Type *mutate( FunctionType *funcType );
+
+			using PolyMutator::mutate;
+			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
+			virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
+			virtual TypeDecl *mutate( TypeDecl *typeDecl ) override;
+			virtual TypedefDecl *mutate( TypedefDecl *typedefDecl ) override;
+			virtual Type *mutate( PointerType *pointerType ) override;
+			virtual Type *mutate( FunctionType *funcType ) override;
 
 		  private:
@@ -156,5 +161,5 @@
 		/// * Calculates polymorphic offsetof expressions from offset array
 		/// * Inserts dynamic calculation of polymorphic type layouts where needed
-		class PolyGenericCalculator : public PolyMutator {
+		class PolyGenericCalculator final : public PolyMutator {
 		public:
 			typedef PolyMutator Parent;
@@ -163,19 +168,19 @@
 			template< typename DeclClass >
 			DeclClass *handleDecl( DeclClass *decl, Type *type );
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-			virtual ObjectDecl *mutate( ObjectDecl *objectDecl );
-			virtual TypedefDecl *mutate( TypedefDecl *objectDecl );
-			virtual TypeDecl *mutate( TypeDecl *objectDecl );
-			virtual Statement *mutate( DeclStmt *declStmt );
-			virtual Type *mutate( PointerType *pointerType );
-			virtual Type *mutate( FunctionType *funcType );
-			virtual Expression *mutate( MemberExpr *memberExpr );
-			virtual Expression *mutate( SizeofExpr *sizeofExpr );
-			virtual Expression *mutate( AlignofExpr *alignofExpr );
-			virtual Expression *mutate( OffsetofExpr *offsetofExpr );
-			virtual Expression *mutate( OffsetPackExpr *offsetPackExpr );
-
-			virtual void doBeginScope();
-			virtual void doEndScope();
+			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
+			virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
+			virtual TypedefDecl *mutate( TypedefDecl *objectDecl ) override;
+			virtual TypeDecl *mutate( TypeDecl *objectDecl ) override;
+			virtual Statement *mutate( DeclStmt *declStmt ) override;
+			virtual Type *mutate( PointerType *pointerType ) override;
+			virtual Type *mutate( FunctionType *funcType ) override;
+			virtual Expression *mutate( MemberExpr *memberExpr ) override;
+			virtual Expression *mutate( SizeofExpr *sizeofExpr ) override;
+			virtual Expression *mutate( AlignofExpr *alignofExpr ) override;
+			virtual Expression *mutate( OffsetofExpr *offsetofExpr ) override;
+			virtual Expression *mutate( OffsetPackExpr *offsetPackExpr ) override;
+
+			virtual void doBeginScope() override;
+			virtual void doEndScope() override;
 
 		private:
@@ -197,14 +202,16 @@
 
 		/// Replaces initialization of polymorphic values with alloca, declaration of dtype/ftype with appropriate void expression, and sizeof expressions of polymorphic types with the proper variable
-		class Pass3 : public PolyMutator {
+		class Pass3 final : public PolyMutator {
 		  public:
 			template< typename DeclClass >
 			DeclClass *handleDecl( DeclClass *decl, Type *type );
-			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-			virtual ObjectDecl *mutate( ObjectDecl *objectDecl );
-			virtual TypedefDecl *mutate( TypedefDecl *objectDecl );
-			virtual TypeDecl *mutate( TypeDecl *objectDecl );
-			virtual Type *mutate( PointerType *pointerType );
-			virtual Type *mutate( FunctionType *funcType );
+
+			using PolyMutator::mutate;
+			virtual DeclarationWithType *mutate( FunctionDecl *functionDecl ) override;
+			virtual ObjectDecl *mutate( ObjectDecl *objectDecl ) override;
+			virtual TypedefDecl *mutate( TypedefDecl *objectDecl ) override;
+			virtual TypeDecl *mutate( TypeDecl *objectDecl ) override;
+			virtual Type *mutate( PointerType *pointerType ) override;
+			virtual Type *mutate( FunctionType *funcType ) override;
 		  private:
 		};
Index: src/GenPoly/InstantiateGeneric.cc
===================================================================
--- src/GenPoly/InstantiateGeneric.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/GenPoly/InstantiateGeneric.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -147,5 +147,5 @@
 
 	/// Mutator pass that replaces concrete instantiations of generic types with actual struct declarations, scoped appropriately
-	class GenericInstantiator : public DeclMutator {
+	class GenericInstantiator final : public DeclMutator {
 		/// Map of (generic type, parameter list) pairs to concrete type instantiations
 		InstantiationMap< AggregateDecl, AggregateDecl > instantiations;
@@ -158,9 +158,10 @@
 		GenericInstantiator() : DeclMutator(), instantiations(), dtypeStatics(), typeNamer("_conc_") {}
 
-		virtual Type* mutate( StructInstType *inst );
-		virtual Type* mutate( UnionInstType *inst );
-
-		virtual void doBeginScope();
-		virtual void doEndScope();
+		using DeclMutator::mutate;
+		virtual Type* mutate( StructInstType *inst ) override;
+		virtual Type* mutate( UnionInstType *inst ) override;
+
+		virtual void doBeginScope() override;
+		virtual void doEndScope() override;
 	private:
 		/// Wrap instantiation lookup for structs
Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/GenPoly/Specialize.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -36,11 +36,12 @@
 	const std::list<Label> noLabels;
 
-	class Specialize : public PolyMutator {
+	class Specialize final : public PolyMutator {
 	  public:
 		Specialize( std::string paramPrefix = "_p" );
 
-		virtual Expression * mutate( ApplicationExpr *applicationExpr );
-		virtual Expression * mutate( AddressExpr *castExpr );
-		virtual Expression * mutate( CastExpr *castExpr );
+		using PolyMutator::mutate;
+		virtual Expression * mutate( ApplicationExpr *applicationExpr ) override;
+		virtual Expression * mutate( AddressExpr *castExpr ) override;
+		virtual Expression * mutate( CastExpr *castExpr ) override;
 		// virtual Expression * mutate( LogicalExpr *logicalExpr );
 		// virtual Expression * mutate( ConditionalExpr *conditionalExpr );
Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/InitTweak/FixInit.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -49,5 +49,5 @@
 namespace InitTweak {
 	namespace {
-		class InsertImplicitCalls : public GenPoly::PolyMutator {
+		class InsertImplicitCalls final : public GenPoly::PolyMutator {
 		public:
 			/// wrap function application expressions as ImplicitCopyCtorExpr nodes so that it is easy to identify which
@@ -55,8 +55,9 @@
 			static void insert( std::list< Declaration * > & translationUnit );
 
-			virtual Expression * mutate( ApplicationExpr * appExpr );
+			using GenPoly::PolyMutator::mutate;
+			virtual Expression * mutate( ApplicationExpr * appExpr ) override;
 		};
 
-		class ResolveCopyCtors : public SymTab::Indexer {
+		class ResolveCopyCtors final : public SymTab::Indexer {
 		public:
 			/// generate temporary ObjectDecls for each argument and return value of each ImplicitCopyCtorExpr,
@@ -68,5 +69,5 @@
 			using Parent::visit;
 
-			virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr );
+			virtual void visit( ImplicitCopyCtorExpr * impCpCtorExpr ) override;
 			virtual void visit( UniqueExpr * unqExpr );
 
@@ -88,6 +89,6 @@
 			using Parent::visit;
 			typedef std::set< ObjectDecl * > ObjectSet;
-			virtual void visit( CompoundStmt *compoundStmt );
-			virtual void visit( DeclStmt *stmt );
+			virtual void visit( CompoundStmt *compoundStmt ) override;
+			virtual void visit( DeclStmt *stmt ) override;
 		  protected:
 			ObjectSet curVars;
@@ -109,5 +110,5 @@
 		}
 
-		class LabelFinder : public ObjDeclCollector {
+		class LabelFinder final : public ObjDeclCollector {
 		  public:
 			typedef ObjDeclCollector Parent;
@@ -123,23 +124,24 @@
 			// subclasses are added, there is only one place that the code has to be updated, rather than ensure that
 			// every specialized class knows about every new kind of statement that might be added.
-			virtual void visit( CompoundStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( ExprStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( AsmStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( IfStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( WhileStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( ForStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( SwitchStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( CaseStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( BranchStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( ReturnStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( TryStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( CatchStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( FinallyStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( NullStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( DeclStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
-			virtual void visit( ImplicitCtorDtorStmt *stmt ) { handleStmt( stmt ); return Parent::visit( stmt ); }
+			using Parent::visit;
+			virtual void visit( CompoundStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( ExprStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( AsmStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( IfStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( WhileStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( ForStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( SwitchStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( CaseStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( BranchStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( ReturnStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( TryStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( CatchStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( FinallyStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( NullStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( DeclStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
+			virtual void visit( ImplicitCtorDtorStmt *stmt ) override { handleStmt( stmt ); return Parent::visit( stmt ); }
 		};
 
-		class InsertDtors : public ObjDeclCollector {
+		class InsertDtors final : public ObjDeclCollector {
 		public:
 			/// insert destructor calls at the appropriate places.  must happen before CtorInit nodes are removed
@@ -153,9 +155,11 @@
 			InsertDtors( LabelFinder & finder ) : labelVars( finder.vars ) {}
 
-			virtual void visit( ObjectDecl * objDecl );
-
-			virtual void visit( CompoundStmt * compoundStmt );
-			virtual void visit( ReturnStmt * returnStmt );
-			virtual void visit( BranchStmt * stmt );
+			using Parent::visit;
+
+			virtual void visit( ObjectDecl * objDecl ) override;
+
+			virtual void visit( CompoundStmt * compoundStmt ) override;
+			virtual void visit( ReturnStmt * returnStmt ) override;
+			virtual void visit( BranchStmt * stmt ) override;
 		private:
 			void handleGoto( BranchStmt * stmt );
@@ -165,15 +169,16 @@
 		};
 
-		class FixInit : public GenPoly::PolyMutator {
+		class FixInit final : public GenPoly::PolyMutator {
 		  public:
 			/// expand each object declaration to use its constructor after it is declared.
 			static void fixInitializers( std::list< Declaration * > &translationUnit );
 
-			virtual DeclarationWithType * mutate( ObjectDecl *objDecl );
+			using GenPoly::PolyMutator::mutate;
+			virtual DeclarationWithType * mutate( ObjectDecl *objDecl ) override;
 
 			std::list< Declaration * > staticDtorDecls;
 		};
 
-		class FixCopyCtors : public GenPoly::PolyMutator {
+		class FixCopyCtors final : public GenPoly::PolyMutator {
 		  public:
 			/// expand ImplicitCopyCtorExpr nodes into the temporary declarations, copy constructors, call expression,
@@ -181,9 +186,10 @@
 			static void fixCopyCtors( std::list< Declaration * > &translationUnit );
 
-			virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr );
-			virtual Expression * mutate( UniqueExpr * unqExpr );
+			using GenPoly::PolyMutator::mutate;
+			virtual Expression * mutate( ImplicitCopyCtorExpr * impCpCtorExpr ) override;
+			virtual Expression * mutate( UniqueExpr * unqExpr ) override;
 		};
 
-		class GenStructMemberCalls : public SymTab::Indexer {
+		class GenStructMemberCalls final : public SymTab::Indexer {
 		  public:
 			typedef Indexer Parent;
@@ -193,8 +199,10 @@
 			static void generate( std::list< Declaration * > & translationUnit );
 
-			virtual void visit( FunctionDecl * funcDecl );
-
-			virtual void visit( MemberExpr * memberExpr );
-			virtual void visit( ApplicationExpr * appExpr );
+			using Parent::visit;
+
+			virtual void visit( FunctionDecl * funcDecl ) override;
+
+			virtual void visit( MemberExpr * memberExpr ) override;
+			virtual void visit( ApplicationExpr * appExpr ) override;
 
 			SemanticError errors;
@@ -214,21 +222,23 @@
 		// resolve UntypedExprs that are found within newly
 		// generated constructor/destructor calls
-		class MutatingResolver : public Mutator {
+		class MutatingResolver final : public Mutator {
 		  public:
 			MutatingResolver( SymTab::Indexer & indexer ) : indexer( indexer ) {}
 
-			virtual DeclarationWithType* mutate( ObjectDecl *objectDecl );
-
-			virtual Expression* mutate( UntypedExpr *untypedExpr );
-			private:
+			using Mutator::mutate;
+			virtual DeclarationWithType* mutate( ObjectDecl *objectDecl ) override;
+			virtual Expression* mutate( UntypedExpr *untypedExpr ) override;
+
+		  private:
 			SymTab::Indexer & indexer;
 		};
 
-		class FixCtorExprs : public GenPoly::DeclMutator {
+		class FixCtorExprs final : public GenPoly::DeclMutator {
 		  public:
 			/// expands ConstructorExpr nodes into comma expressions, using a temporary for the first argument
 			static void fix( std::list< Declaration * > & translationUnit );
 
-			virtual Expression * mutate( ConstructorExpr * ctorExpr );
+			using GenPoly::DeclMutator::mutate;
+			virtual Expression * mutate( ConstructorExpr * ctorExpr ) override;
 		};
 	} // namespace
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/InitTweak/GenInit.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -37,5 +37,5 @@
 	}
 
-	class ReturnFixer : public GenPoly::PolyMutator {
+	class ReturnFixer final : public GenPoly::PolyMutator {
 	  public:
 		/// consistently allocates a temporary variable for the return value
@@ -46,7 +46,7 @@
 		ReturnFixer();
 
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
-
-		virtual Statement * mutate( ReturnStmt * returnStmt );
+		using GenPoly::PolyMutator::mutate;
+		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
+		virtual Statement * mutate( ReturnStmt * returnStmt ) override;
 
 	  protected:
@@ -56,5 +56,5 @@
 	};
 
-	class CtorDtor : public GenPoly::PolyMutator {
+	class CtorDtor final : public GenPoly::PolyMutator {
 	  public:
 		typedef GenPoly::PolyMutator Parent;
@@ -66,18 +66,18 @@
 		static void generateCtorDtor( std::list< Declaration * > &translationUnit );
 
-		virtual DeclarationWithType * mutate( ObjectDecl * );
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
+		virtual DeclarationWithType * mutate( ObjectDecl * ) override;
+		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
 		// should not traverse into any of these declarations to find objects
 		// that need to be constructed or destructed
-		virtual Declaration* mutate( StructDecl *aggregateDecl );
-		virtual Declaration* mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual Declaration* mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual Declaration* mutate( TraitDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual TypeDecl* mutate( TypeDecl *typeDecl ) { return typeDecl; }
-		virtual Declaration* mutate( TypedefDecl *typeDecl ) { return typeDecl; }
-
-		virtual Type * mutate( FunctionType *funcType ) { return funcType; }
-
-		virtual CompoundStmt * mutate( CompoundStmt * compoundStmt );
+		virtual Declaration* mutate( StructDecl *aggregateDecl ) override;
+		virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; }
+		virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; }
+
+		virtual Type * mutate( FunctionType *funcType ) override { return funcType; }
+
+		virtual CompoundStmt * mutate( CompoundStmt * compoundStmt ) override;
 
 	  private:
@@ -93,5 +93,5 @@
 	};
 
-	class HoistArrayDimension : public GenPoly::DeclMutator {
+	class HoistArrayDimension final : public GenPoly::DeclMutator {
 	  public:
 		typedef GenPoly::DeclMutator Parent;
@@ -103,16 +103,18 @@
 
 	  private:
-		virtual DeclarationWithType * mutate( ObjectDecl * objectDecl );
-		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl );
+		using Parent::mutate;
+
+		virtual DeclarationWithType * mutate( ObjectDecl * objectDecl ) override;
+		virtual DeclarationWithType * mutate( FunctionDecl *functionDecl ) override;
 		// should not traverse into any of these declarations to find objects
 		// that need to be constructed or destructed
-		virtual Declaration* mutate( StructDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual Declaration* mutate( UnionDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual Declaration* mutate( EnumDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual Declaration* mutate( TraitDecl *aggregateDecl ) { return aggregateDecl; }
-		virtual TypeDecl* mutate( TypeDecl *typeDecl ) { return typeDecl; }
-		virtual Declaration* mutate( TypedefDecl *typeDecl ) { return typeDecl; }
-
-		virtual Type* mutate( FunctionType *funcType ) { return funcType; }
+		virtual Declaration* mutate( StructDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual Declaration* mutate( UnionDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual Declaration* mutate( EnumDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual Declaration* mutate( TraitDecl *aggregateDecl ) override { return aggregateDecl; }
+		virtual TypeDecl* mutate( TypeDecl *typeDecl ) override { return typeDecl; }
+		virtual Declaration* mutate( TypedefDecl *typeDecl ) override { return typeDecl; }
+
+		virtual Type* mutate( FunctionType *funcType ) override { return funcType; }
 
 		void hoist( Type * type );
Index: src/InitTweak/InitTweak.h
===================================================================
--- src/InitTweak/InitTweak.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/InitTweak/InitTweak.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -100,4 +100,5 @@
 
 		class ExpanderImpl;
+		typedef std::list< Expression * > IndexList;
 	private:
 		std::shared_ptr< ExpanderImpl > expander;
@@ -105,5 +106,4 @@
 
 		// invariant: list of size 2N (elements come in pairs [index, dimension])
-		typedef std::list< Expression * > IndexList;
 		IndexList indices;
 	};
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/Makefile.am	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -6,11 +6,11 @@
 ## file "LICENCE" distributed with Cforall.
 ##
-## Makefile.am -- 
+## Makefile.am --
 ##
 ## Author           : Peter A. Buhr
 ## Created On       : Sun May 31 08:51:46 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Sat Sep 24 15:03:52 2016
-## Update Count     : 73
+## Last Modified On : Thu Oct 27 20:41:25 2016
+## Update Count     : 75
 ###############################################################################
 
@@ -41,5 +41,6 @@
 driver_cfa_cpp_SOURCES = ${SRC}
 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT
+driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
 
 MAINTAINERCLEANFILES += ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}}
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -198,5 +198,5 @@
 driver_cfa_cpp_DEPENDENCIES = $(am__DEPENDENCIES_1)
 driver_cfa_cpp_LINK = $(CXXLD) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+	$(driver_cfa_cpp_LDFLAGS) $(LDFLAGS) -o $@
 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/automake/depcomp
@@ -267,5 +267,4 @@
 CFA_PREFIX = @CFA_PREFIX@
 CFLAGS = @CFLAGS@
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
@@ -419,5 +418,6 @@
 driver_cfa_cpp_SOURCES = ${SRC}
 driver_cfa_cpp_LDADD = ${LEXLIB} -ldl			# yywrap
-driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -rdynamic -I${abs_top_srcdir}/src/include
+driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT
+driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
 all: $(BUILT_SOURCES)
 	$(MAKE) $(AM_MAKEFLAGS) all-am
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/Parser/ParseNode.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -109,5 +109,5 @@
 	ExpressionNode * set_extension( bool exten ) { extension = exten; return this; }
 
-	void print( std::ostream &os, int indent = 0 ) const {}
+	virtual void print( std::ostream &os, int indent = 0 ) const override {}
 	void printOneLine( std::ostream &os, int indent = 0 ) const {}
 
@@ -191,5 +191,5 @@
 //##############################################################################
 
-class TypeData;
+struct TypeData;
 
 class DeclarationNode : public ParseNode {
@@ -275,6 +275,6 @@
 	}
 
-	void print( std::ostream &os, int indent = 0 ) const;
-	void printList( std::ostream &os, int indent = 0 ) const;
+	virtual void print( std::ostream &os, int indent = 0 ) const override;
+	virtual void printList( std::ostream &os, int indent = 0 ) const override;
 
 	Declaration * build() const;
@@ -349,6 +349,6 @@
 	virtual StatementNode * append_last_case( StatementNode * );
 
-	virtual void print( std::ostream &os, int indent = 0 ) {}
-	virtual void printList( std::ostream &os, int indent = 0 ) {}
+	virtual void print( std::ostream &os, int indent = 0 ) const override {}
+	virtual void printList( std::ostream &os, int indent = 0 ) const override {}
   private:
 	std::unique_ptr<Statement> stmt;
Index: src/ResolvExpr/AlternativeFinder.h
===================================================================
--- src/ResolvExpr/AlternativeFinder.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ResolvExpr/AlternativeFinder.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -95,6 +95,4 @@
 	Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env );
 
-	void resolveObject( const SymTab::Indexer & indexer, ObjectDecl * objectDecl );
-
 	template< typename InputIterator, typename OutputIterator >
 	void findMinCost( InputIterator begin, InputIterator end, OutputIterator out ) {
Index: src/ResolvExpr/AlternativePrinter.h
===================================================================
--- src/ResolvExpr/AlternativePrinter.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ResolvExpr/AlternativePrinter.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// AlternativePrinter.h -- 
+// AlternativePrinter.h --
 //
 // Author           : Richard C. Bilson
@@ -23,8 +23,10 @@
 
 namespace ResolvExpr {
-	class AlternativePrinter : public SymTab::Indexer {
+	class AlternativePrinter final : public SymTab::Indexer {
 	  public:
 		AlternativePrinter( std::ostream &os );
-		virtual void visit( ExprStmt *exprStmt );
+
+		using SymTab::Indexer::visit;
+		virtual void visit( ExprStmt *exprStmt ) override;
 	  private:
 		std::ostream &os;
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ResolvExpr/Resolver.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -33,31 +33,31 @@
 
 namespace ResolvExpr {
-	class Resolver : public SymTab::Indexer {
+	class Resolver final : public SymTab::Indexer {
 	  public:
 		Resolver() : SymTab::Indexer( false ) {}
-		Resolver( const SymTab::Indexer & indexer ) : SymTab::Indexer( indexer ) {}
-
-		virtual void visit( FunctionDecl *functionDecl );
-		virtual void visit( ObjectDecl *objectDecl );
-		virtual void visit( TypeDecl *typeDecl );
-		virtual void visit( EnumDecl * enumDecl );
-
-		virtual void visit( ArrayType * at );
-		virtual void visit( PointerType * at );
-
-		virtual void visit( ExprStmt *exprStmt );
-		virtual void visit( AsmExpr *asmExpr );
-		virtual void visit( AsmStmt *asmStmt );
-		virtual void visit( IfStmt *ifStmt );
-		virtual void visit( WhileStmt *whileStmt );
-		virtual void visit( ForStmt *forStmt );
-		virtual void visit( SwitchStmt *switchStmt );
-		virtual void visit( CaseStmt *caseStmt );
-		virtual void visit( BranchStmt *branchStmt );
-		virtual void visit( ReturnStmt *returnStmt );
-
-		virtual void visit( SingleInit *singleInit );
-		virtual void visit( ListInit *listInit );
-		virtual void visit( ConstructorInit *ctorInit );
+
+		using SymTab::Indexer::visit;
+		virtual void visit( FunctionDecl *functionDecl ) override;
+		virtual void visit( ObjectDecl *functionDecl ) override;
+		virtual void visit( TypeDecl *typeDecl ) override;
+		virtual void visit( EnumDecl * enumDecl ) override;
+
+		virtual void visit( ArrayType * at ) override;
+		virtual void visit( PointerType * at ) override;
+
+		virtual void visit( ExprStmt *exprStmt ) override;
+		virtual void visit( AsmExpr *asmExpr ) override;
+		virtual void visit( AsmStmt *asmStmt ) override;
+		virtual void visit( IfStmt *ifStmt ) override;
+		virtual void visit( WhileStmt *whileStmt ) override;
+		virtual void visit( ForStmt *forStmt ) override;
+		virtual void visit( SwitchStmt *switchStmt ) override;
+		virtual void visit( CaseStmt *caseStmt ) override;
+		virtual void visit( BranchStmt *branchStmt ) override;
+		virtual void visit( ReturnStmt *returnStmt ) override;
+
+		virtual void visit( SingleInit *singleInit ) override;
+		virtual void visit( ListInit *listInit ) override;
+		virtual void visit( ConstructorInit *ctorInit ) override;
 	  private:
   	typedef std::list< Initializer * >::iterator InitIterator;
@@ -69,4 +69,5 @@
 	  void resolveSingleAggrInit( Declaration *, InitIterator &, InitIterator & );
 	  void fallbackInit( ConstructorInit * ctorInit );
+
 		Type * functionReturn = nullptr;
 		Type *initContext = nullptr;
@@ -533,9 +534,4 @@
 	}
 
-	void resolveObject( const SymTab::Indexer & indexer, ObjectDecl * objectDecl ) {
-		Resolver resolver( indexer );
-		objectDecl->accept( resolver );
-	}
-
 	void Resolver::visit( ConstructorInit *ctorInit ) {
 		// xxx - fallback init has been removed => remove fallbackInit function and remove complexity from FixInit and remove C-init from ConstructorInit
Index: src/ResolvExpr/TypeMap.h
===================================================================
--- src/ResolvExpr/TypeMap.h	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ResolvExpr/TypeMap.h	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -38,5 +38,5 @@
 		typedef typename std::map< std::string, Value* > ValueMap;
 		typedef typename ValueMap::iterator ValueMapIterator;
-		
+
 		Value *voidValue;                                     ///< Value for void type
 		Value *basicValue[BasicType::NUMBER_OF_BASIC_TYPES];  ///< Values for basic types
@@ -54,5 +54,5 @@
 			/// One scope of map rollbacks
 			typedef std::vector< std::pair< ValueMapIterator, Value* > > MapScope;
-			
+
 			PointerScope pointers;  ///< Value pointers to roll back to their previous state
 			MapScope mapNodes;      ///< Value map iterators to roll back to their previous state
@@ -68,5 +68,5 @@
 
 		std::vector< Rollback > scopes;  ///< Scope rollback information
-		
+
 		struct Lookup : public Visitor {
 			Lookup( TypeMap<Value> &typeMap ) : typeMap( typeMap ), found( 0 ), toInsert( 0 ) {}
@@ -87,5 +87,5 @@
 				return found;
 			}
-			
+
 			void findAndReplace( Value *&loc ) {
 				found = loc;
@@ -109,13 +109,13 @@
 				}
 			}
-			
+
 			virtual void visit( VoidType *voidType ) {
 				findAndReplace( typeMap.voidValue );
 			}
-			
+
 			virtual void visit( BasicType *basicType ) {
 				findAndReplace( typeMap.basicValue[basicType->get_kind()] );
 			}
-			
+
 			virtual void visit( PointerType *pointerType ) {
 				// NOTE This is one of the places where the apporoximation of the resolver is (deliberately) poor;
@@ -129,5 +129,5 @@
 				}
 			}
-			
+
 			virtual void visit( ArrayType *arrayType ) {
 				if ( dynamic_cast< FunctionType* >( arrayType->get_base() ) ) {
@@ -137,17 +137,17 @@
 				}
 			}
-			
+
 			virtual void visit( FunctionType *functionType ) {
 				findAndReplace( typeMap.functionPointerValue );
 			}
-			
+
 			virtual void visit( StructInstType *structType ) {
 				findAndReplace( typeMap.structValue, structType->get_name() );
 			}
-			
+
 			virtual void visit( UnionInstType *unionType ) {
 				findAndReplace( typeMap.unionValue, unionType->get_name() );
 			}
-			
+
 			virtual void visit( EnumInstType *enumType ) {
 				findAndReplace( typeMap.enumValue, enumType->get_name() );
@@ -157,7 +157,7 @@
 			Value *found;             ///< Value found (NULL if none yet)
 			Value *toInsert;          ///< Value to insert (NULL if a lookup)
-		};  // class Lookup
-		friend class Lookup;
-		
+		};  // struct Lookup
+		friend struct Lookup;
+
 	public:
 		/// Starts a new scope
@@ -180,5 +180,5 @@
 			scopes.pop_back();
 		}
-		
+
 		TypeMap() : voidValue( 0 ), pointerValue( 0 ), voidPointerValue( 0 ), functionPointerValue( 0 ), structValue(), unionValue(), enumValue(), scopes() {
 			beginScope();
@@ -199,5 +199,5 @@
 			return searcher.find( key );
 		}
-		
+
 	}; // class TypeMap
 
Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/ResolvExpr/Unify.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -73,5 +73,4 @@
 		const OpenVarSet &openVars;
 		WidenMode widenMode;
-		Type *commonType;
 		const SymTab::Indexer &indexer;
 	};
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/SymTab/Validate.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -94,15 +94,16 @@
 
 	/// Associates forward declarations of aggregates with their definitions
-	class Pass2 : public Indexer {
+	class Pass2 final : public Indexer {
 		typedef Indexer Parent;
 	  public:
 		Pass2( bool doDebug, const Indexer *indexer );
 	  private:
-		virtual void visit( StructInstType *structInst );
-		virtual void visit( UnionInstType *unionInst );
-		virtual void visit( TraitInstType *contextInst );
-		virtual void visit( StructDecl *structDecl );
-		virtual void visit( UnionDecl *unionDecl );
-		virtual void visit( TypeInstType *typeInst );
+  		using Indexer::visit;
+		void visit( StructInstType *structInst ) final;
+		void visit( UnionInstType *unionInst ) final;
+		void visit( TraitInstType *contextInst ) final;
+		void visit( StructDecl *structDecl ) final;
+		void visit( UnionDecl *unionDecl ) final;
+		void visit( TypeInstType *typeInst ) final;
 
 		const Indexer *indexer;
@@ -182,9 +183,10 @@
 	};
 
-	class CompoundLiteral : public GenPoly::DeclMutator {
+	class CompoundLiteral final : public GenPoly::DeclMutator {
 		DeclarationNode::StorageClass storageclass = DeclarationNode::NoStorageClass;
 
-		virtual DeclarationWithType * mutate( ObjectDecl *objectDecl );
-		virtual Expression *mutate( CompoundLiteralExpr *compLitExpr );
+		using GenPoly::DeclMutator::mutate;
+		DeclarationWithType * mutate( ObjectDecl *objectDecl ) final;
+		Expression *mutate( CompoundLiteralExpr *compLitExpr ) final;
 	};
 
@@ -652,5 +654,5 @@
 	void EliminateTypedef::addImplicitTypedef( AggDecl * aggDecl ) {
 		if ( typedefNames.count( aggDecl->get_name() ) == 0 ) {
-			Type *type;
+			Type *type = nullptr;
 			if ( StructDecl * newDeclStructDecl = dynamic_cast< StructDecl * >( aggDecl ) ) {
 				type = new StructInstType( Type::Qualifiers(), newDeclStructDecl->get_name() );
Index: src/driver/Makefile.am
===================================================================
--- src/driver/Makefile.am	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/driver/Makefile.am	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -11,6 +11,6 @@
 ## Created On       : Sun May 31 08:49:31 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Thu Jan 28 09:04:40 2016
-## Update Count     : 7
+## Last Modified On : Fri Oct 28 13:46:06 2016
+## Update Count     : 10
 ###############################################################################
 
@@ -26,6 +26,3 @@
 cc1_SOURCES = cc1.cc
 
-cfa.cc : ${abs_top_srcdir}/version
-	@true
-
 MAINTAINERCLEANFILES = @CFA_PREFIX@/bin/${bin_PROGRAMS} @CFA_PREFIX@/lib/${cc1lib_PROGRAMS}
Index: src/driver/Makefile.in
===================================================================
--- src/driver/Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/driver/Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -100,5 +100,4 @@
 CFA_PREFIX = @CFA_PREFIX@
 CFLAGS = @CFLAGS@
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
@@ -543,7 +542,4 @@
 
 
-cfa.cc : ${abs_top_srcdir}/version
-	@true
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
Index: src/driver/cfa.cc
===================================================================
--- src/driver/cfa.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/driver/cfa.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -10,6 +10,6 @@
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Oct 25 21:29:48 2016
-// Update Count     : 152
+// Last Modified On : Thu Oct 27 22:19:37 2016
+// Update Count     : 154
 //
 
@@ -50,7 +50,9 @@
 
 
+#define str(s) #s
+
 int main( int argc, char *argv[] ) {
-	string Version( CFA_VERSION_LONG );							// current version number from CONFIG
-	string Major( to_string( CFA_VERSION_MAJOR ) ), Minor( to_string( CFA_VERSION_MINOR ) ), Patch( to_string( CFA_VERSION_PATCH ) );
+	string Version( CFA_VERSION_LONG );					// current version number from CONFIG
+	string Major( str( CFA_VERSION_MAJOR ) ), Minor( str( CFA_VERSION_MINOR ) ), Patch( str( CFA_VERSION_PATCH ) );
 
 	string installincdir( CFA_INCDIR );					// fixed location of include files
Index: src/examples/Makefile.in
===================================================================
--- src/examples/Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/examples/Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -111,5 +111,4 @@
 # applies to both programs
 CFLAGS = -g -Wall -Wno-unused-function # TEMPORARY: does not build with -O2
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/libcfa/Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -137,5 +137,4 @@
 CFA_PREFIX = @CFA_PREFIX@
 CFLAGS = -quiet -no-include-stdhdr -g -Wall -Wno-unused-function @CFA_FLAGS@ -B${abs_top_srcdir}/src/driver -XCFA -t # TEMPORARY: does not build with -O2
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/main.cc	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Aug 29 17:34:39 2016
-// Update Count     : 426
+// Last Modified On : Sun Oct 30 10:11:38 2016
+// Update Count     : 435
 //
 
@@ -18,6 +18,7 @@
 #include <signal.h>										// signal
 #include <getopt.h>										// getopt
-#include <execinfo.h>									// backtrace, backtrace_symbols_fd
+#include <execinfo.h>									// backtrace, backtrace_symbols
 #include <cxxabi.h>										// __cxa_demangle
+#include <cstring>										// index
 
 using namespace std;
@@ -76,9 +77,12 @@
 static void dump( list< Declaration * > & translationUnit, ostream & out = cout );
 
-void backtrace( int start ) {							// skip first N stack frames
+static void backtrace( int start ) {					// skip first N stack frames
 	enum { Frames = 50 };
 	void * array[Frames];
-	int size = backtrace( array, Frames );
-	char ** messages = backtrace_symbols( array, size );
+	int size = ::backtrace( array, Frames );
+	char ** messages = ::backtrace_symbols( array, size ); // does not demangle names
+
+	*index( messages[0], '(' ) = '\0';					// find executable name
+	cerr << "Stack back trace for: " << messages[0] << endl;
 
 	// skip last 2 stack frames after main
@@ -86,9 +90,9 @@
 		char * mangled_name = nullptr, * offset_begin = nullptr, * offset_end = nullptr;
 		for ( char *p = messages[i]; *p; ++p ) {        // find parantheses and +offset
-			if (*p == '(') {
+			if ( *p == '(' ) {
 				mangled_name = p;
-			} else if (*p == '+') {
+			} else if ( *p == '+' ) {
 				offset_begin = p;
-			} else if (*p == ')') {
+			} else if ( *p == ')' ) {
 				offset_end = p;
 				break;
@@ -99,18 +103,19 @@
 		int frameNo = i - start;
 		if ( mangled_name && offset_begin && offset_end && mangled_name < offset_begin ) {
-			*mangled_name++ = '\0';
+			*mangled_name++ = '\0';						// delimit strings
 			*offset_begin++ = '\0';
 			*offset_end++ = '\0';
 
-			int status, frameNo = i - start;
+			int status;
 			char * real_name = __cxxabiv1::__cxa_demangle( mangled_name, 0, 0, &status );
+			// bug in __cxa_demangle for single-character lower-case non-mangled names
 			if ( status == 0 ) {						// demangling successful ?
 				cerr << "(" << frameNo << ") " << messages[i] << " : "
 					 << real_name << "+" << offset_begin << offset_end << endl;
-
 			} else {									// otherwise, output mangled name
 				cerr << "(" << frameNo << ") " << messages[i] << " : "
-					 << mangled_name << "+" << offset_begin << offset_end << endl;
+					 << mangled_name << "(/*unknown*/)+" << offset_begin << offset_end << endl;
 			} // if
+
 			free( real_name );
 		} else {										// otherwise, print the whole line
@@ -125,5 +130,5 @@
 	cerr << "*CFA runtime error* program cfa-cpp terminated with "
 		 <<	(sig_num == SIGSEGV ? "segment fault" : "bus error")
-		 << " backtrace:" << endl;
+		 << "." << endl;
 	backtrace( 2 );										// skip first 2 stack frames
 	exit( EXIT_FAILURE );
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ src/tests/Makefile.in	(revision b7260842d3d46862cb3406f96e73c6e605589177)
@@ -121,5 +121,4 @@
 # applies to both programs
 CFLAGS = -g -Wall -Wno-unused-function @CFA_FLAGS@ # TEMPORARY: does not build with -O2
-CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
Index: rsion
===================================================================
--- version	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
+++ 	(revision )
@@ -1,1 +1,0 @@
-1.0.0.0
