Index: doc/uC++toCFA/.gitignore
===================================================================
--- doc/uC++toCFA/.gitignore	(revision a2c2363a574380db06d7194fc74622a5071aae38)
+++ doc/uC++toCFA/.gitignore	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -0,0 +1,4 @@
+# generated by latex
+build/*
+*.pdf
+*.ps
Index: doc/uC++toCFA/Makefile
===================================================================
--- doc/uC++toCFA/Makefile	(revision a2c2363a574380db06d7194fc74622a5071aae38)
+++ doc/uC++toCFA/Makefile	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -0,0 +1,92 @@
+## Define the configuration variables.
+
+Build = build
+Figures = figures
+Macros = ../LaTeXmacros
+TeXLIB = .:${Macros}:${Build}:
+LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && latex -halt-on-error -output-directory=${Build}
+BibTeX = BIBINPUTS=../bibliography: && export BIBINPUTS && bibtex
+
+MAKEFLAGS = --no-print-directory --silent #
+VPATH = ${Build} ${Figures}
+
+## Define the text source files.
+
+SOURCES = ${addsuffix .tex, \
+uC++toCFA \
+../refrat/keywords \
+../refrat/operidents \
+}
+
+FIGURES = ${addsuffix .tex, \
+}
+
+PICTURES = ${addsuffix .pstex, \
+}
+
+PROGRAMS = ${addsuffix .tex, \
+}
+
+GRAPHS = ${addsuffix .tex, \
+}
+
+## Define the documents that need to be made.
+
+DOCUMENT = uC++toCFA.pdf
+BASE = ${basename ${DOCUMENT}}
+
+# Directives #
+
+.PHONY : all clean					# not file names
+
+all : ${DOCUMENT}
+
+clean :
+	@rm -frv ${DOCUMENT} ${BASE}.ps ${Build}
+
+# File Dependencies #
+
+build/version: ../../configure | ${Build}
+	../../configure --version | grep "cfa-cc configure" | grep -oEe "([0-9]+\.)+[0-9]+" > $@
+
+${DOCUMENT} : ${BASE}.ps
+	ps2pdf -dPDFSETTINGS=/prepress $<
+
+${BASE}.ps : ${BASE}.dvi
+	dvips ${Build}/$< -o $@
+
+${BASE}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} \
+		${Macros}/common.sty ${Macros}/lstlang.sty ${Macros}/indexstyle ../bibliography/pl.bib build/version | ${Build}
+	# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
+	if [ ! -r ${basename $@}.ind ] ; then touch ${Build}/${basename $@}.ind ; fi
+	# Must have *.aux file containing citations for bibtex
+	if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
+	-${BibTeX} ${Build}/${basename $@}
+	# Some citations reference others so run again to resolve these citations
+	${LaTeX} ${basename $@}.tex
+#	-${BibTeX} ${Build}/${basename $@}
+	# Make index from *.aux entries and input index at end of document
+	makeindex -s ${Macros}/indexstyle ${Build}/${basename $@}.idx
+	# Run again to finish citations
+	${LaTeX} ${basename $@}.tex
+	# Run again to get index title into table of contents
+#	${LaTeX} ${basename $@}.tex
+
+## Define the default recipes.
+
+${Build} :
+	mkdir -p ${Build}
+
+%.tex : %.fig | ${Build}
+	fig2dev -L eepic $< > ${Build}/$@
+
+%.ps : %.fig | ${Build}
+	fig2dev -L ps $< > ${Build}/$@
+
+%.pstex : %.fig | ${Build}
+	fig2dev -L pstex $< > ${Build}/$@
+	fig2dev -L pstex_t -p ${Build}/$@ $< > ${Build}/$@_t
+
+# Local Variables: #
+# compile-command: "make" #
+# End: #
Index: doc/uC++toCFA/uC++toCFA.tex
===================================================================
--- doc/uC++toCFA/uC++toCFA.tex	(revision a2c2363a574380db06d7194fc74622a5071aae38)
+++ doc/uC++toCFA/uC++toCFA.tex	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -0,0 +1,580 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%%
+%% The contents of this file are covered under the licence agreement in the
+%% file "LICENCE" distributed with Cforall.
+%%
+%% user.tex --
+%%
+%% Author           : Peter A. Buhr
+%% Created On       : Wed Apr  6 14:53:29 2016
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Sun Sep 17 09:10:12 2023
+%% Update Count     : 5883
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
+
+\documentclass[11pt]{article}
+
+\makeatletter
+\def\@maketitle{%
+    \newpage
+    \null
+%   \vskip 2em%
+    \begin{center}%
+	\let \footnote \thanks
+        {\LARGE\bf \@title \par}%
+        \@ifundefined{@author}{}
+        {
+            \ifx\@empty\@author
+            \else
+                \vskip 1.5em%
+                {\large
+                    \lineskip .5em%
+                    \begin{tabular}[t]{c}%
+                        \@author
+                    \end{tabular}%
+                    \par
+                }%
+	    \fi
+        }%
+        \ifx\@empty\@date
+        \else
+            \vskip 1em%
+	    {\large \@date}%
+        \fi
+    \end{center}%
+    \par
+%   \vskip 1.5em
+}%maketitle
+\makeatother
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Latex packages used in the document.
+%\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[labelformat=simple,aboveskip=0pt,farskip=0pt]{subfig}
+\renewcommand{\thesubfigure}{\alph{subfigure})}
+\usepackage{latexsym}                                   % \Box glyph
+\usepackage{mathptmx}                                   % better math font with "times"
+\usepackage[usenames]{color}
+\usepackage[pagewise]{lineno}
+\renewcommand{\linenumberfont}{\scriptsize\sffamily}
+\input{common}											% common CFA document macros
+\usepackage[dvips,plainpages=false,pdfpagelabels,pdfpagemode=UseNone,colorlinks=true,pagebackref=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref=true,breaklinks=true]{hyperref}
+\usepackage{breakurl}
+
+\renewcommand\footnoterule{\kern -3pt\rule{0.3\linewidth}{0.15pt}\kern 2pt}
+\newcommand{\uC}{$\mu$\CC}
+
+% Default underscore is too low and wide. Cannot use lstlisting "literate" as replacing underscore
+% removes it as a variable-name character so keywords in variables are highlighted. MUST APPEAR
+% AFTER HYPERREF.
+\renewcommand{\textunderscore}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}}
+
+\setlength{\topmargin}{-0.45in}							% move running title into header
+\setlength{\headsep}{0.25in}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\setlength{\gcolumnposn}{3in}
+\CFAStyle												% use default CFA format-style
+\lstset{language=CFA}									% CFA default lnaguage
+\lstnewenvironment{C++}[1][]                            % use C++ style
+{\lstset{language=C++,escapechar=\$,mathescape=false,moredelim=**[is][\protect\color{red}]{@}{@},#1}}{}
+\lstnewenvironment{uC++}[1][]
+{\lstset{language=uC++,escapechar=\$,mathescape=false,moredelim=**[is][\protect\color{red}]{@}{@},#1}}{}
+
+\newsavebox{\myboxA}
+\newsavebox{\myboxB}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Names used in the document.
+\newcommand{\Version}{\input{build/version}}
+\newcommand{\Textbf}[2][red]{{\color{#1}{\textbf{#2}}}}
+\newcommand{\Emph}[2][red]{{\color{#1}\textbf{\emph{#2}}}}
+\newcommand{\R}[1]{{\color{red}#1}}
+\newcommand{\RB}[1]{\Textbf{#1}}
+\newcommand{\B}[1]{{\Textbf[blue]{#1}}}
+\newcommand{\G}[1]{{\Textbf[OliveGreen]{#1}}}
+\newcommand{\Sp}{\R{\textvisiblespace}}
+\newcommand{\KWC}{K-W C\xspace}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\setcounter{secnumdepth}{3}                             % number subsubsections
+\setcounter{tocdepth}{3}                                % subsubsections in table of contents
+\makeindex
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\title{\vspace*{-0.5in}
+\CC/\uC to \CFA Cheat Sheet}
+%\author{Peter A. Buhr}
+\date{}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\begin{document}
+\pagestyle{headings}
+% changed after setting pagestyle
+\renewcommand{\sectionmark}[1]{\markboth{\thesection\quad #1}{\thesection\quad #1}}
+\renewcommand{\subsectionmark}[1]{\markboth{\thesubsection\quad #1}{\thesubsection\quad #1}}
+
+%\linenumbers                                            % comment out to turn off line numbering
+
+\maketitle
+\vspace*{-0.55in}
+
+\section{Introduction}
+
+\CFA is NOT an object-oriented programming-language.
+\CFA uses parametric polymorphism and allows overloading of variables and routines:
+\begin{cfa}
+int i;  char i;  double i;		// overload name i
+int i();  double i();  char i();
+i += 1;			$\C[1.5in]{// int i}$
+i += 1.0;		$\C{// double i}$
+i += 'a'; 		$\C{// char i}$
+int j = i();	$\C{// int i()}$
+double j = i();	$\C{// double i();}$
+char j = i();	$\C{// char i()}\CRT$
+\end{cfa}
+\CFA has rebindable references.
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\multicolumn{2}{l}{\lstinline{	int x = 1, y = 2, * p1x = &x, * p1y = &y, ** p2i = &p1x,}} \\
+\multicolumn{2}{l}{\lstinline{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ && r1x = x, & r1y = y, && r2i = r1x;}} \\
+\begin{uC++}
+**p2i = 3;
+p2i = &p1y;
+**p2i = 3;
+p1x = p1y;
+**p2i = 4;
+p1x = @nullptr@;
+\end{uC++}
+&
+\begin{cfa}
+r2i = 3; $\C[1.0in]{// change x}$
+&r2i = &r1y; $\C{// change p2i / r2i}$
+r2i = 3; $\C{// change y}$
+&r1x = &r1y; $\C{// change p1x / r1x}$
+r2i = 4; $\C{// change y}$
+&r1x = @0p@; $\C{// reset}\CRT$
+\end{cfa}
+\end{tabular}
+\end{cquote}
+Non-rebindable reference (\CC reference) is a @const@ reference (@const@ pointer).
+\begin{cfa}
+int & @const@ cr = x; // must initialize, no null pointer
+int & @const@ & @const@ crcr = cr; // generalize
+\end{cfa}
+Aggregate qualification is reduced or eliminated by opening scopes using the @with@ clause.
+\begin{cfa}
+struct S { int i; int j; double m; };  // field i has same type in structures S and T
+struct T { int i; int k; int m; };
+void foo( S s, T t ) @with(s, t)@ {   // open structure scope s and t in parallel
+	j + k;				$\C[1.6in]{// unambiguous, s.j + t.k}$
+	m = 5.0;			$\C{// unambiguous, s.m = 5.0}$
+	m = 1;				$\C{// unambiguous, t.m = 1}$
+	int a = m;			$\C{// unambiguous, a = t.m}$
+	double b = m;		$\C{// unambiguous, b = s.m}$
+	int c = s.i + t.i;	$\C{// unambiguous with qualification}$
+	(double)m;			$\C{// unambiguous with cast s.m}\CRT$
+}
+\end{cfa}
+\noindent
+In subsequent code examples, the left example is \CC/\uC and the right example is \CFA.
+
+
+\section{Looping}
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\begin{uC++}
+for ( ;; ) { ... } / while ( true ) { ... }
+for ( int i = 0; i < 10; i += 1 ) { ... }
+for ( int i = 5; i < 15; i += 2 ) { ... }
+int i = 0
+for ( i = 0; i < 10; i += 1 ) { ... }
+if ( i == 10 ) { ... }
+\end{uC++}
+&
+\begin{cfa}
+for () { ... } / while () { ... }
+for ( 10 ) { ... } / for ( i; 10 ) { ... }
+for ( i; 5~15~2 ) { ... }
+
+for ( i; 10 ) { ... }
+else { ... } // i == 10
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{Exceptions}
+
+Currently, \CFA uses macros @ExceptionDecl@ and @ExceptionInst@ to declare and instantiate an exception.
+\begin{cquote}
+\begin{tabular}{l|ll}
+\begin{uC++}
+
+struct E {		// local or global scope
+	... // exception fields
+};
+try {
+	...
+	if ( ... ) _Resume E( /* initialization */ );
+	if ( ... ) _Throw E( /* initialization */ );
+	...
+} _CatchResume( E & ) { // should be reference
+	...
+} catch( E & ) {
+	...
+}
+\end{uC++}
+&
+\begin{cfa}
+#include <Exception.hfa>
+@ExceptionDecl@( E,		// must be global scope
+	... // exception fields
+);
+try {
+	...
+	if ( ... ) throwResume @ExceptionInst@( E, /* intialization */ );
+	if ( ... ) throw @ExceptionInst@( E, /* intialization */ );
+	...
+} catchResume( E * ) { // must be pointer
+	...
+} catch( E * ) {
+	...
+}
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{Stream I/O}
+
+\CFA output streams automatically separate values and insert a newline at the end of the print.
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\begin{uC++}
+#include <@iostream@>
+using namespace std;
+int i;   double d;   char c;
+cin >> i >> d >> c;
+cout << i << ' ' << d << ' ' << c | endl;
+\end{uC++}
+&
+\begin{cfa}
+#include <@fstream.hfa@>
+
+int i;   double d;   char c;
+sin | i | d | c;
+sout | i | d | c
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{String}
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\multicolumn{2}{l}{\lstinline{string s1, s2;}} \\
+\begin{uC++}
+s1 = "hi";
+s2 = s1;
+s1 += s2;
+s1 == s2; s1 != s2;
+s1 < s2; s1 <= s2; s1 > s2; s1 >= s2;
+s1.length();
+s1[3];
+s1.substr( 2 ); s1.substr( 2, 3 );
+s1.replace( 2, 5, s2 );
+s1.find( s2 ), s1.rfind( s2 );
+s1.find_first_of( s2 ); s1.find_last_of( s2 );
+s1.find_first_not_of(s2 ); s1.find_last_not_of( s2 );
+getline( cin, s1 );
+cout << s1 << endl;
+\end{uC++}
+&
+\begin{cfa}
+s1 = "hi";
+s2 = s1;
+s1 += s2;
+s1 == s2; s1 != s2;
+s1 < s2; s1 <= s2; s1 > s2; s1 >= s2;
+size( s1 );
+s1[3];
+s1( 2 ); s1( 2, 3 );
+//s1.replace( 2, 5, s2 );
+find( s1, s2 ), rfind( s1, s2 );
+find_first_of( .substr, s2 ); s1.find_last_of( s2 );
+s1.find_first_not_of(s2 ); s1.find_last_not_of( s2 );
+sin | getline( s1 );
+sout | s1;
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{Constructor / Destructor}
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\begin{uC++}
+struct S {
+	... // fields
+	@S@(...) { ... }
+	@~S@(...) { ... }
+};
+\end{uC++}
+&
+\begin{cfa}
+struct S {
+	... // fields
+};
+@?{}@( @S & s,@ ...) { ... }
+@^?{}@( @S & s@ ) { ... }
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{\texorpdfstring{Structures (object-oriented \protect\vs routine style)}{Structures (object-oriented vs. routine style)}}
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\begin{uC++}
+struct S {
+	int i = 0;
+	int setter( int j ) { int t = i; i = j; return t; }
+	int getter() { return i; }
+};
+
+S s;
+@s.@setter( 3 );  // object-oriented call
+int k = @s.@getter();
+\end{uC++}
+&
+\begin{cfa}
+struct S {
+	int i;
+};
+void ?{}( S & s ) { s.i = 0; }
+int setter( @S & s,@ int j ) @with(s)@ { int t = i; i = j; return t; }
+int getter( @S & s@ ) @with(s)@ { return i; }
+S s;
+setter( @s,@ 3 );  // normal routine call
+int k = getter( @s@ );
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{\texorpdfstring{\lstinline{uNoCtor}}{uNoCtor}}
+
+\begin{cquote}
+\begin{tabular}{l|l}
+\begin{uC++}
+struct S {
+	int i;
+	S( int i ) { S::i = i; cout << S::i << endl; }
+};
+@uNoCtor<S>@ s[10];
+int main() {
+	for ( int i = 0; i < 10; i += 1 ) {
+		s[i].ctor( i );
+	}
+	for ( int i = 0; i < 10; i += 1 ) {
+		cout << s[i]@->@i << endl;
+	}
+}
+\end{uC++}
+&
+\begin{cfa}
+struct S {
+	int i;
+};
+void ?{}( S & s, int i ) { s.i = i; sout | s.i; }
+S s[10] @$\color{red}@$= {}@;
+int main() {
+	for ( i; 10 ) {
+		?{}( s[i], i );  // call constructor
+	}
+	for ( i; 10 ) {
+		sout | s[i]@.@i; // dot not arrow
+	}
+}
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{Coroutines}
+
+\begin{cquote}
+\begin{tabular}{l|ll}
+\begin{uC++}
+
+_Coroutine C {
+	// private coroutine fields
+	void main() {
+		... suspend(); ...
+		... _Resume E( ... ) _At partner;
+	}
+  public:
+	void mem( ... ) {
+		... resume() ...
+	}
+};
+\end{uC++}
+&
+\begin{cfa}
+#include <$coroutine$.hfa>
+coroutine C {
+	// private coroutine fields
+
+};
+void main( C & c ) {
+	... suspend; ... // keyword not routine
+	... resumeAt( partner, ExceptionInst( E, ... ) );
+}
+void mem( C & c, ... ) {
+	... resume(); ...
+}
+\end{cfa}
+\\
+\multicolumn{2}{l}{\lstinline{C c;}}
+\end{tabular}
+\end{cquote}
+
+
+\section{Locks}
+
+\begin{cquote}
+\begin{tabular}{l|ll}
+\begin{uC++}
+
+uOwnerLock m;
+uCondLock s;
+bool avail = true;
+m.acquire();
+if ( ! avail ) s.wait( m );
+else {
+	avail = false;
+	m.release();
+}
+@osacquire( cout )@ << i << endl;
+\end{uC++}
+&
+\begin{cfa}
+#include <locks.hfa>
+owner_lock m;
+condition_variable( owner_lock ) s;
+bool avail = true;
+lock( m );
+if ( ! avail ) wait( s, m );
+else {
+	avail = false;
+	unlock( m );
+}
+@mutex( sout )@ sout | i;  // safe I/O
+\end{cfa}
+\end{tabular}
+\end{cquote}
+
+
+\section{Monitors}
+
+\begin{cquote}
+\begin{tabular}{l|ll}
+\begin{uC++}
+
+@_Monitor@ M {
+	@uCondition@ c;
+	bool avail = true;
+  public:
+
+	void rtn() {
+		if ( ! avail ) c.wait();
+		else avail = false;
+	}
+};
+\end{uC++}
+&
+\begin{cfa}
+#include <$monitor$.hfa>
+@monitor@ M {
+	@condition@ c;
+	bool avail;
+};
+void ?{}( M & m ) { m.avail = true; }
+void rtn( M & m ) with( m ) {
+	if ( ! avail ) wait( c );
+	else avail = false;
+}
+
+\end{cfa}
+\\
+\multicolumn{2}{l}{\lstinline{M m;}}
+\end{tabular}
+\end{cquote}
+
+
+\section{Threads}
+
+\begin{cquote}
+\begin{tabular}{l|ll}
+\begin{uC++}
+
+@_Task@ T {
+	// private task fields
+	void main() {
+		... _Resume E( ... ) _At partner;
+	}
+  public:
+};
+\end{uC++}
+&
+\begin{cfa}
+#include <$thread$.hfa>
+@thread@ T {
+	// private task fields
+
+};
+void main( @T & t@ ) {
+	... resumeAt( partner, ExceptionInst( E, ... ) );
+}
+\end{cfa}
+\\
+\multicolumn{2}{l}{\lstinline{T t; // start thread in main routine}}
+\end{tabular}
+\end{cquote}
+
+
+\input{uC++toCFA.ind}
+
+% \bibliographystyle{plain}
+% \bibliography{pl}
+
+\end{document}
+
+% Local Variables: %
+% tab-width: 4 %
+% fill-column: 100 %
+% compile-command: "make" %
+% End: %
Index: libcfa/src/common.hfa
===================================================================
--- libcfa/src/common.hfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ libcfa/src/common.hfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -69,12 +69,12 @@
 	T min( T v1, T v2 ) { return v1 < v2 ? v1 : v2; }
 
-	forall( T, Ts... | { T min( T, T ); T min( T, Ts ); } )
-	T min( T v1, T v2, Ts vs ) { return min( min( v1, v2 ), vs ); }
+	forall( T, Ts... | { T min( T, T ); T min( T, T, Ts ); } )
+	T min( T v1, T v2, T v3, Ts vs ) { return min( min( v1, v2 ), v3, vs ); }
 
 	forall( T | { int ?>?( T, T ); } )
 	T max( T v1, T v2 ) { return v1 > v2 ? v1 : v2; }
 
-	forall( T, Ts... | { T max( T, T ); T max( T, Ts ); } )
-	T max( T v1, T v2, Ts vs ) { return max( max( v1, v2 ), vs ); }
+	forall( T, Ts... | { T max( T, T ); T max( T, T, Ts ); } )
+	T max( T v1, T v2, T v3, Ts vs ) { return max( max( v1, v2 ), v3, vs ); }
 
 	forall( T | { T min( T, T ); T max( T, T ); } )
Index: src/GenPoly/GenPoly.cc
===================================================================
--- src/GenPoly/GenPoly.cc	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ src/GenPoly/GenPoly.cc	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -48,8 +48,9 @@
 		}
 
-		bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const ast::TypeSubstitution * env) {
-			for (auto &param : params) {
-				auto paramType = param.strict_as<ast::TypeExpr>();
-				if (isPolyType(paramType->type, env)) return true;
+		bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const ast::TypeSubstitution * env ) {
+			for ( auto &param : params ) {
+				auto paramType = param.as<ast::TypeExpr>();
+				assertf( paramType, "Aggregate parameters should be type expressions" );
+				if ( isPolyType( paramType->type, env ) ) return true;
 			}
 			return false;
@@ -62,4 +63,13 @@
 				assertf(paramType, "Aggregate parameters should be type expressions");
 				if ( isPolyType( paramType->get_type(), tyVars, env ) ) return true;
+			}
+			return false;
+		}
+
+		bool hasPolyParams( const std::vector<ast::ptr<ast::Expr>> & params, const TypeVarMap & typeVars, const ast::TypeSubstitution * env ) {
+			for ( auto & param : params ) {
+				auto paramType = param.as<ast::TypeExpr>();
+				assertf( paramType, "Aggregate parameters should be type expressions" );
+				if ( isPolyType( paramType->type, typeVars, env ) ) return true;
 			}
 			return false;
@@ -185,19 +195,4 @@
 	}
 
-	const ast::Type * isPolyType(const ast::Type * type, const TyVarMap & tyVars, const ast::TypeSubstitution * env) {
-		type = replaceTypeInst( type, env );
-
-		if ( auto typeInst = dynamic_cast< const ast::TypeInstType * >( type ) ) {
-			if ( tyVars.contains( typeInst->typeString() ) ) return type;
-		} else if ( auto arrayType = dynamic_cast< const ast::ArrayType * >( type ) ) {
-			return isPolyType( arrayType->base, env );
-		} else if ( auto structType = dynamic_cast< const ast::StructInstType* >( type ) ) {
-			if ( hasPolyParams( structType->params, env ) ) return type;
-		} else if ( auto unionType = dynamic_cast< const ast::UnionInstType* >( type ) ) {
-			if ( hasPolyParams( unionType->params, env ) ) return type;
-		}
-		return nullptr;
-	}
-
 const ast::Type * isPolyType( const ast::Type * type,
 		const TypeVarMap & typeVars, const ast::TypeSubstitution * subst ) {
@@ -207,9 +202,9 @@
 		if ( typeVars.contains( *inst ) ) return type;
 	} else if ( auto array = dynamic_cast< const ast::ArrayType * >( type ) ) {
-		return isPolyType( array->base, subst );
+		return isPolyType( array->base, typeVars, subst );
 	} else if ( auto sue = dynamic_cast< const ast::StructInstType * >( type ) ) {
-		if ( hasPolyParams( sue->params, subst ) ) return type;
+		if ( hasPolyParams( sue->params, typeVars, subst ) ) return type;
 	} else if ( auto sue = dynamic_cast< const ast::UnionInstType * >( type ) ) {
-		if ( hasPolyParams( sue->params, subst ) ) return type;
+		if ( hasPolyParams( sue->params, typeVars, subst ) ) return type;
 	}
 	return nullptr;
Index: tests/.expect/minmax.txt
===================================================================
--- tests/.expect/minmax.txt	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/.expect/minmax.txt	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -20,2 +20,10 @@
 double			4. 3.1	max 4.
 long double		4. 3.1	max 4.
+
+3 arguments
+2 3 4	min 2	max 4
+4 2 3	min 2	max 4
+3 4 2	min 2	max 4
+4 arguments
+3 2 5 4	min 2	max 5
+5 3 4 2	min 2	max 5
Index: tests/concurrency/actors/dynamic.cfa
===================================================================
--- tests/concurrency/actors/dynamic.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/dynamic.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -9,61 +9,57 @@
 struct derived_actor { inline actor; };
 struct derived_msg {
-    inline message;
-    int cnt;
+	inline message;
+	int cnt;
 };
 
 void ?{}( derived_msg & this, int cnt ) {
-    ((message &) this){ Delete };
-    this.cnt = cnt;
+	set_allocation( this, Delete );
+	this.cnt = cnt;
 }
 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
 
 allocation receive( derived_actor & receiver, derived_msg & msg ) {
-    if ( msg.cnt >= Times ) {
-        sout | "Done";
-        return Delete;
-    }
-    derived_msg * d_msg = alloc();
-    (*d_msg){ msg.cnt + 1 };
-    derived_actor * d_actor = alloc();
-    (*d_actor){};
-    *d_actor | *d_msg;
-    return Delete;
+	if ( msg.cnt >= Times ) {
+		sout | "Done";
+		return Delete;
+	}
+	derived_msg * d_msg = alloc();
+	(*d_msg){ msg.cnt + 1 };
+	derived_actor * d_actor = alloc();
+	(*d_actor){};
+	*d_actor | *d_msg;
+	return Delete;
 }
 
 int main( int argc, char * argv[] ) {
-    switch ( argc ) {
+	switch ( argc ) {
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Times = atoi( argv[1] );
-			if ( Times < 1 ) goto Usage;
+			Times = ato( argv[1] );
+			if ( Times < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0] | " [ times (> 0) ]";
-		exit( EXIT_FAILURE );
+		exit | "Usage: " | argv[0] | " [ times (> 0) ]";
 	} // switch
 
-    printf("starting\n");
+	sout | "starting";
 
-    executor e{ 0, 1, 1, false };
-    start_actor_system( e );
+	executor e{ 0, 1, 1, false };
+	start_actor_system( e );
 
-    printf("started\n");
+	sout | "started";
 
-    derived_msg * d_msg = alloc();
-    (*d_msg){};
-    derived_actor * d_actor = alloc();
-    (*d_actor){};
-    *d_actor | *d_msg;
+	derived_msg * d_msg = alloc();
+	(*d_msg){};
+	derived_actor * d_actor = alloc();
+	(*d_actor){};
+	*d_actor | *d_msg;
 
-    printf("stopping\n");
+	sout | "stopping";
 
-    stop_actor_system();
+	stop_actor_system();
 
-    printf("stopped\n");
-
-    return 0;
+	sout | "stopped";
 }
Index: tests/concurrency/actors/executor.cfa
===================================================================
--- tests/concurrency/actors/executor.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/executor.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -10,14 +10,14 @@
 static int ids = 0;
 struct d_actor { 
-    inline actor;
-    d_actor * gstart;
-    int id, rounds, recs, sends;
+	inline actor;
+	d_actor * gstart;
+	int id, rounds, recs, sends;
 };
 void ?{}( d_actor & this ) with(this) {
-    id = ids++;
-    gstart = (&this + (id / Set * Set - id)); // remember group-start array-element
-    rounds = Set * Rounds;	// send at least one message to each group member
-    recs = 0;
-    sends = 0;
+	id = ids++;
+	gstart = (&this + (id / Set * Set - id)); // remember group-start array-element
+	rounds = Set * Rounds;	// send at least one message to each group member
+	recs = 0;
+	sends = 0;
 }
 
@@ -25,53 +25,52 @@
 
 allocation receive( d_actor & this, d_msg & msg ) with( this ) {
-    if ( recs == rounds ) return Finished;
-    if ( recs % Batch == 0 ) {
-        for ( i; Batch ) {
-            gstart[sends % Set] | shared_msg;
-            sends += 1;
-        }
-    }
-    recs += 1;
-    return Nodelete;
+	if ( recs == rounds ) return Finished;
+	if ( recs % Batch == 0 ) {
+		for ( i; Batch ) {
+			gstart[sends % Set] | shared_msg;
+			sends += 1;
+		}
+	}
+	recs += 1;
+	return Nodelete;
 }
 
 int main( int argc, char * argv[] ) {
-    switch ( argc ) {
+	switch ( argc ) {
 	  case 7:
 		if ( strcmp( argv[6], "d" ) != 0 ) {			// default ?
-			BufSize = atoi( argv[6] );
-			if ( BufSize < 0 ) goto Usage;
+			BufSize = ato( argv[6] );
+			if ( BufSize < 0 ) fallthru default;
 		} // if
 	  case 6:
 		if ( strcmp( argv[5], "d" ) != 0 ) {			// default ?
-			Batch = atoi( argv[5] );
-			if ( Batch < 1 ) goto Usage;
+			Batch = ato( argv[5] );
+			if ( Batch < 1 ) fallthru default;
 		} // if
 	  case 5:
 		if ( strcmp( argv[4], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[4] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[4] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 4:
 		if ( strcmp( argv[3], "d" ) != 0 ) {			// default ?
-			Rounds = atoi( argv[3] );
-			if ( Rounds < 1 ) goto Usage;
+			Rounds = ato( argv[3] );
+			if ( Rounds < 1 ) fallthru default;
 		} // if
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Set = atoi( argv[2] );
-			if ( Set < 1 ) goto Usage;
+			Set = ato( argv[2] );
+			if ( Set < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Actors = atoi( argv[1] );
-			if ( Actors < 1 || Actors <= Set || Actors % Set != 0 ) goto Usage;
+			Actors = ato( argv[1] );
+			if ( Actors < 1 || Actors <= Set || Actors % Set != 0 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
-             | " [ actors (> 0 && > set && actors % set == 0 ) | 'd' (default " | Actors
+		exit | "Usage: " | argv[0]
+			 | " [ actors (> 0 && > set && actors % set == 0 ) | 'd' (default " | Actors
 			 | ") ] [ set (> 0) | 'd' (default " | Set
 			 | ") ] [ rounds (> 0) | 'd' (default " | Rounds
@@ -80,16 +79,15 @@
 			 | ") ] [ buffer size (>= 0) | 'd' (default " | BufSize
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
 
-    executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 512, true };
+	executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 512, true };
 
-    printf("starting\n");
+	sout | "starting";
 
-    start_actor_system( e );
+	start_actor_system( e );
 
-    printf("started\n");
+	sout | "started";
 
-    d_actor actors[ Actors ];
+	d_actor actors[ Actors ];
 
 	for ( i; Actors ) {
@@ -97,10 +95,8 @@
 	} // for
 
-    printf("stopping\n");
+	sout | "stopping";
 
-    stop_actor_system();
+	stop_actor_system();
 
-    printf("stopped\n");
-
-    return 0;
+	sout | "stopped";
 }
Index: tests/concurrency/actors/inherit.cfa
===================================================================
--- tests/concurrency/actors/inherit.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/inherit.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -18,5 +18,5 @@
 
 allocation handle() {
-    return Finished;
+	return Finished;
 }
 
@@ -27,30 +27,30 @@
 
 int main() {
-    sout | "Start";
-    {
-        start_actor_system();
-        D_msg * dm = alloc();
-        (*dm){};
-        D_msg2 * dm2 = alloc();
-        (*dm2){};
-        Server2 * s = alloc();
-        (*s){};
-        Server2 * s2 = alloc();
-        (*s2){};
-        *s | *dm;
-        *s2 | *dm2;
-        stop_actor_system();
-    }
-    {
-        start_actor_system();
-        Server s[2];
-        D_msg * dm = alloc();
-        (*dm){};
-        D_msg2 * dm2 = alloc();
-        (*dm2){};
-        s[0] | *dm;
-        s[1] | *dm2;
-        stop_actor_system();
-    }
-    sout | "Finished";
+	sout | "Start";
+	{
+		start_actor_system();
+		D_msg * dm = alloc();
+		(*dm){};
+		D_msg2 * dm2 = alloc();
+		(*dm2){};
+		Server2 * s = alloc();
+		(*s){};
+		Server2 * s2 = alloc();
+		(*s2){};
+		*s | *dm;
+		*s2 | *dm2;
+		stop_actor_system();
+	}
+	{
+		start_actor_system();
+		Server s[2];
+		D_msg * dm = alloc();
+		(*dm){};
+		D_msg2 * dm2 = alloc();
+		(*dm2){};
+		s[0] | *dm;
+		s[1] | *dm2;
+		stop_actor_system();
+	}
+	sout | "Finished";
 }
Index: tests/concurrency/actors/inline.cfa
===================================================================
--- tests/concurrency/actors/inline.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/inline.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -3,15 +3,15 @@
 
 struct d_actor {
-    inline actor;
+	inline actor;
 };
 struct msg_wrapper {
-    int b;
-    inline message;
+	int b;
+	inline message;
 };
 void ^?{}( msg_wrapper & this ) { sout | "msg_wrapper dtor"; }
 
 struct d_msg {
-    int m;
-    inline msg_wrapper;
+	int m;
+	inline msg_wrapper;
 };
 void ?{}( d_msg & this, int m, int b ) { this.m = m; this.b = b; set_allocation( this, Delete ); }
@@ -19,40 +19,40 @@
 
 allocation receive( d_actor &, d_msg & msg ) {
-    sout | msg.m;
-    sout | msg.b;
-    return Finished;
+	sout | msg.m;
+	sout | msg.b;
+	return Finished;
 }
 
 struct d_msg2 {
-    int m;
-    inline msg_wrapper;
+	int m;
+	inline msg_wrapper;
 };
 void ^?{}( d_msg2 & this ) { sout | "d_msg2 dtor";}
 
 allocation receive( d_actor &, d_msg2 & msg ) {
-    sout | msg.m;
-    return Finished;
+	sout | msg.m;
+	return Finished;
 }
 
 int main() {
-    processor p;
-    {
-        start_actor_system();                                // sets up executor
-        d_actor da;
-        d_msg * dm = alloc();
-        (*dm){ 42, 2423 };
-        da | *dm;
-        stop_actor_system();                                // waits until actors finish
-    }
-    {
-        start_actor_system();                                // sets up executor
-        d_actor da;
-        d_msg2 dm{ 29079 };
-        set_allocation( dm, Nodelete );
-        msg_wrapper * mw = &dm;
-        message * mg = &dm;
-        virtual_dtor * v = &dm;
-        da | dm;
-        stop_actor_system();                                // waits until actors finish
-    }
+	processor p;
+	{
+		start_actor_system();								// sets up executor
+		d_actor da;
+		d_msg * dm = alloc();
+		(*dm){ 42, 2423 };
+		da | *dm;
+		stop_actor_system();								// waits until actors finish
+	}
+	{
+		start_actor_system();								// sets up executor
+		d_actor da;
+		d_msg2 dm{ 29079 };
+		set_allocation( dm, Nodelete );
+		msg_wrapper * mw = &dm;
+		message * mg = &dm;
+		virtual_dtor * v = &dm;
+		da | dm;
+		stop_actor_system();								// waits until actors finish
+	}
 }
Index: tests/concurrency/actors/matrix.cfa
===================================================================
--- tests/concurrency/actors/matrix.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/matrix.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -5,60 +5,59 @@
 #include <stdio.h>
 
-unsigned int xr = 500, xc = 500, yc = 500, Processors = 1; // default values
+int xr = 500, xc = 500, yc = 500, Processors = 1; // default values, must be signed
 
 struct derived_actor { inline actor; };
 
 struct derived_msg {
-    inline message;
-    int * Z;
+	inline message;
+	int * Z;
 	int * X;
-    int ** Y;
+	int ** Y;
 };
 
 void ?{}( derived_msg & this ) {}
 void ?{}( derived_msg & this, int * Z, int * X, int ** Y ) {
-    ((message &) this){ Nodelete };
-    this.Z = Z;
-    this.X = X;
-    this.Y = Y;
+	set_allocation( this, Nodelete );
+	this.Z = Z;
+	this.X = X;
+	this.Y = Y;
 }
 
 allocation receive( derived_actor & receiver, derived_msg & msg ) {
-    for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products
-        msg.Z[i] = 0;
-        for ( unsigned int j = 0; j < xc; j += 1 ) {
-            msg.Z[i] += msg.X[j] * msg.Y[j][i];
-        } // for
-    } // for
-    return Finished;
+	for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products
+		msg.Z[i] = 0;
+		for ( unsigned int j = 0; j < xc; j += 1 ) {
+			msg.Z[i] += msg.X[j] * msg.Y[j][i];
+		} // for
+	} // for
+	return Finished;
 }
 
 int main( int argc, char * argv[] ) {
-    switch ( argc ) {
+	switch ( argc ) {
 	  case 5:
 		if ( strcmp( argv[4], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[4] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[4] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 4:
 		if ( strcmp( argv[3], "d" ) != 0 ) {			// default ?
-			xr = atoi( argv[3] );
-			if ( xr < 1 ) goto Usage;
+			xr = ato( argv[3] );
+			if ( xr < 1 ) fallthru default;
 		} // if
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			xc = atoi( argv[2] );
-			if ( xc < 1 ) goto Usage;
+			xc = ato( argv[2] );
+			if ( xc < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			yc = atoi( argv[1] );
-			if ( yc < 1 ) goto Usage;
+			yc = ato( argv[1] );
+			if ( yc < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
 			 | " [ yc (> 0) | 'd' (default " | yc
 			 | ") ] [ xc (> 0) | 'd' (default " | xc
@@ -66,8 +65,7 @@
 			 | ") ] [ processors (> 0) | 'd' (default " | Processors
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
 
-    unsigned int r, c;
+	unsigned int r, c;
 	int * Z[xr], * X[xr], * Y[xc];
 
@@ -88,15 +86,15 @@
 	} // for
 
-    executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 16, true };
+	executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 16, true };
 
-    printf("starting\n");
+	sout | "starting";
 
-    start_actor_system( e );
+	start_actor_system( e );
 
-    printf("started\n");
+	sout | "started";
 
-    derived_msg messages[xr];
+	derived_msg messages[xr];
 
-    derived_actor actors[xr];
+	derived_actor actors[xr];
 
 	for ( unsigned int r = 0; r < xr; r += 1 ) {
@@ -108,18 +106,16 @@
 	} // for
 
-    printf("stopping\n");
+	sout | "stopping";
 
-    stop_actor_system();
+	stop_actor_system();
 
-    printf("stopped\n");
+	sout | "stopped";
 
-    for ( r = 0; r < xr; r += 1 ) {						// deallocate X and Z matrices
+	for ( r = 0; r < xr; r += 1 ) {						// deallocate X and Z matrices
 		free( X[r] );
-        free( Z[r] );
+		free( Z[r] );
 	} // for
 	for ( r = 0; r < xc; r += 1 ) {						// deallocate Y matrix
-        free( Y[r] );
+		free( Y[r] );
 	} // for
-
-    return 0;
 }
Index: tests/concurrency/actors/pingpong.cfa
===================================================================
--- tests/concurrency/actors/pingpong.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/pingpong.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -10,8 +10,9 @@
 
 struct p_msg {
-    inline message;
-    size_t count;
+	inline message;
+	size_t count;
 };
-static inline void ?{}( p_msg & this ) { ((message &)this){}; this.count = 0; }
+//static inline void ?{}( p_msg & this ) { ((message &)this){}; this.count = 0; }
+static inline void ?{}( p_msg & this ) { this.count = 0; }
 
 ping * pi;
@@ -20,21 +21,21 @@
 
 allocation receive( ping & receiver, p_msg & msg ) {
-    msg.count++;
-    if ( msg.count > times ) return Finished;
+	msg.count++;
+	if ( msg.count > times ) return Finished;
 
-    allocation retval = Nodelete;
-    if ( msg.count == times ) retval = Finished;
-    *po | msg;
-    return retval;
+	allocation retval = Nodelete;
+	if ( msg.count == times ) retval = Finished;
+	*po | msg;
+	return retval;
 }
 
 allocation receive( pong & receiver, p_msg & msg ) {
-    msg.count++;
-    if ( msg.count > times ) return Finished;
-    
-    allocation retval = Nodelete;
-    if ( msg.count == times ) retval = Finished;
-    *pi | msg;
-    return retval;
+	msg.count++;
+	if ( msg.count > times ) return Finished;
+	
+	allocation retval = Nodelete;
+	if ( msg.count == times ) retval = Finished;
+	*pi | msg;
+	return retval;
 }
 
@@ -42,19 +43,17 @@
 
 int main( int argc, char * argv[] ) {
-    printf("start\n");
+	sout | "start";
 
-    processor p[Processors - 1];
+	processor p[Processors - 1];
 
-    start_actor_system( Processors ); // test passing number of processors
+	start_actor_system( Processors ); // test passing number of processors
+	ping pi_actor;
+	pong po_actor;
+	po = &po_actor;
+	pi = &pi_actor;
+	p_msg m;
+	pi_actor | m;
+	stop_actor_system();
 
-    ping pi_actor;
-    pong po_actor;
-    po = &po_actor;
-    pi = &pi_actor;
-    p_msg m;
-    pi_actor | m;
-    stop_actor_system();
-
-    printf("end\n");
-    return 0;
+	sout | "end";
 }
Index: tests/concurrency/actors/poison.cfa
===================================================================
--- tests/concurrency/actors/poison.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/poison.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -11,40 +11,39 @@
 
 int main() {
-    sout | "Start";
+	sout | "Start";
 
-    sout | "Finished";
-    {
-        start_actor_system();
-        Server s[10];
-        for ( i; 10 ) {
-            s[i] | finished_msg;
-        }
-        stop_actor_system();
-    }
+	sout | "Finished";
+	{
+		start_actor_system();
+		Server s[10];
+		for ( i; 10 ) {
+			s[i] | finished_msg;
+		}
+		stop_actor_system();
+	}
 
-    sout | "Delete";
-    {
-        start_actor_system();
-        for ( i; 10 ) {
-            Server * s = alloc();
-            (*s){};
-            (*s) | delete_msg;
-        }
-        stop_actor_system();
-    }
+	sout | "Delete";
+	{
+		start_actor_system();
+		for ( i; 10 ) {
+			Server * s = alloc();
+			(*s){};
+			(*s) | delete_msg;
+		}
+		stop_actor_system();
+	}
 
-    sout | "Destroy";
-    {
-        start_actor_system();
-        Server s[10];
-        for ( i; 10 )
-            s[i] | destroy_msg;
-        stop_actor_system();
-        for ( i; 10 )
-            if (s[i].val != 777)
-                sout | "Error: dtor not called correctly.";
-    }
+	sout | "Destroy";
+	{
+		start_actor_system();
+		Server s[10];
+		for ( i; 10 )
+			s[i] | destroy_msg;
+		stop_actor_system();
+		for ( i; 10 )
+			if (s[i].val != 777)
+				sout | "Error: dtor not called correctly.";
+	}
 
-    sout | "Done";
-    return 0;
+	sout | "Done";
 }
Index: tests/concurrency/actors/static.cfa
===================================================================
--- tests/concurrency/actors/static.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/static.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -9,58 +9,54 @@
 struct derived_actor { inline actor; };
 struct derived_msg {
-    inline message;
-    int cnt;
+	inline message;
+	int cnt;
 };
 
 void ?{}( derived_msg & this, int cnt ) {
-    ((message &) this){ Nodelete };
-    this.cnt = cnt;
+	set_allocation( this, Nodelete );
+	this.cnt = cnt;
 }
 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
 
 allocation receive( derived_actor & receiver, derived_msg & msg ) {
-    if ( msg.cnt >= Times ) {
-        sout | "Done";
-        return Finished;
-    }
-    msg.cnt++;
-    receiver | msg;
-    return Nodelete;
+	if ( msg.cnt >= Times ) {
+		sout | "Done";
+		return Finished;
+	}
+	msg.cnt++;
+	receiver | msg;
+	return Nodelete;
 }
 
 int main( int argc, char * argv[] ) {
-    switch ( argc ) {
+	switch ( argc ) {
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Times = atoi( argv[1] );
-			if ( Times < 1 ) goto Usage;
+			Times = ato( argv[1] );
+			if ( Times < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0] | " [ times (> 0) ]";
-		exit( EXIT_FAILURE );
+		exit | "Usage: " | argv[0] | " [ times (> 0) ]";
 	} // switch
 
-    printf("starting\n");
+	sout | "starting";
 
-    executor e{ 0, 1, 1, false };
-    start_actor_system( e );
+	executor e{ 0, 1, 1, false };
+	start_actor_system( e );
 
-    printf("started\n");
+	sout | "started";
 
-    derived_msg msg;
+	derived_msg msg;
 
-    derived_actor actor;
+	derived_actor actor;
 
-    actor | msg;
+	actor | msg;
 
-    printf("stopping\n");
+	sout | "stopping";
 
-    stop_actor_system();
+	stop_actor_system();
 
-    printf("stopped\n");
-
-    return 0;
+	sout | "stopped";
 }
Index: tests/concurrency/actors/types.cfa
===================================================================
--- tests/concurrency/actors/types.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/actors/types.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -9,34 +9,34 @@
 
 struct derived_actor {
-    inline actor;
-    int counter;
+	inline actor;
+	int counter;
 };
 static inline void ?{}( derived_actor & this ) { ((actor &)this){}; this.counter = 0; }
 
 struct d_msg {
-    inline message;
-    int num;
+	inline message;
+	int num;
 };
 
 // this isn't a valid receive routine since int is not a message type
 allocation receive( derived_actor & receiver, int i ) with( receiver ) {
-    mutex(sout) sout | i;
-    counter++;
-    if ( counter == 2 ) return Finished;
-    return Nodelete; 
+	mutex(sout) sout | i;
+	counter++;
+	if ( counter == 2 ) return Finished;
+	return Nodelete; 
 }
 
 allocation receive( derived_actor & receiver, d_msg & msg ) {
-    return receive( receiver, msg.num );
+	return receive( receiver, msg.num );
 }
 
 struct derived_actor2 {
-    struct nested { int i; }; // testing nested before inline
-    inline actor;
+	struct nested { int i; }; // testing nested before inline
+	inline actor;
 };
 
 allocation receive( derived_actor2 & receiver, d_msg & msg ) {
-    mutex(sout) sout | msg.num;
-    return Finished;
+	mutex(sout) sout | msg.num;
+	return Finished;
 }
 
@@ -44,17 +44,17 @@
 struct derived_actor4 { inline derived_actor3; };
 struct d_msg2 {
-    inline message;
-    int num;
+	inline message;
+	int num;
 };
 
 allocation receive( derived_actor3 & receiver, d_msg & msg ) {
-    mutex(sout) sout | msg.num;
-    if ( msg.num == -1 ) return Nodelete;
-    return Finished;
+	mutex(sout) sout | msg.num;
+	if ( msg.num == -1 ) return Nodelete;
+	return Finished;
 }
 
 allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
-    mutex(sout) sout | msg.num;
-    return Finished;
+	mutex(sout) sout | msg.num;
+	return Finished;
 }
 
@@ -62,67 +62,66 @@
 
 int main( int argc, char * argv[] ) {
-    printf("start\n");
+	sout | "start";
 
-    processor p[Processors - 1];
+	processor p[Processors - 1];
 
-    printf("basic test\n"); 
-    start_actor_system( Processors ); // test passing number of processors
-    derived_actor a;
-    d_msg b, c;
-    b.num = 1;
-    c.num = 2;
-    a | b | c;
-    stop_actor_system();
+	sout | "basic test"; 
+	start_actor_system( Processors ); // test passing number of processors
+	derived_actor a;
+	d_msg b, c;
+	b.num = 1;
+	c.num = 2;
+	a | b | c;
+	stop_actor_system();
 
-    printf("same message and different actors test\n");
-    start_actor_system(); // let system detect # of processors
-    derived_actor2 d_ac2_0, d_ac2_1;
-    d_msg d_ac2_msg;
-    d_ac2_msg.num = 3;
-    d_ac2_0 | d_ac2_msg;
-    d_ac2_1 | d_ac2_msg;
-    stop_actor_system();
+	sout | "same message and different actors test";
+	start_actor_system(); // let system detect # of processors
+	derived_actor2 d_ac2_0, d_ac2_1;
+	d_msg d_ac2_msg;
+	d_ac2_msg.num = 3;
+	d_ac2_0 | d_ac2_msg;
+	d_ac2_1 | d_ac2_msg;
+	stop_actor_system();
 
-    
-    {
-        printf("same message and different actor types test\n");
-        executor e{ 0, Processors, Processors == 1 ? 1 : Processors * 4, false };
-        start_actor_system( e ); // pass an explicit executor
-        derived_actor2 d_ac2_2;
-        derived_actor3 d_ac3_0;
-        d_msg d_ac23_msg;
-        d_ac23_msg.num = 4;
-        d_ac3_0 | d_ac23_msg;
-        d_ac2_2 | d_ac23_msg;
-        stop_actor_system();
-    } // RAII to clean up executor
+	
+	{
+		sout | "same message and different actor types test";
+		executor e{ 0, Processors, Processors == 1 ? 1 : Processors * 4, false };
+		start_actor_system( e ); // pass an explicit executor
+		derived_actor2 d_ac2_2;
+		derived_actor3 d_ac3_0;
+		d_msg d_ac23_msg;
+		d_ac23_msg.num = 4;
+		d_ac3_0 | d_ac23_msg;
+		d_ac2_2 | d_ac23_msg;
+		stop_actor_system();
+	} // RAII to clean up executor
 
-    {
-        printf("different message types, one actor test\n");
-        executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true };
-        start_actor_system( Processors );
-        derived_actor3 a3;
-        d_msg b1;
-        d_msg2 c2;
-        b1.num = -1;
-        c2.num = 5;
-        a3 | b1 | c2;
-        stop_actor_system();
-    } // RAII to clean up executor
+	{
+		sout | "different message types, one actor test";
+		executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true };
+		start_actor_system( Processors );
+		derived_actor3 a3;
+		d_msg b1;
+		d_msg2 c2;
+		b1.num = -1;
+		c2.num = 5;
+		a3 | b1 | c2;
+		stop_actor_system();
+	} // RAII to clean up executor
 
-    {
-        printf("nested inheritance actor test\n");
-        executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true };
-        start_actor_system( Processors );
-        derived_actor4 a4;
-        d_msg b1;
-        d_msg2 c2;
-        b1.num = -1;
-        c2.num = 5;
-        a4 | b1 | c2;
-        stop_actor_system();
-    } // RAII to clean up executor
+	{
+		sout | "nested inheritance actor test";
+		executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true };
+		start_actor_system( Processors );
+		derived_actor4 a4;
+		d_msg b1;
+		d_msg2 c2;
+		b1.num = -1;
+		c2.num = 5;
+		a4 | b1 | c2;
+		stop_actor_system();
+	} // RAII to clean up executor
 
-    printf("end\n");
-    return 0;
+	sout | "end";
 }
Index: tests/concurrency/channels/barrier.cfa
===================================================================
--- tests/concurrency/channels/barrier.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/barrier.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -8,5 +8,5 @@
 
 size_t total_operations = 0;
-int Processors = 1, Tasks = 5, BarrierSize = 2;
+ssize_t Processors = 1, Tasks = 5, BarrierSize = 2;		// must be signed
 
 typedef channel( int ) Channel;
@@ -65,21 +65,19 @@
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			BarrierSize = atoi( argv[2] );
-            if ( Processors < 1 ) goto Usage;
+			BarrierSize = ato( argv[2] );
+            if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[1] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors (> 0) | 'd' (default " | Processors
 			 | ") ] [ BarrierSize (> 0) | 'd' (default " | BarrierSize
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
     if ( Tasks < BarrierSize )
Index: tests/concurrency/channels/big_elems.cfa
===================================================================
--- tests/concurrency/channels/big_elems.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/big_elems.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -2,5 +2,5 @@
 #include "parallel_harness.hfa"
 
-size_t Processors = 10, Channels = 10, Producers = 40, Consumers = 40, ChannelSize = 128;
+ssize_t Processors = 10, Channels = 10, Producers = 40, Consumers = 40, ChannelSize = 128;
 
 int main() {
Index: tests/concurrency/channels/churn.cfa
===================================================================
--- tests/concurrency/channels/churn.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/churn.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -7,5 +7,5 @@
 #include <time.hfa>
 
-size_t Processors = 1, Channels = 4, Producers = 2, Consumers = 2, ChannelSize = 128;
+ssize_t Processors = 1, Channels = 4, Producers = 2, Consumers = 2, ChannelSize = 128;
 
 owner_lock o;
@@ -90,27 +90,25 @@
       case 4:
 		if ( strcmp( argv[3], "d" ) != 0 ) {			// default ?
-			if ( atoi( argv[3] ) < 1 ) goto Usage;
-			ChannelSize = atoi( argv[3] );
+			ChannelSize = ato( argv[3] );
+			if ( ChannelSize < 1 ) fallthru default;
 		} // if
       case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			if ( atoi( argv[2] ) < 1 ) goto Usage;
-			Channels = atoi( argv[2] );
+			Channels = ato( argv[2] );
+			if ( Channels < 1 ) fallthru default;
 		} // if
       case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			if ( atoi( argv[1] ) < 1 ) goto Usage;
-			Processors = atoi( argv[1] );
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors > 0 | d ]"
              | " [ producers > 0 | d ]"
              | " [ consumers > 0 | d ]"
              | " [ channels > 0 | d ]";
-		exit( EXIT_FAILURE );
     }
     processor p[Processors - 1];
Index: tests/concurrency/channels/contend.cfa
===================================================================
--- tests/concurrency/channels/contend.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/contend.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -127,21 +127,21 @@
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			ChannelSize = atoi( argv[2] );
+			ChannelSize = ato( argv[2] );
+			if ( ChannelSize < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[1] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors (> 0) | 'd' (default " | Processors
 			 | ") ] [ channel size (>= 0) | 'd' (default " | ChannelSize
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
+
     test(Processors, Channels, Producers, Consumers, ChannelSize);
 }
Index: tests/concurrency/channels/daisy_chain.cfa
===================================================================
--- tests/concurrency/channels/daisy_chain.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/daisy_chain.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -8,5 +8,5 @@
 
 size_t total_operations = 0;
-size_t Processors = 1, Tasks = 4;
+ssize_t Processors = 1, Tasks = 4;						// must be signed
 
 owner_lock o;
@@ -37,21 +37,19 @@
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Tasks = atoi( argv[2] );
-            if ( Tasks < 1 ) goto Usage;
+			Tasks = ato( argv[2] );
+            if ( Tasks < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[1] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors (> 0) | 'd' (default " | Processors
 			 | ") ] [ channel size (>= 0) | 'd' (default " | Tasks
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
     processor proc[Processors - 1];
@@ -71,5 +69,3 @@
     // sout | total_operations;
     sout | "done";
-
-    return 0;
 }
Index: tests/concurrency/channels/hot_potato.cfa
===================================================================
--- tests/concurrency/channels/hot_potato.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/hot_potato.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -8,5 +8,5 @@
 
 size_t total_operations = 0;
-size_t Processors = 1, Tasks = 4;
+ssize_t Processors = 1, Tasks = 4;						// must be signed
 
 owner_lock o;
@@ -38,27 +38,25 @@
 }
 
-
 int main( int argc, char * argv[] ) {
     switch ( argc ) {
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Tasks = atoi( argv[2] );
-            if ( Tasks < 1 ) goto Usage;
+			Tasks = ato( argv[2] );
+            if ( Tasks < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[1] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors (> 0) | 'd' (default " | Processors
 			 | ") ] [ channel size (>= 0) | 'd' (default " | Tasks
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
+
     processor proc[Processors - 1];
 
Index: tests/concurrency/channels/pub_sub.cfa
===================================================================
--- tests/concurrency/channels/pub_sub.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/channels/pub_sub.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -87,21 +87,19 @@
 	  case 3:
 		if ( strcmp( argv[2], "d" ) != 0 ) {			// default ?
-			Tasks = atoi( argv[2] );
-            if ( Tasks < 1 ) goto Usage;
+			Tasks = ato( argv[2] );
+            if ( Tasks < 1 ) fallthru default;
 		} // if
 	  case 2:
 		if ( strcmp( argv[1], "d" ) != 0 ) {			// default ?
-			Processors = atoi( argv[1] );
-			if ( Processors < 1 ) goto Usage;
+			Processors = ato( argv[1] );
+			if ( Processors < 1 ) fallthru default;
 		} // if
 	  case 1:											// use defaults
 		break;
 	  default:
-	  Usage:
-		sout | "Usage: " | argv[0]
+		exit | "Usage: " | argv[0]
              | " [ processors (> 0) | 'd' (default " | Processors
 			 | ") ] [ Tasks (> 0) | 'd' (default " | Tasks
 			 | ") ]" ;
-		exit( EXIT_FAILURE );
 	} // switch
     BarrierSize = Tasks;
Index: tests/concurrency/examples/matrixSum.cfa
===================================================================
--- tests/concurrency/examples/matrixSum.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/examples/matrixSum.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -10,10 +10,9 @@
 // Created On       : Mon Oct  9 08:29:28 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 20 08:37:53 2019
-// Update Count     : 16
+// Last Modified On : Fri Sep  8 19:05:34 2023
+// Update Count     : 19
 //
 
 #include <fstream.hfa>
-#include <kernel.hfa>
 #include <thread.hfa>
 
@@ -35,18 +34,20 @@
 
 int main() {
-	/* const */ int rows = 10, cols = 1000;
+	const int rows = 10, cols = 1000;
 	int matrix[rows][cols], subtotals[rows], total = 0;
 	processor p;										// add kernel thread
 
-	for ( r; rows ) {
+	for ( r; rows ) {									// initialize
 		for ( c; cols ) {
 			matrix[r][c] = 1;
 		} // for
 	} // for
+
 	Adder * adders[rows];
 	for ( r; rows ) {									// start threads to sum rows
 		adders[r] = &(*malloc()){ matrix[r], cols, subtotals[r] };
-//		adders[r] = new( matrix[r], cols, &subtotals[r] );
+		// adders[r] = new( matrix[r], cols, subtotals[r] );
 	} // for
+
 	for ( r; rows ) {									// wait for threads to finish
 		delete( adders[r] );
@@ -57,5 +58,4 @@
 
 // Local Variables: //
-// tab-width: 4 //
 // compile-command: "cfa matrixSum.cfa" //
 // End: //
Index: tests/concurrency/unified_locking/locks.cfa
===================================================================
--- tests/concurrency/unified_locking/locks.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/unified_locking/locks.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -1,4 +1,4 @@
 #include <stdio.h>
-#include "locks.hfa"
+#include <locks.hfa>
 #include <stdlib.hfa>
 #include <thread.hfa>
Index: tests/concurrency/unified_locking/pthread_locks.cfa
===================================================================
--- tests/concurrency/unified_locking/pthread_locks.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/unified_locking/pthread_locks.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -1,4 +1,4 @@
 #include <stdio.h>
-#include "locks.hfa"
+#include <locks.hfa>
 #include <stdlib.hfa>
 #include <thread.hfa>
Index: tests/concurrency/unified_locking/test_debug.cfa
===================================================================
--- tests/concurrency/unified_locking/test_debug.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/unified_locking/test_debug.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -1,3 +1,3 @@
-#include "locks.hfa"
+#include <locks.hfa>
 
 fast_block_lock f;
Index: tests/concurrency/unified_locking/thread_test.cfa
===================================================================
--- tests/concurrency/unified_locking/thread_test.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/concurrency/unified_locking/thread_test.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -1,4 +1,4 @@
 #include <stdio.h>
-#include "locks.hfa"
+#include <locks.hfa>
 #include <stdlib.hfa>
 #include <thread.hfa>
Index: tests/minmax.cfa
===================================================================
--- tests/minmax.cfa	(revision e3784a5091108f0d55c8a18a06008f9092acde3f)
+++ tests/minmax.cfa	(revision a2c2363a574380db06d7194fc74622a5071aae38)
@@ -45,4 +45,15 @@
 	sout | "double\t\t\t"				| 4.0 | 3.1 | "\tmax" | max( 4.0, 3.1 );
 	sout | "long double\t\t"			| 4.0l | 3.1l | "\tmax" | max( 4.0l, 3.1l );
+
+	sout | nl;
+
+	sout | "3 arguments";
+	sout | 2 | 3 | 4 | "\tmin" | min(2, 3, 4) | "\tmax" | max(2, 3, 4);
+	sout | 4 | 2 | 3 | "\tmin" | min(4, 2, 3) | "\tmax" | max(4, 2, 3);
+	sout | 3 | 4 | 2 | "\tmin" | min(3, 4, 2) | "\tmax" | max(3, 4, 2);
+
+	sout | "4 arguments";
+	sout | 3 | 2 | 5 | 4 | "\tmin" | min(3, 2, 5, 4) | "\tmax" | max(3, 2, 5, 4);
+	sout | 5 | 3 | 4 | 2 | "\tmin" | min(5, 3, 4, 2) | "\tmax" | max(5, 3, 4, 2);
 } // main
 
