Index: Jenkins/FullBuild
===================================================================
--- Jenkins/FullBuild	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ Jenkins/FullBuild	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -1,17 +1,89 @@
 #!groovy
 
+//===========================================================================================================
+// Main loop of the compilation
+//===========================================================================================================
+
+node ('master') {
+	def err = null
+
+	try {
+		//Prevent the build from exceeding 30 minutes
+		timeout(60) {
+
+			//Wrap build to add timestamp to command line
+			wrap([$class: 'TimestamperBuildWrapper']) {
+
+				stage 'Build'
+
+					results = [null, null]
+
+					parallel (
+						gcc_6_x64: { trigger_build( 'gcc-6',   'x64' ) },
+						gcc_6_x86: { trigger_build( 'gcc-6',   'x86' ) },
+						gcc_5_x64: { trigger_build( 'gcc-5',   'x64' ) },
+						gcc_5_x86: { trigger_build( 'gcc-5',   'x86' ) },
+						gcc_4_x64: { trigger_build( 'gcc-4.9', 'x64' ) },
+						gcc_4_x86: { trigger_build( 'gcc-4.9', 'x86' ) },
+						clang_x64: { trigger_build( 'clang',   'x64' ) },
+						clang_x86: { trigger_build( 'clang',   'x86' ) },
+					)
+
+				//Push latest changes to do-lang repo
+				push_build()
+			}
+		}
+	}
+
+	//If an exception is caught we need to change the status and remember to
+	//attach the build log to the email
+	catch (Exception caughtError) {
+		echo('error caught')
+
+		//rethrow error later
+		err = caughtError
+
+		//Store the result of the build log
+		currentBuild.result = 'FAILURE'
+
+		//Send email to notify the failure
+		promote_failure_email()
+	}
+
+	finally {
+		//Must re-throw exception to propagate error
+		if (err) {
+			throw err
+		}
+	}
+}
 //===========================================================================================================
 // Main compilation routines
 //===========================================================================================================
 
-def trigger_build(String arch) {
+def trigger_build(String cc, String arch) {
 	def result = build job: 'Cforall/master', 		\
 		parameters: [						\
+			[$class: 'StringParameterValue', 		\
+			  name: 'pCompiler', 				\
+			  value: cc],					\
+			[$class: 'StringParameterValue', 		\
+			  name: 'pArchitecture', 			\
+			  value: arch],					\
 			[$class: 'BooleanParameterValue', 		\
-			  name: 'isFullBuild', 				\
+			  name: 'pRunAllTests', 			\
 			  value: true], 					\
-			[$class: 'StringParameterValue', 		\
-			  name: 'buildArchitecture', 			\
-			  value: arch]					\
+			[$class: 'BooleanParameterValue', 		\
+			  name: 'pRunBenchmark', 			\
+			  value: true], 					\
+			[$class: 'BooleanParameterValue', 		\
+			  name: 'pBuildDocumentation', 		\
+			  value: true], 					\
+			[$class: 'BooleanParameterValue', 		\
+			  name: 'pPublish', 				\
+			  value: true], 					\
+			[$class: 'BooleanParameterValue', 		\
+			  name: 'pSilent', 				\
+			  value: true], 					\
 		],								\
 		propagate: false
@@ -69,59 +141,4 @@
 
 //===========================================================================================================
-// Main loop of the compilation
-//===========================================================================================================
-
-node ('master') {
-	def err = null
-
-	try {
-		//Prevent the build from exceeding 30 minutes
-		timeout(60) {
-
-			//Wrap build to add timestamp to command line
-			wrap([$class: 'TimestamperBuildWrapper']) {
-
-				stage 'Build'
-
-					results = [null, null]
-
-					parallel (
-						x64: {
-							trigger_build('64-bit')
-						},
-						x32: {
-							trigger_build('32-bit')
-						}
-					)
-
-				//Push latest changes to do-lang repo
-				push_build()
-			}
-		}
-	}
-
-	//If an exception is caught we need to change the status and remember to
-	//attach the build log to the email
-	catch (Exception caughtError) {
-		echo('error caught')
-
-		//rethrow error later
-		err = caughtError
-
-		//Store the result of the build log
-		currentBuild.result = 'FAILURE'
-
-		//Send email to notify the failure
-		promote_failure_email()
-	}
-
-	finally {
-		//Must re-throw exception to propagate error
-		if (err) {
-			throw err
-		}
-	}
-}
-//===========================================================================================================
 //Routine responsible of sending the email notification once the build is completed
 //===========================================================================================================
Index: Jenkinsfile
===================================================================
--- Jenkinsfile	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ Jenkinsfile	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -2,214 +2,51 @@
 
 //===========================================================================================================
-// Main compilation routines
-//===========================================================================================================
-//Compilation script is done here but environnement set-up and error handling is done in main loop
-def cfa_build(boolean full_build, String flags) {
-	build_stage 'Checkout'
-		def install_dir = pwd tmp: true
-		//checkout the source code and clean the repo
-		checkout scm
-
-		//Clean all temporary files to make sure no artifacts of the previous build remain
-		sh 'git clean -fdqx'
-
-		//Reset the git repo so no local changes persist
-		sh 'git reset --hard'
-
-	build_stage 'Build'
-
-		//Configure the conpilation (Output is not relevant)
-		//Use the current directory as the installation target so nothing
-		//escapes the sandbox
-		//Also specify the compiler by hand
-		sh "./configure CXX=${currentCC.cpp_cc} ${flags} --with-backend-compiler=${currentCC.cfa_backend_cc} --prefix=${install_dir} --enable-silent-rules --quiet"
-
-		//Compile the project
-		sh 'make -j 8 --no-print-directory V=0 install'
-
-	build_stage 'Test'
-
-		//Run the tests from the tests directory
-		if (full_build) {
-			sh 'make -C src/tests all-tests debug=yes'
-			sh 'make -C src/tests all-tests debug=no'
-		}
-		else {
-			sh 'make -C src/tests'
-		}
-
-	build_stage 'Cleanup'
-
-		//do a maintainer-clean to make sure we need to remake from scratch
-		sh 'make maintainer-clean > /dev/null'
-}
-
-def make_doc() {
-	def err = null
-
-	try {
-		sh 'make clean > /dev/null'
-		sh 'make > /dev/null 2>&1'
-	}
-
-	catch (Exception caughtError) {
-		//rethrow error later
-		err = caughtError
-
-		sh 'cat *.log'
-	}
-
-	finally {
-		/* Must re-throw exception to propagate error */
-		if (err) {
-			throw err
-		}
-	}
-}
-
-def doc_build() {
-	stage 'Documentation'
-
-		status_prefix = 'Documentation'
-
-		dir ('doc/user') {
-			make_doc()
-		}
-
-		dir ('doc/refrat') {
-			make_doc()
-		}
-}
-
-def benchmark() {
-	stage 'Benchmark'
-
-		status_prefix = 'Documentation'
-
-		// //We can't just write to a file outside our repo
-		// //Copy the file locally using ssh
-		// sh 'scp plg2.cs.uwaterloo.ca:/u/cforall/public_html/perf-history/concurrency.csv bench.csv'
-
-		// //Then append to the local file
-		// sh 'make -C src/benchmark csv-data >> bench.csv'
-
-		// //Then publish the file again
-		// sh 'scp bench.csv plg2.cs.uwaterloo.ca:/u/cforall/public_html/perf-history/concurrency.csv'		
-}
-
-//===========================================================================================================
-// Helper classes/variables/routines to make the status and stage name easier to use
-//===========================================================================================================
-//Description of a compiler (Must be serializable since pipelines are persistent)
-class CC_Desc implements Serializable {
-	public String cc_name
-	public String cpp_cc
-	public String cfa_backend_cc
-
-	CC_Desc(String cc_name, String cpp_cc, String cfa_backend_cc) {
-		this.cc_name = cc_name
-		this.cpp_cc = cpp_cc
-		this.cfa_backend_cc = cfa_backend_cc
-	}
-}
-
-//Global Variables defining the compiler and at which point in the build we are
-// These variables are used but can't be declared before hand because of wierd scripting rules
-// @Field String currentCC
-// @Field String status_prefix
-
-//Wrapper to sync stage name and status name
-def build_stage(String name) {
-	def stage_name = "${currentCC.cc_name} ${name}".trim()
-	stage stage_name
-
-		status_prefix = stage_name
-}
-
-//Helper routine to collect information about the git history
-def collect_git_info() {
-
-	//create the temporary output directory in case it doesn't already exist
-	def out_dir = pwd tmp: true
-	sh "mkdir -p ${out_dir}"
-
-	//parse git logs to find what changed
-	gitRefName = env.BRANCH_NAME
-	dir("../${gitRefName}@script") {
-		sh "git reflog > ${out_dir}/GIT_COMMIT"
-	}
-	git_reflog = readFile("${out_dir}/GIT_COMMIT")
-	gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
-	gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
-}
-
-//===========================================================================================================
 // Main loop of the compilation
 //===========================================================================================================
 node ('master'){
 
-	boolean bIsFullBuild
+	boolean bIsSandbox = env.BRANCH_NAME == "jenkins-sandbox"
 	def err = null
 	def log_needed = false
+
+	stage_name 		= ''
+
+	compiler 		= null
+	architecture 	= ''
+	
+	do_alltests		= false
+	do_benchmark	= false
+	do_doc		= false
+	do_publish		= false
+	do_sendemail	= true
+
 	currentBuild.result = "SUCCESS"
-	status_prefix = ''
 
 	try {
-		//Prevent the build from exceeding 30 minutes
-		timeout(60) {
-
-			//Wrap build to add timestamp to command line
-			wrap([$class: 'TimestamperBuildWrapper']) {
-
-				collect_git_info()
-
-				properties ([ 									\
-					[$class: 'ParametersDefinitionProperty', 				\
-						parameterDefinitions: [ 					\
-						[$class: 'BooleanParameterDefinition',  			\
-						  defaultValue: false,  					\
-						  description: 'If true, the build will be promoted to the do-lang git repository (on successful builds only)', \
-						  name: 'isFullBuild' 					\
-						], 								\
-						[$class: 'ChoiceParameterDefinition',				\
-						  choices: '64-bit\n32-bit',					\
-						  defaultValue: '64-bit',					\
-						  description: 'The architecture to use for compilation',	\
-						  name: 'buildArchitecture'					\
-						]]								\
-					]])
-
-				bIsSandbox = env.BRANCH_NAME == "jenkins-sandbox"
-				bIsFullBuild = isFullBuild == 'true'
-				architectureFlag = ''
-				if (buildArchitecture == '64-bit') {
-					architectureFlag = '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'
-				} else if (buildArchitecture == '32-bit'){
-					architectureFlag = '--host=i386 CXXFLAGS="-m32" CFAFLAGS="-m32"'
-				} else {
-					architectureFlag = 'ERROR'
-				}
-
-				echo "FULL BUILD = ${isFullBuild}\nArchitecture = ${buildArchitecture} (flag ${architectureFlag})"
-
-				//Compile using gcc-4.9
-				currentCC = new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
-				cfa_build(bIsFullBuild, architectureFlag)
-
-				//Compile latex documentation
-				doc_build()
-
-				//Run benchmark and save result
+		//Wrap build to add timestamp to command line
+		wrap([$class: 'TimestamperBuildWrapper']) {
+
+			//Prevent the build from exceeding 60 minutes
+			timeout(60) {
+
+				notify_server()
+
+				prepare_build()
+
+				checkout()
+
+				build()
+
+				test()
+
 				benchmark()
 
-				if( bIsFullBuild ) {
-					//Compile using gcc-5
-					currentCC = new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
-					cfa_build(true, architectureFlag)
-
-					//Compile using gcc-4.9
-					currentCC = new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
-					cfa_build(true, architectureFlag)
-				}
+				clean()
+
+				build_doc()
+
+				publish()
+
+				notify_server()
 			}
 		}
@@ -226,15 +63,15 @@
 
 		//Store the result of the build log
-		currentBuild.result = "${status_prefix} FAILURE".trim()
+		currentBuild.result = "${stage_name} FAILURE".trim()
 	}
 
 	finally {
-		echo 'Build Completed'
-
 		//Send email with final results if this is not a full build
-		if( !bIsFullBuild && !bIsSandbox ) {
+		if( do_sendemail && !bIsSandbox ) {
 			echo 'Notifying users of result'
 			email(currentBuild.result, log_needed)
 		}
+
+		echo 'Build Completed'
 
 		/* Must re-throw exception to propagate error */
@@ -243,4 +80,245 @@
 		}
 	}
+}
+
+//===========================================================================================================
+// Helper classes/variables/routines
+//===========================================================================================================
+//Helper routine to collect information about the git history
+def collect_git_info() {
+
+	//create the temporary output directory in case it doesn't already exist
+	def out_dir = pwd tmp: true
+	sh "mkdir -p ${out_dir}"
+
+	//parse git logs to find what changed
+	gitRefName = env.BRANCH_NAME
+	dir("../${gitRefName}@script") {
+		sh "git reflog > ${out_dir}/GIT_COMMIT"
+	}
+	git_reflog = readFile("${out_dir}/GIT_COMMIT")
+	gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
+	gitRefNewValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][2]
+}
+
+def prepare_build() {
+	properties ([ 													\
+		[$class: 'ParametersDefinitionProperty', 								\
+			parameterDefinitions: [ 									\
+				[$class: 'ChoiceParameterDefinition',						\
+					description: 'Which compiler to use',					\
+					name: 'pCompiler',								\
+					choices: 'gcc-6\ngcc-5\ngcc-4.9\nclang',					\
+					defaultValue: 'gcc-6',								\
+				],												\
+				[$class: 'ChoiceParameterDefinition',						\
+					description: 'The target architecture',					\
+					name: 'pArchitecture',								\
+					choices: 'x64\nx86',								\
+					defaultValue: 'x64',								\
+				],												\
+				[$class: 'BooleanParameterDefinition',  						\
+					description: 'If false, only the quick test suite is ran', 		\
+					name: 'pRunAllTests', 								\
+					defaultValue: false,  								\
+				], 												\
+				[$class: 'BooleanParameterDefinition',  						\
+					description: 'If true, jenkins also runs benchmarks', 		\
+					name: 'pRunBenchmark', 								\
+					defaultValue: true,  								\
+				], 												\
+				[$class: 'BooleanParameterDefinition',  						\
+					description: 'If true, jenkins also builds documentation', 		\
+					name: 'pBuildDocumentation', 								\
+					defaultValue: true,  								\
+				],												\
+				[$class: 'BooleanParameterDefinition',  						\
+					description: 'If true, jenkins also publishes results', 		\
+					name: 'pPublish', 								\
+					defaultValue: true,  								\
+				],												\
+				[$class: 'BooleanParameterDefinition',  						\
+					description: 'If true, jenkins will not send emails', 		\
+					name: 'pSilent', 						\
+					defaultValue: false,  								\
+				],												\
+			],
+		]])
+
+	compiler 		= compiler_from_params( pCompiler )
+	architecture 	= architecture_from_params( pArchitecture )
+
+	do_alltests		= (pRunAllTests == 'true')
+	do_benchmark	= (pRunBenchmark == 'true')
+	do_doc		= (pBuildDocumentation == 'true')
+	do_publish		= (pPublish == 'true')
+	do_sendemail	= ! (pSilent == 'true')
+
+	echo """Compiler 		: ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc})
+Architecture		: ${architecture}
+Run All Tests		: ${ pRunAllTests.toString() }
+Run Benchmark		: ${ pRunBenchmark.toString() }
+Build Documentation	: ${ pBuildDocumentation.toString() }
+Publish		: ${ pPublish.toString() }
+Silent			: ${ pSilent.toString() }
+"""
+
+	collect_git_info()
+}
+
+def build_stage(String name) {
+	stage_name = name
+	stage name
+}
+
+def notify_server() {
+	sh 'curl --silent -X POST http://plg2:8082/jenkins/notify > /dev/null'
+	return
+}
+
+def make_doc() {
+	def err = null
+	try {
+		sh 'make clean > /dev/null'
+		sh 'make > /dev/null 2>&1'
+	} 
+	catch (Exception caughtError) {
+		err = caughtError //rethrow error later
+		sh 'cat *.log'
+	}
+	finally {
+		if (err) throw err // Must re-throw exception to propagate error
+	}
+}
+
+//Description of a compiler (Must be serializable since pipelines are persistent)
+class CC_Desc implements Serializable {
+	public String cc_name
+	public String cpp_cc
+	public String cfa_cc
+
+	CC_Desc(String cc_name, String cpp_cc, String cfa_cc) {
+		this.cc_name = cc_name
+		this.cpp_cc = cpp_cc
+		this.cfa_cc = cfa_cc
+	}
+}
+
+def compiler_from_params(cc) {
+	switch( cc ) {
+		case 'gcc-6':
+			return new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
+		break
+		case 'gcc-5':
+			return new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
+		break
+		case 'gcc-4.9':
+			return new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
+		break
+		case 'clang':
+			return new CC_Desc('clang', 'clang++', 'gcc-6')
+		break
+		default :
+			error "Unhandled compiler : ${cc}"
+	}
+}
+
+def architecture_from_params( arch ) {
+	switch( arch ) {
+		case 'x64':
+			return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'
+		break
+		case 'x86':
+			return '--host=i386   CXXFLAGS="-m32" CFAFLAGS="-m32"'
+		break
+		default :
+			error "Unhandled architecture : ${arch}"
+	}
+}
+
+//===========================================================================================================
+// Main compilation routines
+//===========================================================================================================
+//Compilation script is done here but environnement set-up and error handling is done in main loop
+def checkout() {
+	build_stage'Checkout'
+		//checkout the source code and clean the repo
+		checkout scm
+
+		//Clean all temporary files to make sure no artifacts of the previous build remain
+		sh 'git clean -fdqx'
+
+		//Reset the git repo so no local changes persist
+		sh 'git reset --hard'
+}
+
+def build() {
+	build_stage'Build'
+	
+		def install_dir = pwd tmp: true
+		
+		//Configure the conpilation (Output is not relevant)
+		//Use the current directory as the installation target so nothing
+		//escapes the sandbox
+		//Also specify the compiler by hand
+		sh "./configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet"
+
+		//Compile the project
+		sh 'make -j 8 --no-print-directory V=0 install'
+}
+
+def test() {
+	build_stage'Test'
+
+		//Run the tests from the tests directory
+		if ( do_alltests ) {
+			sh 'make -C src/tests all-tests debug=yes'
+			sh 'make -C src/tests all-tests debug=no'
+		}
+		else {
+			sh 'make -C src/tests'
+		}
+}
+
+def benchmark() {
+	build_stage'Benchmark'
+
+		if( !do_benchmark ) return
+
+		//Write the commit id to Benchmark
+		writeFile  file: 'bench.csv', text:'data=' + gitRefNewValue + ',' 
+ 
+		//Append bench results
+		sh 'make -C src/benchmark --no-print-directory csv-data >> bench.csv'
+}
+
+def clean() {
+	build_stage'Cleanup'
+
+		//do a maintainer-clean to make sure we need to remake from scratch
+		sh 'make maintainer-clean > /dev/null'
+}
+
+def build_doc() {
+	build_stage'Documentation'
+
+		if( !do_doc ) return
+
+		dir ('doc/user') {
+			make_doc()
+		}
+
+		dir ('doc/refrat') {
+			make_doc()
+		}
+}
+
+def publish() {
+	build_stage'Publish'
+
+		if( !do_publish ) return
+
+		//Then publish the results
+		sh 'curl --silent --data @bench.csv http://plg2:8082/jenkins/publish > /dev/null'
 }
 
Index: src/CodeTools/DeclStats.cc
===================================================================
--- src/CodeTools/DeclStats.cc	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/CodeTools/DeclStats.cc	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -62,4 +62,5 @@
 			std::map<unsigned, unsigned> p_basic;  ///< Count of decls with each percentage of basic type elements
 			std::map<unsigned, unsigned> p_poly;   ///< Count of decls with each percentage of polymorphic elements
+			VectorMap<unsigned> n_types;           ///< Count of decls with each number of distinct types in the pack
 
 			ArgPackStats& operator+= (const ArgPackStats& o) {
@@ -69,4 +70,5 @@
 				sum(p_basic, o.p_basic);
 				sum(p_poly, o.p_poly);
+				sum(n_types, o.n_types);
 				
 				return *this;
@@ -121,19 +123,23 @@
 		/// Update arg pack stats based on a declaration list
 		void analyze( Stats& stats, ArgPackStats& pstats, std::list<DeclarationWithType*>& decls ) {
+			std::unordered_set<std::string> types;
 			unsigned n = 0;
 			unsigned n_basic = 0;
 			unsigned n_poly = 0;
 			for ( auto decl : decls ) {
-				n += decl->get_type()->size();
-				if ( BasicType* bt = dynamic_cast<BasicType*>( decl->get_type() ) ) {
+				Type* dt = decl->get_type();
+
+				n += dt->size();
+				
+				std::stringstream ss;
+				dt->print( ss );
+				types.insert( ss.str() );
+
+				if ( dynamic_cast<BasicType*>( dt ) ) {
 					++n_basic;
-					std::stringstream ss;
-					bt->print( ss );
 					++stats.basic_type_names[ ss.str() ];
-				} else if ( GenPoly::hasPolyBase( decl->get_type() ) ) {
+				} else if ( GenPoly::hasPolyBase( dt ) ) {
 					++n_poly;
 				} else {
-					std::stringstream ss;
-					decl->get_type()->print( ss );
 					++stats.compound_type_names[ ss.str() ];
 				}
@@ -146,4 +152,5 @@
 				++pstats.p_poly[ n_poly*100/n ];
 			}
+			++pstats.n_types.at( types.size() );
 		}
 		
@@ -267,4 +274,5 @@
 			printAllMap("%_basic_" + name, [&extract](const Stats& stats) { return extract(stats).p_basic; });
 			printAllMap("%_poly_" + name, [&extract](const Stats& stats) { return extract(stats).p_poly; });
+			printAllMap("n_distinct_types_" + name, [&extract](const Stats& stats) { return extract(stats).n_types; });
 		}
 		
Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/DeclarationNode.cc	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 16 13:06:50 2017
-// Update Count     : 753
+// Last Modified On : Thu Feb 23 15:45:02 2017
+// Update Count     : 759
 //
 
@@ -174,8 +174,4 @@
 	} // if
 
-	if ( body ) {
-		newnode->type->function.hasBody = true;
-	} // if
-
 	if ( ret ) {
 		newnode->type->base = ret->type;
@@ -259,5 +255,5 @@
 } // DeclarationNode::newAggregate
 
-DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants ) {
+DeclarationNode * DeclarationNode::newEnum( string * name, DeclarationNode * constants, bool body ) {
 	DeclarationNode * newnode = new DeclarationNode;
 	newnode->type = new TypeData( TypeData::Enum );
@@ -268,4 +264,5 @@
 	} // if
 	newnode->type->enumeration.constants = constants;
+	newnode->type->enumeration.body = body;
 	return newnode;
 } // DeclarationNode::newEnum
@@ -698,5 +695,4 @@
 	assert( ! type->function.body );
 	type->function.body = body;
-	type->function.hasBody = true;
 	return this;
 }
@@ -1040,24 +1036,45 @@
 	switch ( type->kind ) {
 	  case TypeData::Enum: {
-		  EnumDecl * typedecl = buildEnum( type, attributes );
-		  return new EnumInstType( buildQualifiers( type ), typedecl );
+		  if ( type->enumeration.body ) {
+			  EnumDecl * typedecl = buildEnum( type, attributes );
+			  return new EnumInstType( buildQualifiers( type ), typedecl );
+		  } else {
+			  return new EnumInstType( buildQualifiers( type ), *type->enumeration.name );
+		  }
 	  }
 	  case TypeData::Aggregate: {
-		  AggregateDecl * typedecl = buildAggregate( type, attributes );
 		  ReferenceToType * ret;
-		  switch ( type->aggregate.kind ) {
-			case DeclarationNode::Struct:
-			  ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
-			  break;
-			case DeclarationNode::Union:
-			  ret = new UnionInstType( buildQualifiers( type ), (UnionDecl *)typedecl );
-			  break;
-			case DeclarationNode::Trait:
-			  assert( false );
-			  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
-			  break;
-			default:
-			  assert( false );
-		  } // switch
+		  if ( type->aggregate.body ) {
+			  AggregateDecl * typedecl = buildAggregate( type, attributes );
+			  switch ( type->aggregate.kind ) {
+				case DeclarationNode::Struct:
+				  ret = new StructInstType( buildQualifiers( type ), (StructDecl *)typedecl );
+				  break;
+				case DeclarationNode::Union:
+				  ret = new UnionInstType( buildQualifiers( type ), (UnionDecl *)typedecl );
+				  break;
+				case DeclarationNode::Trait:
+				  assert( false );
+				  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
+				  break;
+				default:
+				  assert( false );
+			  } // switch
+		  } else {
+			  switch ( type->aggregate.kind ) {
+				case DeclarationNode::Struct:
+				  ret = new StructInstType( buildQualifiers( type ), *type->aggregate.name );
+				  break;
+				case DeclarationNode::Union:
+				  ret = new UnionInstType( buildQualifiers( type ), *type->aggregate.name );
+				  break;
+				case DeclarationNode::Trait:
+				  assert( false );
+				  //ret = new TraitInstType( buildQualifiers( type ), (TraitDecl *)typedecl );
+				  break;
+				default:
+				  assert( false );
+			  } // switch
+		  } // if
 		  buildList( type->aggregate.actuals, ret->get_parameters() );
 		  return ret;
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/ParseNode.h	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 16 13:15:55 2017
-// Update Count     : 661
+// Last Modified On : Thu Feb 23 15:22:10 2017
+// Update Count     : 662
 //
 
@@ -238,5 +238,5 @@
 	static DeclarationNode * newFromTypedef( std::string * );
 	static DeclarationNode * newAggregate( Aggregate kind, const std::string * name, ExpressionNode * actuals, DeclarationNode * fields, bool body );
-	static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants );
+	static DeclarationNode * newEnum( std::string * name, DeclarationNode * constants, bool body );
 	static DeclarationNode * newEnumConstant( std::string * name, ExpressionNode * constant );
 	static DeclarationNode * newName( std::string * );
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/TypeData.cc	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 19 09:49:33 2017
-// Update Count     : 467
+// Last Modified On : Thu Feb 23 16:26:39 2017
+// Update Count     : 477
 //
 
@@ -48,5 +48,4 @@
 		function.oldDeclList = nullptr;
 		function.body = nullptr;
-		function.hasBody = false;
 		function.newStyle = false;
 		break;
@@ -68,4 +67,5 @@
 		enumeration.name = nullptr;
 		enumeration.constants = nullptr;
+		enumeration.body = false;
 		break;
 	  case Symbolic:
@@ -182,5 +182,4 @@
 		newtype->function.oldDeclList = maybeClone( function.oldDeclList );
 		newtype->function.body = maybeClone( function.body );
-		newtype->function.hasBody = function.hasBody;
 		newtype->function.newStyle = function.newStyle;
 		break;
@@ -200,4 +199,5 @@
 		newtype->enumeration.name = enumeration.name ? new string( *enumeration.name ) : nullptr;
 		newtype->enumeration.constants = maybeClone( enumeration.constants );
+		newtype->enumeration.body = enumeration.body;
 		break;
 	  case Symbolic:
@@ -293,8 +293,6 @@
 		} // if
 		os << endl;
-		if ( function.hasBody ) {
+		if ( function.body ) {
 			os << string( indent + 2, ' ' ) << "with body " << endl;
-		} // if
-		if ( function.body ) {
 			function.body->printList( os, indent + 2 );
 		} // if
@@ -335,4 +333,7 @@
 			os << "with constants" << endl;
 			enumeration.constants->printList( os, indent + 2 );
+		} // if
+		if ( enumeration.body ) {
+			os << string( indent + 2, ' ' ) << " with body " << endl;
 		} // if
 		break;
@@ -696,4 +697,5 @@
 		} // if
 	} // for
+	ret->set_body( td->enumeration.body );
 	return ret;
 } // buildEnum
@@ -724,22 +726,12 @@
 Declaration * buildDecl( const TypeData * td, const string &name, DeclarationNode::StorageClass sc, Expression * bitfieldWidth, bool isInline, bool isNoreturn, LinkageSpec::Spec linkage, ConstantExpr *asmName, Initializer * init, std::list< Attribute * > attributes ) {
 	if ( td->kind == TypeData::Function ) {
-		if ( td->function.idList ) {
-			buildKRFunction( td->function );
+		if ( td->function.idList ) {					// KR function ?
+			buildKRFunction( td->function );			// transform into C11 function
 		} // if
 
 		FunctionDecl * decl;
-		if ( td->function.hasBody ) {
-			if ( td->function.body ) {
-				Statement * stmt = td->function.body->build();
-				CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
-				assert( body );
-				decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn, attributes );
-			} else {
-				// list< Label > ls;
-				decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), new CompoundStmt( list< Label >() ), isInline, isNoreturn, attributes );
-			} // if
-		} else {
-			decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), nullptr, isInline, isNoreturn, attributes );
-		} // if
+		Statement * stmt = maybeBuild<Statement>( td->function.body );
+		CompoundStmt * body = dynamic_cast< CompoundStmt* >( stmt );
+		decl = new FunctionDecl( name, sc, linkage, buildFunction( td ), body, isInline, isNoreturn, attributes );
 		return decl->set_asmName( asmName );
 	} else if ( td->kind == TypeData::Aggregate ) {
@@ -816,5 +808,5 @@
 
 	for ( DeclarationNode * param = function.idList; param != nullptr; param = dynamic_cast< DeclarationNode* >( param->get_next() ) ) {
-		if ( ! param->type ) {							// generate type int for empty parameters
+		if ( ! param->type ) {							// generate type int for empty parameter type
 			param->type = new TypeData( TypeData::Basic );
 			param->type->basictype = DeclarationNode::Int;
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/TypeData.h	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 16 14:30:05 2017
-// Update Count     : 153
+// Last Modified On : Thu Feb 23 15:16:18 2017
+// Update Count     : 155
 //
 
@@ -49,4 +49,5 @@
 		const std::string * name;
 		DeclarationNode * constants;
+		bool body;
 	};
 
@@ -56,5 +57,4 @@
 		mutable DeclarationNode * oldDeclList;
 		StatementNode * body;
-		bool hasBody;
 		bool newStyle;
 	};
Index: src/Parser/parser.cc
===================================================================
--- src/Parser/parser.cc	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/parser.cc	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -7292,5 +7292,5 @@
 /* Line 1806 of yacc.c  */
 #line 1651 "parser.yy"
-    { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(4) - (6)].decl) )->addQualifiers( (yyvsp[(2) - (6)].decl) ); }
+    { (yyval.decl) = DeclarationNode::newEnum( nullptr, (yyvsp[(4) - (6)].decl), true )->addQualifiers( (yyvsp[(2) - (6)].decl) ); }
     break;
 
@@ -7301,5 +7301,5 @@
     {
 			typedefTable.makeTypedef( *(yyvsp[(3) - (3)].tok) );
-			(yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (3)].tok), 0 )->addQualifiers( (yyvsp[(2) - (3)].decl) );
+			(yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (3)].tok), 0, false )->addQualifiers( (yyvsp[(2) - (3)].decl) );
 		}
     break;
@@ -7316,5 +7316,5 @@
 /* Line 1806 of yacc.c  */
 #line 1660 "parser.yy"
-    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (8)].tok), (yyvsp[(6) - (8)].decl) )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
+    { (yyval.decl) = DeclarationNode::newEnum( (yyvsp[(3) - (8)].tok), (yyvsp[(6) - (8)].decl), true )->addQualifiers( (yyvsp[(2) - (8)].decl) ); }
     break;
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/Parser/parser.yy	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Feb 16 15:56:33 2017
-// Update Count     : 2186
+// Last Modified On : Thu Feb 23 15:23:49 2017
+// Update Count     : 2187
 //
 
@@ -1649,14 +1649,14 @@
 enum_type:
 	ENUM attribute_list_opt '{' enumerator_list comma_opt '}'
-		{ $$ = DeclarationNode::newEnum( nullptr, $4 )->addQualifiers( $2 ); }
+		{ $$ = DeclarationNode::newEnum( nullptr, $4, true )->addQualifiers( $2 ); }
 	| ENUM attribute_list_opt no_attr_identifier_or_type_name
 		{
 			typedefTable.makeTypedef( *$3 );
-			$$ = DeclarationNode::newEnum( $3, 0 )->addQualifiers( $2 );
+			$$ = DeclarationNode::newEnum( $3, 0, false )->addQualifiers( $2 );
 		}
 	| ENUM attribute_list_opt no_attr_identifier_or_type_name
 		{ typedefTable.makeTypedef( *$3 ); }
 	  '{' enumerator_list comma_opt '}'
-		{ $$ = DeclarationNode::newEnum( $3, $6 )->addQualifiers( $2 ); }
+		{ $$ = DeclarationNode::newEnum( $3, $6, true )->addQualifiers( $2 ); }
 	;
 
Index: src/benchmark/Makefile.am
===================================================================
--- src/benchmark/Makefile.am	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/benchmark/Makefile.am	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -24,5 +24,5 @@
 bench :
 	@for ccflags in "-debug" "-nodebug"; do \
-		echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
+		echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\
 		${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
 		./a.out ; \
@@ -31,5 +31,5 @@
 
 ctxswitch-coroutine:
-	${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 CorCtxSwitch.c
+	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c
 	@for number in 1 2 3 4 5 6 7 8 9 10; do \
                 ./a.out ; \
@@ -38,5 +38,5 @@
 
 ctxswitch-thread:
-	${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
+	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
 	@for number in 1 2 3 4 5 6 7 8 9 10; do \
                 ./a.out ; \
@@ -45,5 +45,5 @@
 
 csv-data:
-	@${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -quiet -DN=10000000 csv-data.c
+	@${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c
 	@./a.out
 	@rm -f ./a.out
Index: src/benchmark/Makefile.in
===================================================================
--- src/benchmark/Makefile.in	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/benchmark/Makefile.in	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -471,5 +471,5 @@
 bench :
 	@for ccflags in "-debug" "-nodebug"; do \
-		echo ${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
+		echo ${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -lrt bench.c;\
 		${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -lrt bench.c;\
 		./a.out ; \
@@ -478,5 +478,5 @@
 
 ctxswitch-coroutine:
-	${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 CorCtxSwitch.c
+	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 CorCtxSwitch.c
 	@for number in 1 2 3 4 5 6 7 8 9 10; do \
                 ./a.out ; \
@@ -485,5 +485,5 @@
 
 ctxswitch-thread:
-	${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
+	${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -DN=10000000 ThrdCtxSwitch.c
 	@for number in 1 2 3 4 5 6 7 8 9 10; do \
                 ./a.out ; \
@@ -492,5 +492,5 @@
 
 csv-data:
-	@${CC} ${AM_CFLAGS} ${CFLAGS} $${ccflags} -nodebug -lrt -quiet -DN=10000000 csv-data.c
+	@${CC} ${AM_CFLAGS} ${CFLAGS} ${ccflags} @CFA_FLAGS@ -nodebug -lrt -quiet -DN=10000000 csv-data.c
 	@./a.out
 	@rm -f ./a.out
Index: src/benchmark/csv-data.c
===================================================================
--- src/benchmark/csv-data.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/benchmark/csv-data.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -3,7 +3,9 @@
 #include <threads>
 
+extern "C" {
 #include <unistd.h>					// sysconf
 #include <sys/times.h>					// times
 #include <time.h>
+}
 
 inline unsigned long long int Time() {
@@ -84,4 +86,4 @@
 int main()
 {
-	sout | time(NULL) | "," | measure_coroutine() | "," | measure_thread() | endl;
+	sout | time(NULL) | ',' | measure_coroutine() | ',' | measure_thread() | endl;
 }
Index: src/examples/multicore.c
===================================================================
--- src/examples/multicore.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/examples/multicore.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -19,8 +19,5 @@
 		processor p;
 		{
-			scoped(MyThread) f1;
-			scoped(MyThread) f2;
-			scoped(MyThread) f3;
-			scoped(MyThread) f4;
+			scoped(MyThread) f[4];
 		}
 	}
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/Makefile.am	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -44,5 +44,5 @@
 # not all platforms support concurrency, add option do disable it
 if BUILD_CONCURRENCY
-headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel
+headers += containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor
 endif
 
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/Makefile.in	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -43,5 +43,5 @@
 
 # not all platforms support concurrency, add option do disable it
-@BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutines concurrency/threads concurrency/kernel
+@BUILD_CONCURRENCY_TRUE@am__append_3 = containers/vector concurrency/coroutines concurrency/threads concurrency/kernel concurrency/monitor
 
 # not all platforms support concurrency, add option do disable it
@@ -101,10 +101,12 @@
 	containers/vector.c concurrency/coroutines.c \
 	concurrency/threads.c concurrency/kernel.c \
-	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
+	concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
+	concurrency/invoke.c
 am__dirstamp = $(am__leading_dot)dirstamp
 @BUILD_CONCURRENCY_TRUE@am__objects_1 = containers/libcfa_d_a-vector.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-coroutines.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-threads.$(OBJEXT) \
-@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-kernel.$(OBJEXT)
+@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-kernel.$(OBJEXT) \
+@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_d_a-monitor.$(OBJEXT)
 am__objects_2 = libcfa_d_a-limits.$(OBJEXT) \
 	libcfa_d_a-stdlib.$(OBJEXT) libcfa_d_a-math.$(OBJEXT) \
@@ -124,10 +126,12 @@
 	containers/vector.c concurrency/coroutines.c \
 	concurrency/threads.c concurrency/kernel.c \
-	concurrency/CtxSwitch-@MACHINE_TYPE@.S concurrency/invoke.c
+	concurrency/monitor.c concurrency/CtxSwitch-@MACHINE_TYPE@.S \
+	concurrency/invoke.c
 @BUILD_CONCURRENCY_TRUE@am__objects_5 =  \
 @BUILD_CONCURRENCY_TRUE@	containers/libcfa_a-vector.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-coroutines.$(OBJEXT) \
 @BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-threads.$(OBJEXT) \
-@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-kernel.$(OBJEXT)
+@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-kernel.$(OBJEXT) \
+@BUILD_CONCURRENCY_TRUE@	concurrency/libcfa_a-monitor.$(OBJEXT)
 am__objects_6 = libcfa_a-limits.$(OBJEXT) libcfa_a-stdlib.$(OBJEXT) \
 	libcfa_a-math.$(OBJEXT) libcfa_a-iostream.$(OBJEXT) \
@@ -172,5 +176,6 @@
 	fstream iterator rational assert containers/vector \
 	concurrency/coroutines concurrency/threads concurrency/kernel \
-	${shell echo stdhdr/*} concurrency/invoke.h
+	concurrency/monitor ${shell echo stdhdr/*} \
+	concurrency/invoke.h
 HEADERS = $(nobase_cfa_include_HEADERS)
 ETAGS = etags
@@ -398,4 +403,6 @@
 concurrency/libcfa_d_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \
 	concurrency/$(DEPDIR)/$(am__dirstamp)
+concurrency/libcfa_d_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \
+	concurrency/$(DEPDIR)/$(am__dirstamp)
 concurrency/CtxSwitch-@MACHINE_TYPE@.$(OBJEXT):  \
 	concurrency/$(am__dirstamp) \
@@ -416,4 +423,6 @@
 concurrency/libcfa_a-kernel.$(OBJEXT): concurrency/$(am__dirstamp) \
 	concurrency/$(DEPDIR)/$(am__dirstamp)
+concurrency/libcfa_a-monitor.$(OBJEXT): concurrency/$(am__dirstamp) \
+	concurrency/$(DEPDIR)/$(am__dirstamp)
 concurrency/libcfa_a-invoke.$(OBJEXT): concurrency/$(am__dirstamp) \
 	concurrency/$(DEPDIR)/$(am__dirstamp)
@@ -429,8 +438,10 @@
 	-rm -f concurrency/libcfa_a-invoke.$(OBJEXT)
 	-rm -f concurrency/libcfa_a-kernel.$(OBJEXT)
+	-rm -f concurrency/libcfa_a-monitor.$(OBJEXT)
 	-rm -f concurrency/libcfa_a-threads.$(OBJEXT)
 	-rm -f concurrency/libcfa_d_a-coroutines.$(OBJEXT)
 	-rm -f concurrency/libcfa_d_a-invoke.$(OBJEXT)
 	-rm -f concurrency/libcfa_d_a-kernel.$(OBJEXT)
+	-rm -f concurrency/libcfa_d_a-monitor.$(OBJEXT)
 	-rm -f concurrency/libcfa_d_a-threads.$(OBJEXT)
 	-rm -f containers/libcfa_a-vector.$(OBJEXT)
@@ -462,8 +473,10 @@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-invoke.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-kernel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-monitor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_a-threads.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-coroutines.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-invoke.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-kernel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@concurrency/$(DEPDIR)/libcfa_d_a-threads.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@containers/$(DEPDIR)/libcfa_a-vector.Po@am__quote@
@@ -677,4 +690,18 @@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
 
+concurrency/libcfa_d_a-monitor.o: concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
+
+concurrency/libcfa_d_a-monitor.obj: concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_d_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_d_a-monitor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_d_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_d_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
+
 concurrency/libcfa_d_a-invoke.obj: concurrency/invoke.c
 @am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_d_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_d_a-invoke.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_d_a-invoke.Tpo -c -o concurrency/libcfa_d_a-invoke.obj `if test -f 'concurrency/invoke.c'; then $(CYGPATH_W) 'concurrency/invoke.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/invoke.c'; fi`
@@ -858,4 +885,18 @@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-kernel.obj `if test -f 'concurrency/kernel.c'; then $(CYGPATH_W) 'concurrency/kernel.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/kernel.c'; fi`
+
+concurrency/libcfa_a-monitor.o: concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.o -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.o `test -f 'concurrency/monitor.c' || echo '$(srcdir)/'`concurrency/monitor.c
+
+concurrency/libcfa_a-monitor.obj: concurrency/monitor.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -MT concurrency/libcfa_a-monitor.obj -MD -MP -MF concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) concurrency/$(DEPDIR)/libcfa_a-monitor.Tpo concurrency/$(DEPDIR)/libcfa_a-monitor.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='concurrency/monitor.c' object='concurrency/libcfa_a-monitor.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libcfa_a_CFLAGS) $(CFLAGS) -c -o concurrency/libcfa_a-monitor.obj `if test -f 'concurrency/monitor.c'; then $(CYGPATH_W) 'concurrency/monitor.c'; else $(CYGPATH_W) '$(srcdir)/concurrency/monitor.c'; fi`
 
 concurrency/libcfa_a-invoke.obj: concurrency/invoke.c
Index: src/libcfa/concurrency/kernel.c
===================================================================
--- src/libcfa/concurrency/kernel.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/concurrency/kernel.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -456,5 +456,5 @@
 
 void append( simple_thread_list * this, thread * t ) {
-	assert( t->next == NULL );
+	assert(this->tail != NULL);
 	*this->tail = t;
 	this->tail = &t->next;
@@ -470,5 +470,4 @@
 		head->next = NULL;
 	}	
-	
 	return head;
 }
Index: src/libcfa/concurrency/monitor
===================================================================
--- src/libcfa/concurrency/monitor	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/libcfa/concurrency/monitor	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,45 @@
+//                              -*- Mode: CFA -*-
+//
+// 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.
+//
+// monitor --
+//
+// Author           : Thierry Delisle
+// Created On       : Thd Feb 23 12:27:26 2017
+// Last Modified By : Thierry Delisle
+// Last Modified On : --
+// Update Count     : 0
+//
+
+#ifndef MONITOR_H
+#define MONITOR_H
+
+#include "assert"
+#include "invoke.h"
+
+struct monitor {
+	spinlock lock;
+	thread * holder;
+	simple_thread_list entry_queue;
+};
+
+void enter(monitor *);
+void leave(monitor *);
+
+struct monitor_guard {
+	monitor * m;
+};
+
+static inline void ?{}( monitor_guard * this, monitor * m ) {
+	this->m = m;
+	enter( this->m );
+}
+
+static inline void ^?{}( monitor_guard * this ) {
+	leave( this->m );
+}
+
+#endif //MONITOR_H
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/libcfa/concurrency/monitor.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,48 @@
+//                              -*- Mode: CFA -*-
+//
+// 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.
+//
+// monitor.c --
+//
+// Author           : Thierry Delisle
+// Created On       : Thd Feb 23 12:27:26 2017
+// Last Modified By : Thierry Delisle
+// Last Modified On : --
+// Update Count     : 0
+//
+
+#include "monitor"
+
+#include "kernel_private.h"
+
+void enter(monitor * this) {
+	lock( &this->lock );
+	thread * thrd = this_thread();
+
+	if( this->holder ) {
+		append( &this->entry_queue, thrd );
+		ScheduleInternal( &this->lock );
+		return;
+	}
+	else {
+		this->holder = thrd;
+	}
+
+	unlock( &this->lock );
+}
+
+void leave(monitor * this) {
+	lock( &this->lock );
+
+	thread * thrd = this_thread();
+	assert( thrd == this->holder );
+
+	this->holder = pop_head( &this->entry_queue );
+
+	unlock( &this->lock );
+
+	if( this->holder ) ScheduleThread( this->holder );
+}
Index: src/libcfa/concurrency/threads
===================================================================
--- src/libcfa/concurrency/threads	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/concurrency/threads	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -9,5 +9,5 @@
 //
 // Author           : Thierry Delisle
-// Created On       : Tue Jan 17 12:27:26 2016
+// Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Thierry Delisle
 // Last Modified On : --
Index: src/libcfa/concurrency/threads.c
===================================================================
--- src/libcfa/concurrency/threads.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/concurrency/threads.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -9,5 +9,5 @@
 //
 // Author           : Thierry Delisle
-// Created On       : Tue Jan 17 12:27:26 2016
+// Created On       : Tue Jan 17 12:27:26 2017
 // Last Modified By : Thierry Delisle
 // Last Modified On : --
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/stdlib	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul  6 14:28:55 2016
-// Update Count     : 99
+// Last Modified On : Thu Feb 23 14:11:47 2017
+// Update Count     : 100
 //
 
@@ -50,5 +50,5 @@
 forall( dtype T, ttype Params | sized(T) | { void ?{}(T *, Params); } ) T * new( Params p );
 forall( dtype T | { void ^?{}(T *); } ) void delete( T * ptr );
-
+forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } ) void delete( T * ptr, Params rest );
 
 //---------------------------------------
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/libcfa/stdlib.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul  6 14:28:57 2016
-// Update Count     : 169
+// Last Modified On : Thu Feb 23 14:11:29 2017
+// Update Count     : 170
 //
 
@@ -91,4 +91,13 @@
 }
 
+forall( dtype T, ttype Params | { void ^?{}(T *); void delete(Params); } )
+void delete( T * ptr, Params rest ) {
+	if ( ptr ) {
+		^ptr{};
+		free( ptr );
+	}
+	delete( rest );
+}
+
 //---------------------------------------
 
Index: src/prelude/prelude.cf
===================================================================
--- src/prelude/prelude.cf	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/prelude/prelude.cf	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -58,21 +58,21 @@
 long double _Complex	?--( long double _Complex * ),		?--( volatile long double _Complex * );
 
-forall( otype T ) T *			 ?++(		     T ** );
-forall( otype T ) const T *		 ?++( const	     T ** );
-forall( otype T ) volatile T *		 ?++(	    volatile T ** );
-forall( otype T ) const volatile T *	 ?++( const volatile T ** );
-forall( otype T ) T *			 ?--(		     T ** );
-forall( otype T ) const T *		 ?--( const	     T ** );
-forall( otype T ) volatile T *		 ?--(	    volatile T ** );
-forall( otype T ) const volatile T *	 ?--( const volatile T ** );
-
-forall( otype T ) lvalue T		 ?[?](		      T *,	    ptrdiff_t );
-forall( otype T ) const lvalue T	 ?[?]( const	      T *,	    ptrdiff_t );
-forall( otype T ) volatile lvalue T	 ?[?](       volatile T *,	    ptrdiff_t );
-forall( otype T ) const volatile lvalue T ?[?]( const volatile T *,	    ptrdiff_t );
-forall( otype T ) lvalue T		 ?[?](		ptrdiff_t,		  T * );
-forall( otype T ) const lvalue T	 ?[?](		ptrdiff_t, const	  T * );
-forall( otype T ) volatile lvalue T	 ?[?](		ptrdiff_t,	 volatile T * );
-forall( otype T ) const volatile lvalue T ?[?](		ptrdiff_t, const volatile T * );
+forall( dtype T | sized(T) ) T *			 ?++(		     T ** );
+forall( dtype T | sized(T) ) const T *		 ?++( const	     T ** );
+forall( dtype T | sized(T) ) volatile T *		 ?++(	    volatile T ** );
+forall( dtype T | sized(T) ) const volatile T *	 ?++( const volatile T ** );
+forall( dtype T | sized(T) ) T *			 ?--(		     T ** );
+forall( dtype T | sized(T) ) const T *		 ?--( const	     T ** );
+forall( dtype T | sized(T) ) volatile T *		 ?--(	    volatile T ** );
+forall( dtype T | sized(T) ) const volatile T *	 ?--( const volatile T ** );
+
+forall( dtype T | sized(T) ) lvalue T		 ?[?](		      T *,	    ptrdiff_t );
+forall( dtype T | sized(T) ) const lvalue T	 ?[?]( const	      T *,	    ptrdiff_t );
+forall( dtype T | sized(T) ) volatile lvalue T	 ?[?](       volatile T *,	    ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile lvalue T ?[?]( const volatile T *,	    ptrdiff_t );
+forall( dtype T | sized(T) ) lvalue T		 ?[?](		ptrdiff_t,		  T * );
+forall( dtype T | sized(T) ) const lvalue T	 ?[?](		ptrdiff_t, const	  T * );
+forall( dtype T | sized(T) ) volatile lvalue T	 ?[?](		ptrdiff_t,	 volatile T * );
+forall( dtype T | sized(T) ) const volatile lvalue T ?[?](		ptrdiff_t, const volatile T * );
 
 // ------------------------------------------------------------
@@ -96,12 +96,12 @@
 long double _Complex	++?( long double _Complex * ),		--?( long double _Complex * );
 
-forall( otype T ) T *			 ++?(		     T ** );
-forall( otype T ) const T *		 ++?( const	     T ** );
-forall( otype T ) volatile T *		 ++?(	    volatile T ** );
-forall( otype T ) const volatile T *	 ++?( const volatile T ** );
-forall( otype T ) T *			 --?(		     T ** );
-forall( otype T ) const T *		 --?( const	     T ** );
-forall( otype T ) volatile T *		 --?(	    volatile T ** );
-forall( otype T ) const volatile T *	 --?( const volatile T ** );
+forall( dtype T | sized(T) ) T *			 ++?(		     T ** );
+forall( dtype T | sized(T) ) const T *		 ++?( const	     T ** );
+forall( dtype T | sized(T) ) volatile T *		 ++?(	    volatile T ** );
+forall( dtype T | sized(T) ) const volatile T *	 ++?( const volatile T ** );
+forall( dtype T | sized(T) ) T *			 --?(		     T ** );
+forall( dtype T | sized(T) ) const T *		 --?( const	     T ** );
+forall( dtype T | sized(T) ) volatile T *		 --?(	    volatile T ** );
+forall( dtype T | sized(T) ) const volatile T *	 --?( const volatile T ** );
 
 forall( dtype T | sized(T) ) lvalue T		 *?(		     T * );
@@ -178,17 +178,17 @@
 long double _Complex	?+?( long double _Complex, long double _Complex ),	?-?( long double _Complex, long double _Complex );
 
-forall( otype T ) T *			?+?(		    T *,	  ptrdiff_t );
-forall( otype T ) T *			?+?(	      ptrdiff_t,		T * );
-forall( otype T ) const T *		?+?( const	    T *,	  ptrdiff_t );
-forall( otype T ) const T *		?+?(	      ptrdiff_t, const		T * );
-forall( otype T ) volatile T *		?+?(	   volatile T *,	  ptrdiff_t );
-forall( otype T ) volatile T *		?+?(	      ptrdiff_t,       volatile T * );
-forall( otype T ) const volatile T *	?+?( const volatile T *,	  ptrdiff_t );
-forall( otype T ) const volatile T *	?+?(	      ptrdiff_t, const volatile T * );
-forall( otype T ) T *			?-?(		    T *,	  ptrdiff_t );
-forall( otype T ) const T *		?-?( const	    T *,	  ptrdiff_t );
-forall( otype T ) volatile T *		?-?(	   volatile T *,	  ptrdiff_t );
-forall( otype T ) const volatile T *	?-?( const volatile T *,	  ptrdiff_t );
-forall( otype T ) ptrdiff_t		?-?( const volatile T *, const volatile T * );
+forall( dtype T | sized(T) ) T *			?+?(		    T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) T *			?+?(	      ptrdiff_t,		T * );
+forall( dtype T | sized(T) ) const T *		?+?( const	    T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?+?(	      ptrdiff_t, const		T * );
+forall( dtype T | sized(T) ) volatile T *		?+?(	   volatile T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?+?(	      ptrdiff_t,       volatile T * );
+forall( dtype T | sized(T) ) const volatile T *	?+?( const volatile T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?+?(	      ptrdiff_t, const volatile T * );
+forall( dtype T | sized(T) ) T *			?-?(		    T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?-?( const	    T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?-?(	   volatile T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?-?( const volatile T *,	  ptrdiff_t );
+forall( dtype T | sized(T) ) ptrdiff_t		?-?( const volatile T *, const volatile T * );
 
 // ------------------------------------------------------------
@@ -428,20 +428,20 @@
 forall( ftype FT ) FT *			?=?( FT * volatile *, forall( ftype FT2 ) FT2 * );
 
-forall( otype T ) T *			?+=?(		     T *	  *, ptrdiff_t );
-forall( otype T ) T *			?+=?(		     T * volatile *, ptrdiff_t );
-forall( otype T ) const T *		?+=?( const	     T *	  *, ptrdiff_t );
-forall( otype T ) const T *		?+=?( const	     T * volatile *, ptrdiff_t );
-forall( otype T ) volatile T *		?+=?(	    volatile T *	  *, ptrdiff_t );
-forall( otype T ) volatile T *		?+=?(	    volatile T * volatile *, ptrdiff_t );
-forall( otype T ) const volatile T *	?+=?( const volatile T *	  *, ptrdiff_t );
-forall( otype T ) const volatile T *	?+=?( const volatile T * volatile *, ptrdiff_t );
-forall( otype T ) T *			?-=?(		     T *	  *, ptrdiff_t );
-forall( otype T ) T *			?-=?(		     T * volatile *, ptrdiff_t );
-forall( otype T ) const T *		?-=?( const	     T *	  *, ptrdiff_t );
-forall( otype T ) const T *		?-=?( const	     T * volatile *, ptrdiff_t );
-forall( otype T ) volatile T *		?-=?(	    volatile T *	  *, ptrdiff_t );
-forall( otype T ) volatile T *		?-=?(	    volatile T * volatile *, ptrdiff_t );
-forall( otype T ) const volatile T *	?-=?( const volatile T *	  *, ptrdiff_t );
-forall( otype T ) const volatile T *	?-=?( const volatile T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) T *			?+=?(		     T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) T *			?+=?(		     T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?+=?( const	     T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?+=?( const	     T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?+=?(	    volatile T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?+=?(	    volatile T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?+=?( const volatile T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?+=?( const volatile T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) T *			?-=?(		     T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) T *			?-=?(		     T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?-=?( const	     T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) const T *		?-=?( const	     T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?-=?(	    volatile T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) volatile T *		?-=?(	    volatile T * volatile *, ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?-=?( const volatile T *	  *, ptrdiff_t );
+forall( dtype T | sized(T) ) const volatile T *	?-=?( const volatile T * volatile *, ptrdiff_t );
 
 _Bool			?=?( _Bool *, _Bool ),					?=?( volatile _Bool *, _Bool );
Index: src/tests/.expect/abs.txt
===================================================================
--- src/tests/.expect/abs.txt	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/tests/.expect/abs.txt	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -1,3 +1,3 @@
-char			¿	abs A
+char			-65	abs 65
 signed int		-65	abs 65
 signed long int		-65	abs 65
Index: src/tests/.expect/globals.txt
===================================================================
--- src/tests/.expect/globals.txt	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/tests/.expect/globals.txt	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,9 @@
+static	inline	autogen	value
+no 		no 		no 		22
+no 		no 		yes		22
+no 		yes		no 		22
+no 		yes		yes		22
+yes		no 		no 		22
+yes		no 		yes		22
+yes		yes		no 		22
+yes		yes		yes		22
Index: src/tests/.expect/monitor.txt
===================================================================
--- src/tests/.expect/monitor.txt	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/tests/.expect/monitor.txt	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,1 @@
+4000000
Index: src/tests/abs.c
===================================================================
--- src/tests/abs.c	(revision c00ddfea2a72aea87b7f7d2ac4a622123973921e)
+++ src/tests/abs.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 18:26:16 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 15:07:26 2016
-// Update Count     : 51
+// Last Modified On : Wed Feb 22 22:31:03 2017
+// Update Count     : 52
 //
 
@@ -18,5 +18,5 @@
 
 int main( void ) {
-	char ch = -65;
+	signed char ch = -65;
 	sout | "char\t\t\t"					| ch     | "\tabs " | abs( ch ) | endl;
 	sout | "signed int\t\t"				| -65    | "\tabs" | abs( -65 ) | endl;
Index: src/tests/globals.c
===================================================================
--- src/tests/globals.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/tests/globals.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,83 @@
+#include <fstream>
+
+struct value_t {
+	int value;
+};
+
+void ?{}( value_t * this ) { this->value = 22; }
+
+//Standard case
+struct g_t {
+	value_t val;
+};
+
+void ?{}( g_t * this ) { (&this->val){}; }
+
+g_t g;
+
+//Autogen case
+struct ga_t {
+	value_t val;
+};
+
+ga_t ga;
+
+//Inline case
+struct gi_t;
+void ?{}( gi_t * this );
+
+struct gi_t {
+	value_t val;
+} gi;
+
+void ?{}( gi_t * this ) { (&this->val){}; }
+
+//Inline autogen case
+struct gia_t {
+	value_t val;
+} gia;
+
+//Static case
+struct gs_t {
+	value_t val;
+};
+
+void ?{}( gs_t * this ) { (&this->val){}; }
+
+static gs_t gs;
+
+//Static autogen case
+struct gsa_t {
+	value_t val;
+};
+
+static gsa_t gsa;
+
+//Static inline case
+struct gsi_t;
+void ?{}( gsi_t * this );
+
+static struct gsi_t {
+	value_t val;
+} gsi;
+
+void ?{}( gsi_t * this ) { (&this->val){}; }
+
+//Static inline autogen case
+static struct gsia_t {
+	value_t val;
+} gsia;
+
+int main() {
+	sout | "static\tinline\tautogen\tvalue" | endl;
+
+	sout | "no \t\tno \t\tno \t\t" | g.val.value    | endl;
+	sout | "no \t\tno \t\tyes\t\t" | ga.val.value   | endl;
+	sout | "no \t\tyes\t\tno \t\t" | gi.val.value   | endl;
+	sout | "no \t\tyes\t\tyes\t\t" | gia.val.value  | endl;
+	sout | "yes\t\tno \t\tno \t\t" | gs.val.value   | endl;
+	sout | "yes\t\tno \t\tyes\t\t" | gsa.val.value  | endl;
+	sout | "yes\t\tyes\t\tno \t\t" | gsi.val.value  | endl;
+	sout | "yes\t\tyes\t\tyes\t\t" | gsia.val.value | endl;
+
+}
Index: src/tests/monitor.c
===================================================================
--- src/tests/monitor.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
+++ src/tests/monitor.c	(revision 255b29467f3c17ce19c32a43618fe50c5efca784)
@@ -0,0 +1,41 @@
+#include <fstream>
+#include <kernel>
+#include <monitor>
+#include <threads>
+
+struct global_t {
+	int value;
+	monitor m;
+};
+
+void ?{}(global_t * this) {
+	this->value = 0;
+}
+
+static global_t global;
+
+void increment( /*mutex*/ global_t * this ) {
+	monitor_guard g = { &this->m };
+	this->value += 1;
+}
+
+struct MyThread { thread t; };
+
+DECL_THREAD(MyThread);
+
+void ?{}( MyThread * this ) {}
+
+void main( MyThread* this ) {
+	for(int i = 0; i < 1000000; i++) {
+		increment( &global );
+	}
+}
+
+int main(int argc, char* argv[]) {
+	assert( global.m.entry_queue.tail != NULL );
+	processor p;
+	{
+		scoped(MyThread) f[4];
+	}
+	sout | global.value | endl;
+}
