Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/CodeGen/CodeGenerator.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -865,4 +865,5 @@
 	void CodeGenerator::visit( CaseStmt * caseStmt ) {
 		updateLocation( caseStmt );
+		output << indent;
 		if ( caseStmt->isDefault()) {
 			output << "default";
Index: src/Concurrency/Waitfor.cc
===================================================================
--- src/Concurrency/Waitfor.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/Concurrency/Waitfor.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -27,5 +27,5 @@
 #include "InitTweak/InitTweak.h"   // for getPointerBase
 #include "Parser/LinkageSpec.h"    // for Cforall
-#include "SymTab/AddVisit.h"       // for acceptAndAdd
+#include "ResolvExpr/Resolver.h"   // for findVoidExpression
 #include "SynTree/Constant.h"      // for Constant
 #include "SynTree/Declaration.h"   // for StructDecl, FunctionDecl, ObjectDecl
@@ -112,5 +112,5 @@
 	//=============================================================================================
 
-	class GenerateWaitForPass final : public WithStmtsToAdd {
+	class GenerateWaitForPass final : public WithIndexer {
 	  public:
 
@@ -129,6 +129,6 @@
 		void         init( ObjectDecl * acceptables, int index, WaitForStmt::Clause & clause, CompoundStmt * stmt );
 		Expression * init_timeout( Expression *& time, Expression *& time_cond, bool has_else, Expression *& else_cond, CompoundStmt * stmt );
-		Expression * call();
-		void choose();
+		Expression * call(size_t count, ObjectDecl * acceptables, Expression * timeout, CompoundStmt * stmt);
+		void         choose( WaitForStmt * waitfor, Expression  * result, CompoundStmt * stmt );
 
 		static void implement( std::list< Declaration * > & translationUnit ) {
@@ -142,8 +142,4 @@
 		StructDecl          * decl_acceptable = nullptr;
 		StructDecl          * decl_monitor    = nullptr;
-		DeclarationWithType * decl_m_func     = nullptr;
-		DeclarationWithType * decl_m_count    = nullptr;
-		DeclarationWithType * decl_m_monitors = nullptr;
-		DeclarationWithType * decl_m_isdtor   = nullptr;
 
 		static std::unique_ptr< Type > generic_func;
@@ -152,4 +148,5 @@
 		UniqueName namer_acc = "__acceptables_"s;
 		UniqueName namer_tim = "__timeout_"s;
+		UniqueName namer_ret = "__return_"s;
 	};
 
@@ -167,5 +164,5 @@
 	namespace {
 		Expression * makeOpIndex( DeclarationWithType * array, unsigned long index ) {
-			return new ApplicationExpr(
+			return new UntypedExpr(
 				new NameExpr( "?[?]" ),
 				{
@@ -177,5 +174,5 @@
 
 		Expression * makeOpAssign( Expression * lhs, Expression * rhs ) {
-			return new ApplicationExpr(
+			return new UntypedExpr(
 					new NameExpr( "?=?" ),
 					{ lhs, rhs }
@@ -183,22 +180,21 @@
 		}
 
-		Expression * makeOpMember( Expression * sue, DeclarationWithType * mem ) {
-			return new MemberExpr( mem, sue );
-		}
-
-		Statement * makeAccStatement( DeclarationWithType * object, unsigned long index, DeclarationWithType * member, Expression * value ) {
-			return new ExprStmt(
-				noLabels,
-				makeOpAssign(
-					makeOpMember(
-						makeOpIndex(
-							object,
-							index
-						),
-						member
+		Expression * makeOpMember( Expression * sue, const std::string & mem ) {
+			return new UntypedMemberExpr( new NameExpr( mem ), sue );
+		}
+
+		Statement * makeAccStatement( DeclarationWithType * object, unsigned long index, const std::string & member, Expression * value, const SymTab::Indexer & indexer ) {
+			std::unique_ptr< Expression > expr( makeOpAssign(
+				makeOpMember(
+					makeOpIndex(
+						object,
+						index
 					),
-					value
-				)
-			);
+					member
+				),
+				value
+			) );
+
+			return new ExprStmt( noLabels, ResolvExpr::findVoidExpression( expr.get(), indexer ) );
 		}
 
@@ -227,11 +223,4 @@
 			assert( !decl_acceptable );
 			decl_acceptable = decl;
-			for( Declaration * field : decl_acceptable->members ) {
-				     if( field->name == "func"    ) decl_m_func     = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "count"   ) decl_m_count    = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "monitor" ) decl_m_monitors = strict_dynamic_cast< DeclarationWithType * >( field );
-				else if( field->name == "is_dtor" ) decl_m_isdtor   = strict_dynamic_cast< DeclarationWithType * >( field );
-			}
-
 		}
 		else if( decl->name == "monitor_desc" ) {
@@ -242,6 +231,4 @@
 
 	Statement * GenerateWaitForPass::postmutate( WaitForStmt * waitfor ) {
-		return waitfor;
-
 		if( !decl_monitor || !decl_acceptable ) throw SemanticError( "waitfor keyword requires monitors to be in scope, add #include <monitor>", waitfor );
 
@@ -265,7 +252,7 @@
 		);
 
-		// Expression * result  = call( acceptables, timeout, orelse, stmt );
-
-		// choose( waitfor, result );
+		Expression * result = call( waitfor->clauses.size(), acceptables, timeout, stmt );
+
+		choose( waitfor, result, stmt );
 
 		return stmt;
@@ -274,9 +261,6 @@
 	ObjectDecl * GenerateWaitForPass::declare( unsigned long count, CompoundStmt * stmt )
 	{
-		ObjectDecl * acceptables = new ObjectDecl(
+		ObjectDecl * acceptables = ObjectDecl::newObject(
 			namer_acc.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new ArrayType(
 				noQualifiers,
@@ -299,9 +283,6 @@
 	ObjectDecl * GenerateWaitForPass::declMon( WaitForStmt::Clause & clause, CompoundStmt * stmt ) {
 
-		ObjectDecl * mon = new ObjectDecl(
+		ObjectDecl * mon = ObjectDecl::newObject(
 			namer_mon.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new ArrayType(
 				noQualifiers,
@@ -330,9 +311,11 @@
 		ObjectDecl * monitors = declMon( clause, stmt );
 
+		Type * fptr_t = new PointerType( noQualifiers, new FunctionType( noQualifiers, true ) );
+
 		CompoundStmt * compound = new CompoundStmt( noLabels );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_func    , clause.target.function ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_count   , new ConstantExpr( Constant::from_ulong( clause.target.arguments.size() ) ) ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_monitors, new VariableExpr( monitors ) ) );
-		compound->push_back( makeAccStatement( acceptables, index, decl_m_isdtor  , new ConstantExpr( Constant::from_bool( true ) ) ) );
+		compound->push_back( makeAccStatement( acceptables, index, "func"    , new CastExpr( clause.target.function, fptr_t )                            , indexer ) );
+		compound->push_back( makeAccStatement( acceptables, index, "count"   , new ConstantExpr( Constant::from_ulong( clause.target.arguments.size() ) ), indexer ) );
+		compound->push_back( makeAccStatement( acceptables, index, "monitors", new VariableExpr( monitors )                                              , indexer ) );
+		compound->push_back( makeAccStatement( acceptables, index, "is_dtor" , new ConstantExpr( Constant::from_bool( true ) )                           , indexer ) );
 
 		stmt->push_back( new IfStmt(
@@ -355,9 +338,6 @@
 		CompoundStmt * stmt
 	) {
-		ObjectDecl * timeout = new ObjectDecl(
+		ObjectDecl * timeout = ObjectDecl::newObject(
 			namer_tim.newName(),
-			noStorage,
-			LinkageSpec::Cforall,
-			nullptr,
 			new BasicType(
 				noQualifiers,
@@ -374,5 +354,5 @@
 			stmt->push_back( new IfStmt(
 				noLabels,
-				safeCond( else_cond ),
+				safeCond( time_cond ),
 				new ExprStmt(
 					noLabels,
@@ -407,4 +387,99 @@
 		return new VariableExpr( timeout );
 	}
+
+	Expression * GenerateWaitForPass::call(
+		size_t count,
+		ObjectDecl * acceptables,
+		Expression * timeout,
+		CompoundStmt * stmt
+	) {
+		ObjectDecl * decl = ObjectDecl::newObject(
+			namer_ret.newName(),
+			new BasicType(
+				noQualifiers,
+				BasicType::LongLongUnsignedInt
+			),
+			new SingleInit(
+				new UntypedExpr(
+					VariableExpr::functionPointer( decl_waitfor ),
+					{
+						new ConstantExpr( Constant::from_ulong( count ) ),
+						new VariableExpr( acceptables ),
+						timeout
+					}
+				)
+			)
+		);
+
+		stmt->push_back( new DeclStmt( noLabels, decl ) );
+
+		return new VariableExpr( decl );
+	}
+
+	void GenerateWaitForPass::choose(
+		WaitForStmt * waitfor,
+		Expression  * result,
+		CompoundStmt * stmt
+	) {
+		SwitchStmt * swtch = new SwitchStmt(
+			noLabels,
+			result,
+			std::list<Statement *>()
+		);
+
+		unsigned long i = 0;
+		for( auto & clause : waitfor->clauses ) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_ulong( i++ ) ),
+					{
+						clause.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		if(waitfor->timeout.statement) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_ulong( i++ ) ),
+					{
+						waitfor->timeout.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		if(waitfor->orelse.statement) {
+			swtch->statements.push_back(
+				new CaseStmt(
+					noLabels,
+					new ConstantExpr( Constant::from_ulong( i++ ) ),
+					{
+						waitfor->orelse.statement,
+						new BranchStmt(
+							noLabels,
+							"",
+							BranchStmt::Break
+						)
+					}
+				)
+			);
+		}
+
+		stmt->push_back( swtch );
+	}
 };
 
Index: src/Parser/StatementNode.cc
===================================================================
--- src/Parser/StatementNode.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/Parser/StatementNode.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -234,5 +234,5 @@
 		target,
 		maybeMoveBuild<Statement >( stmt ),
-		maybeMoveBuild<Expression>( when )
+		notZeroExpr( maybeMoveBuild<Expression>( when ) )
 	});
 
@@ -253,5 +253,5 @@
 		std::move( target ),
 		maybeMoveBuild<Statement >( stmt ),
-		maybeMoveBuild<Expression>( when )
+		notZeroExpr( maybeMoveBuild<Expression>( when ) )
 	});
 
@@ -265,9 +265,9 @@
 		node->timeout.time      = maybeMoveBuild<Expression>( timeout );
 		node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
-		node->timeout.condition = maybeMoveBuild<Expression>( when    );
+		node->timeout.condition = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 	}
 	else {
-		node->orelse.statement  = maybeMoveBuild<Statement >( stmt    );
-		node->orelse.condition  = maybeMoveBuild<Expression>( when    );
+		node->orelse.statement  = maybeMoveBuild<Statement >( stmt );
+		node->orelse.condition  = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 	}
 
@@ -280,17 +280,11 @@
 	node->timeout.time      = maybeMoveBuild<Expression>( timeout );
 	node->timeout.statement = maybeMoveBuild<Statement >( stmt    );
-	node->timeout.condition = maybeMoveBuild<Expression>( when    );
+	node->timeout.condition = notZeroExpr( maybeMoveBuild<Expression>( when ) );
 
 	node->orelse.statement = maybeMoveBuild<Statement >( else_stmt );
-	node->orelse.condition = maybeMoveBuild<Expression>( else_when );
+	node->orelse.condition  = notZeroExpr( maybeMoveBuild<Expression>( else_when ) );
 
 	return node;
 }
-
-// WaitForStmt::Target build_waitfor( const std::string * name, ExpressionNode * arguments ) {
-// 	 return WaitForStmt::Clause{
-
-// 	 };
-// }
 
 Statement *build_compound( StatementNode *first ) {
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -144,12 +144,12 @@
 			expr->get_result()->accept( global_renamer );
 		}
-
-		void referenceToRvalueConversion( Expression *& expr ) {
-			if ( dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
-				// cast away reference from expr
-				expr = new CastExpr( expr, expr->get_result()->stripReferences()->clone() );
-			}
-		}
 	} // namespace
+
+	void referenceToRvalueConversion( Expression *& expr ) {
+		if ( dynamic_cast< ReferenceType * >( expr->get_result() ) ) {
+			// cast away reference from expr
+			expr = new CastExpr( expr, expr->get_result()->stripReferences()->clone() );
+		}
+	}
 
 	template< typename InputIterator, typename OutputIterator >
Index: src/ResolvExpr/AlternativeFinder.h
===================================================================
--- src/ResolvExpr/AlternativeFinder.h	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/ResolvExpr/AlternativeFinder.h	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -50,4 +50,9 @@
 		const SymTab::Indexer &get_indexer() const { return indexer; }
 		const TypeEnvironment &get_environ() const { return env; }
+
+		/// Runs a new alternative finder on each element in [begin, end)
+		/// and writes each alternative finder to out.
+		template< typename InputIterator, typename OutputIterator >
+		void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
 	  private:
 		virtual void visit( ApplicationExpr *applicationExpr );
@@ -81,8 +86,4 @@
 		virtual void visit( StmtExpr *stmtExpr );
 		virtual void visit( UntypedInitExpr *initExpr );
-		/// Runs a new alternative finder on each element in [begin, end)
-		/// and writes each alternative finder to out.
-		template< typename InputIterator, typename OutputIterator >
-		void findSubExprs( InputIterator begin, InputIterator end, OutputIterator out );
 
 		/// Adds alternatives for anonymous members
@@ -108,4 +109,5 @@
 
 	Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer, TypeEnvironment &env );
+	void referenceToRvalueConversion( Expression *& expr );
 
 	template< typename InputIterator, typename OutputIterator >
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/ResolvExpr/Resolver.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -39,4 +39,5 @@
 #include "SynTree/Visitor.h"             // for acceptAll, maybeAccept
 #include "typeops.h"                     // for extractResultType
+#include "Unify.h"                       // for unify
 
 using namespace std;
@@ -76,4 +77,5 @@
 		virtual void visit( ThrowStmt *throwStmt ) override;
 		virtual void visit( CatchStmt *catchStmt ) override;
+		virtual void visit( WaitForStmt *waitforStmt ) override;
 
 		virtual void visit( SingleInit *singleInit ) override;
@@ -410,4 +412,206 @@
 	}
 
+	inline void resolveAsIf( Expression *& expr, Resolver & resolver ) {
+		if( !expr ) return;
+		Expression * newExpr = findSingleExpression( expr, resolver );
+		delete expr;
+		expr = newExpr;
+	}
+
+	inline void resolveAsType( Expression *& expr, Type * type, Resolver & resolver ) {
+		if( !expr ) return;
+		Expression * newExpr = findSingleExpression( new CastExpr( expr, type ), resolver );
+		delete expr;
+		expr = newExpr;
+	}
+
+	template< typename iterator_t >
+	inline bool advance_to_mutex( iterator_t & it, const iterator_t & end ) {
+		while( it != end && !(*it)->get_type()->get_mutex() ) {
+			it++;
+		}
+
+		return it != end;
+	}
+
+	void Resolver::visit( WaitForStmt * stmt ) {
+
+		// Resolve all clauses first
+		for( auto& clause : stmt->clauses ) {
+
+			TypeEnvironment env;
+			AlternativeFinder funcFinder( *this, env );
+
+			// Find all alternatives for a function in canonical form
+			funcFinder.findWithAdjustment( clause.target.function );
+
+			if ( funcFinder.get_alternatives().empty() ) {
+				stringstream ss;
+				ss << "Use of undeclared indentifier '";
+				ss << strict_dynamic_cast<NameExpr*>( clause.target.function )->name;
+				ss << "' in call to waitfor";
+				throw SemanticError( ss.str() );
+			}
+
+			// Find all alternatives for all arguments in canonical form
+			std::list< AlternativeFinder > argAlternatives;
+			funcFinder.findSubExprs( clause.target.arguments.begin(), clause.target.arguments.end(), back_inserter( argAlternatives ) );
+
+			// List all combinations of arguments
+			std::list< AltList > possibilities;
+			combos( argAlternatives.begin(), argAlternatives.end(), back_inserter( possibilities ) );
+
+			AltList                func_candidates;
+			std::vector< AltList > args_candidates;
+
+			// For every possible function :
+			// 	try matching the arguments to the parameters
+			// 	not the other way around because we have more arguments than parameters
+			SemanticError errors;
+			for ( Alternative & func : funcFinder.get_alternatives() ) {
+				try {
+					PointerType * pointer = dynamic_cast< PointerType* >( func.expr->get_result()->stripReferences() );
+					if( !pointer ) {
+						throw SemanticError( "candidate not viable: not a pointer type\n", func.expr->get_result() );
+					}
+
+					FunctionType * function = dynamic_cast< FunctionType* >( pointer->get_base() );
+					if( !function ) {
+						throw SemanticError( "candidate not viable: not a function type\n", pointer->get_base() );
+					}
+
+
+					{
+						auto param     = function->parameters.begin();
+						auto param_end = function->parameters.end();
+
+						if( !advance_to_mutex( param, param_end ) ) {
+							throw SemanticError("candidate function not viable: no mutex parameters\n", function);
+						}
+					}
+
+					Alternative newFunc( func );
+					// Strip reference from function
+					referenceToRvalueConversion( newFunc.expr );
+
+					// For all the set of arguments we have try to match it with the parameter of the current function alternative
+					for ( auto & argsList : possibilities ) {
+
+						try {
+							// Declare data structures need for resolution
+							OpenVarSet openVars;
+							AssertionSet resultNeed, resultHave;
+							TypeEnvironment resultEnv;
+
+							// Load type variables from arguemnts into one shared space
+							simpleCombineEnvironments( argsList.begin(), argsList.end(), resultEnv );
+
+							// Make sure we don't widen any existing bindings
+							for ( auto & i : resultEnv ) {
+								i.allowWidening = false;
+							}
+
+							// Find any unbound type variables
+							resultEnv.extractOpenVars( openVars );
+
+							auto param     = function->parameters.begin();
+							auto param_end = function->parameters.end();
+
+							// For every arguments of its set, check if it matches one of the parameter
+							// The order is important
+							for( auto & arg : argsList ) {
+
+								// Ignore non-mutex arguments
+								if( !advance_to_mutex( param, param_end ) ) {
+									// We ran out of parameters but still have arguments
+									// this function doesn't match
+									throw SemanticError("candidate function not viable: too many mutex arguments\n", function);
+								}
+
+								// Check if the argument matches the parameter type in the current scope
+								if( ! unify( (*param)->get_type(), arg.expr->get_result(), resultEnv, resultNeed, resultHave, openVars, *this ) ) {
+									// Type doesn't match
+									stringstream ss;
+									ss << "candidate function not viable: no known convertion from '";
+									arg.expr->get_result()->print( ss );
+									ss << "' to '";
+									(*param)->get_type()->print( ss );
+									ss << "'\n";
+									throw SemanticError(ss.str(), function);
+								}
+
+								param++;
+							}
+
+							// All arguments match !
+
+							// Check if parameters are missing
+							if( advance_to_mutex( param, param_end ) ) {
+								// We ran out of arguments but still have parameters left
+								// this function doesn't match
+								throw SemanticError("candidate function not viable: too few mutex arguments\n", function);
+							}
+
+							// All parameters match !
+
+							// Finish the expressions to tie in the proper environments
+							finishExpr( newFunc.expr, resultEnv );
+							for( Alternative & alt : argsList ) {
+								finishExpr( alt.expr, resultEnv );
+							}
+
+							// This is a match store it and save it for later
+							func_candidates.push_back( newFunc );
+							args_candidates.push_back( argsList );
+
+						}
+						catch( SemanticError &e ) {
+							errors.append( e );
+						}
+					}
+				}
+				catch( SemanticError &e ) {
+					errors.append( e );
+				}
+			}
+
+			// Make sure we got the right number of arguments
+			if( func_candidates.empty() )    { SemanticError top( "No alternatives for function in call to waitfor"  ); top.append( errors ); throw top; }
+			if( args_candidates.empty() )    { SemanticError top( "No alternatives for arguments in call to waitfor" ); top.append( errors ); throw top; }
+			if( func_candidates.size() > 1 ) { SemanticError top( "Ambiguous function in call to waitfor"            ); top.append( errors ); throw top; }
+			if( args_candidates.size() > 1 ) { SemanticError top( "Ambiguous arguments in call to waitfor"           ); top.append( errors ); throw top; }
+
+
+			// Swap the results from the alternative with the unresolved values.
+			// Alternatives will handle deletion on destruction
+			std::swap( clause.target.function, func_candidates.front().expr );
+			for( auto arg_pair : group_iterate( clause.target.arguments, args_candidates.front() ) ) {
+				std::swap ( std::get<0>( arg_pair), std::get<1>( arg_pair).expr );
+			}
+
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsIf( clause.condition, *this );
+			clause.statement->accept( *this );
+		}
+
+
+		if( stmt->timeout.statement ) {
+			// Resolve the timeout as an size_t for now
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsType( stmt->timeout.time, new BasicType( noQualifiers, BasicType::LongLongUnsignedInt ), *this );
+			resolveAsIf  ( stmt->timeout.condition, *this );
+			stmt->timeout.statement->accept( *this );
+		}
+
+		if( stmt->orelse.statement ) {
+			// Resolve the conditions as if it were an IfStmt
+			// Resolve the statments normally
+			resolveAsIf( stmt->orelse.condition, *this );
+			stmt->orelse.statement->accept( *this );
+		}
+	}
+
 	template< typename T >
 	bool isCharType( T t ) {
Index: src/SynTree/Statement.cc
===================================================================
--- src/SynTree/Statement.cc	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/SynTree/Statement.cc	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -168,5 +168,5 @@
 }
 
-SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, std::list<Statement *> &statements ):
+SwitchStmt::SwitchStmt( std::list<Label> labels, Expression * condition, const std::list<Statement *> &statements ):
 	Statement( labels ), condition( condition ), statements( statements ) {
 }
@@ -196,5 +196,5 @@
 }
 
-CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) :
+CaseStmt::CaseStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements, bool deflt ) throw ( SemanticError ) :
 	Statement( labels ), condition( condition ), stmts( statements ), _isDefault( deflt ) {
 	if ( isDefault() && condition != 0 )
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/SynTree/Statement.h	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -157,5 +157,5 @@
 	std::list<Statement *> statements;
 
-	SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements );
+	SwitchStmt( std::list<Label> labels, Expression *condition, const std::list<Statement *> &statements );
 	SwitchStmt( const SwitchStmt &other );
 	virtual ~SwitchStmt();
@@ -179,5 +179,5 @@
 	std::list<Statement *> stmts;
 
-	CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
+	CaseStmt( std::list<Label> labels, Expression *conditions, const std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
 	CaseStmt( const CaseStmt &other );
 	virtual ~CaseStmt();
Index: src/libcfa/concurrency/monitor
===================================================================
--- src/libcfa/concurrency/monitor	(revision f92c6969281d9fe4d6f1cd6b904b52c4294d54d1)
+++ src/libcfa/concurrency/monitor	(revision 1dcd955480c332b81ce157f2b7ccf8e34ad2acd3)
@@ -21,4 +21,9 @@
 #include "invoke.h"
 #include "stdlib"
+
+trait is_monitor(dtype T) {
+	monitor_desc * get_monitor( T & );
+	void ^?{}( T & mutex );
+};
 
 static inline void ?{}(monitor_desc & this) {
@@ -106,5 +111,5 @@
 };
 
-int __accept_internal( unsigned short count, __acceptable_t * acceptables );
+int __accept_internal( unsigned short count, __acceptable_t * acceptables, int duration );
 
 // Local Variables: //
