Index: doc/bibliography/pl.bib
===================================================================
--- doc/bibliography/pl.bib	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ doc/bibliography/pl.bib	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -830,5 +830,5 @@
     month	= oct,
     type	= {Diplomarbeit},
-    note	= {{\small\textsf{ftp://\-plg.uwaterloo.ca/\-pub/\-theses/\-KrischerThesis.ps.gz}}},
+    note	= {\href{https://plg.uwaterloo.ca/~usystem/theses/KrischerThesis.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-theses/\-KrischerThesis.pdf}},
 }
 
@@ -925,5 +925,5 @@
     key		= {Cforall},
     author	= {{\textsf{C}{$\mathbf{\forall}$} Features}},
-    howpublished= {\href{https://plg.uwaterloo.ca/~cforall/features}{https://\-plg.uwaterloo.ca/\-~cforall/\-features}},
+    howpublished= {\href{https://plg.uwaterloo.ca/~cforall/features}{https://\-plg.uwaterloo.ca/\-$\sim$cforall/\-features}},
     optnote	= {Accessed: 2018-01-01},
 }
@@ -1101,5 +1101,5 @@
     month	= oct,
     year	= 2001,
-    note	= {\href{http://plg.uwaterloo.ca/~cforall/cfa.ps}{http://\-plg.uwaterloo.ca/\-\char`\~cforall/\-cfa.ps}},
+    note	= {\href{http://plg.uwaterloo.ca/~cforall/cfa.ps}{http://\-plg.uwaterloo.ca/\-$\sim$cforall/\-cfa.ps}},
 }
 
@@ -1516,5 +1516,5 @@
     month	= dec,
     year	= 2017,
-    note	= {\href{https://plg.uwaterloo.ca/~usystem/pub/uSystem/uC++.pdf}{https://\-plg.uwaterloo.ca/\-~usystem/\-pub/\-uSystem/uC++.pdf}},
+    note	= {\href{https://plg.uwaterloo.ca/~usystem/pub/uSystem/uC++.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-pub/\-uSystem/uC++.pdf}},
 }
 
@@ -1809,5 +1809,5 @@
     author	= {Glen Ditchfield},
     title	= {Conversions for \textsf{C}$\mathbf{\forall}$},
-    note	= {\href{http://plg.uwaterloo.ca/~cforall/Conversions/index.html}{http://\-plg.uwaterloo.ca/\-\textasciitilde cforall/\-Conversions/\-index.html}},
+    note	= {\href{http://plg.uwaterloo.ca/~cforall/Conversions/index.html}{http://\-plg.uwaterloo.ca/\-$\sim$cforall/\-Conversions/\-index.html}},
     month	= {Nov},
     year	= {2002},
@@ -1877,5 +1877,5 @@
     title	= {CS343},
     year	= 2018,
-    howpublished= {\href{https://www.student.cs.uwaterloo.ca/~cs343}{https://\-www.student.cs.uwaterloo.ca/\-~cs343}},
+    howpublished= {\href{https://www.student.cs.uwaterloo.ca/~cs343}{https://\-www.student.cs.uwaterloo.ca/\-$\sim$cs343}},
 }
 
@@ -4144,5 +4144,5 @@
     month	= sep,
     year	= 2006,
-    note	= {\textsf{http://cs.anu.edu.au/\-\char`\~Robin.Garner/\-mmtk-guide.pdf}},
+    note	= {\textsf{http://cs.anu.edu.au/\-$\sim$Robin.Garner/\-mmtk-guide.pdf}},
 }
 
@@ -4248,5 +4248,5 @@
     month	= sep,
     year	= 1994,
-    note	= {{\small\textsf{ftp://\-plg.uwaterloo.ca/\-pub/\-uSystem/\-uSystem.ps.gz}}},
+    note	= {\href{https://plg.uwaterloo.ca/~usystem/pub/uSystem/uSystem.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-pub/\-uSystem/\-uSystem.pdf}},
 }
 
@@ -4790,5 +4790,5 @@
     year	= 1995,
     number	= 31,
-    note	= {{\small\textsf{http://\-www.cs.wustl.edu/\-\char`\~schmidt/\-PDF/\-IPC\_SAP-92.pdf}}},
+    note	= {{\small\textsf{http://\-www.cs.wustl.edu/\-$\sim$schmidt/\-PDF/\-IPC\_SAP-92.pdf}}},
 }
 
@@ -6132,5 +6132,5 @@
     month	= apr,
     type	= {Diplomarbeit},
-    note	= {\href{ftp://plg.uwaterloo.ca/pub/theses/SchusterThesis.ps.gz}{ftp://\-plg.uwaterloo.ca/\-pub/\-theses/\-SchusterThesis.ps.gz}},
+    note	= {\href{https://plg.uwaterloo.ca/~usystem/theses/SchusterThesis.pdf}{https://\-plg.uwaterloo.ca/\-$\sim$usystem/\-theses/\-SchusterThesis.pdf}},
 }
 
Index: doc/papers/concurrency/Makefile
===================================================================
--- doc/papers/concurrency/Makefile	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ doc/papers/concurrency/Makefile	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -4,7 +4,7 @@
 Figures = figures
 Macros = ../AMA/AMA-stix/ama
-TeXLIB = .:annex:../../LaTeXmacros:${Macros}:${Build}:../../bibliography:
+TeXLIB = .:../../LaTeXmacros:${Macros}:${Build}:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
-BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
+BibTeX = BIBINPUTS=annex:../../bibliography: && export BIBINPUTS && bibtex
 
 MAKEFLAGS = --no-print-directory # --silent
Index: doc/papers/general/Makefile
===================================================================
--- doc/papers/general/Makefile	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ doc/papers/general/Makefile	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -4,7 +4,7 @@
 Figures = figures
 Macros = ../AMA/AMA-stix/ama
-TeXLIB = .:${Macros}:${Build}:../../bibliography:
+TeXLIB = .:${Macros}:${Build}:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
-BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
+BibTeX = BIBINPUTS=../../bibliography: && export BIBINPUTS && bibtex
 
 MAKEFLAGS = --no-print-directory # --silent
Index: doc/user/Makefile
===================================================================
--- doc/user/Makefile	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ doc/user/Makefile	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -4,7 +4,7 @@
 Figures = figures
 Macros = ../LaTeXmacros
-TeXLIB = .:${Macros}:${Build}:../bibliography:
+TeXLIB = .:${Macros}:${Build}:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
-BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
+BibTeX = BIBINPUTS=../bibliography: && export BIBINPUTS && bibtex
 
 MAKEFLAGS = --no-print-directory --silent #
Index: driver/cfa.cc
===================================================================
--- driver/cfa.cc	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ driver/cfa.cc	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -10,6 +10,6 @@
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Sep  3 16:47:59 2018
-// Update Count     : 275
+// Last Modified On : Fri Sep 14 23:02:59 2018
+// Update Count     : 277
 //
 
@@ -114,5 +114,4 @@
 	bool std_flag = false;								// -std= flag
 	bool noincstd_flag = false;							// -no-include-stdhdr= flag
-	bool xflag = false;									// user supplied -x flag
 	bool debugging __attribute(( unused )) = false;		// -g flag
 	bool m32 = false;                                    // -m32 flag
@@ -291,9 +290,8 @@
 			} // if
 			nonoptarg = true;
-			xflag = false;
 		} // if
 	} // for
 
-    args[nargs] = "-x";					// turn off language
+    args[nargs] = "-x";									// turn off language
     nargs += 1;
     args[nargs] = "none";
Index: libcfa/src/time.hfa
===================================================================
--- libcfa/src/time.hfa	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ libcfa/src/time.hfa	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -10,6 +10,6 @@
 // Created On       : Wed Mar 14 23:18:57 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug 11 13:55:33 2018
-// Update Count     : 642
+// Last Modified On : Sat Sep 22 12:25:34 2018
+// Update Count     : 643
 //
 
@@ -23,5 +23,5 @@
 #include <sys/time.h>									// timeval
 }
-#include <time_t.hfa>										// Duration/Time types
+#include <time_t.hfa>									// Duration/Time types
 
 enum { TIMEGRAN = 1_000_000_000LL };					// nanosecond granularity, except for timeval
@@ -104,6 +104,6 @@
 
 	timeval ?=?( timeval & t, zero_t ) { return t{ 0 }; }
-	timeval ?+?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
-	timeval ?-?( timeval & lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; }
+	timeval ?+?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_usec + rhs.tv_usec }; }
+	timeval ?-?( timeval lhs, timeval rhs ) { return (timeval)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_usec - rhs.tv_usec }; }
 	bool ?==?( timeval lhs, timeval rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_usec == rhs.tv_usec; }
 	bool ?!=?( timeval lhs, timeval rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_usec != rhs.tv_usec; }
@@ -119,6 +119,6 @@
 
 	timespec ?=?( timespec & t, zero_t ) { return t{ 0 }; }
-	timespec ?+?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
-	timespec ?-?( timespec & lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; }
+	timespec ?+?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec + rhs.tv_sec, lhs.tv_nsec + rhs.tv_nsec }; }
+	timespec ?-?( timespec lhs, timespec rhs ) { return (timespec)@{ lhs.tv_sec - rhs.tv_sec, lhs.tv_nsec - rhs.tv_nsec }; }
 	bool ?==?( timespec lhs, timespec rhs ) { return lhs.tv_sec == rhs.tv_sec && lhs.tv_nsec == rhs.tv_nsec; }
 	bool ?!=?( timespec lhs, timespec rhs ) { return lhs.tv_sec != rhs.tv_sec || lhs.tv_nsec != rhs.tv_nsec; }
Index: src/CodeTools/ResolvProtoDump.cc
===================================================================
--- src/CodeTools/ResolvProtoDump.cc	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ src/CodeTools/ResolvProtoDump.cc	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -204,4 +204,11 @@
 		/// ensures type inst names are uppercase
 		static void ti_name( const std::string& name, std::stringstream& ss ) {
+			// replace built-in wide character types with named types
+			if ( name == "char16_t" || name == "char32_t" || name == "wchar_t" ) {
+				ss << "#" << name;
+				return;
+			}
+
+			// strip leading underscore
 			unsigned i = 0;
 			while ( i < name.size() && name[i] == '_' ) { ++i; }
@@ -210,6 +217,16 @@
 				return;
 			}
-			ss << (char)std::toupper( static_cast<unsigned char>(name[i]) )
-			   << (name.c_str() + i + 1);
+
+			std::string stripped = name.substr(i);
+			// strip trailing "_generic_" from autogen names (avoids some user-generation issues)
+			char generic[] = "_generic_"; size_t n_generic = sizeof(generic) - 1;
+			if ( stripped.size() >= n_generic 
+					&& stripped.substr( stripped.size() - n_generic ) == generic ) {
+				stripped.resize( stripped.size() - n_generic );
+			}
+
+			// uppercase first character
+			ss << (char)std::toupper( static_cast<unsigned char>(stripped[0]) )
+			   << (stripped.c_str() + 1);
 		}
 
@@ -304,5 +321,9 @@
 			}
 
-			// TODO support VarArgsType
+			// TODO support variable args for functions
+			void previsit( VarArgsType* ) {
+				// only include varargs for top level (argument type)
+				if ( depth == 0 ) { ss << "#$varargs"; }
+			}
 
 			// replace 0 and 1 with int
@@ -397,4 +418,11 @@
 			}
 
+			/// Handle already-resolved variables as type constants
+			void previsit( VariableExpr* expr ) {
+				PassVisitor<TypePrinter> tyPrinter{ closed, ss };
+				expr->var->get_type()->accept( tyPrinter );
+				visit_children = false;
+			}
+
 			/// Calls handled as calls
 			void previsit( UntypedExpr* expr ) {
@@ -426,6 +454,8 @@
 			}
 
-			/// Already-resolved calls skipped
-			void previsit( ApplicationExpr* ) {
+			/// Already-resolved calls reduced to their type constant
+			void previsit( ApplicationExpr* expr ) {
+				PassVisitor<TypePrinter> tyPrinter{ closed, ss };
+				expr->result->accept( tyPrinter );
 				visit_children = false;
 			}
@@ -532,5 +562,4 @@
 				for ( Initializer* it : li->initializers ) {
 					build( it, ss );
-					ss << ' ';
 				}
 			}
@@ -539,7 +568,7 @@
 		/// Adds an object initializer to the list of expressions
 		void build( const std::string& name, Initializer* init, std::stringstream& ss ) {
-			ss << "$constructor( ";
+			ss << "$constructor( &";
 			rp_name( name, ss );
-			ss << "() ";
+			ss << ' ';
 			build( init, ss );
 			ss << ')';
@@ -676,4 +705,9 @@
 		}
 
+		void previsit( AsmStmt* ) {
+			// skip asm statements
+			visit_children = false;
+		}
+
 		void previsit( Expression* expr ) {
 			std::stringstream ss;
@@ -686,5 +720,5 @@
 		/// Print non-prelude global declarations for resolv proto
 		void printGlobals() const {
-			std::cout << "#ptr<T> $addr T" << std::endl;  // &?
+			std::cout << "#$ptr<T> $addr T" << std::endl;  // &?
 			int i = (int)BasicType::SignedInt;
 			std::cout << i << " $and " << i << ' ' << i << std::endl;  // ?&&?
Index: src/SynTree/Constant.cc
===================================================================
--- src/SynTree/Constant.cc	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ src/SynTree/Constant.cc	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Jul 14 14:50:00 2017
-// Update Count     : 29
+// Last Modified On : Fri Spt 28 14:49:00 2018
+// Update Count     : 30
 //
 
@@ -19,4 +19,5 @@
 
 #include "Constant.h"
+#include "Expression.h" // for ConstantExpr
 #include "Type.h"    // for BasicType, Type, Type::Qualifiers, PointerType
 
@@ -48,4 +49,14 @@
 Constant Constant::from_double( double d ) {
 	return Constant( new BasicType( Type::Qualifiers(), BasicType::Double ), std::to_string( d ), d );
+}
+
+Constant Constant::from_string( std::string const & str ) {
+	return Constant(
+		new ArrayType(
+			noQualifiers,
+			new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
+			new ConstantExpr( Constant::from_int( str.size() + 1 /* \0 */ )),
+			false, false ),
+		std::string("\"") + str + "\"", (unsigned long long int)0 );
 }
 
Index: src/SynTree/Constant.h
===================================================================
--- src/SynTree/Constant.h	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ src/SynTree/Constant.h	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:54:46 2017
-// Update Count     : 17
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Spt 28 14:48:00 2018
+// Update Count     : 18
 //
 
@@ -51,4 +51,6 @@
 	/// generates a floating point constant of the given double
 	static Constant from_double( double d );
+	/// generates an array of chars constant of the given string
+	static Constant from_string( std::string const & s );
 
 	/// generates a null pointer value for the given type. void * if omitted.
Index: tests/.expect/forctrl.txt
===================================================================
--- tests/.expect/forctrl.txt	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/.expect/forctrl.txt	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -22,2 +22,3 @@
 (0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)
 (0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)
+(0 0)(1 1)(2 2)(3 3)(4 4)(5 5)(6 6)(7 7)(8 8)(9 9)
Index: tests/concurrent/coroutineYield.c
===================================================================
--- tests/concurrent/coroutineYield.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/concurrent/coroutineYield.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -1,4 +1,4 @@
 #include <fstream.hfa>
-#include <kernel.hfa>hfa>
+#include <kernel.hfa>
 #include <stdlib.hfa>
 #include <thread.hfa>
Index: tests/concurrent/preempt.c
===================================================================
--- tests/concurrent/preempt.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/concurrent/preempt.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -1,3 +1,3 @@
-#include <kernel.hfa>hfa>
+#include <kernel.hfa>
 #include <thread.hfa>
 #include <time.hfa>
Index: tests/concurrent/signal/block.c
===================================================================
--- tests/concurrent/signal/block.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/concurrent/signal/block.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -8,5 +8,5 @@
 
 #include <fstream.hfa>
-#include <kernel.hfa>hfa>
+#include <kernel.hfa>
 #include <monitor.hfa>
 #include <stdlib.hfa>
Index: tests/concurrent/signal/disjoint.c
===================================================================
--- tests/concurrent/signal/disjoint.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/concurrent/signal/disjoint.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -1,4 +1,4 @@
 #include <fstream.hfa>
-#include <kernel.hfa>hfa>
+#include <kernel.hfa>
 #include <monitor.hfa>
 #include <thread.hfa>
Index: tests/concurrent/signal/wait.c
===================================================================
--- tests/concurrent/signal/wait.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/concurrent/signal/wait.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -6,5 +6,5 @@
 
 #include <fstream.hfa>
-#include <kernel.hfa>hfa>
+#include <kernel.hfa>
 #include <monitor.hfa>
 #include <stdlib.hfa>
Index: tests/forctrl.c
===================================================================
--- tests/forctrl.c	(revision 6cb935d44eac9fc5a0d5681d4222864aa38d730f)
+++ tests/forctrl.c	(revision a29c6e22a2d775ffa73748ce94a39f76d8667035)
@@ -10,6 +10,6 @@
 // Created On       : Wed Aug  8 18:32:59 2018
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 30 17:12:12 2018
-// Update Count     : 43
+// Last Modified On : Tue Sep 25 17:43:47 2018
+// Update Count     : 44
 // 
 
@@ -59,5 +59,5 @@
 
 	for ( S s = (S){0}; s < (S){10,10}; s += (S){1} ) { sout | s; } sout | endl;
-//	for ( s; (S){10,10} ) { sout | s; } sout | endl;
+	for ( s; (S){10,10} ) { sout | s; } sout | endl;
 	for ( s; (S){0} ~ (S){10,10} ) { sout | s; } sout | endl;
 	for ( s; (S){0} ~ (S){10,10} ~ (S){1} ) { sout | s; } sout | endl;
