Index: translator/ArgTweak/FunctionFixer.cc
===================================================================
--- translator/ArgTweak/FunctionFixer.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ArgTweak/FunctionFixer.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 08:12:38 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat May 16 08:17:07 2015
-// Update Count     : 5
+// Last Modified On : Mon May 18 23:30:39 2015
+// Update Count     : 6
 //
 
Index: translator/ArgTweak/FunctionFixer.h
===================================================================
--- translator/ArgTweak/FunctionFixer.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ArgTweak/FunctionFixer.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef _DEFS_FUNCTION_FIXER_H_
-#define _DEFS_FUNCTION_FIXER_H_
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FunctionFixer.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:31:58 2015
+// Update Count     : 3
+//
+
+#ifndef _FUNCTION_FIXER_H_
+#define _FUNCTION_FIXER_H_
 
 #include "SynTree/Mutator.h"
@@ -8,43 +23,38 @@
 
 namespace ArgTweak {
-  class FunctionFixer : public Mutator
-  {
-    typedef Mutator Parent;
+	class FunctionFixer : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		FunctionFixer(SymTab::Indexer *ind = 0);
+		~FunctionFixer();
 
-  public:
-    FunctionFixer(SymTab::Indexer *ind = 0);
-    ~FunctionFixer();
+		virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
+		virtual Expression *mutate( UntypedExpr *untypedExpr ) throw ( SemanticError );
+	  private:
+		class Matcher {
+			typedef std::string key;
+			typedef DeclarationWithType * pattern_type;
+			typedef Expression * permutation_type;
+		  public:
+			static key null_key;
+			static permutation_type null_value;
 
-    virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-    virtual Expression *mutate( UntypedExpr *untypedExpr ) throw ( SemanticError );
+			std::string extract_key( DeclarationWithType * );
+			std::string extract_key( Expression * );
 
-  private:
-    class Matcher {
-      typedef std::string key;
-      typedef DeclarationWithType * pattern_type;
-      typedef Expression * permutation_type;
-    public:
-      static key null_key;
-      static permutation_type null_value;
+			bool operator()( DeclarationWithType *, Expression * ) { return true; }
+		};
 
-      std::string extract_key( DeclarationWithType * );
-      std::string extract_key( Expression * );
+		SymTab::Indexer *index;
+	};
 
-      bool operator()( DeclarationWithType *, Expression * ) { return true; }
-    };
-
-    SymTab::Indexer *index;
-  };
-
-  template < class L1, class L2, class Predicate > bool align( L1 &pattern, L2 &possible_permutation, Predicate pred ); 
-
+	template < class L1, class L2, class Predicate > bool align( L1 &pattern, L2 &possible_permutation, Predicate pred ); 
 } // namespace ArgTweak
 
+#endif // _FUNCTION_FIXER_H_
 
-#endif // #ifndef _DEFS_FUNCTION_FIXER_H_
-
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ArgTweak/Mutate.cc
===================================================================
--- translator/ArgTweak/Mutate.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ArgTweak/Mutate.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Mutate.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:32:23 2015
+// Update Count     : 1
+//
+
 #include "SynTree/Mutator.h"
 
@@ -5,13 +20,14 @@
 
 namespace ArgTweak {
+	void mutate( std::list< Declaration * > translationUnit ) {
+		FunctionFixer ff;
 
-  void mutate( std::list< Declaration * > translationUnit )
-  {
-    FunctionFixer ff;
-
-    mutateAll( translationUnit, ff );
-  }
-
+		mutateAll( translationUnit, ff );
+	}
 } // namespace ArgTweak
 
-
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ArgTweak/Mutate.h
===================================================================
--- translator/ArgTweak/Mutate.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ArgTweak/Mutate.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef ARGTWEAK_MUTATE_H
-#define ARGTWEAK_MUTATE_H
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Mutate.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:33:04 2015
+// Update Count     : 2
+//
+
+#ifndef _MUTATE_H
+#define _MUTATE_H
 
 #include <list>
@@ -8,14 +23,12 @@
 
 namespace ArgTweak {
-
-  void mutate( std::list< Declaration* > translationUnit );
-
+	void mutate( std::list< Declaration* > translationUnit );
 } // namespace ArgTweak
 
-#endif // #ifndef ARGTWEAK_MUTATE_H
+#endif // _MUTATE_H
 
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/CodeGenerator2.cc
===================================================================
--- translator/CodeGen/CodeGenerator2.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/CodeGenerator2.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CodeGenerator2.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:34:27 2015
+// Update Count     : 1
+//
+
 #include <algorithm>
 #include <iostream>
@@ -20,634 +35,638 @@
 
 namespace CodeGen {
-    int CodeGenerator2::tabsize = 4;
-
-    CodeGenerator2::CodeGenerator2( std::ostream &os ) : cur_indent( 0 ), insideFunction( false ), before( os ), after() { }
-
-    CodeGenerator2::CodeGenerator2( std::ostream &os, std::string init, int indent, bool infunp )
-	: cur_indent( indent ), insideFunction( infunp ), before( os )
-    {
-	//before << std::string( init );
-    }
-
-    CodeGenerator2::CodeGenerator2( std::ostream &os, char *init, int indent, bool infunp )
-	: cur_indent( indent ), insideFunction( infunp ), before( os )
-    {
-	//before << std::string( init );
-    }
-
-    string mangleName( DeclarationWithType *decl ) {
-	if ( decl->get_mangleName() != "" ) {
-	    return decl->get_mangleName();
-	} else {
-	    return decl->get_name();
-	} // if
-    }
-  
-    //*** Declarations
-    void CodeGenerator2::visit( FunctionDecl *functionDecl ) {
-	handleStorageClass( functionDecl );
-	before << genType( functionDecl->get_functionType(), mangleName( functionDecl ) );
-
-	// how to get this to the Functype?
-	std::list< Declaration * > olds = functionDecl->get_oldDecls();
-	if ( ! olds.empty() ) {
-	    before << " /* function has old declaration */";
-	} // if
-
-	// acceptAll( functionDecl->get_oldDecls(), *this );
-	if ( functionDecl->get_statements() ) {
-	    functionDecl->get_statements()->accept(*this );
-	} // if
-    }
-
-    void CodeGenerator2::visit( ObjectDecl *objectDecl ) {
-	handleStorageClass( objectDecl );
-	before << genType( objectDecl->get_type(), mangleName( objectDecl ) );
-    
-	if ( objectDecl->get_init() ) {
-	    before << " = ";
-	    objectDecl->get_init()->accept( *this );
-	} // if
-	if ( objectDecl->get_bitfieldWidth() ) {
-	    before << ":";
-	    objectDecl->get_bitfieldWidth()->accept( *this );
-	} // if
-    }
-
-    void CodeGenerator2::handleAggregate( AggregateDecl *aggDecl ) {
-	if ( aggDecl->get_name() != "" )
-	    before << aggDecl->get_name();
-    
-	std::list< Declaration * > &memb = aggDecl->get_members();
-
-	if ( ! memb.empty() ) {
-	    before << endl << string( cur_indent, ' ' ) << "{" << endl;
-
-	    cur_indent += CodeGenerator2::tabsize; 
-	    for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
-		before << string( cur_indent, ' ' ); 
-		(*i)->accept(*this );
-		before << ";" << endl;
-	    }
-
-	    cur_indent -= CodeGenerator2::tabsize; 
-
-	    before << string( cur_indent, ' ' ) << "}";
-	} // if
-    }
-
-    void CodeGenerator2::visit( StructDecl *structDecl ) {
-	before << "struct ";
-	handleAggregate( structDecl );
-    }
-
-    void CodeGenerator2::visit( UnionDecl *aggregateDecl ) {
-	before << "union ";
-	handleAggregate( aggregateDecl );
-    }
-  
-    void CodeGenerator2::visit( EnumDecl *aggDecl ) {
-	before << "enum ";
-
-	if ( aggDecl->get_name() != "" )
-	    before << aggDecl->get_name();
-    
-	std::list< Declaration* > &memb = aggDecl->get_members();
-
-	if ( ! memb.empty() ) {
-	    before << endl << "{" << endl;
-
-	    cur_indent += CodeGenerator2::tabsize; 
-	    for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
-		ObjectDecl *obj = dynamic_cast< ObjectDecl* >( *i );
-		assert( obj );
-		before << string( cur_indent, ' ' ) << mangleName( obj ); 
-		if ( obj->get_init() ) {
-		    before << " = ";
-		    obj->get_init()->accept(*this );
-		} // if
-		before << "," << endl;
-	    }
-
-	    cur_indent -= CodeGenerator2::tabsize; 
-
-	    before << "}" << endl;
-	} // if
-    }
-  
-    void CodeGenerator2::visit( ContextDecl *aggregateDecl ) {}
-  
-    void CodeGenerator2::visit( TypedefDecl *typeDecl ) {
-	before << "typedef ";
-	before << genType( typeDecl->get_base(), typeDecl->get_name() );
-    }
-  
-    void CodeGenerator2::visit( TypeDecl *typeDecl ) {
-	// really, we should mutate this into something that isn't a TypeDecl but that requires large-scale changes,
-	// still to be done
-	before << "extern unsigned long " << typeDecl->get_name();
-	if ( typeDecl->get_base() ) {
-	    before << " = sizeof( " << genType( typeDecl->get_base(), "" ) << " )";
-	} // if
-    }
-
-    void CodeGenerator2::visit( SingleInit *init ) {
-	init->get_value()->accept( *this );
-    }
-
-    void CodeGenerator2::visit( ListInit *init ) {
-	before << "{ ";
-	genCommaList( init->begin_initializers(), init->end_initializers() );
-	before << " }";
-    }
-
-    void CodeGenerator2::visit( Constant *constant ) { 
-	before << constant->get_value() ;
-    }
-
-    //*** Expressions
-    void CodeGenerator2::visit( ApplicationExpr *applicationExpr ) {
-	if ( VariableExpr *varExpr = dynamic_cast< VariableExpr* >( applicationExpr->get_function() ) ) {
-	    OperatorInfo opInfo;
-	    if ( varExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && operatorLookup( varExpr->get_var()->get_name(), opInfo ) ) {
-		std::list< Expression* >::iterator arg = applicationExpr->get_args().begin();
-		switch ( opInfo.type ) {
-		  case OT_PREFIXASSIGN:
-		  case OT_POSTFIXASSIGN:
-		  case OT_INFIXASSIGN:
-		    {
-			assert( arg != applicationExpr->get_args().end() );
-			if ( AddressExpr *addrExpr = dynamic_cast< AddressExpr * >( *arg ) ) {
-            
-			    *arg = addrExpr->get_arg();
+	int CodeGenerator2::tabsize = 4;
+
+	CodeGenerator2::CodeGenerator2( std::ostream &os ) : cur_indent( 0 ), insideFunction( false ), before( os ), after() { }
+
+	CodeGenerator2::CodeGenerator2( std::ostream &os, std::string init, int indent, bool infunp )
+		: cur_indent( indent ), insideFunction( infunp ), before( os ) {
+		//before << std::string( init );
+	}
+
+	CodeGenerator2::CodeGenerator2( std::ostream &os, char *init, int indent, bool infunp )
+		: cur_indent( indent ), insideFunction( infunp ), before( os ) {
+		//before << std::string( init );
+	}
+
+	string mangleName( DeclarationWithType *decl ) {
+		if ( decl->get_mangleName() != "" ) {
+			return decl->get_mangleName();
+		} else {
+			return decl->get_name();
+		} // if
+	}
+  
+	//*** Declarations
+	void CodeGenerator2::visit( FunctionDecl *functionDecl ) {
+		handleStorageClass( functionDecl );
+		before << genType( functionDecl->get_functionType(), mangleName( functionDecl ) );
+
+		// how to get this to the Functype?
+		std::list< Declaration * > olds = functionDecl->get_oldDecls();
+		if ( ! olds.empty() ) {
+			before << " /* function has old declaration */";
+		} // if
+
+		// acceptAll( functionDecl->get_oldDecls(), *this );
+		if ( functionDecl->get_statements() ) {
+			functionDecl->get_statements()->accept(*this );
+		} // if
+	}
+
+	void CodeGenerator2::visit( ObjectDecl *objectDecl ) {
+		handleStorageClass( objectDecl );
+		before << genType( objectDecl->get_type(), mangleName( objectDecl ) );
+	
+		if ( objectDecl->get_init() ) {
+			before << " = ";
+			objectDecl->get_init()->accept( *this );
+		} // if
+		if ( objectDecl->get_bitfieldWidth() ) {
+			before << ":";
+			objectDecl->get_bitfieldWidth()->accept( *this );
+		} // if
+	}
+
+	void CodeGenerator2::handleAggregate( AggregateDecl *aggDecl ) {
+		if ( aggDecl->get_name() != "" )
+			before << aggDecl->get_name();
+	
+		std::list< Declaration * > &memb = aggDecl->get_members();
+
+		if ( ! memb.empty() ) {
+			before << endl << string( cur_indent, ' ' ) << "{" << endl;
+
+			cur_indent += CodeGenerator2::tabsize; 
+			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
+				before << string( cur_indent, ' ' ); 
+				(*i)->accept(*this );
+				before << ";" << endl;
+			}
+
+			cur_indent -= CodeGenerator2::tabsize; 
+
+			before << string( cur_indent, ' ' ) << "}";
+		} // if
+	}
+
+	void CodeGenerator2::visit( StructDecl *structDecl ) {
+		before << "struct ";
+		handleAggregate( structDecl );
+	}
+
+	void CodeGenerator2::visit( UnionDecl *aggregateDecl ) {
+		before << "union ";
+		handleAggregate( aggregateDecl );
+	}
+  
+	void CodeGenerator2::visit( EnumDecl *aggDecl ) {
+		before << "enum ";
+
+		if ( aggDecl->get_name() != "" )
+			before << aggDecl->get_name();
+	
+		std::list< Declaration* > &memb = aggDecl->get_members();
+
+		if ( ! memb.empty() ) {
+			before << endl << "{" << endl;
+
+			cur_indent += CodeGenerator2::tabsize; 
+			for ( std::list< Declaration* >::iterator i = memb.begin(); i != memb.end();  i++) {
+				ObjectDecl *obj = dynamic_cast< ObjectDecl* >( *i );
+				assert( obj );
+				before << string( cur_indent, ' ' ) << mangleName( obj ); 
+				if ( obj->get_init() ) {
+					before << " = ";
+					obj->get_init()->accept(*this );
+				} // if
+				before << "," << endl;
+			} // for
+
+			cur_indent -= CodeGenerator2::tabsize; 
+
+			before << "}" << endl;
+		} // if
+	}
+  
+	void CodeGenerator2::visit( ContextDecl *aggregateDecl ) {}
+  
+	void CodeGenerator2::visit( TypedefDecl *typeDecl ) {
+		before << "typedef ";
+		before << genType( typeDecl->get_base(), typeDecl->get_name() );
+	}
+  
+	void CodeGenerator2::visit( TypeDecl *typeDecl ) {
+		// really, we should mutate this into something that isn't a TypeDecl but that requires large-scale changes,
+		// still to be done
+		before << "extern unsigned long " << typeDecl->get_name();
+		if ( typeDecl->get_base() ) {
+			before << " = sizeof( " << genType( typeDecl->get_base(), "" ) << " )";
+		} // if
+	}
+
+	void CodeGenerator2::visit( SingleInit *init ) {
+		init->get_value()->accept( *this );
+	}
+
+	void CodeGenerator2::visit( ListInit *init ) {
+		before << "{ ";
+		genCommaList( init->begin_initializers(), init->end_initializers() );
+		before << " }";
+	}
+
+	void CodeGenerator2::visit( Constant *constant ) { 
+		before << constant->get_value() ;
+	}
+
+	//*** Expressions
+	void CodeGenerator2::visit( ApplicationExpr *applicationExpr ) {
+		if ( VariableExpr *varExpr = dynamic_cast< VariableExpr* >( applicationExpr->get_function() ) ) {
+			OperatorInfo opInfo;
+			if ( varExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && operatorLookup( varExpr->get_var()->get_name(), opInfo ) ) {
+				std::list< Expression* >::iterator arg = applicationExpr->get_args().begin();
+				switch ( opInfo.type ) {
+				  case OT_PREFIXASSIGN:
+				  case OT_POSTFIXASSIGN:
+				  case OT_INFIXASSIGN:
+					{
+						assert( arg != applicationExpr->get_args().end() );
+						if ( AddressExpr *addrExpr = dynamic_cast< AddressExpr * >( *arg ) ) {
+	        
+							*arg = addrExpr->get_arg();
+						} else {
+							UntypedExpr *newExpr = new UntypedExpr( new NameExpr( "*?" ) );
+							newExpr->get_args().push_back( *arg );
+							*arg = newExpr;
+						} // if
+						break;
+					}
+	      
+				  default:
+					// do nothing
+					;
+				}
+	    
+				switch ( opInfo.type ) {
+				  case OT_INDEX:
+					assert( applicationExpr->get_args().size() == 2 );
+					(*arg++)->accept( *this );
+					before << "[";
+					(*arg)->accept( *this );
+					before << "]";
+					break;
+	      
+				  case OT_CALL:
+					// there are no intrinsic definitions of the function call operator
+					assert( false );
+					break;
+	      
+				  case OT_PREFIX:
+				  case OT_PREFIXASSIGN:
+					assert( applicationExpr->get_args().size() == 1 );
+					before << "(";
+					before << opInfo.symbol;
+					(*arg)->accept( *this );
+					before << ")";
+					break;
+	      
+				  case OT_POSTFIX:
+				  case OT_POSTFIXASSIGN:
+					assert( applicationExpr->get_args().size() == 1 );
+					(*arg)->accept( *this );
+					before << opInfo.symbol;
+					break;
+
+				  case OT_INFIX:
+				  case OT_INFIXASSIGN:
+					assert( applicationExpr->get_args().size() == 2 );
+					before << "(";
+					(*arg++)->accept( *this );
+					before << opInfo.symbol;
+					(*arg)->accept( *this );
+					before << ")";
+					break;
+	      
+				  case OT_CONSTANT:
+					// there are no intrinsic definitions of 0 or 1 as functions
+					assert( false );
+				}
 			} else {
-			    UntypedExpr *newExpr = new UntypedExpr( new NameExpr( "*?" ) );
-			    newExpr->get_args().push_back( *arg );
-			    *arg = newExpr;
+				varExpr->accept( *this );
+				before << "(";
+				genCommaList( applicationExpr->get_args().begin(), applicationExpr->get_args().end() );
+				before << ")";
 			} // if
-			break;
-		    }
-          
-		  default:
-		    // do nothing
-		    ;
+		} else {
+			applicationExpr->get_function()->accept( *this );
+			before << "(";
+			genCommaList( applicationExpr->get_args().begin(), applicationExpr->get_args().end() );
+			before << ")";
+		} // if
+	}
+  
+	void CodeGenerator2::visit( UntypedExpr *untypedExpr ) {
+		if ( NameExpr *nameExpr = dynamic_cast< NameExpr* >( untypedExpr->get_function() ) ) {
+			OperatorInfo opInfo;
+			if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
+				std::list< Expression* >::iterator arg = untypedExpr->get_args().begin();
+				switch ( opInfo.type ) {
+				  case OT_INDEX:
+					assert( untypedExpr->get_args().size() == 2 );
+					(*arg++)->accept( *this );
+					before << "[";
+					(*arg)->accept( *this );
+					before << "]";
+					break;
+	      
+				  case OT_CALL:
+					assert( false );
+					break;
+	      
+				  case OT_PREFIX:
+				  case OT_PREFIXASSIGN:
+					assert( untypedExpr->get_args().size() == 1 );
+					before << "(";
+					before << opInfo.symbol;
+					(*arg)->accept( *this );
+					before << ")";
+					break;
+	      
+				  case OT_POSTFIX:
+				  case OT_POSTFIXASSIGN:
+					assert( untypedExpr->get_args().size() == 1 );
+					(*arg)->accept( *this );
+					before << opInfo.symbol;
+					break;
+  
+				  case OT_INFIX:
+				  case OT_INFIXASSIGN:
+					assert( untypedExpr->get_args().size() == 2 );
+					before << "(";
+					(*arg++)->accept( *this );
+					before << opInfo.symbol;
+					(*arg)->accept( *this );
+					before << ")";
+					break;
+	      
+				  case OT_CONSTANT:
+					// there are no intrinsic definitions of 0 or 1 as functions
+					assert( false );
+				}
+			} else {
+				nameExpr->accept( *this );
+				before << "(";
+				genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
+				before << ")";
+			} // if
+		} else {
+			untypedExpr->get_function()->accept( *this );
+			before << "(";
+			genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
+			before << ")";
+		} // if
+	}
+  
+	void CodeGenerator2::visit( NameExpr *nameExpr ) {
+		OperatorInfo opInfo;
+		if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
+			assert( opInfo.type == OT_CONSTANT );
+			before << opInfo.symbol;
+		} else {
+			before << nameExpr->get_name();
+		} // if
+	}
+  
+	void CodeGenerator2::visit( AddressExpr *addressExpr ) {
+		before << "(&";
+		// this hack makes sure that we don't convert "constant_zero" to "0" if we're taking its address
+		if ( VariableExpr *variableExpr = dynamic_cast< VariableExpr* >( addressExpr->get_arg() ) ) {
+			before << mangleName( variableExpr->get_var() );
+		} else {
+			addressExpr->get_arg()->accept( *this );
+		} // if
+		before << ")";
+	}
+
+	void CodeGenerator2::visit( CastExpr *castExpr ) {
+		before << "((";
+		if ( castExpr->get_results().empty() ) {
+			before << "void" ;
+		} else {
+			before << genType( castExpr->get_results().front(), "" );
+		} // if
+		before << ")";
+		castExpr->get_arg()->accept( *this );
+		before << ")";
+	}
+  
+	void CodeGenerator2::visit( UntypedMemberExpr *memberExpr ) {
+		assert( false );
+	}
+  
+	void CodeGenerator2::visit( MemberExpr *memberExpr ) {
+		memberExpr->get_aggregate()->accept( *this );
+		before << "." << mangleName( memberExpr->get_member() );
+	}
+  
+	void CodeGenerator2::visit( VariableExpr *variableExpr ) {
+		OperatorInfo opInfo;
+		if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && operatorLookup( variableExpr->get_var()->get_name(), opInfo ) && opInfo.type == OT_CONSTANT ) {
+			before << opInfo.symbol;
+		} else {
+			before << mangleName( variableExpr->get_var() );
+		} // if
+	}
+  
+	void CodeGenerator2::visit( ConstantExpr *constantExpr ) {
+		assert( constantExpr->get_constant() );
+		constantExpr->get_constant()->accept( *this );
+	}
+  
+	void CodeGenerator2::visit( SizeofExpr *sizeofExpr ) {
+		before << "sizeof(";
+		if ( sizeofExpr->get_isType() ) {
+			before << genType( sizeofExpr->get_type(), "" );
+		} else {
+			sizeofExpr->get_expr()->accept( *this );
+		} // if
+		before << ")";
+	}
+  
+	void CodeGenerator2::visit( LogicalExpr *logicalExpr ) {
+		before << "(";
+		logicalExpr->get_arg1()->accept( *this );
+		if ( logicalExpr->get_isAnd() ) {
+			before << " && ";
+		} else {
+			before << " || ";
+		} // if
+		logicalExpr->get_arg2()->accept( *this );
+		before << ")";
+	}
+  
+	void CodeGenerator2::visit( ConditionalExpr *conditionalExpr ) {
+		before << "(";
+		conditionalExpr->get_arg1()->accept( *this );
+		before << " ? ";
+		conditionalExpr->get_arg2()->accept( *this );
+		before << " : ";
+		conditionalExpr->get_arg3()->accept( *this );
+		before << ")";
+	}
+  
+	void CodeGenerator2::visit( CommaExpr *commaExpr ) {
+		before << "(";
+		commaExpr->get_arg1()->accept( *this );
+		before << " , ";
+		commaExpr->get_arg2()->accept( *this );
+		before << ")";
+	}
+  
+	void CodeGenerator2::visit( TupleExpr *tupleExpr ) {}
+  
+	void CodeGenerator2::visit( TypeExpr *typeExpr ) {}
+  
+  
+	//*** Statements
+	void CodeGenerator2::visit( CompoundStmt *compoundStmt ) {
+		std::list<Statement*> ks = compoundStmt->get_kids();
+
+		before << endl << string( cur_indent, ' ' ) << "{" << endl;
+
+		cur_indent += CodeGenerator2::tabsize; 
+
+		for ( std::list<Statement *>::iterator i = ks.begin(); i != ks.end();  i++) {
+			before << string( cur_indent, ' ' ) << printLabels( (*i)->get_labels() )  ;
+			(*i)->accept(*this );
+			shift_left();
+			before << endl;
 		}
-        
-		switch ( opInfo.type ) {
-		  case OT_INDEX:
-		    assert( applicationExpr->get_args().size() == 2 );
-		    (*arg++)->accept( *this );
-		    before << "[";
-		    (*arg)->accept( *this );
-		    before << "]";
-		    break;
-          
-		  case OT_CALL:
-		    // there are no intrinsic definitions of the function call operator
-		    assert( false );
-		    break;
-          
-		  case OT_PREFIX:
-		  case OT_PREFIXASSIGN:
-		    assert( applicationExpr->get_args().size() == 1 );
-		    before << "(";
-		    before << opInfo.symbol;
-		    (*arg)->accept( *this );
-		    before << ")";
-		    break;
-          
-		  case OT_POSTFIX:
-		  case OT_POSTFIXASSIGN:
-		    assert( applicationExpr->get_args().size() == 1 );
-		    (*arg)->accept( *this );
-		    before << opInfo.symbol;
-		    break;
-
-		  case OT_INFIX:
-		  case OT_INFIXASSIGN:
-		    assert( applicationExpr->get_args().size() == 2 );
-		    before << "(";
-		    (*arg++)->accept( *this );
-		    before << opInfo.symbol;
-		    (*arg)->accept( *this );
-		    before << ")";
-		    break;
-          
-		  case OT_CONSTANT:
-		    // there are no intrinsic definitions of 0 or 1 as functions
-		    assert( false );
+		cur_indent -= CodeGenerator2::tabsize; 
+
+		before << string( cur_indent, ' ' ) << "}" << endl;
+	}
+
+	void CodeGenerator2::visit( ExprStmt *exprStmt ) {
+		if ( exprStmt != 0 ) {
+			exprStmt->get_expr()->accept( *this );
+			shift_left();
+			before << ";" ;
+		} // if
+	}
+
+	void CodeGenerator2::visit( IfStmt *ifStmt ) {
+		before << "if (";
+		ifStmt->get_condition()->accept(*this );
+		after += ")\n";
+		shift_left(); 
+
+		cur_indent += CodeGenerator2::tabsize;
+		before << string( cur_indent, ' ' );
+		ifStmt->get_thenPart()->accept(*this );
+		cur_indent -= CodeGenerator2::tabsize; 
+		shift_left(); before << endl;
+
+		if ( ifStmt->get_elsePart() != 0) {
+			before << string( cur_indent, ' ' ) << " else " << endl ;
+
+			cur_indent += CodeGenerator2::tabsize; 
+			ifStmt->get_elsePart()->accept(*this );
+			cur_indent -= CodeGenerator2::tabsize; 
+		} // if
+	}
+
+	void CodeGenerator2::visit( SwitchStmt *switchStmt ) {
+		//before << /* "\r" << */ string( cur_indent, ' ' ) << CodeGenerator2::printLabels( switchStmt->get_labels() ) 
+		before << "switch (" ;
+		switchStmt->get_condition()->accept(*this );
+		after += ")\n";
+		shift_left();
+
+		before << string( cur_indent, ' ' ) << "{" << std::endl;
+		cur_indent += CodeGenerator2::tabsize;
+
+		std::list< Statement * > stmts = switchStmt->get_branches();
+		bool lastBreak = false; 
+
+		// horrible, horrible hack
+		if ( dynamic_cast<BranchStmt *>( stmts.back() ) != 0 ) {
+			lastBreak = true;
+			stmts.pop_back();
+		} // if
+		acceptAll( stmts, *this );
+		if ( lastBreak ) {
+			Statement *st = switchStmt->get_branches().back();
+			before << CodeGenerator2::printLabels( st->get_labels());
+			st->accept( *this );
+		} // if
+	  
+		cur_indent -= CodeGenerator2::tabsize; 
+
+		before << /* "\r" << */ string( cur_indent, ' ' ) << "}" << endl ;
+	}
+
+	void CodeGenerator2::visit( CaseStmt *caseStmt ) {
+		before << string( cur_indent, ' ' );
+		if ( caseStmt->isDefault()) 
+			before << "default "  ;
+		else {
+			before << "case "  ;
+			caseStmt->get_condition()->accept(*this );
+		} // if
+		after += ":\n";
+		shift_left();
+
+		std::list<Statement *> sts = caseStmt->get_statements();
+
+		cur_indent += CodeGenerator2::tabsize;
+		for ( std::list<Statement *>::iterator i = sts.begin(); i != sts.end();  i++) {
+			before << /* "\r" << */ string( cur_indent, ' ' ) << printLabels( (*i)->get_labels() )  ;
+			(*i)->accept(*this );
+			shift_left();
+			before << ";" << endl;
 		}
-	    } else {
-		varExpr->accept( *this );
-		before << "(";
-		genCommaList( applicationExpr->get_args().begin(), applicationExpr->get_args().end() );
-		before << ")";
-	    } // if
-	} else {
-	    applicationExpr->get_function()->accept( *this );
-	    before << "(";
-	    genCommaList( applicationExpr->get_args().begin(), applicationExpr->get_args().end() );
-	    before << ")";
-	} // if
-    }
-  
-    void CodeGenerator2::visit( UntypedExpr *untypedExpr ) {
-	if ( NameExpr *nameExpr = dynamic_cast< NameExpr* >( untypedExpr->get_function() ) ) {
-	    OperatorInfo opInfo;
-	    if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
-		std::list< Expression* >::iterator arg = untypedExpr->get_args().begin();
-		switch ( opInfo.type ) {
-		  case OT_INDEX:
-		    assert( untypedExpr->get_args().size() == 2 );
-		    (*arg++)->accept( *this );
-		    before << "[";
-		    (*arg)->accept( *this );
-		    before << "]";
-		    break;
-          
-		  case OT_CALL:
-		    assert( false );
-		    break;
-          
-		  case OT_PREFIX:
-		  case OT_PREFIXASSIGN:
-		    assert( untypedExpr->get_args().size() == 1 );
-		    before << "(";
-		    before << opInfo.symbol;
-		    (*arg)->accept( *this );
-		    before << ")";
-		    break;
-          
-		  case OT_POSTFIX:
-		  case OT_POSTFIXASSIGN:
-		    assert( untypedExpr->get_args().size() == 1 );
-		    (*arg)->accept( *this );
-		    before << opInfo.symbol;
-		    break;
-  
-		  case OT_INFIX:
-		  case OT_INFIXASSIGN:
-		    assert( untypedExpr->get_args().size() == 2 );
-		    before << "(";
-		    (*arg++)->accept( *this );
-		    before << opInfo.symbol;
-		    (*arg)->accept( *this );
-		    before << ")";
-		    break;
-          
-		  case OT_CONSTANT:
-		    // there are no intrinsic definitions of 0 or 1 as functions
-		    assert( false );
+		cur_indent -= CodeGenerator2::tabsize;
+	}
+
+	void CodeGenerator2::visit( BranchStmt *branchStmt ) {
+		switch ( branchStmt->get_type()) {
+		  case BranchStmt::Goto:
+			if ( ! branchStmt->get_target().empty() )
+				before << "goto " << branchStmt->get_target();
+			else { 
+				if ( branchStmt->get_computedTarget() != 0 ) {
+					before << "goto *";
+					branchStmt->get_computedTarget()->accept( *this );
+				} // if
+			} // if
+			break;
+		  case BranchStmt::Break:
+			before << "break";
+			break;
+		  case BranchStmt::Continue:
+			before << "continue";
+			break;
 		}
-	    } else {
-		nameExpr->accept( *this );
-		before << "(";
-		genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
-		before << ")";
-	    } // if
-	} else {
-	    untypedExpr->get_function()->accept( *this );
-	    before << "(";
-	    genCommaList( untypedExpr->get_args().begin(), untypedExpr->get_args().end() );
-	    before << ")";
-	} // if
-    }
-  
-    void CodeGenerator2::visit( NameExpr *nameExpr ) {
-	OperatorInfo opInfo;
-	if ( operatorLookup( nameExpr->get_name(), opInfo ) ) {
-	    assert( opInfo.type == OT_CONSTANT );
-	    before << opInfo.symbol;
-	} else {
-	    before << nameExpr->get_name();
-	} // if
-    }
-  
-    void CodeGenerator2::visit( AddressExpr *addressExpr ) {
-	before << "(&";
-	// this hack makes sure that we don't convert "constant_zero" to "0" if we're taking its address
-	if ( VariableExpr *variableExpr = dynamic_cast< VariableExpr* >( addressExpr->get_arg() ) ) {
-	    before << mangleName( variableExpr->get_var() );
-	} else {
-	    addressExpr->get_arg()->accept( *this );
-	} // if
-	before << ")";
-    }
-
-    void CodeGenerator2::visit( CastExpr *castExpr ) {
-	before << "((";
-	if ( castExpr->get_results().empty() ) {
-	    before << "void" ;
-	} else {
-	    before << genType( castExpr->get_results().front(), "" );
-	} // if
-	before << ")";
-	castExpr->get_arg()->accept( *this );
-	before << ")";
-    }
-  
-    void CodeGenerator2::visit( UntypedMemberExpr *memberExpr ) {
-	assert( false );
-    }
-  
-    void CodeGenerator2::visit( MemberExpr *memberExpr ) {
-	memberExpr->get_aggregate()->accept( *this );
-	before << "." << mangleName( memberExpr->get_member() );
-    }
-  
-    void CodeGenerator2::visit( VariableExpr *variableExpr ) {
-	OperatorInfo opInfo;
-	if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && operatorLookup( variableExpr->get_var()->get_name(), opInfo ) && opInfo.type == OT_CONSTANT ) {
-	    before << opInfo.symbol;
-	} else {
-	    before << mangleName( variableExpr->get_var() );
-	} // if
-    }
-  
-    void CodeGenerator2::visit( ConstantExpr *constantExpr ) {
-	assert( constantExpr->get_constant() );
-	constantExpr->get_constant()->accept( *this );
-    }
-  
-    void CodeGenerator2::visit( SizeofExpr *sizeofExpr ) {
-	before << "sizeof(";
-	if ( sizeofExpr->get_isType() ) {
-	    before << genType( sizeofExpr->get_type(), "" );
-	} else {
-	    sizeofExpr->get_expr()->accept( *this );
-	} // if
-	before << ")";
-    }
-  
-    void CodeGenerator2::visit( LogicalExpr *logicalExpr ) {
-	before << "(";
-	logicalExpr->get_arg1()->accept( *this );
-	if ( logicalExpr->get_isAnd() ) {
-	    before << " && ";
-	} else {
-	    before << " || ";
-	} // if
-	logicalExpr->get_arg2()->accept( *this );
-	before << ")";
-    }
-  
-    void CodeGenerator2::visit( ConditionalExpr *conditionalExpr ) {
-	before << "(";
-	conditionalExpr->get_arg1()->accept( *this );
-	before << " ? ";
-	conditionalExpr->get_arg2()->accept( *this );
-	before << " : ";
-	conditionalExpr->get_arg3()->accept( *this );
-	before << ")";
-    }
-  
-    void CodeGenerator2::visit( CommaExpr *commaExpr ) {
-	before << "(";
-	commaExpr->get_arg1()->accept( *this );
-	before << " , ";
-	commaExpr->get_arg2()->accept( *this );
-	before << ")";
-    }
-  
-    void CodeGenerator2::visit( TupleExpr *tupleExpr ) {}
-  
-    void CodeGenerator2::visit( TypeExpr *typeExpr ) {}
-  
-  
-    //*** Statements
-    void CodeGenerator2::visit( CompoundStmt *compoundStmt ) {
-	std::list<Statement*> ks = compoundStmt->get_kids();
-
-	before << endl << string( cur_indent, ' ' ) << "{" << endl;
-
-	cur_indent += CodeGenerator2::tabsize; 
-
-	for ( std::list<Statement *>::iterator i = ks.begin(); i != ks.end();  i++) {
-	    before << string( cur_indent, ' ' ) << printLabels( (*i)->get_labels() )  ;
-	    (*i)->accept(*this );
-	    shift_left();
-	    before << endl;
-	}
-	cur_indent -= CodeGenerator2::tabsize; 
-
-	before << string( cur_indent, ' ' ) << "}" << endl;
-    }
-
-    void CodeGenerator2::visit( ExprStmt *exprStmt ) {
-	if ( exprStmt != 0 ) {
-	    exprStmt->get_expr()->accept( *this );
-	    shift_left();
-	    before << ";" ;
-	} // if
-    }
-
-    void CodeGenerator2::visit( IfStmt *ifStmt ) {
-	before << "if (";
-	ifStmt->get_condition()->accept(*this );
-	after += ")\n";
-	shift_left(); 
-
-	cur_indent += CodeGenerator2::tabsize;
-	before << string( cur_indent, ' ' );
-	ifStmt->get_thenPart()->accept(*this );
-	cur_indent -= CodeGenerator2::tabsize; 
-	shift_left(); before << endl;
-
-	if ( ifStmt->get_elsePart() != 0) {
-	    before << string( cur_indent, ' ' ) << " else " << endl ;
-
-	    cur_indent += CodeGenerator2::tabsize; 
-	    ifStmt->get_elsePart()->accept(*this );
-	    cur_indent -= CodeGenerator2::tabsize; 
-	} // if
-    }
-
-    void CodeGenerator2::visit( SwitchStmt *switchStmt ) {
-	//before << /* "\r" << */ string( cur_indent, ' ' ) << CodeGenerator2::printLabels( switchStmt->get_labels() ) 
-	before << "switch (" ;
-	switchStmt->get_condition()->accept(*this );
-	after += ")\n";
-	shift_left();
-
-	before << string( cur_indent, ' ' ) << "{" << std::endl;
-	cur_indent += CodeGenerator2::tabsize;
-
-	std::list< Statement * > stmts = switchStmt->get_branches();
-	bool lastBreak = false; 
-
-	// horrible, horrible hack
-	if ( dynamic_cast<BranchStmt *>( stmts.back() ) != 0 ) {
-	    lastBreak = true;
-	    stmts.pop_back();
-	} // if
-	acceptAll( stmts, *this );
-	if ( lastBreak ) {
-	    Statement *st = switchStmt->get_branches().back();
-	    before << CodeGenerator2::printLabels( st->get_labels());
-	    st->accept( *this );
-	} // if
-      
-	cur_indent -= CodeGenerator2::tabsize; 
-
-	before << /* "\r" << */ string( cur_indent, ' ' ) << "}" << endl ;
-    }
-
-    void CodeGenerator2::visit( CaseStmt *caseStmt ) {
-	before << string( cur_indent, ' ' );
-	if ( caseStmt->isDefault()) 
-	    before << "default "  ;
-	else {
-	    before << "case "  ;
-	    caseStmt->get_condition()->accept(*this );
-	} // if
-	after += ":\n";
-	shift_left();
-
-	std::list<Statement *> sts = caseStmt->get_statements();
-
-	cur_indent += CodeGenerator2::tabsize;
-	for ( std::list<Statement *>::iterator i = sts.begin(); i != sts.end();  i++) {
-	    before << /* "\r" << */ string( cur_indent, ' ' ) << printLabels( (*i)->get_labels() )  ;
-	    (*i)->accept(*this );
-	    shift_left();
-	    before << ";" << endl;
-	}
-	cur_indent -= CodeGenerator2::tabsize;
-    }
-
-    void CodeGenerator2::visit( BranchStmt *branchStmt ) {
-	switch ( branchStmt->get_type()) {
-	  case BranchStmt::Goto:
-	    if ( ! branchStmt->get_target().empty() )
-		before << "goto " << branchStmt->get_target();
-	    else { 
-		if ( branchStmt->get_computedTarget() != 0 ) {
-		    before << "goto *";
-		    branchStmt->get_computedTarget()->accept( *this );
-		} // if
-	    } // if
-	    break;
-	  case BranchStmt::Break:
-	    before << "break";
-	    break;
-	  case BranchStmt::Continue:
-	    before << "continue";
-	    break;
-	}
-	before << ";";
-    }
-
-
-    void CodeGenerator2::visit( ReturnStmt *returnStmt ) {
-	before << "return ";
-
-	// xxx -- check for null expression;
-	if ( returnStmt->get_expr() ) {
-	    returnStmt->get_expr()->accept( *this );
-	} // if
-	after += ";";
-    }
-
-    void CodeGenerator2::visit( WhileStmt *whileStmt ) {
-	if ( whileStmt->get_isDoWhile() )
-	    before << "do" ;
-	else {
-	    before << "while (" ;
-	    whileStmt->get_condition()->accept(*this );
-	    after += ")";
-	} // if
-	after += "{\n";
-	shift_left();
-
-	whileStmt->get_body()->accept( *this );
-
-	before << /* "\r" << */ string( cur_indent, ' ' ) << "}" ;
-
-	if ( whileStmt->get_isDoWhile() ) {
-	    before << " while (" ;
-	    whileStmt->get_condition()->accept(*this );
-	    after += ");";
-	} // if
-
-	after += "\n";
-    }
-
-    void CodeGenerator2::visit( ForStmt *forStmt ) {
-	before << "for (";
-
-	if ( forStmt->get_initialization() != 0 )
-	    forStmt->get_initialization()->accept( *this );
-	else
-	    before << ";";
-	shift_left();
-
-	if ( forStmt->get_condition() != 0 )
-	    forStmt->get_condition()->accept( *this );
-	shift_left(); before << ";";
-
-	if ( forStmt->get_increment() != 0 )
-	    forStmt->get_increment()->accept( *this );
-	shift_left(); before << ")" << endl;
-
-	if ( forStmt->get_body() != 0 ) {
-	    cur_indent += CodeGenerator2::tabsize; 
-	    before << string( cur_indent, ' ' ) << CodeGenerator2::printLabels( forStmt->get_body()->get_labels() );
-	    forStmt->get_body()->accept( *this );
-	    cur_indent -= CodeGenerator2::tabsize; 
-	} // if
-    }
-
-    void CodeGenerator2::visit( NullStmt *nullStmt ) {
-	//before << /* "\r" << */ string( cur_indent, ' ' ) << CodeGenerator2::printLabels( nullStmt->get_labels() );
-	before << "/* null statement */ ;";
-    }
-
-    void CodeGenerator2::visit( DeclStmt *declStmt ) {
-	declStmt->get_decl()->accept( *this );
-    
-	if ( doSemicolon( declStmt->get_decl() ) ) {
-	    after += ";";
-	} // if
-	shift_left();
-    }
-
-    std::string CodeGenerator2::printLabels( std::list< Label > &l ) {
-	std::string str( "" );
-	l.unique();
-
-	for ( std::list< Label >::iterator i = l.begin(); i != l.end(); i++ )
-	    str += *i + ": ";
-
-	return str;
-    }
-
-    void CodeGenerator2::shift_left() {
-	before << after;
-	after = "";
-    }
-
-    void CodeGenerator2::handleStorageClass( Declaration *decl ) {
-	switch ( decl->get_storageClass() ) {
-	  case Declaration::NoStorageClass:
-	    break;
-	  case Declaration::Extern:
-	    before << "extern ";
-	    break;
-	  case Declaration::Static:
-	    before << "static ";
-	    break;
-	  case Declaration::Auto:
-	    // silently drop storage class
-	    break;
-	  case Declaration::Register:
-	    before << "register ";
-	    break;
-	  case Declaration::Inline:
-	    before << "inline ";
-	    break;
-	  case Declaration::Fortran:
-	    before << "fortran ";
-	    break;
-	}
-    }
+		before << ";";
+	}
+
+
+	void CodeGenerator2::visit( ReturnStmt *returnStmt ) {
+		before << "return ";
+
+		// xxx -- check for null expression;
+		if ( returnStmt->get_expr() ) {
+			returnStmt->get_expr()->accept( *this );
+		} // if
+		after += ";";
+	}
+
+	void CodeGenerator2::visit( WhileStmt *whileStmt ) {
+		if ( whileStmt->get_isDoWhile() )
+			before << "do" ;
+		else {
+			before << "while (" ;
+			whileStmt->get_condition()->accept(*this );
+			after += ")";
+		} // if
+		after += "{\n";
+		shift_left();
+
+		whileStmt->get_body()->accept( *this );
+
+		before << /* "\r" << */ string( cur_indent, ' ' ) << "}" ;
+
+		if ( whileStmt->get_isDoWhile() ) {
+			before << " while (" ;
+			whileStmt->get_condition()->accept(*this );
+			after += ");";
+		} // if
+
+		after += "\n";
+	}
+
+	void CodeGenerator2::visit( ForStmt *forStmt ) {
+		before << "for (";
+
+		if ( forStmt->get_initialization() != 0 )
+			forStmt->get_initialization()->accept( *this );
+		else
+			before << ";";
+		shift_left();
+
+		if ( forStmt->get_condition() != 0 )
+			forStmt->get_condition()->accept( *this );
+		shift_left(); before << ";";
+
+		if ( forStmt->get_increment() != 0 )
+			forStmt->get_increment()->accept( *this );
+		shift_left(); before << ")" << endl;
+
+		if ( forStmt->get_body() != 0 ) {
+			cur_indent += CodeGenerator2::tabsize; 
+			before << string( cur_indent, ' ' ) << CodeGenerator2::printLabels( forStmt->get_body()->get_labels() );
+			forStmt->get_body()->accept( *this );
+			cur_indent -= CodeGenerator2::tabsize; 
+		} // if
+	}
+
+	void CodeGenerator2::visit( NullStmt *nullStmt ) {
+		//before << /* "\r" << */ string( cur_indent, ' ' ) << CodeGenerator2::printLabels( nullStmt->get_labels() );
+		before << "/* null statement */ ;";
+	}
+
+	void CodeGenerator2::visit( DeclStmt *declStmt ) {
+		declStmt->get_decl()->accept( *this );
+	
+		if ( doSemicolon( declStmt->get_decl() ) ) {
+			after += ";";
+		} // if
+		shift_left();
+	}
+
+	std::string CodeGenerator2::printLabels( std::list< Label > &l ) {
+		std::string str( "" );
+		l.unique();
+
+		for ( std::list< Label >::iterator i = l.begin(); i != l.end(); i++ )
+			str += *i + ": ";
+
+		return str;
+	}
+
+	void CodeGenerator2::shift_left() {
+		before << after;
+		after = "";
+	}
+
+	void CodeGenerator2::handleStorageClass( Declaration *decl ) {
+		switch ( decl->get_storageClass() ) {
+		  case Declaration::NoStorageClass:
+			break;
+		  case Declaration::Extern:
+			before << "extern ";
+			break;
+		  case Declaration::Static:
+			before << "static ";
+			break;
+		  case Declaration::Auto:
+			// silently drop storage class
+			break;
+		  case Declaration::Register:
+			before << "register ";
+			break;
+		  case Declaration::Inline:
+			before << "inline ";
+			break;
+		  case Declaration::Fortran:
+			before << "fortran ";
+			break;
+		}
+	}
 } // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/CodeGenerator2.h
===================================================================
--- translator/CodeGen/CodeGenerator2.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/CodeGenerator2.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// CodeGenerator2.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:35:37 2015
+// Update Count     : 2
+//
+
 #ifndef CODEGENV_H
 #define CODEGENV_H
@@ -10,102 +25,102 @@
 
 namespace CodeGen {
-    class CodeGenerator2 : public Visitor {
-      public:
-	static int tabsize;
+	class CodeGenerator2 : public Visitor {
+	  public:
+		static int tabsize;
 
-	CodeGenerator2( std::ostream &os );
-	CodeGenerator2( std::ostream &os, std::string, int indent = 0, bool infun = false );
-	CodeGenerator2( std::ostream &os, char *, int indent = 0, bool infun = false );
+		CodeGenerator2( std::ostream &os );
+		CodeGenerator2( std::ostream &os, std::string, int indent = 0, bool infun = false );
+		CodeGenerator2( std::ostream &os, char *, int indent = 0, bool infun = false );
 
-	CodeGenerator2( CodeGenerator2 & );
+		CodeGenerator2( CodeGenerator2 & );
 
-	//*** Declaration
-	virtual void visit( StructDecl * );
-	virtual void visit( FunctionDecl * );
-	virtual void visit( ObjectDecl * );
-	virtual void visit( UnionDecl *aggregateDecl );
-	virtual void visit( EnumDecl *aggregateDecl );
-	virtual void visit( ContextDecl *aggregateDecl );
-	virtual void visit( TypedefDecl *typeDecl );
-	virtual void visit( TypeDecl *typeDecl );
+		//*** Declaration
+		virtual void visit( StructDecl * );
+		virtual void visit( FunctionDecl * );
+		virtual void visit( ObjectDecl * );
+		virtual void visit( UnionDecl *aggregateDecl );
+		virtual void visit( EnumDecl *aggregateDecl );
+		virtual void visit( ContextDecl *aggregateDecl );
+		virtual void visit( TypedefDecl *typeDecl );
+		virtual void visit( TypeDecl *typeDecl );
 
-	//*** Initializer
-	virtual void visit( SingleInit * );
-	virtual void visit( ListInit * );
+		//*** Initializer
+		virtual void visit( SingleInit * );
+		virtual void visit( ListInit * );
 
-	//*** Constant
-	virtual void visit( Constant * );
+		//*** Constant
+		virtual void visit( Constant * );
 
-	//*** Expression
-	virtual void visit( ApplicationExpr *applicationExpr );
-	virtual void visit( UntypedExpr *untypedExpr );
-	virtual void visit( NameExpr *nameExpr );
-	virtual void visit( AddressExpr *addressExpr );
-	virtual void visit( CastExpr *castExpr );
-	virtual void visit( UntypedMemberExpr *memberExpr );
-	virtual void visit( MemberExpr *memberExpr );
-	virtual void visit( VariableExpr *variableExpr );
-	virtual void visit( ConstantExpr *constantExpr ); 
-	virtual void visit( SizeofExpr *sizeofExpr );
-	virtual void visit( LogicalExpr *logicalExpr );
-	virtual void visit( ConditionalExpr *conditionalExpr );
-	virtual void visit( CommaExpr *commaExpr );
-	virtual void visit( TupleExpr *tupleExpr );
-	virtual void visit( TypeExpr *typeExpr );
+		//*** Expression
+		virtual void visit( ApplicationExpr *applicationExpr );
+		virtual void visit( UntypedExpr *untypedExpr );
+		virtual void visit( NameExpr *nameExpr );
+		virtual void visit( AddressExpr *addressExpr );
+		virtual void visit( CastExpr *castExpr );
+		virtual void visit( UntypedMemberExpr *memberExpr );
+		virtual void visit( MemberExpr *memberExpr );
+		virtual void visit( VariableExpr *variableExpr );
+		virtual void visit( ConstantExpr *constantExpr ); 
+		virtual void visit( SizeofExpr *sizeofExpr );
+		virtual void visit( LogicalExpr *logicalExpr );
+		virtual void visit( ConditionalExpr *conditionalExpr );
+		virtual void visit( CommaExpr *commaExpr );
+		virtual void visit( TupleExpr *tupleExpr );
+		virtual void visit( TypeExpr *typeExpr );
 
-	//*** Statements
-	virtual void visit( CompoundStmt * );
-	virtual void visit( ExprStmt * );
-	virtual void visit( IfStmt * );
-	virtual void visit( SwitchStmt * );
-	virtual void visit( CaseStmt * );
-	virtual void visit( BranchStmt * );
-	virtual void visit( ReturnStmt * );
-	virtual void visit( WhileStmt * );
-	virtual void visit( ForStmt * );
-	virtual void visit( NullStmt * );
-	virtual void visit( DeclStmt * ); 
+		//*** Statements
+		virtual void visit( CompoundStmt * );
+		virtual void visit( ExprStmt * );
+		virtual void visit( IfStmt * );
+		virtual void visit( SwitchStmt * );
+		virtual void visit( CaseStmt * );
+		virtual void visit( BranchStmt * );
+		virtual void visit( ReturnStmt * );
+		virtual void visit( WhileStmt * );
+		virtual void visit( ForStmt * );
+		virtual void visit( NullStmt * );
+		virtual void visit( DeclStmt * ); 
 
-	std::string get_string( void );
-	void add_string_left( std::string s ) { before << s; }
-	void shift_left();
-	template< class Iterator > void genCommaList( Iterator begin, Iterator end );
-      private:
-	int cur_indent;
-	bool insideFunction;
-	std::ostream &before;
-	std::string after;
+		std::string get_string( void );
+		void add_string_left( std::string s ) { before << s; }
+		void shift_left();
+		template< class Iterator > void genCommaList( Iterator begin, Iterator end );
+	  private:
+		int cur_indent;
+		bool insideFunction;
+		std::ostream &before;
+		std::string after;
 
-	static std::string printLabels ( std::list < Label > & );
-	void handleStorageClass( Declaration *decl );
-	void handleAggregate( AggregateDecl *aggDecl );
-	void handleTypedef( NamedTypeDecl *namedType );
+		static std::string printLabels ( std::list < Label > & );
+		void handleStorageClass( Declaration *decl );
+		void handleAggregate( AggregateDecl *aggDecl );
+		void handleTypedef( NamedTypeDecl *namedType );
 
-    };
-    
-    template< class Iterator >
-    void CodeGenerator2::genCommaList( Iterator begin, Iterator end ) {
-	if ( begin == end ) return;
+	};
+	
+	template< class Iterator >
+	void CodeGenerator2::genCommaList( Iterator begin, Iterator end ) {
+		if ( begin == end ) return;
 
-	for ( ;; ) {
-	    (*begin++)->accept( *this );
-	    if ( begin == end ) return;
-	    before << ", ";
+		for ( ;; ) {
+			(*begin++)->accept( *this );
+			if ( begin == end ) return;
+			before << ", ";
+		} // for
 	}
-    }
   
-    inline bool doSemicolon( Declaration* decl ) {
-	if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) {
-	    return ! func->get_statements();
+	inline bool doSemicolon( Declaration* decl ) {
+		if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) {
+			return ! func->get_statements();
+		} // if
+		return true;
 	}
-	return true;
-    }
 } // namespace CodeGen
 
-#endif /* #ifndef CODEGENV_H */
+#endif // CODEGENV_H
 
-/*
-  Local Variables:
-  mode: "c++"
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/FixNames.cc
===================================================================
--- translator/CodeGen/FixNames.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/FixNames.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,8 +1,16 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: FixNames.cc,v 1.8 2005/08/29 20:14:12 rcbilson Exp $
- *
- */
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixNames.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:36:42 2015
+// Update Count     : 1
+//
 
 #include "FixNames.h"
@@ -14,42 +22,37 @@
 
 namespace CodeGen {
+	class FixNames : public Visitor {
+	  public:
+		virtual void visit( ObjectDecl *objectDecl );
+		virtual void visit( FunctionDecl *functionDecl );
+	};
 
-class FixNames : public Visitor
-{
-public:
-  virtual void visit( ObjectDecl *objectDecl );
-  virtual void visit( FunctionDecl *functionDecl );
-};
+	void fixNames( std::list< Declaration* > translationUnit ) {
+		FixNames fixer;
+		acceptAll( translationUnit, fixer );
+	}
 
-void
-fixNames( std::list< Declaration* > translationUnit )
-{
-  FixNames fixer;
-  acceptAll( translationUnit, fixer );
-}
+	void fixDWT( DeclarationWithType *dwt ) {
+		if ( dwt->get_name() != "" ) {
+			if ( LinkageSpec::isDecoratable( dwt->get_linkage() ) ) {
+				dwt->set_mangleName( SymTab::Mangler::mangle( dwt ) );
+			} // if
+		} // if
+	}
 
-void
-fixDWT( DeclarationWithType *dwt )
-{
-  if ( dwt->get_name() != "" ) {
-    if ( LinkageSpec::isDecoratable( dwt->get_linkage() ) ) {
-      dwt->set_mangleName( SymTab::Mangler::mangle( dwt ) );
-    }
-  }
-}
+	void FixNames::visit( ObjectDecl *objectDecl ) {
+		Visitor::visit( objectDecl );
+		fixDWT( objectDecl );
+	}
 
-void 
-FixNames::visit( ObjectDecl *objectDecl )
-{
-  Visitor::visit( objectDecl );
-  fixDWT( objectDecl );
-}
+	void FixNames::visit( FunctionDecl *functionDecl ) {
+		Visitor::visit( functionDecl );
+		fixDWT( functionDecl );
+	}
+} // namespace CodeGen
 
-void 
-FixNames::visit( FunctionDecl *functionDecl )
-{
-  Visitor::visit( functionDecl );
-  fixDWT( functionDecl );
-}
-
-} // namespace CodeGen
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/FixNames.h
===================================================================
--- translator/CodeGen/FixNames.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/FixNames.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,8 +1,16 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: FixNames.h,v 1.2 2005/08/29 20:14:12 rcbilson Exp $
- *
- */
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FixNames.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:37:32 2015
+// Update Count     : 2
+//
 
 #ifndef FIXNAMES_H
@@ -12,8 +20,12 @@
 
 namespace CodeGen {
-
-void fixNames( std::list< Declaration* > translationUnit );
-
+	void fixNames( std::list< Declaration* > translationUnit );
 } // namespace CodeGen
 
-#endif /* #ifndef FIXNAMES_H */
+#endif // FIXNAMES_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/GenType.cc
===================================================================
--- translator/CodeGen/GenType.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/GenType.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// GenType.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:38:22 2015
+// Update Count     : 2
+//
+
 #include <strstream>
 #include <cassert>
@@ -9,181 +24,187 @@
 
 namespace CodeGen {
-    class GenType : public Visitor {
-      public:
-	GenType( const std::string &typeString );
-	std::string get_typeString() const { return typeString; }
-	void set_typeString( const std::string &newValue ) { typeString = newValue; }
-  
-	virtual void visit( FunctionType *funcType );
-	virtual void visit( VoidType *voidType );
-	virtual void visit( BasicType *basicType );
-	virtual void visit( PointerType *pointerType );
-	virtual void visit( ArrayType *arrayType );
-	virtual void visit( StructInstType *structInst );
-	virtual void visit( UnionInstType *unionInst );
-	virtual void visit( EnumInstType *enumInst );
-	virtual void visit( TypeInstType *typeInst );
-  
-      private:
-	void handleQualifiers( Type *type );
-	void genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic );
-  
-	std::string typeString;
-    };
-
-    std::string genType( Type *type, const std::string &baseString ) {
-	GenType gt( baseString );
-	type->accept( gt );
-	return gt.get_typeString();
-    }
-
-    GenType::GenType( const std::string &typeString ) : typeString( typeString ) {}
-
-    void GenType::visit( VoidType *voidType ) {
-	typeString = "void " + typeString;
-	handleQualifiers( voidType );
-    }
-
-    void GenType::visit( BasicType *basicType ) {
-	BasicType::Kind kind = basicType->get_kind();
-	assert( 0 <= kind && kind < BasicType::NUMBER_OF_BASIC_TYPES );
-	typeString = std::string( BasicType::typeNames[kind] ) + " " + typeString;
-	handleQualifiers( basicType );
-    }
-
-    void GenType::genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic ) {
-	std::ostrstream os;
-	if ( typeString != "" ) {
-	    if ( typeString[ 0 ] == '*' ) {
-		os << "(" << typeString << ")";
-	    } else {
-		os << typeString;
-	    } // if
-	} // if
-	os << "[";
-
-	if ( isStatic ) {
-	    os << "static ";
-	} // if
-	if ( qualifiers.isConst ) {
-	    os << "const ";
-	} // if
-	if ( qualifiers.isVolatile ) {
-	    os << "volatile ";
-	} // if
-	if ( qualifiers.isRestrict ) {
-	    os << "__restrict ";
-	} // if
-	if ( qualifiers.isAtomic ) {
-	    os << "_Atomic ";
-	} // if
-	if ( isVarLen ) {
-	    os << "*";
-	} // if
-	if ( dimension != 0 ) {
-	    CodeGenerator2 cg( os );
-	    dimension->accept( cg );
-	} // if
-	os << "]";
-
-	typeString = std::string( os.str(), os.pcount() );
-  
-	base->accept( *this );
-    }
-
-    void GenType::visit( PointerType *pointerType ) {
-	assert( pointerType->get_base() != 0);
-	if ( pointerType->get_isStatic() || pointerType->get_isVarLen() || pointerType->get_dimension() ) {
-	    genArray( pointerType->get_qualifiers(), pointerType->get_base(), pointerType->get_dimension(), pointerType->get_isVarLen(), pointerType->get_isStatic() );
-	} else {
-	    handleQualifiers( pointerType );
-	    if ( typeString[ 0 ] == '?' ) {
-		typeString = "* " + typeString;
-	    } else {
-		typeString = "*" + typeString;
-	    } // if
-	    pointerType->get_base()->accept( *this );
-	} // if
-    }
-
-    void GenType::visit( ArrayType *arrayType ){
-	genArray( arrayType->get_qualifiers(), arrayType->get_base(), arrayType->get_dimension(), arrayType->get_isVarLen(), arrayType->get_isStatic() );
-    }
-
-    void GenType::visit( FunctionType *funcType ) {
-	std::ostrstream os;
-
-	if ( typeString != "" ) {
-	    if ( typeString[ 0 ] == '*' ) {
-		os << "(" << typeString << ")";
-	    } else {
-		os << typeString;
-	    } // if
-	} // if
-  
-	/************* parameters ***************/
-
-	const std::list<DeclarationWithType *> &pars = funcType->get_parameters();
-
-	if ( pars.empty() ) {
-	    if ( funcType->get_isVarArgs() ) {
-		os << "()";
-	    } else {
-		os << "(void)";
-	    } // if
-	} else {
-	    CodeGenerator2 cg( os );
-	    os << "(" ;
-
-	    cg.genCommaList( pars.begin(), pars.end() );
-
-	    if ( funcType->get_isVarArgs() ){
-		os << ", ...";
-	    } // if
-	    os << ")";
-	} // if
-  
-	typeString = std::string( os.str(), os.pcount() );
-
-	if ( funcType->get_returnVals().size() == 0 ) {
-	    typeString = "void " + typeString;
-	} else {
-	    funcType->get_returnVals().front()->get_type()->accept( *this );
-	} // if
-    }
-
-    void GenType::visit( StructInstType *structInst )  {
-	typeString = "struct " + structInst->get_name() + " " + typeString;
-	handleQualifiers( structInst );
-    }
-
-    void GenType::visit( UnionInstType *unionInst ) {
-	typeString = "union " + unionInst->get_name() + " " + typeString;
-	handleQualifiers( unionInst );
-    }
-
-    void GenType::visit( EnumInstType *enumInst ) {
-	typeString = "enum " + enumInst->get_name() + " " + typeString;
-	handleQualifiers( enumInst );
-    }
-
-    void GenType::visit( TypeInstType *typeInst ) {
-	typeString = typeInst->get_name() + " " + typeString;
-	handleQualifiers( typeInst );
-    }
-
-    void GenType::handleQualifiers( Type *type ) {
-	if ( type->get_isConst() ) {
-	    typeString = "const " + typeString;
-	} // if
-	if ( type->get_isVolatile() ) {
-	    typeString = "volatile " + typeString;
-	} // if
-	if ( type->get_isRestrict() ) {
-	    typeString = "__restrict " + typeString;
-	} // if
-	if ( type->get_isAtomic() ) {
-	    typeString = "_Atomic " + typeString;
-	} // if
-    }
+	class GenType : public Visitor {
+	  public:
+		GenType( const std::string &typeString );
+		std::string get_typeString() const { return typeString; }
+		void set_typeString( const std::string &newValue ) { typeString = newValue; }
+  
+		virtual void visit( FunctionType *funcType );
+		virtual void visit( VoidType *voidType );
+		virtual void visit( BasicType *basicType );
+		virtual void visit( PointerType *pointerType );
+		virtual void visit( ArrayType *arrayType );
+		virtual void visit( StructInstType *structInst );
+		virtual void visit( UnionInstType *unionInst );
+		virtual void visit( EnumInstType *enumInst );
+		virtual void visit( TypeInstType *typeInst );
+  
+	  private:
+		void handleQualifiers( Type *type );
+		void genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic );
+  
+		std::string typeString;
+	};
+
+	std::string genType( Type *type, const std::string &baseString ) {
+		GenType gt( baseString );
+		type->accept( gt );
+		return gt.get_typeString();
+	}
+
+	GenType::GenType( const std::string &typeString ) : typeString( typeString ) {}
+
+	void GenType::visit( VoidType *voidType ) {
+		typeString = "void " + typeString;
+		handleQualifiers( voidType );
+	}
+
+	void GenType::visit( BasicType *basicType ) {
+		BasicType::Kind kind = basicType->get_kind();
+		assert( 0 <= kind && kind < BasicType::NUMBER_OF_BASIC_TYPES );
+		typeString = std::string( BasicType::typeNames[kind] ) + " " + typeString;
+		handleQualifiers( basicType );
+	}
+
+	void GenType::genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic ) {
+		std::ostrstream os;
+		if ( typeString != "" ) {
+			if ( typeString[ 0 ] == '*' ) {
+				os << "(" << typeString << ")";
+			} else {
+				os << typeString;
+			} // if
+		} // if
+		os << "[";
+
+		if ( isStatic ) {
+			os << "static ";
+		} // if
+		if ( qualifiers.isConst ) {
+			os << "const ";
+		} // if
+		if ( qualifiers.isVolatile ) {
+			os << "volatile ";
+		} // if
+		if ( qualifiers.isRestrict ) {
+			os << "__restrict ";
+		} // if
+		if ( qualifiers.isAtomic ) {
+			os << "_Atomic ";
+		} // if
+		if ( isVarLen ) {
+			os << "*";
+		} // if
+		if ( dimension != 0 ) {
+			CodeGenerator2 cg( os );
+			dimension->accept( cg );
+		} // if
+		os << "]";
+
+		typeString = std::string( os.str(), os.pcount() );
+  
+		base->accept( *this );
+	}
+
+	void GenType::visit( PointerType *pointerType ) {
+		assert( pointerType->get_base() != 0);
+		if ( pointerType->get_isStatic() || pointerType->get_isVarLen() || pointerType->get_dimension() ) {
+			genArray( pointerType->get_qualifiers(), pointerType->get_base(), pointerType->get_dimension(), pointerType->get_isVarLen(), pointerType->get_isStatic() );
+		} else {
+			handleQualifiers( pointerType );
+			if ( typeString[ 0 ] == '?' ) {
+				typeString = "* " + typeString;
+			} else {
+				typeString = "*" + typeString;
+			} // if
+			pointerType->get_base()->accept( *this );
+		} // if
+	}
+
+	void GenType::visit( ArrayType *arrayType ){
+		genArray( arrayType->get_qualifiers(), arrayType->get_base(), arrayType->get_dimension(), arrayType->get_isVarLen(), arrayType->get_isStatic() );
+	}
+
+	void GenType::visit( FunctionType *funcType ) {
+		std::ostrstream os;
+
+		if ( typeString != "" ) {
+			if ( typeString[ 0 ] == '*' ) {
+				os << "(" << typeString << ")";
+			} else {
+				os << typeString;
+			} // if
+		} // if
+  
+		/************* parameters ***************/
+
+		const std::list<DeclarationWithType *> &pars = funcType->get_parameters();
+
+		if ( pars.empty() ) {
+			if ( funcType->get_isVarArgs() ) {
+				os << "()";
+			} else {
+				os << "(void)";
+			} // if
+		} else {
+			CodeGenerator2 cg( os );
+			os << "(" ;
+
+			cg.genCommaList( pars.begin(), pars.end() );
+
+			if ( funcType->get_isVarArgs() ){
+				os << ", ...";
+			} // if
+			os << ")";
+		} // if
+  
+		typeString = std::string( os.str(), os.pcount() );
+
+		if ( funcType->get_returnVals().size() == 0 ) {
+			typeString = "void " + typeString;
+		} else {
+			funcType->get_returnVals().front()->get_type()->accept( *this );
+		} // if
+	}
+
+	void GenType::visit( StructInstType *structInst )  {
+		typeString = "struct " + structInst->get_name() + " " + typeString;
+		handleQualifiers( structInst );
+	}
+
+	void GenType::visit( UnionInstType *unionInst ) {
+		typeString = "union " + unionInst->get_name() + " " + typeString;
+		handleQualifiers( unionInst );
+	}
+
+	void GenType::visit( EnumInstType *enumInst ) {
+		typeString = "enum " + enumInst->get_name() + " " + typeString;
+		handleQualifiers( enumInst );
+	}
+
+	void GenType::visit( TypeInstType *typeInst ) {
+		typeString = typeInst->get_name() + " " + typeString;
+		handleQualifiers( typeInst );
+	}
+
+	void GenType::handleQualifiers( Type *type ) {
+		if ( type->get_isConst() ) {
+			typeString = "const " + typeString;
+		} // if
+		if ( type->get_isVolatile() ) {
+			typeString = "volatile " + typeString;
+		} // if
+		if ( type->get_isRestrict() ) {
+			typeString = "__restrict " + typeString;
+		} // if
+		if ( type->get_isAtomic() ) {
+			typeString = "_Atomic " + typeString;
+		} // if
+	}
 } // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/GenType.h
===================================================================
--- translator/CodeGen/GenType.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/GenType.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef CODEGEN_GENTYPE_H
-#define CODEGEN_GENTYPE_H
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// GenType.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:38:53 2015
+// Update Count     : 1
+//
+
+#ifndef _GENTYPE_H
+#define _GENTYPE_H
 
 #include <string>
@@ -6,6 +21,12 @@
 
 namespace CodeGen {
-    std::string genType( Type *type, const std::string &baseString );
+	std::string genType( Type *type, const std::string &baseString );
 } // namespace CodeGen
 
-#endif // CODEGEN_GENTYPE_H
+#endif // _GENTYPE_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/Generate.cc
===================================================================
--- translator/CodeGen/Generate.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/Generate.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Generate.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:39:24 2015
+// Update Count     : 1
+//
+
 #include <algorithm>
 #include <iostream>
@@ -12,17 +27,23 @@
 
 namespace CodeGen {
-    void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) {
-	CodeGen::CodeGenerator2 cgv( os );
+	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ) {
+		CodeGen::CodeGenerator2 cgv( os );
 
-	for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end();  i++ ) {
-	    if ( LinkageSpec::isGeneratable( (*i)->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( (*i)->get_linkage() ) ) ) {
-		(*i)->accept(cgv);
-		cgv.shift_left();
-		if ( doSemicolon( *i ) ) {
-		    os << ";";
-		} // if
-		os << std::endl;
-	    } // if
-	} // for
-    }
+		for ( std::list<Declaration *>::iterator i = translationUnit.begin(); i != translationUnit.end();  i++ ) {
+			if ( LinkageSpec::isGeneratable( (*i)->get_linkage() ) && (doIntrinsics || ! LinkageSpec::isBuiltin( (*i)->get_linkage() ) ) ) {
+				(*i)->accept(cgv);
+				cgv.shift_left();
+				if ( doSemicolon( *i ) ) {
+					os << ";";
+				} // if
+				os << std::endl;
+			} // if
+		} // for
+	}
 } // namespace CodeGen
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/Generate.h
===================================================================
--- translator/CodeGen/Generate.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/Generate.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Generate.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:39:51 2015
+// Update Count     : 1
+//
+
 #ifndef GENERATE_H
 #define GENERATE_H
@@ -8,8 +23,12 @@
 
 namespace CodeGen {
-
-  void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics );
-
+	void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics );
 } // namespace CodeGen
 
-#endif /* #ifndef GENERATE_H */
+#endif // GENERATE_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/OperatorTable.cc
===================================================================
--- translator/CodeGen/OperatorTable.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/OperatorTable.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,89 +1,94 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: OperatorTable.cc,v 1.6 2003/01/19 04:19:31 rcbilson Exp $
- *
- */
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// OperatorTable.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:42:07 2015
+// Update Count     : 2
+//
 
 #include <map>
-
 #include "OperatorTable.h"
 
 namespace CodeGen {
+	namespace {
+		const OperatorInfo tableValues[] = {
+			{	"?[?]",		"",		"_operator_index",			OT_INDEX		},
+			{	"?()",		"",		"_operator_call",			OT_CALL			},
+			{	"?++",		"++",	"_operator_postincr",		OT_POSTFIXASSIGN	},
+			{	"?--",		"--",	"_operator_postdecr",		OT_POSTFIXASSIGN	},
+			{	"*?",		"*",	"_operator_deref",			OT_PREFIX		},
+			{	"+?",		"+",	"_operator_unaryplus",		OT_PREFIX		},
+			{	"-?",		"-",	"_operator_unaryminus",		OT_PREFIX		},
+			{	"~?",		"~",	"_operator_bitnot",			OT_PREFIX		},
+			{	"!?",		"!",	"_operator_lognot",			OT_PREFIX		},
+			{	"++?",		"++",	"_operator_preincr",		OT_PREFIXASSIGN		},
+			{	"--?",		"--",	"_operator_predecr",		OT_PREFIXASSIGN		},
+			{	"?*?",		"*",	"_operator_multiply",		OT_INFIX		},
+			{	"?/?",		"/",	"_operator_divide",			OT_INFIX		},
+			{	"?%?",		"%",	"_operator_modulus",		OT_INFIX		},
+			{	"?+?",		"+",	"_operator_add",			OT_INFIX		},
+			{	"?-?",		"-",	"_operator_subtract",		OT_INFIX		},
+			{	"?<<?",		"<<",	"_operator_shiftleft",		OT_INFIX		},
+			{	"?>>?",		">>",	"_operator_shiftright",		OT_INFIX		},
+			{	"?<?",		"<",	"_operator_less",			OT_INFIX		},
+			{	"?>?",		">",	"_operator_greater",		OT_INFIX		},
+			{	"?<=?",		"<=",	"_operator_lessequal",		OT_INFIX		},
+			{	"?>=?",		">=",	"_operator_greaterequal",	OT_INFIX		},
+			{	"?==?",		"==",	"_operator_equal",			OT_INFIX		},
+			{	"?!=?",		"!=",	"_operator_notequal",		OT_INFIX		},
+			{	"?&?",		"&",	"_operator_bitand",			OT_INFIX		},
+			{	"?^?",		"^",	"_operator_bitxor",			OT_INFIX		},
+			{	"?|?",		"|",	"_operator_bitor",			OT_INFIX		},
+			{	"?=?",		"=",	"_operator_assign",			OT_INFIXASSIGN		},
+			{	"?*=?",		"*=",	"_operator_multassign",		OT_INFIXASSIGN		},
+			{	"?/=?",		"/=",	"_operator_divassign",		OT_INFIXASSIGN		},
+			{	"?%=?",		"%=",	"_operator_modassign",		OT_INFIXASSIGN		},
+			{	"?+=?",		"+=",	"_operator_addassign",		OT_INFIXASSIGN		},
+			{	"?-=?",		"-=",	"_operator_subassign",		OT_INFIXASSIGN		},
+			{	"?<<=?",	"<<=",	"_operator_shiftleftassign",	OT_INFIXASSIGN		},
+			{	"?>>=?",	">>=",	"_operator_shiftrightassign",	OT_INFIXASSIGN		},
+			{	"?&=?",		"&=",	"_operator_bitandassign",	OT_INFIXASSIGN		},
+			{	"?^=?",		"^=",	"_operator_bitxorassign",	OT_INFIXASSIGN		},
+			{	"?|=?",		"|=",	"_operator_bitorassign",	OT_INFIXASSIGN		},
+			{	"0",		"0",	"_constant_zero",			OT_CONSTANT		},
+			{	"1",		"1",	"_constant_one",			OT_CONSTANT		}
+		};
 
-namespace {
+		const int numOps = sizeof( tableValues ) / sizeof( OperatorInfo );
 
-const OperatorInfo tableValues[] = {
-{	"?[?]",		"",		"_operator_index",		OT_INDEX		},
-{	"?()",		"",		"_operator_call",		OT_CALL			},
-{	"?++",		"++",		"_operator_postincr",		OT_POSTFIXASSIGN	},
-{	"?--",		"--",		"_operator_postdecr",		OT_POSTFIXASSIGN	},
-{	"*?",		"*",		"_operator_deref",		OT_PREFIX		},
-{	"+?",		"+",		"_operator_unaryplus",		OT_PREFIX		},
-{	"-?",		"-",		"_operator_unaryminus",		OT_PREFIX		},
-{	"~?",		"~",		"_operator_bitnot",		OT_PREFIX		},
-{	"!?",		"!",		"_operator_lognot",		OT_PREFIX		},
-{	"++?",		"++",		"_operator_preincr",		OT_PREFIXASSIGN		},
-{	"--?",		"--",		"_operator_predecr",		OT_PREFIXASSIGN		},
-{	"?*?",		"*",		"_operator_multiply",		OT_INFIX		},
-{	"?/?",		"/",		"_operator_divide",		OT_INFIX		},
-{	"?%?",		"%",		"_operator_modulus",		OT_INFIX		},
-{	"?+?",		"+",		"_operator_add",		OT_INFIX		},
-{	"?-?",		"-",		"_operator_subtract",		OT_INFIX		},
-{	"?<<?",		"<<",		"_operator_shiftleft",		OT_INFIX		},
-{	"?>>?",		">>",		"_operator_shiftright",		OT_INFIX		},
-{	"?<?",		"<",		"_operator_less",		OT_INFIX		},
-{	"?>?",		">",		"_operator_greater",		OT_INFIX		},
-{	"?<=?",		"<=",		"_operator_lessequal",		OT_INFIX		},
-{	"?>=?",		">=",		"_operator_greaterequal",	OT_INFIX		},
-{	"?==?",		"==",		"_operator_equal",		OT_INFIX		},
-{	"?!=?",		"!=",		"_operator_notequal",		OT_INFIX		},
-{	"?&?",		"&",		"_operator_bitand",		OT_INFIX		},
-{	"?^?",		"^",		"_operator_bitxor",		OT_INFIX		},
-{	"?|?",		"|",		"_operator_bitor",		OT_INFIX		},
-{	"?=?",		"=",		"_operator_assign",		OT_INFIXASSIGN		},
-{	"?*=?",		"*=",		"_operator_multassign",		OT_INFIXASSIGN		},
-{	"?/=?",		"/=",		"_operator_divassign",		OT_INFIXASSIGN		},
-{	"?%=?",		"%=",		"_operator_modassign",		OT_INFIXASSIGN		},
-{	"?+=?",		"+=",		"_operator_addassign",		OT_INFIXASSIGN		},
-{	"?-=?",		"-=",		"_operator_subassign",		OT_INFIXASSIGN		},
-{	"?<<=?",	"<<=",		"_operator_shiftleftassign",	OT_INFIXASSIGN		},
-{	"?>>=?",	">>=",		"_operator_shiftrightassign",	OT_INFIXASSIGN		},
-{	"?&=?",		"&=",		"_operator_bitandassign",	OT_INFIXASSIGN		},
-{	"?^=?",		"^=",		"_operator_bitxorassign",	OT_INFIXASSIGN		},
-{	"?|=?",		"|=",		"_operator_bitorassign",	OT_INFIXASSIGN		},
-{	"0",		"0",		"_constant_zero",		OT_CONSTANT		},
-{	"1",		"1",		"_constant_one",			OT_CONSTANT		}
-};
+		std::map< std::string, OperatorInfo > table;
 
-const int numOps = sizeof( tableValues ) / sizeof( OperatorInfo );
+		void initialize() {
+			for ( int i = 0; i < numOps; ++i ) {
+				table[ tableValues[i].inputName ] = tableValues[i];
+			} // for
+		}
+	} // namespace
 
-std::map< std::string, OperatorInfo > table;
+	bool operatorLookup( std::string funcName, OperatorInfo &info ) {
+		static bool init = false;
+		if ( ! init ) {
+			initialize();
+		} // if
+		std::map< std::string, OperatorInfo >::const_iterator i = table.find( funcName );
+		if ( i == table.end() ) {
+			return false;
+		} else {
+			info = i->second;
+			return true;
+		} // if
+	}
+} // namespace CodeGen
 
-void
-initialize()
-{
-  for ( int i = 0; i < numOps; ++i ) {
-    table[ tableValues[i].inputName ] = tableValues[i];
-  }
-}
-
-} // namespace
-
-bool
-operatorLookup( std::string funcName, OperatorInfo &info )
-{
-  static bool init = false;
-  if ( ! init ) {
-    initialize();
-  }
-  std::map< std::string, OperatorInfo >::const_iterator i = table.find( funcName );
-  if ( i == table.end() ) {
-    return false;
-  } else {
-    info = i->second;
-    return true;
-  }
-}
-
-} // namespace CodeGen
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/CodeGen/OperatorTable.h
===================================================================
--- translator/CodeGen/OperatorTable.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/CodeGen/OperatorTable.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,40 +1,50 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: OperatorTable.h,v 1.4 2003/01/19 04:19:31 rcbilson Exp $
- *
- */
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// OperatorTable.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 23:43:07 2015
+// Update Count     : 2
+//
 
-#ifndef CODEGEN_OPERATORTABLE_H
-#define CODEGEN_OPERATORTABLE_H
+#ifndef _OPERATORTABLE_H
+#define _OPERATORTABLE_H
 
 #include <string>
 
 namespace CodeGen {
+	enum OperatorType {
+		OT_INDEX,
+		OT_CALL,
+		OT_PREFIX,
+		OT_POSTFIX,
+		OT_INFIX,
+		OT_PREFIXASSIGN,
+		OT_POSTFIXASSIGN,
+		OT_INFIXASSIGN,
+		OT_CONSTANT
+	};
 
-enum OperatorType
-{
-  OT_INDEX,
-  OT_CALL,
-  OT_PREFIX,
-  OT_POSTFIX,
-  OT_INFIX,
-  OT_PREFIXASSIGN,
-  OT_POSTFIXASSIGN,
-  OT_INFIXASSIGN,
-  OT_CONSTANT
-};
+	struct OperatorInfo {
+		std::string inputName;
+		std::string symbol;
+		std::string outputName;
+		OperatorType type;
+	};
 
-struct OperatorInfo
-{
-  std::string inputName;
-  std::string symbol;
-  std::string outputName;
-  OperatorType type;
-};
-
-bool operatorLookup( std::string funcName, OperatorInfo &info );
-
+	bool operatorLookup( std::string funcName, OperatorInfo &info );
 } // namespace CodeGen
 
-#endif /* #ifndef CODEGEN_OPERATORTABLE_H */
+#endif // _OPERATORTABLE_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/CompilerError.h
===================================================================
--- translator/Common/CompilerError.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/CompilerError.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef COMPILER_ERROR_H
 #define COMPILER_ERROR_H
@@ -26,2 +40,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/SemanticError.cc
===================================================================
--- translator/Common/SemanticError.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/SemanticError.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -40,2 +54,7 @@
   std::copy( errors.begin(), errors.end(), std::ostream_iterator< std::string >( os, "\n" ) );
 }
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/SemanticError.h
===================================================================
--- translator/Common/SemanticError.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/SemanticError.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -44,2 +58,7 @@
 
 #endif /* SEMANTICERROR_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/UnimplementedError.h
===================================================================
--- translator/Common/UnimplementedError.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/UnimplementedError.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -26,2 +40,7 @@
 
 #endif /* #ifndef COMMON_UNIMPLEMENTEDERROR_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/UniqueName.cc
===================================================================
--- translator/Common/UniqueName.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/UniqueName.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -24,2 +38,7 @@
 }
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/UniqueName.h
===================================================================
--- translator/Common/UniqueName.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/UniqueName.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -24,2 +38,7 @@
 
 #endif /* #ifndef UNIQUENAME_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Common/utility.h
===================================================================
--- translator/Common/utility.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Common/utility.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -217,2 +231,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/CaseRangeMutator.cc
===================================================================
--- translator/ControlStruct/CaseRangeMutator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/CaseRangeMutator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <cassert>
@@ -180,2 +194,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/CaseRangeMutator.h
===================================================================
--- translator/ControlStruct/CaseRangeMutator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/CaseRangeMutator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef CASERNG_MUTATOR_H
 #define CASERNG_MUTATOR_H
@@ -31,2 +45,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/ChooseMutator.cc
===================================================================
--- translator/ControlStruct/ChooseMutator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/ChooseMutator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 
@@ -44,2 +58,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/ChooseMutator.h
===================================================================
--- translator/ControlStruct/ChooseMutator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/ChooseMutator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef CHOOSE_MUTATOR_H
 #define CHOOSE_MUTATOR_H
@@ -28,2 +42,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/ForExprMutator.cc
===================================================================
--- translator/ControlStruct/ForExprMutator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/ForExprMutator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "SynTree/Mutator.h"
 #include "SynTree/Statement.h"
@@ -22,2 +36,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/ForExprMutator.h
===================================================================
--- translator/ControlStruct/ForExprMutator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/ForExprMutator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef FOR_MUTATOR_H
 #define FOR_MUTATOR_H
@@ -20,2 +34,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelFixer.cc
===================================================================
--- translator/ControlStruct/LabelFixer.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelFixer.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <cassert>
@@ -127,2 +141,7 @@
     }
 }  // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelFixer.h
===================================================================
--- translator/ControlStruct/LabelFixer.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelFixer.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef LABEL_FIXER_H
 #define LABEL_FIXER_H
@@ -80,2 +94,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelGenerator.cc
===================================================================
--- translator/ControlStruct/LabelGenerator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelGenerator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <iostream>
 #include <strstream>
@@ -22,2 +36,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelGenerator.h
===================================================================
--- translator/ControlStruct/LabelGenerator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelGenerator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef LABEL_GENERATOR_H
 #define LABEL_GENERATOR_H
@@ -26,2 +40,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelTypeChecker.cc
===================================================================
--- translator/ControlStruct/LabelTypeChecker.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelTypeChecker.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <cassert>
@@ -65,2 +79,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/LabelTypeChecker.h
===================================================================
--- translator/ControlStruct/LabelTypeChecker.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/LabelTypeChecker.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef LABEL_TYPE_H
 #define LABEL_TYPE_H
@@ -32,2 +46,7 @@
 
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/MLEMutator.cc
===================================================================
--- translator/ControlStruct/MLEMutator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/MLEMutator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <cassert>
 #include <algorithm>
@@ -192,2 +206,7 @@
     }
 } // namespace ControlStruct
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/MLEMutator.h
===================================================================
--- translator/ControlStruct/MLEMutator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/MLEMutator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef MLE_MUTATOR_H
 #define MLE_MUTATOR_H
@@ -71,2 +85,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/Mutate.cc
===================================================================
--- translator/ControlStruct/Mutate.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/Mutate.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <algorithm>
 #include <iostream>
@@ -36,2 +50,7 @@
     }
 } // namespace CodeGen
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/ControlStruct/Mutate.h
===================================================================
--- translator/ControlStruct/Mutate.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/ControlStruct/Mutate.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef CTRLS_MUTATE_H
 #define CTRLS_MUTATE_H
@@ -18,2 +32,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Designators/Processor.cc
===================================================================
--- translator/Designators/Processor.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Designators/Processor.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <vector>
 #include <algorithm>
@@ -146,2 +160,7 @@
 #endif // 0
 } // namespaces Designators
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Designators/Processor.h
===================================================================
--- translator/Designators/Processor.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Designators/Processor.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "SynTree/Declaration.h"
 #include "SynTree/Expression.h"
@@ -63,2 +77,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Box.cc
===================================================================
--- translator/GenPoly/Box.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Box.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -1073,2 +1087,7 @@
 
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Box.h
===================================================================
--- translator/GenPoly/Box.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Box.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -20,2 +34,7 @@
 
 #endif /* #ifndef GENPOLY_BOX_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/CopyParams.cc
===================================================================
--- translator/GenPoly/CopyParams.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/CopyParams.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <set>
 #include <map>
@@ -83,2 +97,7 @@
     }
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/CopyParams.h
===================================================================
--- translator/GenPoly/CopyParams.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/CopyParams.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -18,2 +32,7 @@
 
 #endif /* #ifndef GENPOLY_COPYPARAMS_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/FindFunction.cc
===================================================================
--- translator/GenPoly/FindFunction.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/FindFunction.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -88,2 +102,7 @@
 
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/FindFunction.h
===================================================================
--- translator/GenPoly/FindFunction.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/FindFunction.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -22,2 +36,7 @@
 
 #endif /* #ifndef FINDFUNCTION_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/GenPoly.cc
===================================================================
--- translator/GenPoly/GenPoly.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/GenPoly.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -63,2 +77,7 @@
 
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/GenPoly.h
===================================================================
--- translator/GenPoly/GenPoly.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/GenPoly.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -31,2 +45,7 @@
 
 #endif
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Lvalue.cc
===================================================================
--- translator/GenPoly/Lvalue.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Lvalue.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -167,2 +181,7 @@
 
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Lvalue.h
===================================================================
--- translator/GenPoly/Lvalue.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Lvalue.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -20,2 +34,7 @@
 
 #endif /* #ifndef GENPOLY_LVALUE_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/PolyMutator.cc
===================================================================
--- translator/GenPoly/PolyMutator.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/PolyMutator.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -188,2 +202,7 @@
 /* static class method */
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/PolyMutator.h
===================================================================
--- translator/GenPoly/PolyMutator.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/PolyMutator.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -59,2 +73,7 @@
 
 #endif /* #ifndef GENPOLY_POLYMUTATOR_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/ScrubTyVars.cc
===================================================================
--- translator/GenPoly/ScrubTyVars.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/ScrubTyVars.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "GenPoly.h"
 #include "ScrubTyVars.h"
@@ -50,2 +64,7 @@
     }
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/ScrubTyVars.h
===================================================================
--- translator/GenPoly/ScrubTyVars.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/ScrubTyVars.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef GENPOLY_SCRUBTYVARS_H
 #define GENPOLY_SCRUBTYVARS_H
@@ -42,2 +56,7 @@
 
 #endif // GENPOLY_SCRUBTYVARS_H
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Specialize.cc
===================================================================
--- translator/GenPoly/Specialize.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Specialize.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -205,2 +219,7 @@
 
 } // namespace GenPoly
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/GenPoly/Specialize.h
===================================================================
--- translator/GenPoly/Specialize.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/GenPoly/Specialize.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -20,2 +34,7 @@
 
 #endif /* #ifndef GENPOLY_SPECIALIZE_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/Association.cc
===================================================================
--- translator/InitTweak/Association.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/Association.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "Association.h"
 
@@ -8,2 +22,7 @@
 const int RangeAssociation::RangeAssociation::UNDEF = -1;
 RangeAssociation::~RangeAssociation() {}
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/Association.h
===================================================================
--- translator/InitTweak/Association.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/Association.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef _ASSOCIATE_H_
 #define _ASSOCIATE_H_
@@ -276,2 +290,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/BasicInit.cc
===================================================================
--- translator/InitTweak/BasicInit.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/BasicInit.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <cassert>
@@ -262,2 +276,7 @@
 } // namespace InitTweak
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/BasicInit.h
===================================================================
--- translator/InitTweak/BasicInit.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/BasicInit.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef _BASINIT_H_
 #define _BASINIT_H_
@@ -215,2 +229,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/DeclarationHoister.cc
===================================================================
--- translator/InitTweak/DeclarationHoister.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/DeclarationHoister.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <cassert>
@@ -48,2 +62,7 @@
 
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/DeclarationHoister.h
===================================================================
--- translator/InitTweak/DeclarationHoister.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/DeclarationHoister.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "SynTree/Visitor.h"
 #include "SymTab/Indexer.h"
@@ -18,2 +32,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/InitExpander.cc
===================================================================
--- translator/InitTweak/InitExpander.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/InitExpander.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <list>
 #include <stack>
@@ -34,2 +48,7 @@
 } // namespace InitTweak
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/InitExpander.h
===================================================================
--- translator/InitTweak/InitExpander.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/InitExpander.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef _INIT_EXPANDER_H_
 #define _INIT_EXPANDER_H_
@@ -65,2 +79,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/InitModel.cc
===================================================================
--- translator/InitTweak/InitModel.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/InitModel.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "SynTree/Constant.h"
 #include "InitModel.h"
@@ -208,2 +222,7 @@
 
 } // namespace InitTweak
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/InitModel.h
===================================================================
--- translator/InitTweak/InitModel.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/InitModel.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef _INITTWEAK_MODEL_H_
 #define _INITTWEAK_MODEL_H_
@@ -113,2 +127,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/Mutate.cc
===================================================================
--- translator/InitTweak/Mutate.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/Mutate.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "SynTree/Mutator.h"
 
@@ -23,2 +37,7 @@
 
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/Mutate.h
===================================================================
--- translator/InitTweak/Mutate.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/Mutate.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #ifndef INIT_MUTATE_H
 #define INIT_MUTATE_H
@@ -19,2 +33,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/RemoveInit.cc
===================================================================
--- translator/InitTweak/RemoveInit.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/RemoveInit.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include "RemoveInit.h"
 #include "SynTree/Declaration.h"
@@ -51,2 +65,7 @@
 } // namespace InitTweak
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/RemoveInit.h
===================================================================
--- translator/InitTweak/RemoveInit.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/RemoveInit.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 /*
  * This file is part of the Cforall project
@@ -33,2 +47,7 @@
 
 #endif /* #ifndef GENPOLY_POLYMUTATOR_H */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/InitTweak/diet_map.h
===================================================================
--- translator/InitTweak/diet_map.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/InitTweak/diet_map.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,16 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// XXX.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : 
+// Last Modified On : 
+// Update Count     : 0
+//
 #include <cassert>
 #include <string>
@@ -206,2 +220,7 @@
   End:
 */
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/AssignExpand.cc
===================================================================
--- translator/Tuples/AssignExpand.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/AssignExpand.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// AssignExpand.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 11:24:47 2015
+// Update Count     : 2
+//
+
 #include <ctime>
 #include <cstdlib>
@@ -14,118 +29,118 @@
 
 namespace Tuples {
-  AssignExpander::AssignExpander() : temporaryNamer("__tpl") {}
+	AssignExpander::AssignExpander() : temporaryNamer("__tpl") {}
 
-  Statement *AssignExpander::mutate( ExprStmt *exprStmt ) {
-    replace.clear();
-    extra.clear();
-    extra2.clear();
-    exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
+	Statement *AssignExpander::mutate( ExprStmt *exprStmt ) {
+		replace.clear();
+		extra.clear();
+		extra2.clear();
+		exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
 
-    CompoundStmt *newSt = 0;
-    if (! extra.empty() ) {
-      if ( ! newSt )
-	newSt= new CompoundStmt(std::list<Label>());
+		CompoundStmt *newSt = 0;
+		if (! extra.empty() ) {
+			if ( ! newSt )
+				newSt= new CompoundStmt(std::list<Label>());
 
-      newSt->get_kids().splice(newSt->get_kids().end(), extra);
-    }
+			newSt->get_kids().splice(newSt->get_kids().end(), extra);
+		} // if
 
-    if (! extra2.empty() ) {
-      if ( ! newSt )
-	newSt= new CompoundStmt(std::list<Label>());
+		if ( ! extra2.empty() ) {
+			if ( ! newSt )
+				newSt= new CompoundStmt(std::list<Label>());
 
-      newSt->get_kids().splice(newSt->get_kids().end(), extra2);
-    }
+			newSt->get_kids().splice(newSt->get_kids().end(), extra2);
+		}
 
-    if (! replace.empty() ) {
-      if ( ! newSt )
-	newSt= new CompoundStmt(std::list<Label>());
+		if ( ! replace.empty() ) {
+			if ( ! newSt )
+				newSt= new CompoundStmt(std::list<Label>());
 
-      for ( std::list<Expression *>::iterator r = replace.begin(); r != replace.end(); r++ )
-	newSt->get_kids().push_back( new ExprStmt( std::list<Label>(), *r ));
-    }
+			for ( std::list<Expression *>::iterator r = replace.begin(); r != replace.end(); r++ )
+				newSt->get_kids().push_back( new ExprStmt( std::list<Label>(), *r ));
+		}
 
-    if ( newSt ) return newSt; else return exprStmt;
-  }
+		if ( newSt ) return newSt; else return exprStmt;
+	}
 
-  Expression *AssignExpander::mutate( SolvedTupleExpr *tupleExpr ) {
-    /* 
-    std::list<Expression *> &exprs = tupleExpr->get_exprs();
+	Expression *AssignExpander::mutate( SolvedTupleExpr *tupleExpr ) {
+		/* 
+		   std::list<Expression *> &exprs = tupleExpr->get_exprs();
 
-    if ( tupleExpr->get_type() == SolvedTupleExpr::MASS ) {
-      // extract lhs of assignments, assert that rhs is the same, create temporaries
-      assert (! exprs.empty());
-      ApplicationExpr *ap1 = dynamic_cast< ApplicationExpr * >( exprs.front() );
-      std::list<Expression *> &args = ap1->get_args();
-      assert(args.size() == 2);
-      std::list<Type *> &temp_types = args.back()->get_results();
-      assert(temp_types.size() == 1);
-      extra.push_back(new DeclStmt( std::list<Label>(), new ObjectDecl(temporaryNamer.newName(), Declaration::Auto, LinkageSpec::C, 0, temp_types.front(), 0 ) ));
+		   if ( tupleExpr->get_type() == SolvedTupleExpr::MASS ) {
+		   // extract lhs of assignments, assert that rhs is the same, create temporaries
+		   assert (! exprs.empty());
+		   ApplicationExpr *ap1 = dynamic_cast< ApplicationExpr * >( exprs.front() );
+		   std::list<Expression *> &args = ap1->get_args();
+		   assert(args.size() == 2);
+		   std::list<Type *> &temp_types = args.back()->get_results();
+		   assert(temp_types.size() == 1);
+		   extra.push_back(new DeclStmt( std::list<Label>(), new ObjectDecl(temporaryNamer.newName(), Declaration::Auto, LinkageSpec::C, 0, temp_types.front(), 0 ) ));
 
-      for ( std::list<Expression *>::iterator e = exprs.begin(); e != exprs.end(); e++ ) {
-	ApplicationExpr *ap = dynamic_cast< ApplicationExpr * >( *e );
-	assert( ap != 0 );
-	replace.push_back(ap);
-      }
+		   for ( std::list<Expression *>::iterator e = exprs.begin(); e != exprs.end(); e++ ) {
+		   ApplicationExpr *ap = dynamic_cast< ApplicationExpr * >( *e );
+		   assert( ap != 0 );
+		   replace.push_back(ap);
+		   }
 
-      return tupleExpr;
-    } else if ( tupleExpr->get_type() == SolvedTupleExpr::MULTIPLE ||
+		   return tupleExpr;
+		   } else if ( tupleExpr->get_type() == SolvedTupleExpr::MULTIPLE ||
 		   tupleExpr->get_type() == SolvedTupleExpr::MASS ) */ {
-      std::list<Expression *> &comps = tupleExpr->get_exprs();
-      for ( std::list<Expression *>::iterator i = comps.begin(); i != comps.end(); ++i ) {
-	std::list<Statement *> decls;
-	std::list<Statement *> temps;
-	std::list<Statement *> assigns;
-	if ( ApplicationExpr *app = dynamic_cast< ApplicationExpr * >(*i) ) {
-	  assert( app->get_args().size() == 2 );
+			std::list<Expression *> &comps = tupleExpr->get_exprs();
+			for ( std::list<Expression *>::iterator i = comps.begin(); i != comps.end(); ++i ) {
+				std::list<Statement *> decls;
+				std::list<Statement *> temps;
+				std::list<Statement *> assigns;
+				if ( ApplicationExpr *app = dynamic_cast< ApplicationExpr * >(*i) ) {
+					assert( app->get_args().size() == 2 );
 
-	  Expression *lhsT = app->get_args().front();
-	  Expression *rhsT = app->get_args().back();
-	  // after the round of type analysis this should be true
-	  assert( lhsT->get_results().size() == 1 );
-	  assert( rhsT->get_results().size() == 1 );
-	  // declare temporaries
-	  ObjectDecl *lhs = new ObjectDecl( temporaryNamer.newName("_lhs_"), Declaration::NoStorageClass, LinkageSpec::Intrinsic, 0,
-					    lhsT->get_results().front(), 0 );
-	  decls.push_back( new DeclStmt( std::list< Label >(), lhs ) );
-	  ObjectDecl *rhs = new ObjectDecl( temporaryNamer.newName("_rhs_"), Declaration::NoStorageClass, LinkageSpec::Intrinsic, 0,
-					    rhsT->get_results().front(), 0);
-	  decls.push_back( new DeclStmt( std::list< Label >(), rhs ));
+					Expression *lhsT = app->get_args().front();
+					Expression *rhsT = app->get_args().back();
+					// after the round of type analysis this should be true
+					assert( lhsT->get_results().size() == 1 );
+					assert( rhsT->get_results().size() == 1 );
+					// declare temporaries
+					ObjectDecl *lhs = new ObjectDecl( temporaryNamer.newName("_lhs_"), Declaration::NoStorageClass, LinkageSpec::Intrinsic, 0,
+													  lhsT->get_results().front(), 0 );
+					decls.push_back( new DeclStmt( std::list< Label >(), lhs ) );
+					ObjectDecl *rhs = new ObjectDecl( temporaryNamer.newName("_rhs_"), Declaration::NoStorageClass, LinkageSpec::Intrinsic, 0,
+													  rhsT->get_results().front(), 0);
+					decls.push_back( new DeclStmt( std::list< Label >(), rhs ));
 
 
-	  // create temporary for lhs, assign address
-	  UntypedExpr *assgnL = new UntypedExpr( new NameExpr( "?=?" ) );
-	  assgnL->get_args().push_back( new VariableExpr( lhs ) );
-	  assgnL->get_args().push_back( lhsT );
-	  temps.push_back( new ExprStmt(std::list<Label>(), assgnL) );
+					// create temporary for lhs, assign address
+					UntypedExpr *assgnL = new UntypedExpr( new NameExpr( "?=?" ) );
+					assgnL->get_args().push_back( new VariableExpr( lhs ) );
+					assgnL->get_args().push_back( lhsT );
+					temps.push_back( new ExprStmt(std::list<Label>(), assgnL) );
 
-	  // create temporary for rhs, assign value
-	  UntypedExpr *assgnR = new UntypedExpr( new NameExpr( "?=?" ) );
-	  assgnR->get_args().push_back( new VariableExpr( rhs ) );
-	  assgnR->get_args().push_back( rhsT );
-	  temps.push_back( new ExprStmt(std::list<Label>(), assgnR) );
+					// create temporary for rhs, assign value
+					UntypedExpr *assgnR = new UntypedExpr( new NameExpr( "?=?" ) );
+					assgnR->get_args().push_back( new VariableExpr( rhs ) );
+					assgnR->get_args().push_back( rhsT );
+					temps.push_back( new ExprStmt(std::list<Label>(), assgnR) );
 
-	  // assign rhs to lhs
-	  UntypedExpr *assgn = new UntypedExpr( new NameExpr( "?=?" ) );
-	  UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
-	  deref->get_args().push_back( new VariableExpr( lhs ) );
-	  assgn->get_args().push_back( deref );
-	  assgn->get_args().push_back( new VariableExpr( rhs ) );
-	  assigns.push_back( new ExprStmt(std::list<Label>(), assgn) );
-
-	} else
-	  throw CompilerError("Solved Tuple should contain only assignment statements");
+					// assign rhs to lhs
+					UntypedExpr *assgn = new UntypedExpr( new NameExpr( "?=?" ) );
+					UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
+					deref->get_args().push_back( new VariableExpr( lhs ) );
+					assgn->get_args().push_back( deref );
+					assgn->get_args().push_back( new VariableExpr( rhs ) );
+					assigns.push_back( new ExprStmt(std::list<Label>(), assgn) );
+				} else
+					throw CompilerError("Solved Tuple should contain only assignment statements");
 	  
-	extra.splice( extra.begin(), decls );
-	extra.splice( extra.end(), temps );
-	extra2.splice( extra2.end(), assigns );
-      }
-
-      return tupleExpr;
-    }
-
-    throw 0; // shouldn't be here
-  }
-
-
+				extra.splice( extra.begin(), decls );
+				extra.splice( extra.end(), temps );
+				extra2.splice( extra2.end(), assigns );
+			} // for
+			return tupleExpr;
+		}
+		throw 0; // shouldn't be here
+	}
 } // namespace Tuples
 
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/AssignExpand.h
===================================================================
--- translator/Tuples/AssignExpand.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/AssignExpand.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// AssignExpand.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 11:25:53 2015
+// Update Count     : 3
+//
+
 #ifndef _ASSIGN_EXPAND_H_
 #define _ASSIGN_EXPAND_H_
@@ -11,27 +26,23 @@
 
 namespace Tuples {
-  class AssignExpander : public Mutator
-  {
-    typedef Mutator Parent;
-
-  public:
-    AssignExpander();
-    virtual Statement *mutate( ExprStmt *expr );
-    virtual Expression *mutate( SolvedTupleExpr *tupleExpr );
-
-  private:
-    std::list<Statement *> extra, extra2;
-    std::list<Expression *> replace;
-    UniqueName temporaryNamer;
-  };
-
+	class AssignExpander : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		AssignExpander();
+		virtual Statement *mutate( ExprStmt *expr );
+		virtual Expression *mutate( SolvedTupleExpr *tupleExpr );
+	  private:
+		std::list<Statement *> extra, extra2;
+		std::list<Expression *> replace;
+		UniqueName temporaryNamer;
+	};
 } // namespace Tuples
 
 
-#endif // #ifndef _ASSIGN_EXPAND_H_
+#endif // _ASSIGN_EXPAND_H_
 
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FlattenTuple.cc
===================================================================
--- translator/Tuples/FlattenTuple.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FlattenTuple.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FlattenTuple.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 11:26:56 2015
+// Update Count     : 1
+//
+
 #include <list>
 #include <vector>
@@ -6,46 +21,45 @@
 #include "FlattenTuple.h"
 
+namespace Tuples {
+	FlattenTuple::FlattenTuple() {
+	}
 
-namespace Tuples {
+	FlattenTuple::~FlattenTuple() {
+	}
 
-  FlattenTuple::FlattenTuple()
-  {
-  }
+	Expression *FlattenTuple::mutate( TupleExpr *tupleExpr ) {
+		CollectArgs c;
 
-  FlattenTuple::~FlattenTuple()
-  {
-  }
+		acceptAll( tupleExpr->get_exprs(), c );
+		tupleExpr->set_exprs( c.get_args() );
 
-  Expression *FlattenTuple::mutate( TupleExpr *tupleExpr )
-  {
-    CollectArgs c;
+		return tupleExpr;
+	}
 
-    acceptAll( tupleExpr->get_exprs(), c );
-    tupleExpr->set_exprs( c.get_args() );
+	void FlattenTuple::CollectArgs::visit( UntypedExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( NameExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( CastExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( AddressExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( UntypedMemberExpr *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( MemberExpr        *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( VariableExpr      *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( ConstantExpr      *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( SizeofExpr        *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( AttrExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( LogicalExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( ConditionalExpr   *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( CommaExpr         *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( TypeExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
+	void FlattenTuple::CollectArgs::visit( UntypedValofExpr  *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
 
-    return tupleExpr;
-  }
+	void FlattenTuple::CollectArgs::visit( TupleExpr *tupleExpr) {
+		acceptAll( tupleExpr->get_exprs(), *this );
+		//currentArgs.splice( currentArgs.end(), c.get_args() );
+	}
+} // namespace Tuples
 
-  void FlattenTuple::CollectArgs::visit( UntypedExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( NameExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( CastExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( AddressExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( UntypedMemberExpr *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( MemberExpr        *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( VariableExpr      *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( ConstantExpr      *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( SizeofExpr        *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( AttrExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( LogicalExpr       *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( ConditionalExpr   *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( CommaExpr         *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( TypeExpr          *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-  void FlattenTuple::CollectArgs::visit( UntypedValofExpr  *expr )  {  currentArgs.insert( currentArgs.end(), expr );  }
-
-  void FlattenTuple::CollectArgs::visit( TupleExpr *tupleExpr)
-  {
-    acceptAll( tupleExpr->get_exprs(), *this );
-
-    //currentArgs.splice( currentArgs.end(), c.get_args() );
-  }
-} // namespace Tuples
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FlattenTuple.h
===================================================================
--- translator/Tuples/FlattenTuple.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FlattenTuple.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FlattenTuple.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 11:28:15 2015
+// Update Count     : 3
+//
+
 #ifndef _FLATTEN_TUPLE_H_
 #define _FLATTEN_TUPLE_H_
@@ -8,51 +23,45 @@
 
 namespace Tuples {
-  class FlattenTuple : public Mutator
-  {
-    typedef Mutator Parent;
+	class FlattenTuple : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		FlattenTuple();
+		~FlattenTuple();
 
-  public:
-    FlattenTuple();
-    ~FlattenTuple();
+		virtual Expression *mutate( TupleExpr *tupleExpr );
+	  private:
+		class CollectArgs : public Visitor {
+		  public:
+			virtual void visit( UntypedExpr * );
+			virtual void visit( NameExpr * );
+			virtual void visit( CastExpr *);
+			virtual void visit( AddressExpr * );
+			virtual void visit( UntypedMemberExpr * );
+			virtual void visit( MemberExpr * );
+			virtual void visit( VariableExpr * );
+			virtual void visit( ConstantExpr * ); 
+			virtual void visit( SizeofExpr * );
+			virtual void visit( AttrExpr * );
+			virtual void visit( LogicalExpr * );
+			virtual void visit( ConditionalExpr * );
+			virtual void visit( CommaExpr * );
+			virtual void visit( TypeExpr * );
+			virtual void visit( UntypedValofExpr * );
 
-    virtual Expression *mutate( TupleExpr *tupleExpr );
+			virtual void visit( TupleExpr *tupleExpr );
 
-  private:
-    class CollectArgs : public Visitor
-    {
-    public:
-      virtual void visit( UntypedExpr * );
-      virtual void visit( NameExpr * );
-      virtual void visit( CastExpr *);
-      virtual void visit( AddressExpr * );
-      virtual void visit( UntypedMemberExpr * );
-      virtual void visit( MemberExpr * );
-      virtual void visit( VariableExpr * );
-      virtual void visit( ConstantExpr * ); 
-      virtual void visit( SizeofExpr * );
-      virtual void visit( AttrExpr * );
-      virtual void visit( LogicalExpr * );
-      virtual void visit( ConditionalExpr * );
-      virtual void visit( CommaExpr * );
-      virtual void visit( TypeExpr * );
-      virtual void visit( UntypedValofExpr * );
+			std::list< Expression *> &get_args() { return currentArgs; }
+		  private:
+			std::list< Expression * > currentArgs;
+		};
 
-      virtual void visit( TupleExpr *tupleExpr );
-
-      std::list< Expression *> &get_args() { return currentArgs; }
-    private:
-      std::list< Expression * > currentArgs;
-    };
-
-  };
-
+	};
 } // namespace Tuples
 
+#endif // _FLATTEN_TUPLE_H_
 
-#endif // #ifndef _FLATTEN_TUPLE_H_
-
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FunctionChecker.cc
===================================================================
--- translator/Tuples/FunctionChecker.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FunctionChecker.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FunctionChecker.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 11:59:55 2015
+// Update Count     : 3
+//
+
 #include "FunctionChecker.h"
 #include "FunctionFixer.h"
@@ -8,113 +23,119 @@
 
 namespace Tuples {
-  using namespace std;
+	using namespace std;
 
-  void checkFunctions( std::list< Declaration * > translationUnit )
-  {
-    FunctionChecker fchk(true);
-    TupleDistrib td;
-    FunctionFixer ff;
+	void checkFunctions( std::list< Declaration * > translationUnit ) {
+		FunctionChecker fchk( true );
+		TupleDistrib td;
+		FunctionFixer ff;
 
-    mutateAll( translationUnit , fchk );
-    mutateAll( translationUnit , ff );
-    mutateAll( translationUnit , td );
-    return;
-  }
-
-  FunctionChecker::FunctionChecker( bool _topLevel, UniqueName *_nameGen ) : topLevel( _topLevel ), nameGen( _nameGen ) {
-    if ( topLevel) {
-      assert( ! nameGen );
-      nameGen = new UniqueName("_MVR_");
-    } else
-      assert( nameGen );
-  }
-
-  FunctionChecker::~FunctionChecker() {
-    if ( topLevel) {
-      delete nameGen;
-      nameGen = 0;
-    }
-  }
-
-  Statement* FunctionChecker::mutate(ExprStmt *exprStmt) {
-    exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
-    if ( ! tempExpr.empty() ) {
-      assert ( ! temporaries.empty() );
-      CompoundStmt *newBlock = new CompoundStmt( std::list< Label >() );
-      // declarations
-      for ( std::list< ObjectDecl *>::iterator d = temporaries.begin(); d != temporaries.end(); ++d )
-	newBlock->get_kids().push_back( new DeclStmt( std::list<Label>(), *d ) );
-      // new expression statements
-      for ( std::list< Expression *>::iterator e = tempExpr.begin(); e != tempExpr.end(); ++e )
-	newBlock->get_kids().push_back( new ExprStmt( std::list<Label>(), *e ) );
-
-      newBlock->get_kids().push_back( exprStmt );
-      return newBlock;
-    } else
-      return exprStmt;
-  }
-
-  Expression* FunctionChecker::mutate(ApplicationExpr *applicationExpr) {
-    if ( topLevel )
-      ; // In top level of Functionchecker
-
-    if ( applicationExpr->get_results().size() > 1 ) {
-      for ( std::list< Type *>::iterator res = applicationExpr->get_results().begin(); res != applicationExpr->get_results().end(); res++ )
-	temporaries.push_back( new ObjectDecl(nameGen->newName(),Declaration::Auto,LinkageSpec::AutoGen, 0, (*res)->clone(), 0 ) );
-
-      assert( ! temporaries.empty() );
-    }
-
-    applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
-
-    std::list< Expression * > newArgs;
-    for ( std::list< Expression *>::iterator e = applicationExpr->get_args().begin(); e != applicationExpr->get_args().end(); ++e ) {
-      FunctionChecker rec( false, nameGen );
-      (*e)->acceptMutator( rec );
-
-      if ( ! rec.temporaries.empty() ) {
-	TupleExpr *lhs = new TupleExpr;
-	std::list< Expression * > &tmem = lhs->get_exprs();
-	for ( std::list<ObjectDecl *>::iterator d = rec.temporaries.begin();  d != rec.temporaries.end(); ++d ) {
-	  tmem.push_back( new VariableExpr( *d ) );
-	  newArgs.push_back( new VariableExpr( *d ) );
+		mutateAll( translationUnit , fchk );
+		mutateAll( translationUnit , ff );
+		mutateAll( translationUnit , td );
+		return;
 	}
 
-	// construct tuple assignment
-	std::list<Expression *> args;
-	args.push_back( new AddressExpr(lhs) );
-	args.push_back( *e );
-	tempExpr.push_back( new UntypedExpr( new NameExpr("?=?"), args ) );
+	FunctionChecker::FunctionChecker( bool _topLevel, UniqueName *_nameGen ) : topLevel( _topLevel ), nameGen( _nameGen ) {
+		if ( topLevel ) {
+			assert( ! nameGen );
+			nameGen = new UniqueName("_MVR_");
+		} else
+			assert( nameGen );
+	}
 
-	temporaries.splice( temporaries.end(), rec.temporaries );
-      } else
-	newArgs.push_back( *e );
-      // percolate to recursive calls
-    }
+	FunctionChecker::~FunctionChecker() {
+		if ( topLevel ) {
+			delete nameGen;
+			nameGen = 0;
+		}
+	}
 
-    applicationExpr->get_args().clear();
-    std::copy( newArgs.begin(), newArgs.end(), back_inserter(applicationExpr->get_args()) );
+	Statement* FunctionChecker::mutate( ExprStmt *exprStmt ) {
+		exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), *this ) );
+		if ( ! tempExpr.empty() ) {
+			assert ( ! temporaries.empty() );
+			CompoundStmt *newBlock = new CompoundStmt( std::list< Label >() );
+			// declarations
+			for ( std::list< ObjectDecl *>::iterator d = temporaries.begin(); d != temporaries.end(); ++d )
+				newBlock->get_kids().push_back( new DeclStmt( std::list<Label>(), *d ) );
+			// new expression statements
+			for ( std::list< Expression *>::iterator e = tempExpr.begin(); e != tempExpr.end(); ++e )
+				newBlock->get_kids().push_back( new ExprStmt( std::list<Label>(), *e ) );
 
-    return applicationExpr;
-  }
+			newBlock->get_kids().push_back( exprStmt );
+			return newBlock;
+		} else
+			return exprStmt;
+	}
 
-  Expression* TupleDistrib::mutate(UntypedExpr *expr) {
-    if (  NameExpr *assgnop = dynamic_cast< NameExpr * >(expr->get_function()) ) {
-      if ( assgnop->get_name() == std::string("?=?") ) {
-	std::list<Expression *> &args = expr->get_args();
-	assert(args.size() == 2);
-	//if args.front() points to a tuple and if args.back() is already resolved
-	if ( AddressExpr *addr = dynamic_cast<AddressExpr *>(args.front()) )
-	  if ( TupleExpr *lhs = dynamic_cast<TupleExpr *>(addr->get_arg()) )
-	    if ( ApplicationExpr *rhs = dynamic_cast<ApplicationExpr *>( args.back() ) ) {
-	      for ( std::list<Expression *>::iterator tc = lhs->get_exprs().begin(); tc != lhs->get_exprs().end(); ++tc )
-		rhs->get_args().push_back( new AddressExpr( *tc ) );
-	      return rhs; // XXX
-	    }
-      } else
-	assert(false); // It's not an assignment, shouldn't be here
-    }
-    return expr;
-  }
+	Expression* FunctionChecker::mutate( ApplicationExpr *applicationExpr ) {
+		if ( topLevel )
+			; // In top level of Functionchecker
 
-} // namespace Tuples
+		if ( applicationExpr->get_results().size() > 1 ) {
+			for ( std::list< Type *>::iterator res = applicationExpr->get_results().begin(); res != applicationExpr->get_results().end(); res++ )
+				temporaries.push_back( new ObjectDecl( nameGen->newName(),Declaration::Auto,LinkageSpec::AutoGen, 0, (*res )->clone(), 0 ) );
+
+			assert( ! temporaries.empty() );
+		}
+
+		applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
+
+		std::list< Expression * > newArgs;
+		for ( std::list< Expression *>::iterator e = applicationExpr->get_args().begin(); e != applicationExpr->get_args().end(); ++e ) {
+			FunctionChecker rec( false, nameGen );
+			(*e )->acceptMutator( rec );
+
+			if ( ! rec.temporaries.empty() ) {
+				TupleExpr *lhs = new TupleExpr;
+				std::list< Expression * > &tmem = lhs->get_exprs();
+				for ( std::list<ObjectDecl *>::iterator d = rec.temporaries.begin();  d != rec.temporaries.end(); ++d ) {
+					tmem.push_back( new VariableExpr( *d ) );
+					newArgs.push_back( new VariableExpr( *d ) );
+				}
+
+				// construct tuple assignment
+				std::list<Expression *> args;
+				args.push_back( new AddressExpr( lhs ) );
+				args.push_back( *e );
+				tempExpr.push_back( new UntypedExpr( new NameExpr("?=?"), args ) );
+
+				temporaries.splice( temporaries.end(), rec.temporaries );
+			} else
+				newArgs.push_back( *e );
+			// percolate to recursive calls
+		}
+
+		applicationExpr->get_args().clear();
+		std::copy( newArgs.begin(), newArgs.end(), back_inserter( applicationExpr->get_args()) );
+
+		return applicationExpr;
+	}
+
+	Expression* TupleDistrib::mutate( UntypedExpr *expr ) {
+		if (  NameExpr *assgnop = dynamic_cast< NameExpr * >( expr->get_function()) ) {
+			if ( assgnop->get_name() == std::string("?=?") ) {
+				std::list<Expression *> &args = expr->get_args();
+				assert( args.size() == 2 );
+				//if args.front() points to a tuple and if args.back() is already resolved
+				if ( AddressExpr *addr = dynamic_cast<AddressExpr *>( args.front()) )
+					if ( TupleExpr *lhs = dynamic_cast<TupleExpr *>( addr->get_arg()) )
+						if ( ApplicationExpr *rhs = dynamic_cast<ApplicationExpr *>( args.back() ) ) {
+							for ( std::list<Expression *>::iterator tc = lhs->get_exprs().begin(); tc != lhs->get_exprs().end(); ++tc )
+								rhs->get_args().push_back( new AddressExpr( *tc ) );
+							return rhs; // XXX
+						} // if
+			} else
+				assert( false ); // It's not an assignment, shouldn't be here
+		} // if
+		return expr;
+	}
+
+}
+
+// namespace Tuples
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FunctionChecker.h
===================================================================
--- translator/Tuples/FunctionChecker.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FunctionChecker.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FunctionChecker.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 12:00:57 2015
+// Update Count     : 2
+//
+
 #ifndef _TUPLE_FUNCHK_H_
 #define _TUPLE_FUNCHK_H_
@@ -16,40 +31,34 @@
 #include "SynTree/Statement.h"
 
+namespace Tuples {
+	class FunctionChecker : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		FunctionChecker( bool _topLevel = false, UniqueName *_nameGen = 0 );
+		~FunctionChecker();
 
-namespace Tuples {
-  class FunctionChecker : public Mutator
-  {
-    typedef Mutator Parent;
+		virtual Expression* mutate(ApplicationExpr *applicationExpr);
+		virtual Statement* mutate(ExprStmt *exprStmt);
+	  private:
+		bool topLevel;
+		UniqueName *nameGen;
+		std::list< ObjectDecl * > temporaries;
+		std::list< Expression * > tempExpr;
+	};
 
-  public:
-    FunctionChecker( bool _topLevel = false, UniqueName *_nameGen = 0 );
-    ~FunctionChecker();
+	class TupleDistrib : public Mutator {
+	  public:
+		virtual Expression* mutate(UntypedExpr *utExpr);
+	  private:
+	};
 
-    virtual Expression* mutate(ApplicationExpr *applicationExpr);
-    virtual Statement* mutate(ExprStmt *exprStmt);
-
-  private:
-    bool topLevel;
-    UniqueName *nameGen;
-    std::list< ObjectDecl * > temporaries;
-    std::list< Expression * > tempExpr;
-  };
-
-  class TupleDistrib : public Mutator {
-  public:
-    virtual Expression* mutate(UntypedExpr *utExpr);
-
-  private:
-  };
-
-  void checkFunctions( std::list< Declaration * > translationUnit );
-
+	void checkFunctions( std::list< Declaration * > translationUnit );
 } // namespace Tuples
 
-#endif // #ifndef _TUPLE_FUNCHK_H_
+#endif // _TUPLE_FUNCHK_H_
 
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FunctionFixer.cc
===================================================================
--- translator/Tuples/FunctionFixer.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FunctionFixer.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FunctionFixer.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 12:02:22 2015
+// Update Count     : 1
+//
+
 #include <list>
 #include <vector>
@@ -7,103 +22,106 @@
 
 namespace Tuples {
-  DeclarationWithType *FunctionFixer::mutate( FunctionDecl *functionDecl ) {
-    functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
-    mutateAll( functionDecl->get_oldDecls(), *this );
-    functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
-    index.visit( functionDecl );
-    rets.clear();
-    return functionDecl;
-  }
+	DeclarationWithType *FunctionFixer::mutate( FunctionDecl *functionDecl ) {
+		functionDecl->set_functionType( maybeMutate( functionDecl->get_functionType(), *this ) );
+		mutateAll( functionDecl->get_oldDecls(), *this );
+		functionDecl->set_statements( maybeMutate( functionDecl->get_statements(), *this ) );
+		index.visit( functionDecl );
+		rets.clear();
+		return functionDecl;
+	}
 
-  Type *FunctionFixer::mutate( FunctionType *functionType )
-  {
-    typedef std::list< DeclarationWithType * >  Decls;
+	Type *FunctionFixer::mutate( FunctionType *functionType ) {
+		typedef std::list< DeclarationWithType * >  Decls;
 
-    if ( functionType->get_returnVals().size() <= 1 )  return functionType;
-    std::copy( functionType->get_returnVals().begin(), functionType->get_returnVals().end(), back_inserter(rets) );
+		if ( functionType->get_returnVals().size() <= 1 )  return functionType;
+		std::copy( functionType->get_returnVals().begin(), functionType->get_returnVals().end(), back_inserter(rets) );
 
-    Type::Qualifiers qual;
-    for ( Decls::iterator i = rets.begin(); i != rets.end(); i++ ) {
-      (*i)->set_type( new PointerType( qual, (*i)->get_type() ) );
-      functionType->get_parameters().push_back( *i );
-    }
+		Type::Qualifiers qual;
+		for ( Decls::iterator i = rets.begin(); i != rets.end(); i++ ) {
+			(*i)->set_type( new PointerType( qual, (*i)->get_type() ) );
+			functionType->get_parameters().push_back( *i );
+		} // for
 
-    functionType->get_returnVals() = *(new std::list< DeclarationWithType * >());
+		functionType->get_returnVals() = *(new std::list< DeclarationWithType * >());
 
-    functionType->set_isVarArgs( false );
-    return functionType;
-  }
+		functionType->set_isVarArgs( false );
+		return functionType;
+	}
 
-  Statement *FunctionFixer::mutate( ReturnStmt *retStmt )
-  {
-    bool tupleReturn = false;
-    Expression *rhs = 0;
-    // also check if returning multiple values
-    if ( CastExpr *cst = dynamic_cast<CastExpr *>( retStmt->get_expr() ) ) {
-      if ( ApplicationExpr *app = dynamic_cast<ApplicationExpr *>( cst->get_arg() ) ) {
-	if ( app->get_results().size() > 1 ) { // doesn't need to be ApplicationExpr
-	  tupleReturn = true;
-	  rhs = app;
+	Statement *FunctionFixer::mutate( ReturnStmt *retStmt ) {
+		bool tupleReturn = false;
+		Expression *rhs = 0;
+		// also check if returning multiple values
+		if ( CastExpr *cst = dynamic_cast<CastExpr *>( retStmt->get_expr() ) ) {
+			if ( ApplicationExpr *app = dynamic_cast<ApplicationExpr *>( cst->get_arg() ) ) {
+				if ( app->get_results().size() > 1 ) { // doesn't need to be ApplicationExpr
+					tupleReturn = true;
+					rhs = app;
+				}
+			} else if ( TupleExpr *t = dynamic_cast<TupleExpr *>( cst->get_arg() ) ) {
+				tupleReturn = true;
+				assert( rets.size() == t->get_exprs().size() ); // stupid check, resolve expression
+				rhs = t;
+			} // if
+
+			if ( tupleReturn ) {
+				assert ( rhs != 0 );
+				std::list< Expression * > lhs;
+				for ( std::list< DeclarationWithType * >::iterator d = rets.begin(); d != rets.end(); ++d ) {
+					std::list<Expression *> largs;
+					largs.push_back(new VariableExpr( *d ));
+					Expression *exp = ResolvExpr::resolveInVoidContext( new CastExpr( new UntypedExpr(new NameExpr("*?"), largs), (*d)->get_type()),
+																		index );
+					lhs.push_back(exp);
+				} // for
+				std::list< Expression * > args;
+				TupleExpr *tlhs = new TupleExpr; tlhs->set_exprs( lhs );
+				args.push_back( new AddressExpr(tlhs) );
+				args.push_back(rhs);
+
+				return new ExprStmt( std::list< Label>(), new UntypedExpr( new NameExpr("?=?"), args ) );
+			} // if
+		} // if
+		/*
+		  else
+		  std::cerr << "Empty return statement" << std::endl;
+		*/
+
+		return retStmt;
 	}
-      } else if ( TupleExpr *t = dynamic_cast<TupleExpr *>( cst->get_arg() ) ) {
-	tupleReturn = true;
-	assert( rets.size() == t->get_exprs().size() ); // stupid check, resolve expression
-	rhs = t;
-      }
 
-      if ( tupleReturn ) {
-	assert ( rhs != 0 );
-	std::list< Expression * > lhs;
-	for ( std::list< DeclarationWithType * >::iterator d = rets.begin(); d != rets.end(); ++d ) {
-	  std::list<Expression *> largs;
-	  largs.push_back(new VariableExpr( *d ));
-	  Expression *exp = ResolvExpr::resolveInVoidContext( new CastExpr( new UntypedExpr(new NameExpr("*?"), largs), (*d)->get_type()),
-								       index );
-	  lhs.push_back(exp);
+	Expression* FunctionFixer::mutate( VariableExpr *variableExpr ) {
+		if ( rets.empty() ) return variableExpr;
+		mutateAll( variableExpr->get_results(), *this );
+		if ( std::find( rets.begin(), rets.end(), variableExpr->get_var() ) != rets.end() )
+//      if ( PointerType *ptr = dynamic_cast<PointerType *>(variableExpr->get_var()->get_type()) ) {
+			if ( dynamic_cast<PointerType *>(variableExpr->get_var()->get_type()) != 0 ) {
+				std::list<Expression *> largs;
+				largs.push_back( new AddressExpr(variableExpr) );
+				Expression *expr = ResolvExpr::resolveInVoidContext( /*new CastExpr(*/new UntypedExpr( new NameExpr( "*?" ), largs )/*,
+																																	  ptr->get_base()),*/, index);
+				if ( ApplicationExpr *app = dynamic_cast< ApplicationExpr * >( expr ) ) {
+					assert( app->get_args().size() == 1 );
+					app->get_args().pop_front();
+					app->get_args().push_back( variableExpr );
+					return app;
+				}
+			}
+		return variableExpr;
 	}
-	std::list< Expression * > args;
-	TupleExpr *tlhs = new TupleExpr; tlhs->set_exprs( lhs );
-	args.push_back( new AddressExpr(tlhs) );
-	args.push_back(rhs);
 
-	return new ExprStmt( std::list< Label>(), new UntypedExpr( new NameExpr("?=?"), args ) );
-      }
-    }
-    /*
-    else
-      std::cerr << "Empty return statement" << std::endl;
-    */
-
-    return retStmt;
-  }
-
-  Expression* FunctionFixer::mutate( VariableExpr *variableExpr ) {
-    if ( rets.empty() ) return variableExpr;
-    mutateAll( variableExpr->get_results(), *this );
-    if ( std::find( rets.begin(), rets.end(), variableExpr->get_var() ) != rets.end() )
-//      if ( PointerType *ptr = dynamic_cast<PointerType *>(variableExpr->get_var()->get_type()) ) {
-      if ( dynamic_cast<PointerType *>(variableExpr->get_var()->get_type()) != 0 ) {
-	std::list<Expression *> largs;
-	largs.push_back( new AddressExpr(variableExpr) );
-	  Expression *expr = ResolvExpr::resolveInVoidContext( /*new CastExpr(*/new UntypedExpr( new NameExpr( "*?" ), largs )/*,
-																 ptr->get_base()),*/, index);
-	  if ( ApplicationExpr *app = dynamic_cast< ApplicationExpr * >( expr ) ) {
-	    assert( app->get_args().size() == 1 );
-	    app->get_args().pop_front();
-	    app->get_args().push_back( variableExpr );
-	    return app;
+	/*
+	  Expression* FunctionFixer::mutate(ApplicationExpr *applicationExpr) {
+	  std::cerr << "In Application Expression" << std::endl;
+	  mutateAll( applicationExpr->get_results(), *this );
+	  applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
+	  mutateAll( applicationExpr->get_args(), *this );
+	  return applicationExpr;
 	  }
-      }
-    return variableExpr;
-  }
-
-  /*
-  Expression* FunctionFixer::mutate(ApplicationExpr *applicationExpr) {
-    std::cerr << "In Application Expression" << std::endl;
-    mutateAll( applicationExpr->get_results(), *this );
-    applicationExpr->set_function(  maybeMutate( applicationExpr->get_function(), *this ) );
-    mutateAll( applicationExpr->get_args(), *this );
-    return applicationExpr;
-  }
-  */
+	*/
 } // namespace Tuples
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/FunctionFixer.h
===================================================================
--- translator/Tuples/FunctionFixer.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/FunctionFixer.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef _FUNFIX_H_
-#define _FUNFIX_H_
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// FunctionFixer.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 14:58:45 2015
+// Update Count     : 3
+//
+
+#ifndef _FUNCTIONFIXER_H_
+#define _FUNCTIONFIXER_H_
 
 #include "SynTree/Mutator.h"
@@ -14,50 +29,43 @@
 
 namespace Tuples {
-  class FunctionFixer : public Mutator
-  {
-    typedef Mutator Parent;
+	class FunctionFixer : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		FunctionFixer() {}
+		virtual ~FunctionFixer() {}
+		virtual Type       *mutate( FunctionType *functionType );
+		virtual Statement  *mutate( ReturnStmt   *retStmt  );
+		virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
+		virtual Expression *mutate( VariableExpr *variableExpr);
 
-  public:
-    FunctionFixer() {}
-    virtual ~FunctionFixer() {}
-    virtual Type       *mutate( FunctionType *functionType );
-    virtual Statement  *mutate( ReturnStmt   *retStmt  );
-    virtual DeclarationWithType *mutate( FunctionDecl *functionDecl );
-    virtual Expression *mutate( VariableExpr *variableExpr);
+		// indexer runs
+		virtual ObjectDecl     *mutate( ObjectDecl *objectDecl )
+			{ index.visit( objectDecl ); return objectDecl; }
+		virtual TypeDecl       *mutate( TypeDecl *typeDecl )
+			{ index.visit( typeDecl ); return typeDecl; }
+		virtual TypedefDecl    *mutate( TypedefDecl *typeDecl )
+			{ index.visit( typeDecl ); return typeDecl; }
+		virtual StructDecl     *mutate( StructDecl *aggregateDecl )
+			{ index.visit( aggregateDecl ); return aggregateDecl; }
+		virtual UnionDecl      *mutate( UnionDecl *aggregateDecl )
+			{ index.visit( aggregateDecl ); return aggregateDecl; }
+		virtual EnumDecl       *mutate( EnumDecl *aggregateDecl )
+			{ index.visit( aggregateDecl ); return aggregateDecl; }
 
-    // indexer runs
-    virtual ObjectDecl     *mutate( ObjectDecl *objectDecl )
-    { index.visit( objectDecl ); return objectDecl; }
-    virtual TypeDecl       *mutate( TypeDecl *typeDecl )
-    { index.visit( typeDecl ); return typeDecl; }
-    virtual TypedefDecl    *mutate( TypedefDecl *typeDecl )
-    { index.visit( typeDecl ); return typeDecl; }
-    virtual StructDecl     *mutate( StructDecl *aggregateDecl )
-    { index.visit( aggregateDecl ); return aggregateDecl; }
-    virtual UnionDecl      *mutate( UnionDecl *aggregateDecl )
-    { index.visit( aggregateDecl ); return aggregateDecl; }
-    virtual EnumDecl       *mutate( EnumDecl *aggregateDecl )
-    { index.visit( aggregateDecl ); return aggregateDecl; }
-
-    virtual Type           *mutate( StructInstType *aggrInst )
-    { index.visit( aggrInst ); return aggrInst; }
-    virtual Type           *mutate( UnionInstType *aggrInst )
-    { index.visit( aggrInst ); return aggrInst; }
-
-
-
-  private:
-    std::list< DeclarationWithType * > rets;
-    SymTab::Indexer index;
-  };
-
+		virtual Type           *mutate( StructInstType *aggrInst )
+			{ index.visit( aggrInst ); return aggrInst; }
+		virtual Type           *mutate( UnionInstType *aggrInst )
+			{ index.visit( aggrInst ); return aggrInst; }
+	  private:
+		std::list< DeclarationWithType * > rets;
+		SymTab::Indexer index;
+	};
 } // namespace Tuples
 
+#endif // _FUNCTIONFIXER_H_
 
-#endif // #ifndef _FUNFIX_H_
-
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/MultRet.cc
===================================================================
--- translator/Tuples/MultRet.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/MultRet.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// MultRet.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 12:37:57 2015
+// Update Count     : 1
+//
+
 #include <list>
 #include <vector>
@@ -11,147 +26,145 @@
 
 namespace Tuples {
+	MVRMutator::MVRMutator() : newVars( 0 ), newCode( 0 ) {
+	}
 
-  MVRMutator::MVRMutator() : newVars( 0 ), newCode( 0 )
-  {
-  }
+	MVRMutator::~MVRMutator() {
+	}
 
-  MVRMutator::~MVRMutator()
-  {
-  }
+	int MVRMutator::curVal = 0;
 
-  int MVRMutator::curVal = 0;
+	Statement *MVRMutator::mutate( ExprStmt *exprStmt ) {
+		MVRMutator toplevel;
+		exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), toplevel ) );
 
-  Statement *MVRMutator::mutate( ExprStmt *exprStmt ){
-    MVRMutator toplevel;
-    exprStmt->set_expr( maybeMutate( exprStmt->get_expr(), toplevel ) );
+		if ( toplevel.hasCode() ) {
+			assert ( toplevel.getVars() != 0 );
 
-    if ( toplevel.hasCode() ) {
-      assert ( toplevel.getVars() != 0 );
+			typedef std::list<Statement *> Statements;
 
-      typedef std::list<Statement *> Statements;
+			CompoundStmt *code = new CompoundStmt( std::list< Label >() );
 
-      CompoundStmt *code = new CompoundStmt( std::list< Label >() );
+			// copy variables
+			Statements &vars = toplevel.getVars()->get_kids();
+			for ( Statements::iterator i = vars.begin(); i != vars.end(); i++ )
+				code->get_kids().push_back( *i );
 
-      // copy variables
-      Statements &vars = toplevel.getVars()->get_kids();
-      for ( Statements::iterator i = vars.begin(); i != vars.end(); i++ )
-	code->get_kids().push_back( *i );
+			// copy statements
+			Statements &block = toplevel.getCode()->get_kids();
+			for ( Statements::iterator i = block.begin(); i != block.end(); i++ )
+				code->get_kids().push_back( *i );
 
-      // copy statements
-      Statements &block = toplevel.getCode()->get_kids();
-      for ( Statements::iterator i = block.begin(); i != block.end(); i++ )
-	code->get_kids().push_back( *i );
+			return code;
+		} else
+			return exprStmt;
+	}
 
-      return code;
-    } else
-      return exprStmt;
-  }
+	Expression *MVRMutator::mutate( ApplicationExpr *appExpr ) {
+		// appExpr->set_function(  maybeMutate( appExpr->get_function(), *this ) );
+		bool mulretp = false;
+		VariableExpr *funname;
+		if ( (funname = dynamic_cast<VariableExpr *>(appExpr->get_function())) == 0 ) goto DoArgs;
 
+		FunctionDecl *fundecl;
+		if ((fundecl = dynamic_cast<FunctionDecl *>(funname->get_var())) == 0) goto DoArgs;
+		{
+			typedef std::list<DeclarationWithType*> RetType;
 
-  Expression *MVRMutator::mutate( ApplicationExpr *appExpr )
-  {
-    // appExpr->set_function(  maybeMutate( appExpr->get_function(), *this ) );
-    bool mulretp = false;
-    VariableExpr *funname;
-    if ( (funname = dynamic_cast<VariableExpr *>(appExpr->get_function())) == 0 ) goto DoArgs;
+			RetType &rets = fundecl->get_functionType()->get_returnVals();
+			if ( rets.size() <= 1 ) goto DoArgs;
+			mulretp = true;
 
-    FunctionDecl *fundecl;
-    if ((fundecl = dynamic_cast<FunctionDecl *>(funname->get_var())) == 0) goto DoArgs;
+			if ( newVars == 0 )
+				newVars = new CompoundStmt( std::list<Label>(0) );
 
-    {
-      typedef std::list<DeclarationWithType*> RetType;
+			for (RetType::iterator i = rets.begin() ; i != rets.end(); i++) {
+				DeclStmt *arg = newVar( *i );
+				newVars->get_kids().push_back( arg );
+				add_pending( arg->get_decl() );
+			} // for
+		}
 
-      RetType &rets = fundecl->get_functionType()->get_returnVals();
-      if ( rets.size() <= 1 ) goto DoArgs;
-      mulretp = true;
+	  DoArgs:
+		// mutate the argument list
+		typedef std::list< Expression *> Exprs;
+		Exprs &args = appExpr->get_args();
+		std::list< Expression * > newArgs;
+		for ( Exprs::iterator i = args.begin(); i != args.end(); i++ ) {
+			MVRMutator next;
+			Expression *mutated = (*i)->acceptMutator( next );
 
-      if ( newVars == 0 )
-	newVars = new CompoundStmt( std::list<Label>(0) );
+			if ( next.hasCode() ) {
+				// merge new vars and bodies
+				typedef std::list< Statement * > Stmts;
+				Stmts &vars = next.getVars()->get_kids();
+				Stmts &block = next.getCode()->get_kids();
 
-      for (RetType::iterator i = rets.begin() ; i != rets.end(); i++) {
-	DeclStmt *arg = newVar( *i );
-	newVars->get_kids().push_back( arg );
-	add_pending( arg->get_decl() );
-      }
-    }
+				if (newVars == 0)
+					newVars = new CompoundStmt( std::list< Label >() );
+				for ( Stmts::iterator i = vars.begin(); i != vars.end(); i++ )  // std::splice? -- need to append lists
+					newVars->get_kids().push_back( *i );
 
-  DoArgs:
-     // mutate the argument list
-    typedef std::list< Expression *> Exprs;
-    Exprs &args = appExpr->get_args();
-    std::list< Expression * > newArgs;
-    for ( Exprs::iterator i = args.begin(); i != args.end(); i++ ) {
-      MVRMutator next;
-      Expression *mutated = (*i)->acceptMutator( next );
+				if (newCode == 0)
+					newCode = new CompoundStmt( std::list< Label >() );
+				for ( Stmts::iterator i = block.begin(); i != block.end(); i++ )
+					newCode->get_kids().push_back( *i );
+			} // if
 
-      if ( next.hasCode() ) {
-	// merge new vars and bodies
-	typedef std::list< Statement * > Stmts;
-	Stmts &vars = next.getVars()->get_kids();
-	Stmts &block = next.getCode()->get_kids();
+			if ( next.hasResults() ) {
+				Exprs &res = next.get_results();
+				for ( Exprs::iterator i = res.begin(); i != res.end(); i++ )
+					newArgs.push_back( *i );
+			} else
+				newArgs.push_back( mutated );
+		}
 
-	if (newVars == 0)
-	  newVars = new CompoundStmt( std::list< Label >() );
-	for ( Stmts::iterator i = vars.begin(); i != vars.end(); i++ )  // std::splice? -- need to append lists
-	  newVars->get_kids().push_back( *i );
+		appExpr->get_args() = newArgs;  // new argument list
 
-	if (newCode == 0)
-	  newCode = new CompoundStmt( std::list< Label >() );
-	for ( Stmts::iterator i = block.begin(); i != block.end(); i++ )
-	  newCode->get_kids().push_back( *i );
+		if ( mulretp ) {
+			// add 'out' parameters
+			if ( ! argsToAdd.empty() )
+				for (std::list< Expression *>::iterator i = argsToAdd.begin(); i != argsToAdd.end(); i++)
+					(appExpr->get_args()).push_back( *i );
+			// clear 'out' parameters ( so that the list can be reused -- substitute by auto_ptr later? )
 
-      }
+			if (newCode == 0)
+				newCode = new CompoundStmt( std::list<Label>(0) );
+		} // if
 
-      if ( next.hasResults() ) {
-	Exprs &res = next.get_results();
-	for ( Exprs::iterator i = res.begin(); i != res.end(); i++ )
-	  newArgs.push_back( *i );
-      } else
-	newArgs.push_back( mutated );
-    }
+		// add to block of code
+		if ( newCode != 0 )
+			newCode->get_kids().push_back( new ExprStmt( std::list<Label>(), appExpr ) );
 
-    appExpr->get_args() = newArgs;  // new argument list
+		return appExpr;
+	}
 
+	// Auxiliary function to generate new names for the `output' parameters
+	DeclStmt *MVRMutator::newVar( DeclarationWithType *reqDecl ) {
+		// std::ostrstream os;
+		// os << "__" << curVal++ << "__";// << std::ends;
+		// os.freeze( false );
 
-    if ( mulretp ) {
-      // add 'out' parameters
-      if ( ! argsToAdd.empty() )
-	for (std::list< Expression *>::iterator i = argsToAdd.begin(); i != argsToAdd.end(); i++)
-	  (appExpr->get_args()).push_back( *i );
-      // clear 'out' parameters ( so that the list can be reused -- substitute by auto_ptr later? )
+		ObjectDecl *decl;
+		if ((decl = dynamic_cast<ObjectDecl *>( reqDecl )) != 0)
+			// return new DeclStmt( new ObjectDecl( std::string (os.str(), os.pcount()), );
+			return new DeclStmt( std::list<Label>(), decl );
+		else
+			return 0;
+	}
 
-      if (newCode == 0)
-	newCode = new CompoundStmt( std::list<Label>(0) );
-    }
+	void MVRMutator::add_pending( Declaration *decl ) {
+		ObjectDecl *obj;
+		if ( (obj = dynamic_cast< ObjectDecl * >( decl )) == 0 ) return;
 
-    // add to block of code
-    if ( newCode != 0 )
-      newCode->get_kids().push_back( new ExprStmt( std::list<Label>(), appExpr ) );
+		VariableExpr *var = new VariableExpr(obj, 0 );
+		results.push_back( var ); // probably change this name to newResults or something
+		argsToAdd.push_back( new AddressExpr( var ) );
+		return;
+	}
+}
 
-    return appExpr;
-  }
-
-  // Auxiliary function to generate new names for the `output' parameters
-  DeclStmt *MVRMutator::newVar( DeclarationWithType *reqDecl ) {
-    // std::ostrstream os;
-    // os << "__" << curVal++ << "__";// << std::ends;
-    // os.freeze( false );
-
-    ObjectDecl *decl;
-    if ((decl = dynamic_cast<ObjectDecl *>( reqDecl )) != 0)
-      // return new DeclStmt( new ObjectDecl( std::string (os.str(), os.pcount()), );
-      return new DeclStmt( std::list<Label>(), decl );
-    else
-      return 0;
-  }
-
-  void MVRMutator::add_pending( Declaration *decl ) {
-    ObjectDecl *obj;
-    if ( (obj = dynamic_cast< ObjectDecl * >( decl )) == 0 ) return;
-
-    VariableExpr *var = new VariableExpr(obj, 0 );
-    results.push_back( var ); // probably change this name to newResults or something
-    argsToAdd.push_back( new AddressExpr( var ) );
-    return;
-  }
-}
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/MultRet.h
===================================================================
--- translator/Tuples/MultRet.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/MultRet.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// MultRet.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 12:39:20 2015
+// Update Count     : 3
+//
+
 #ifndef _MULTRET_H_
 #define _MULTRET_H_
@@ -9,41 +24,36 @@
 
 namespace Tuples {
-  class MVRMutator : public Mutator
-  {
-    typedef Mutator Parent;
+	class MVRMutator : public Mutator {
+		typedef Mutator Parent;
+	  public:
+		MVRMutator();
+		~MVRMutator();
 
-  public:
-    MVRMutator();
-    ~MVRMutator();
+		virtual Statement  *mutate( ExprStmt        *exprStmt );
+		virtual Expression *mutate( ApplicationExpr *appExpr  );
 
-    virtual Statement  *mutate( ExprStmt        *exprStmt );
-    virtual Expression *mutate( ApplicationExpr *appExpr  );
+		bool hasCode() const { return ( newCode != 0 ); }
+		CompoundStmt *getCode() const { return newCode; }
+		CompoundStmt *getVars() const { return newVars; }
 
-    bool hasCode() const { return ( newCode != 0 ); }
-    CompoundStmt *getCode() const { return newCode; }
-    CompoundStmt *getVars() const { return newVars; }
+		bool hasResults() const { return (! results.empty()); }
+		std::list<Expression *> &get_results() { return results; }
+	  private:
+		CompoundStmt *newVars;
+		CompoundStmt *newCode;
+		std::list<Expression *> argsToAdd;
+		std::list<Expression *> results;
 
-    bool hasResults() const { return (! results.empty()); }
-    std::list<Expression *> &get_results() { return results; }
-
-  private:
-    CompoundStmt *newVars;
-    CompoundStmt *newCode;
-    std::list<Expression *> argsToAdd;
-    std::list<Expression *> results;
-
-    static int curVal;
-    DeclStmt *newVar( DeclarationWithType * );
-    void add_pending( Declaration * );
-  };
-
+		static int curVal;
+		DeclStmt *newVar( DeclarationWithType * );
+		void add_pending( Declaration * );
+	};
 } // namespace Tuples
 
+#endif // _MULTRET_H_
 
-#endif // #ifndef _MULTRET_H_
-
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/Mutate.cc
===================================================================
--- translator/Tuples/Mutate.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/Mutate.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Mutate.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 14:57:10 2015
+// Update Count     : 2
+//
+
 #include "SynTree/Mutator.h"
 
@@ -11,14 +26,16 @@
 
 namespace Tuples {
+	void mutate( std::list< Declaration * > translationUnit ) {
+		//FunctionFixer fst;
+		AssignExpander snd;
 
-  void mutate( std::list< Declaration * > translationUnit )
-  {
-    //FunctionFixer fst;
-    AssignExpander snd;
-
-    //mutateAll( translationUnit, fst );
-    mutateAll( translationUnit, snd );
-  }
+		//mutateAll( translationUnit, fst );
+		mutateAll( translationUnit, snd );
+	}
 } // namespace Tuples
 
-
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/Mutate.h
===================================================================
--- translator/Tuples/Mutate.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/Mutate.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef TUPLES_MUTATE_H
-#define TUPLES_MUTATE_H
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Mutate.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 14:58:05 2015
+// Update Count     : 2
+//
+
+#ifndef MUTATE_H
+#define MUTATE_H
 
 #include <list>
@@ -7,17 +22,14 @@
 #include "SynTree/Declaration.h"
 
-
 namespace Tuples {
-
-  void mutate( std::list< Declaration* > translationUnit );
-  void mulReturn( std::list< Declaration * > translationUnit );
-
+	void mutate( std::list< Declaration* > translationUnit );
+	void mulReturn( std::list< Declaration * > translationUnit );
 } // namespace Tuples
 
-#endif // #ifndef TUPLES_MUTATE_H
+#endif // MUTATE_H
 
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/NameMatcher.cc
===================================================================
--- translator/Tuples/NameMatcher.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/NameMatcher.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,47 +1,67 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// NameMatcher.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 15:00:06 2015
+// Update Count     : 1
+//
+
 #include "NameMatcher.h"
 #include "NameMatcher.h"
 
 namespace Tuples {
-  NameMatcher::NameMatcher( std::list< DeclarationWithType* > &formals )
-    : current( 0 ) {
-    int cnt = 0;
-    for ( std::list< DeclarationWithType *>::const_iterator f = formals.begin(); f != formals.end(); ++f ) {
-      table.insert( std::pair< std::string, int >( (*f)->get_name(), cnt++ ) );
-      index.push_back(*f);
-    }
-    exprs.reserve( index.size() );
-  }
+	NameMatcher::NameMatcher( std::list< DeclarationWithType* > &formals ) : current( 0 ) {
+		int cnt = 0;
+		for ( std::list< DeclarationWithType *>::const_iterator f = formals.begin(); f != formals.end(); ++f ) {
+			table.insert( std::pair< std::string, int >( (*f)->get_name(), cnt++ ) );
+			index.push_back(*f);
+		} // for
+		exprs.reserve( index.size() );
+	}
 
-  NameMatcher::~NameMatcher() {}
+	NameMatcher::~NameMatcher() {}
 
-  void NameMatcher::match( ResolvExpr::AltList &alternatives ) throw (NoMatch) {
-    if ( alternatives.size() != index.size() )
-      throw NoMatch("Length of actuals and formals differ");
+	void NameMatcher::match( ResolvExpr::AltList &alternatives ) throw (NoMatch) {
+		if ( alternatives.size() != index.size() )
+			throw NoMatch("Length of actuals and formals differ");
 
-    for ( ResolvExpr::AltList::const_iterator a = alternatives.begin(); a != alternatives.end(); ++a ) {
-      if ( a->expr->get_argName() != 0 )
-	if ( NameExpr *name = dynamic_cast<NameExpr *>( a->expr->get_argName() ) ) {
-	  if ( table.find( name->get_name() ) != table.end() ) {
-	    std::cerr << "Rearranging to " << table[ name->get_name() ] << "position in the list." << std::endl;
-	    exprs[ table[ name->get_name() ] ] = &(*a);
-	  } else
-	    throw NoMatch( name->get_name() + "no such  designation" );
-	} /*else if ( TupleExpr *tup = dynamic_cast<TupleExpr *>( a->expr->get_argName() ) )
-	    std::cerr << "Designated expression" << std::endl; */
-      exprs.push_back( &(*a) );
-    }
+		for ( ResolvExpr::AltList::const_iterator a = alternatives.begin(); a != alternatives.end(); ++a ) {
+			if ( a->expr->get_argName() != 0 )
+				if ( NameExpr *name = dynamic_cast<NameExpr *>( a->expr->get_argName() ) ) {
+					if ( table.find( name->get_name() ) != table.end() ) {
+						std::cerr << "Rearranging to " << table[ name->get_name() ] << "position in the list." << std::endl;
+						exprs[ table[ name->get_name() ] ] = &(*a);
+					} else
+						throw NoMatch( name->get_name() + "no such  designation" );
+				} /*else if ( TupleExpr *tup = dynamic_cast<TupleExpr *>( a->expr->get_argName() ) )
+					std::cerr << "Designated expression" << std::endl; */
+			exprs.push_back( &(*a) );
+		} // for
 
-    /*std::cerr << "In matcher/match: ";
-    if ( exprs.size() != index.size() )
-      std::cerr << "exprs and index differ in length" << std::endl;
-    else
-      std::cerr << "is all good." << std::endl;
-    */
-  }
+		/*std::cerr << "In matcher/match: ";
+		  if ( exprs.size() != index.size() )
+		  std::cerr << "exprs and index differ in length" << std::endl;
+		  else
+		  std::cerr << "is all good." << std::endl;
+		*/
+	}
 
-  ResolvExpr::Alternative &NameMatcher::get_next() throw (NoMoreElements) {
-    if ( current++ >= (int)(index.size()) )
-      throw NoMoreElements();
-    return *(new ResolvExpr::Alternative());
-  }
+	ResolvExpr::Alternative &NameMatcher::get_next() throw (NoMoreElements) {
+		if ( current++ >= (int)(index.size()) )
+			throw NoMoreElements();
+		return *(new ResolvExpr::Alternative());
+	}
 } // namespace Tuples
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/NameMatcher.h
===================================================================
--- translator/Tuples/NameMatcher.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/NameMatcher.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,4 +1,19 @@
-#ifndef _TUPLE_NAMEMATCH_H_
-#define _TUPLE_NAMEMATCH_H_
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// NameMatcher.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 15:01:37 2015
+// Update Count     : 3
+//
+
+#ifndef _NAMEMATCHER_H_
+#define _NAMEMATCHER_H_
 
 #include <map>
@@ -17,33 +32,31 @@
 
 namespace Tuples {
-  struct NoMoreElements {};
-  struct NoMatch {
-    NoMatch( std::string msg ) : message( msg ) {}
-    std::string message;
-  };
+	struct NoMoreElements {};
+	struct NoMatch {
+		NoMatch( std::string msg ) : message( msg ) {}
+		std::string message;
+	};
 
-  class NameMatcher
-  {
-  public:
-    NameMatcher( std::list< DeclarationWithType* >& );
-    ~NameMatcher();
+	class NameMatcher {
+	  public:
+		NameMatcher( std::list< DeclarationWithType* >& );
+		~NameMatcher();
 
-    void match( ResolvExpr::AltList &alternatives ) throw (NoMatch) ;
-    ResolvExpr::Alternative &get_next() throw (NoMoreElements);
+		void match( ResolvExpr::AltList &alternatives ) throw (NoMatch) ;
+		ResolvExpr::Alternative &get_next() throw (NoMoreElements);
 
-  private:
-    int current;
-    std::vector< DeclarationWithType* > index;
-    std::vector< const ResolvExpr::Alternative * > exprs;
-    std::map< std::string, int> table;
-  };
-
+	  private:
+		int current;
+		std::vector< DeclarationWithType* > index;
+		std::vector< const ResolvExpr::Alternative * > exprs;
+		std::map< std::string, int> table;
+	};
 } // namespace Tuples
 
-#endif // #ifndef _TUPLE_NAMEMATCH_H_
+#endif // _NAMEMATCHER_H_
 
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/TupleAssignment.cc
===================================================================
--- translator/Tuples/TupleAssignment.cc	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/TupleAssignment.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// TupleAssignment.cc -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 15:02:53 2015
+// Update Count     : 2
+//
+
 #include "ResolvExpr/AlternativeFinder.h"
 #include "ResolvExpr/Alternative.h"
@@ -14,387 +29,387 @@
 
 namespace Tuples {
-  TupleAssignSpotter::TupleAssignSpotter( ResolvExpr::AlternativeFinder *f = 0 )
-    : currentFinder(f), matcher(0), hasMatched( false ) {}
-
-  bool TupleAssignSpotter::pointsToTuple( Expression *expr ) {
-    // also check for function returning tuple of reference types
-    if (AddressExpr *addr = dynamic_cast<AddressExpr *>(expr) )
-      if ( isTuple(addr->get_arg() ) )
-	return true;
-    return false;
-  }
-
-  bool TupleAssignSpotter::isTupleVar( DeclarationWithType *decl ) {
-    if ( dynamic_cast<TupleType *>(decl->get_type()) )
-      return true;
-    return false;
-  }
-
-  bool TupleAssignSpotter::isTuple( Expression *expr, bool isRight ) {
-    // true if `expr' is an expression returning a tuple: tuple, tuple variable or MRV function
-    if ( ! expr ) return false;
-
-    if ( dynamic_cast<TupleExpr *>(expr) )
-      return true;
-    else if ( VariableExpr *var = dynamic_cast<VariableExpr *>(expr) ) {
-      if ( isTupleVar(var->get_var()) )
-	return true;
-    }
-
-    return false;
-  }
-
-  bool TupleAssignSpotter::match() {
-    assert ( matcher != 0 );
-
-    std::list< Expression * > new_assigns;
-    if (! matcher->match(new_assigns) )
-      return false;
-
-    if ( new_assigns.empty() ) return false;
-    /*return */matcher->solve( new_assigns );
-    if ( dynamic_cast<TupleAssignSpotter::MultipleAssignMatcher *>( matcher ) ) {
-      // now resolve new assignments
-      std::list< Expression * > solved_assigns;
-      ResolvExpr::AltList solved_alts;
-      assert( currentFinder != 0 );
-
-      ResolvExpr::AltList current;
-      for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i ) {
-	//try {
-	ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
-	finder.findWithAdjustment(*i);
-	// prune expressions that don't coincide with
-	ResolvExpr::AltList alts = finder.get_alternatives();
-	assert( alts.size() == 1 );
-	assert(alts.front().expr != 0 );
-	current.push_back( finder.get_alternatives().front() );
-	solved_assigns.push_back( alts.front().expr->clone() );
-	//solved_assigns.back()->print(std::cerr);
-	/*} catch( ... ) {
-	  continue; // no reasonable alternative found
-	  }*/
-      }
-      options.add_option( current );
-
-      return true;
-    } else { // mass assignment
-      //if ( new_assigns.empty() ) return false;
-      std::list< Expression * > solved_assigns;
-      ResolvExpr::AltList solved_alts;
-      assert( currentFinder != 0 );
-
-      ResolvExpr::AltList current;
-      if ( optMass.empty() ) {
-	for ( std::list< Expression * >::size_type i = 0; i != new_assigns.size(); ++i )
-	  optMass.push_back( ResolvExpr::AltList() );
-      }
-      int cnt = 0;
-      for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i, cnt++ ) {
-
-	ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
-	finder.findWithAdjustment(*i);
-	ResolvExpr::AltList alts = finder.get_alternatives();
-	assert( alts.size() == 1 );
-	assert(alts.front().expr != 0 );
-	current.push_back( finder.get_alternatives().front() );
-	optMass[cnt].push_back( finder.get_alternatives().front() );
-	solved_assigns.push_back( alts.front().expr->clone() );
-      }
-
-      return true;
-    }
-
-    return false;
-  }
-
-  bool TupleAssignSpotter::isMVR( Expression *expr ) {
-    if ( expr->get_results().size() > 1 ) {
-      // MVR processing
-      return true;
-    }
-    return false;
-  }
-
-  bool TupleAssignSpotter::isTupleAssignment( UntypedExpr * expr, std::list<ResolvExpr::AltList> &possibilities ) {
-    if (  NameExpr *assgnop = dynamic_cast< NameExpr * >(expr->get_function()) ) {
-
-      if ( assgnop->get_name() == std::string("?=?") ) {
-
-	for ( std::list<ResolvExpr::AltList>::iterator ali = possibilities.begin(); ali != possibilities.end(); ++ali ) {
-	  assert( ali->size() == 2 );
-	  ResolvExpr::AltList::iterator opit = ali->begin();
-	  ResolvExpr::Alternative op1 = *opit, op2 = *(++opit);
-
-	  if ( pointsToTuple(op1.expr) ) { // also handles tuple vars
-	    if ( isTuple( op2.expr, true ) )
-	      matcher = new MultipleAssignMatcher(op1.expr, op2.expr);
-	    else if ( isMVR( op2.expr ) ) {
-	      // handle MVR differently
-	    } else
-	      // mass assignment
-	      matcher = new MassAssignMatcher(op1.expr, op2.expr);
-
-	    std::list< ResolvExpr::AltList > options;
-	    if ( match() )
-	      /*
-	      if ( hasMatched ) {
-		// throw SemanticError("Ambiguous tuple assignment");
-	      } else {*/
-		// Matched for the first time
-		hasMatched = true;
-		/*} */
-	  } /* else if ( isTuple( op2 ) )
-	    throw SemanticError("Inapplicable tuple assignment.");
-	    */
-	}
-
-	if ( hasMatched ) {
-	  if ( dynamic_cast<TupleAssignSpotter::MultipleAssignMatcher *>( matcher ) ) {
-	    //options.print( std::cerr );
-	    std::list< ResolvExpr::AltList >best = options.get_best();
-	    if ( best.size() == 1 ) {
-	      std::list<Expression *> solved_assigns;
-	      for ( ResolvExpr::AltList::iterator i = best.front().begin(); i != best.front().end(); ++i ){
-		solved_assigns.push_back( i->expr );
-	      }
-	      /* assigning cost zero? */
-	      currentFinder->get_alternatives().push_front( ResolvExpr::Alternative(new SolvedTupleExpr(solved_assigns/*, SolvedTupleExpr::MULTIPLE*/), currentFinder->get_environ(), ResolvExpr::Cost() ) );
-	    }
-	  } else {
-	    assert(! optMass.empty() );
-	    ResolvExpr::AltList winners;
-	    for ( std::vector< ResolvExpr::AltList >::iterator i = optMass.begin(); i != optMass.end(); ++i )
-	      findMinCostAlt( i->begin(), i->end(), back_inserter(winners) );
-
-	    std::list< Expression *> solved_assigns;
-	    for ( ResolvExpr::AltList::iterator i = winners.begin(); i != winners.end(); ++i )
-	      solved_assigns.push_back( i->expr );
-	    currentFinder->get_alternatives().push_front( ResolvExpr::Alternative(new SolvedTupleExpr(solved_assigns/*, SolvedTupleExpr::MASS*/), currentFinder->get_environ(), ResolvExpr::Cost() ) );
-	  }
-	}
-      }
-    }
-    return hasMatched;
-  }
-
-  void TupleAssignSpotter::Matcher::init( Expression *_lhs, Expression *_rhs ) {
-    lhs.clear();
-    if (AddressExpr *addr = dynamic_cast<AddressExpr *>(_lhs) )
-      if ( TupleExpr *tuple = dynamic_cast<TupleExpr *>(addr->get_arg()) )
-	std::copy( tuple->get_exprs().begin(), tuple->get_exprs().end(), back_inserter(lhs) );
-
-    rhs.clear();
-  }
-
-  TupleAssignSpotter::Matcher::Matcher( /*TupleAssignSpotter &spot,*/ Expression *_lhs, Expression *_rhs ) /*: own_spotter(spot) */{
-    init(_lhs,_rhs);
-  }
-
-  TupleAssignSpotter::MultipleAssignMatcher::MultipleAssignMatcher( Expression *_lhs, Expression *_rhs )/* : own_spotter(spot) */{
-    init(_lhs,_rhs);
-
-    if ( TupleExpr *tuple = dynamic_cast<TupleExpr *>(_rhs) )
-      std::copy( tuple->get_exprs().begin(), tuple->get_exprs().end(), back_inserter(rhs) );
-  }
-
-  UntypedExpr *TupleAssignSpotter::Matcher::createAssgn( Expression *left, Expression *right ) {
-    if ( left && right ) {
-      std::list< Expression * > args;
-      args.push_back(new AddressExpr(left->clone()));  args.push_back(right->clone());
-      return new UntypedExpr(new NameExpr("?=?"), args);
-    } else
-      throw 0; // xxx - diagnose the problem
-  }
-
-  bool TupleAssignSpotter::MassAssignMatcher::match( std::list< Expression * > &out ) {
-    if ( lhs.empty() || (rhs.size() != 1) ) return false;
-
-    for ( std::list< Expression * >::iterator l = lhs.begin(); l != lhs.end(); l++ ) {
-      std::list< Expression * > args;
-      args.push_back( new AddressExpr(*l) );
-      args.push_back( rhs.front() );
-      out.push_back( new UntypedExpr(new NameExpr("?=?"), args) );
-    }
-
-    return true;
-  }
-
-  bool TupleAssignSpotter::MassAssignMatcher::solve( std::list< Expression * > &assigns ) {
-    /*
-    std::list< Expression * > solved_assigns;
-    ResolvExpr::AltList solved_alts;
-    assert( currentFinder != 0 );
-
-    ResolvExpr::AltList current;
-    if ( optMass.empty() ) {
-      for ( std::list< Expression * >::size_type i = 0; i != new_assigns.size(); ++i )
-	optMass.push_back( ResolvExpr::AltList() );
-    }
-    int cnt = 0;
-    for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i, cnt++ ) {
-
-      ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
-      finder.findWithAdjustment(*i);
-      ResolvExpr::AltList alts = finder.get_alternatives();
-      assert( alts.size() == 1 );
-      assert(alts.front().expr != 0 );
-      current.push_back( finder.get_alternatives().front() );
-      optMass[cnt].push_back( finder.get_alternatives().front() );
-      solved_assigns.push_back( alts.front().expr->clone() );
-    }
-    */
-    return true;
-  }
-
-  bool TupleAssignSpotter::MultipleAssignMatcher::match( std::list< Expression * > &out ) {
-    // need more complicated matching
-    if ( lhs.size() == rhs.size() ) {
-      zipWith( lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), back_inserter(out), TupleAssignSpotter::Matcher::createAssgn );
-      return true;
-    } //else
-    //std::cerr << "The length of (left, right) is: (" << lhs.size() << "," << rhs.size() << ")" << std::endl;*/
-    return false;
-  }
-
-  bool TupleAssignSpotter::MultipleAssignMatcher::solve( std::list< Expression * > &assigns ) {
-    /*
-    std::list< Expression * > solved_assigns;
-    ResolvExpr::AltList solved_alts;
-    assert( currentFinder != 0 );
-
-    ResolvExpr::AltList current;
-    for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i ) {
-      //try {
-      ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
-      finder.findWithAdjustment(*i);
-      // prune expressions that don't coincide with
-      ResolvExpr::AltList alts = finder.get_alternatives();
-      assert( alts.size() == 1 );
-      assert(alts.front().expr != 0 );
-      current.push_back( finder.get_alternatives().front() );
-      solved_assigns.push_back( alts.front().expr->clone() );
-      //solved_assigns.back()->print(std::cerr);
-      //} catch( ... ) {
-      //continue; // no reasonable alternative found
-      //}
-    }
-    options.add_option( current );
-    */
-
-    return true;
-  }
-
-  void TupleAssignSpotter::Options::add_option( ResolvExpr::AltList &opt ) {
-    using namespace std;
-
-    options.push_back( opt );
-    /*
-      vector< Cost > costs;
-      costs.reserve( opt.size() );
-      transform( opt.begin(), opt.end(), back_inserter(costs), ptr_fun(extract_cost) );
-    */
-    // transpose matrix
-    if ( costMatrix.empty() )
-      for ( unsigned int i = 0; i< opt.size(); ++i)
-	costMatrix.push_back( vector<ResolvExpr::Cost>() );
-
-    int cnt = 0;
-    for ( ResolvExpr::AltList::iterator i = opt.begin(); i != opt.end(); ++i, cnt++ )
-      costMatrix[cnt].push_back( i->cost );
-
-    return;
-  }
-
-  std::list< ResolvExpr::AltList > TupleAssignSpotter::Options::get_best() {
-    using namespace std;
-    using namespace ResolvExpr;
-    list< ResolvExpr::AltList > ret;
-    list< multiset<int> > solns;
-    for ( vector< vector<Cost> >::iterator i = costMatrix.begin(); i != costMatrix.end(); ++i ) {
-      list<int> current;
-      findMinCost( i->begin(), i->end(), back_inserter(current) );
-      solns.push_back( multiset<int>(current.begin(), current.end()) );
-    }
-    // need to combine
-    multiset<int> result;
-    lift_intersection( solns.begin(), solns.end(), inserter( result, result.begin() ) );
-    if ( result.size() != 1 )
-      throw SemanticError("Ambiguous tuple expression");
-    ret.push_back(get_option( *(result.begin() )));
-    return ret;
-  }
-
-  void TupleAssignSpotter::Options::print( std::ostream &ostr ) {
-    using namespace std;
-
-    for ( vector< vector < ResolvExpr::Cost > >::iterator i = costMatrix.begin(); i != costMatrix.end(); ++i ) {
-      for ( vector < ResolvExpr::Cost >::iterator j = i->begin(); j != i->end(); ++j )
-	ostr << *j << " " ;
-      ostr << std::endl;
-    }
-    
-    return;
-  }
-
-  ResolvExpr::Cost extract_cost( ResolvExpr::Alternative &alt ) {
-    return alt.cost;
-  }
-
-  template< typename InputIterator, typename OutputIterator >
-  void
-  TupleAssignSpotter::Options::findMinCost( InputIterator begin, InputIterator end, OutputIterator out )
-  {
-    using namespace ResolvExpr;
-    std::list<int> alternatives;
-
-    // select the alternatives that have the minimum parameter cost
-    Cost minCost = Cost::infinity;
-    unsigned int index = 0;
-    for ( InputIterator i = begin; i != end; ++i, index++ ) {
-      if ( *i < minCost ) {
-        minCost = *i;
-        alternatives.clear();
-        alternatives.push_back( index );
-      } else if ( *i == minCost ) {
-        alternatives.push_back( index );
-      }
-    }
-    std::copy( alternatives.begin(), alternatives.end(), out );
-  }
-
-  template< class InputIterator, class OutputIterator >
-  void TupleAssignSpotter::Options::lift_intersection( InputIterator begin, InputIterator end, OutputIterator out ){
-    if ( begin == end ) return;
-    InputIterator test = begin;
-
-    if (++test == end)
-      { copy(begin->begin(), begin->end(), out); return; }
-
-
-    std::multiset<int> cur; // InputIterator::value_type::value_type
-    copy( begin->begin(), begin->end(), inserter( cur, cur.begin() ) );
-
-    while ( test != end ) {
-      std::multiset<int> temp;
-      set_intersection( cur.begin(), cur.end(), test->begin(), test->end(), inserter(temp,temp.begin()) );
-      cur.clear();
-      copy( temp.begin(), temp.end(), inserter(cur,cur.begin()));
-      ++test;
-    }
-
-    copy( cur.begin(), cur.end(), out );
-    return;
-  }
-
-
-  ResolvExpr::AltList TupleAssignSpotter::Options::get_option( std::list< ResolvExpr::AltList >::size_type index ) {
-    if ( index >= options.size() )
-      throw 0; // XXX
-    std::list< ResolvExpr::AltList >::iterator it = options.begin();
-    for ( std::list< ResolvExpr::AltList >::size_type i = 0; i < index; ++i, ++it );
-    return *it;
-  }
-
-
+	TupleAssignSpotter::TupleAssignSpotter( ResolvExpr::AlternativeFinder *f = 0 )
+		: currentFinder(f), matcher(0), hasMatched( false ) {}
+
+	bool TupleAssignSpotter::pointsToTuple( Expression *expr ) {
+		// also check for function returning tuple of reference types
+		if (AddressExpr *addr = dynamic_cast<AddressExpr *>(expr) )
+			if ( isTuple(addr->get_arg() ) )
+				return true;
+		return false;
+	}
+
+	bool TupleAssignSpotter::isTupleVar( DeclarationWithType *decl ) {
+		if ( dynamic_cast<TupleType *>(decl->get_type()) )
+			return true;
+		return false;
+	}
+
+	bool TupleAssignSpotter::isTuple( Expression *expr, bool isRight ) {
+		// true if `expr' is an expression returning a tuple: tuple, tuple variable or MRV function
+		if ( ! expr ) return false;
+
+		if ( dynamic_cast<TupleExpr *>(expr) )
+			return true;
+		else if ( VariableExpr *var = dynamic_cast<VariableExpr *>(expr) ) {
+			if ( isTupleVar(var->get_var()) )
+				return true;
+		}
+
+		return false;
+	}
+
+	bool TupleAssignSpotter::match() {
+		assert ( matcher != 0 );
+
+		std::list< Expression * > new_assigns;
+		if (! matcher->match(new_assigns) )
+			return false;
+
+		if ( new_assigns.empty() ) return false;
+		/*return */matcher->solve( new_assigns );
+		if ( dynamic_cast<TupleAssignSpotter::MultipleAssignMatcher *>( matcher ) ) {
+			// now resolve new assignments
+			std::list< Expression * > solved_assigns;
+			ResolvExpr::AltList solved_alts;
+			assert( currentFinder != 0 );
+
+			ResolvExpr::AltList current;
+			for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i ) {
+				//try {
+				ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
+				finder.findWithAdjustment(*i);
+				// prune expressions that don't coincide with
+				ResolvExpr::AltList alts = finder.get_alternatives();
+				assert( alts.size() == 1 );
+				assert(alts.front().expr != 0 );
+				current.push_back( finder.get_alternatives().front() );
+				solved_assigns.push_back( alts.front().expr->clone() );
+				//solved_assigns.back()->print(std::cerr);
+				/*} catch( ... ) {
+				  continue; // no reasonable alternative found
+				  }*/
+			}
+			options.add_option( current );
+
+			return true;
+		} else { // mass assignment
+			//if ( new_assigns.empty() ) return false;
+			std::list< Expression * > solved_assigns;
+			ResolvExpr::AltList solved_alts;
+			assert( currentFinder != 0 );
+
+			ResolvExpr::AltList current;
+			if ( optMass.empty() ) {
+				for ( std::list< Expression * >::size_type i = 0; i != new_assigns.size(); ++i )
+					optMass.push_back( ResolvExpr::AltList() );
+			}
+			int cnt = 0;
+			for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i, cnt++ ) {
+
+				ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
+				finder.findWithAdjustment(*i);
+				ResolvExpr::AltList alts = finder.get_alternatives();
+				assert( alts.size() == 1 );
+				assert(alts.front().expr != 0 );
+				current.push_back( finder.get_alternatives().front() );
+				optMass[cnt].push_back( finder.get_alternatives().front() );
+				solved_assigns.push_back( alts.front().expr->clone() );
+			}
+
+			return true;
+		}
+
+		return false;
+	}
+
+	bool TupleAssignSpotter::isMVR( Expression *expr ) {
+		if ( expr->get_results().size() > 1 ) {
+			// MVR processing
+			return true;
+		}
+		return false;
+	}
+
+	bool TupleAssignSpotter::isTupleAssignment( UntypedExpr * expr, std::list<ResolvExpr::AltList> &possibilities ) {
+		if (  NameExpr *assgnop = dynamic_cast< NameExpr * >(expr->get_function()) ) {
+
+			if ( assgnop->get_name() == std::string("?=?") ) {
+
+				for ( std::list<ResolvExpr::AltList>::iterator ali = possibilities.begin(); ali != possibilities.end(); ++ali ) {
+					assert( ali->size() == 2 );
+					ResolvExpr::AltList::iterator opit = ali->begin();
+					ResolvExpr::Alternative op1 = *opit, op2 = *(++opit);
+
+					if ( pointsToTuple(op1.expr) ) { // also handles tuple vars
+						if ( isTuple( op2.expr, true ) )
+							matcher = new MultipleAssignMatcher(op1.expr, op2.expr);
+						else if ( isMVR( op2.expr ) ) {
+							// handle MVR differently
+						} else
+							// mass assignment
+							matcher = new MassAssignMatcher(op1.expr, op2.expr);
+
+						std::list< ResolvExpr::AltList > options;
+						if ( match() )
+							/*
+							  if ( hasMatched ) {
+							  // throw SemanticError("Ambiguous tuple assignment");
+							  } else {*/
+							// Matched for the first time
+							hasMatched = true;
+						/*} */
+					} /* else if ( isTuple( op2 ) )
+						 throw SemanticError("Inapplicable tuple assignment.");
+					  */
+				}
+
+				if ( hasMatched ) {
+					if ( dynamic_cast<TupleAssignSpotter::MultipleAssignMatcher *>( matcher ) ) {
+						//options.print( std::cerr );
+						std::list< ResolvExpr::AltList >best = options.get_best();
+						if ( best.size() == 1 ) {
+							std::list<Expression *> solved_assigns;
+							for ( ResolvExpr::AltList::iterator i = best.front().begin(); i != best.front().end(); ++i ){
+								solved_assigns.push_back( i->expr );
+							}
+							/* assigning cost zero? */
+							currentFinder->get_alternatives().push_front( ResolvExpr::Alternative(new SolvedTupleExpr(solved_assigns/*, SolvedTupleExpr::MULTIPLE*/), currentFinder->get_environ(), ResolvExpr::Cost() ) );
+						}
+					} else {
+						assert(! optMass.empty() );
+						ResolvExpr::AltList winners;
+						for ( std::vector< ResolvExpr::AltList >::iterator i = optMass.begin(); i != optMass.end(); ++i )
+							findMinCostAlt( i->begin(), i->end(), back_inserter(winners) );
+
+						std::list< Expression *> solved_assigns;
+						for ( ResolvExpr::AltList::iterator i = winners.begin(); i != winners.end(); ++i )
+							solved_assigns.push_back( i->expr );
+						currentFinder->get_alternatives().push_front( ResolvExpr::Alternative(new SolvedTupleExpr(solved_assigns/*, SolvedTupleExpr::MASS*/), currentFinder->get_environ(), ResolvExpr::Cost() ) );
+					}
+				}
+			}
+		}
+		return hasMatched;
+	}
+
+	void TupleAssignSpotter::Matcher::init( Expression *_lhs, Expression *_rhs ) {
+		lhs.clear();
+		if (AddressExpr *addr = dynamic_cast<AddressExpr *>(_lhs) )
+			if ( TupleExpr *tuple = dynamic_cast<TupleExpr *>(addr->get_arg()) )
+				std::copy( tuple->get_exprs().begin(), tuple->get_exprs().end(), back_inserter(lhs) );
+
+		rhs.clear();
+	}
+
+	TupleAssignSpotter::Matcher::Matcher( /*TupleAssignSpotter &spot,*/ Expression *_lhs, Expression *_rhs ) /*: own_spotter(spot) */{
+		init(_lhs,_rhs);
+	}
+
+	TupleAssignSpotter::MultipleAssignMatcher::MultipleAssignMatcher( Expression *_lhs, Expression *_rhs )/* : own_spotter(spot) */{
+		init(_lhs,_rhs);
+
+		if ( TupleExpr *tuple = dynamic_cast<TupleExpr *>(_rhs) )
+			std::copy( tuple->get_exprs().begin(), tuple->get_exprs().end(), back_inserter(rhs) );
+	}
+
+	UntypedExpr *TupleAssignSpotter::Matcher::createAssgn( Expression *left, Expression *right ) {
+		if ( left && right ) {
+			std::list< Expression * > args;
+			args.push_back(new AddressExpr(left->clone()));  args.push_back(right->clone());
+			return new UntypedExpr(new NameExpr("?=?"), args);
+		} else
+			throw 0; // xxx - diagnose the problem
+	}
+
+	bool TupleAssignSpotter::MassAssignMatcher::match( std::list< Expression * > &out ) {
+		if ( lhs.empty() || (rhs.size() != 1) ) return false;
+
+		for ( std::list< Expression * >::iterator l = lhs.begin(); l != lhs.end(); l++ ) {
+			std::list< Expression * > args;
+			args.push_back( new AddressExpr(*l) );
+			args.push_back( rhs.front() );
+			out.push_back( new UntypedExpr(new NameExpr("?=?"), args) );
+		}
+
+		return true;
+	}
+
+	bool TupleAssignSpotter::MassAssignMatcher::solve( std::list< Expression * > &assigns ) {
+		/*
+		  std::list< Expression * > solved_assigns;
+		  ResolvExpr::AltList solved_alts;
+		  assert( currentFinder != 0 );
+
+		  ResolvExpr::AltList current;
+		  if ( optMass.empty() ) {
+		  for ( std::list< Expression * >::size_type i = 0; i != new_assigns.size(); ++i )
+		  optMass.push_back( ResolvExpr::AltList() );
+		  }
+		  int cnt = 0;
+		  for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i, cnt++ ) {
+
+		  ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
+		  finder.findWithAdjustment(*i);
+		  ResolvExpr::AltList alts = finder.get_alternatives();
+		  assert( alts.size() == 1 );
+		  assert(alts.front().expr != 0 );
+		  current.push_back( finder.get_alternatives().front() );
+		  optMass[cnt].push_back( finder.get_alternatives().front() );
+		  solved_assigns.push_back( alts.front().expr->clone() );
+		  }
+		*/
+		return true;
+	}
+
+	bool TupleAssignSpotter::MultipleAssignMatcher::match( std::list< Expression * > &out ) {
+		// need more complicated matching
+		if ( lhs.size() == rhs.size() ) {
+			zipWith( lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), back_inserter(out), TupleAssignSpotter::Matcher::createAssgn );
+			return true;
+		} //else
+		//std::cerr << "The length of (left, right) is: (" << lhs.size() << "," << rhs.size() << ")" << std::endl;*/
+		return false;
+	}
+
+	bool TupleAssignSpotter::MultipleAssignMatcher::solve( std::list< Expression * > &assigns ) {
+		/*
+		  std::list< Expression * > solved_assigns;
+		  ResolvExpr::AltList solved_alts;
+		  assert( currentFinder != 0 );
+
+		  ResolvExpr::AltList current;
+		  for ( std::list< Expression * >::iterator i = new_assigns.begin(); i != new_assigns.end(); ++i ) {
+		  //try {
+		  ResolvExpr::AlternativeFinder finder( currentFinder->get_indexer(), currentFinder->get_environ() );
+		  finder.findWithAdjustment(*i);
+		  // prune expressions that don't coincide with
+		  ResolvExpr::AltList alts = finder.get_alternatives();
+		  assert( alts.size() == 1 );
+		  assert(alts.front().expr != 0 );
+		  current.push_back( finder.get_alternatives().front() );
+		  solved_assigns.push_back( alts.front().expr->clone() );
+		  //solved_assigns.back()->print(std::cerr);
+		  //} catch( ... ) {
+		  //continue; // no reasonable alternative found
+		  //}
+		  }
+		  options.add_option( current );
+		*/
+
+		return true;
+	}
+
+	void TupleAssignSpotter::Options::add_option( ResolvExpr::AltList &opt ) {
+		using namespace std;
+
+		options.push_back( opt );
+		/*
+		  vector< Cost > costs;
+		  costs.reserve( opt.size() );
+		  transform( opt.begin(), opt.end(), back_inserter(costs), ptr_fun(extract_cost) );
+		*/
+		// transpose matrix
+		if ( costMatrix.empty() )
+			for ( unsigned int i = 0; i< opt.size(); ++i)
+				costMatrix.push_back( vector<ResolvExpr::Cost>() );
+
+		int cnt = 0;
+		for ( ResolvExpr::AltList::iterator i = opt.begin(); i != opt.end(); ++i, cnt++ )
+			costMatrix[cnt].push_back( i->cost );
+
+		return;
+	}
+
+	std::list< ResolvExpr::AltList > TupleAssignSpotter::Options::get_best() {
+		using namespace std;
+		using namespace ResolvExpr;
+		list< ResolvExpr::AltList > ret;
+		list< multiset<int> > solns;
+		for ( vector< vector<Cost> >::iterator i = costMatrix.begin(); i != costMatrix.end(); ++i ) {
+			list<int> current;
+			findMinCost( i->begin(), i->end(), back_inserter(current) );
+			solns.push_back( multiset<int>(current.begin(), current.end()) );
+		}
+		// need to combine
+		multiset<int> result;
+		lift_intersection( solns.begin(), solns.end(), inserter( result, result.begin() ) );
+		if ( result.size() != 1 )
+			throw SemanticError("Ambiguous tuple expression");
+		ret.push_back(get_option( *(result.begin() )));
+		return ret;
+	}
+
+	void TupleAssignSpotter::Options::print( std::ostream &ostr ) {
+		using namespace std;
+
+		for ( vector< vector < ResolvExpr::Cost > >::iterator i = costMatrix.begin(); i != costMatrix.end(); ++i ) {
+			for ( vector < ResolvExpr::Cost >::iterator j = i->begin(); j != i->end(); ++j )
+				ostr << *j << " " ;
+			ostr << std::endl;
+		} // for
+		return;
+	}
+
+	ResolvExpr::Cost extract_cost( ResolvExpr::Alternative &alt ) {
+		return alt.cost;
+	}
+
+	template< typename InputIterator, typename OutputIterator >
+	void TupleAssignSpotter::Options::findMinCost( InputIterator begin, InputIterator end, OutputIterator out ) {
+		using namespace ResolvExpr;
+		std::list<int> alternatives;
+
+		// select the alternatives that have the minimum parameter cost
+		Cost minCost = Cost::infinity;
+		unsigned int index = 0;
+		for ( InputIterator i = begin; i != end; ++i, index++ ) {
+			if ( *i < minCost ) {
+				minCost = *i;
+				alternatives.clear();
+				alternatives.push_back( index );
+			} else if ( *i == minCost ) {
+				alternatives.push_back( index );
+			}
+		}
+		std::copy( alternatives.begin(), alternatives.end(), out );
+	}
+
+	template< class InputIterator, class OutputIterator >
+	void TupleAssignSpotter::Options::lift_intersection( InputIterator begin, InputIterator end, OutputIterator out ){
+		if ( begin == end ) return;
+		InputIterator test = begin;
+
+		if (++test == end)
+			{ copy(begin->begin(), begin->end(), out); return; }
+
+
+		std::multiset<int> cur; // InputIterator::value_type::value_type
+		copy( begin->begin(), begin->end(), inserter( cur, cur.begin() ) );
+
+		while ( test != end ) {
+			std::multiset<int> temp;
+			set_intersection( cur.begin(), cur.end(), test->begin(), test->end(), inserter(temp,temp.begin()) );
+			cur.clear();
+			copy( temp.begin(), temp.end(), inserter(cur,cur.begin()));
+			++test;
+		}
+
+		copy( cur.begin(), cur.end(), out );
+		return;
+	}
+
+	ResolvExpr::AltList TupleAssignSpotter::Options::get_option( std::list< ResolvExpr::AltList >::size_type index ) {
+		if ( index >= options.size() )
+			throw 0; // XXX
+		std::list< ResolvExpr::AltList >::iterator it = options.begin();
+		for ( std::list< ResolvExpr::AltList >::size_type i = 0; i < index; ++i, ++it );
+		return *it;
+	}
 } // namespace Tuples
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: translator/Tuples/TupleAssignment.h
===================================================================
--- translator/Tuples/TupleAssignment.h	(revision 0dd3a2faa6372da8704ff969a8bb37b5d340f350)
+++ translator/Tuples/TupleAssignment.h	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
@@ -1,2 +1,17 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// TupleAssignment.h -- 
+//
+// Author           : Richard C. Bilson
+// Created On       : Mon May 18 07:44:20 2015
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Mon May 18 15:04:02 2015
+// Update Count     : 2
+//
+
 #ifndef _TUPLE_ASSIGNMENT_H_
 #define _TUPLE_ASSIGNMENT_H_
@@ -11,117 +26,111 @@
 
 namespace Tuples {
-  class TupleAssignSpotter {
-  public:
-    // dispatcher for Tuple (multiple and mass) assignment operations
-    TupleAssignSpotter( ResolvExpr::AlternativeFinder * );
-    ~TupleAssignSpotter() { delete matcher; matcher = 0; }
+	class TupleAssignSpotter {
+	  public:
+		// dispatcher for Tuple (multiple and mass) assignment operations
+		TupleAssignSpotter( ResolvExpr::AlternativeFinder * );
+		~TupleAssignSpotter() { delete matcher; matcher = 0; }
 
-    bool pointsToTuple( Expression * );
-    static bool isTupleVar( DeclarationWithType * );
-    bool isTuple( Expression *, bool isRight = false );
-    bool isMVR( Expression * );
-    bool isTupleAssignment( UntypedExpr *, std::list<ResolvExpr::AltList> & );
-    bool match();
+		bool pointsToTuple( Expression * );
+		static bool isTupleVar( DeclarationWithType * );
+		bool isTuple( Expression *, bool isRight = false );
+		bool isMVR( Expression * );
+		bool isTupleAssignment( UntypedExpr *, std::list<ResolvExpr::AltList> & );
+		bool match();
+	  private:
+		// records for assignment generation
+		class Options {
+		  public:
+			void add_option( ResolvExpr::AltList &opt );
+			std::list< ResolvExpr::AltList > get_best();
+			void print( std::ostream & );
+			int size() const { return options.size(); }
+			ResolvExpr::AltList get_option( std::list< ResolvExpr::AltList >::size_type index );
 
-  private:
-    // records for assignment generation
-    class Options {
-    public:
-      void add_option( ResolvExpr::AltList &opt );
-      std::list< ResolvExpr::AltList > get_best();
-      void print( std::ostream & );
-      int size() const { return options.size(); }
-      ResolvExpr::AltList get_option( std::list< ResolvExpr::AltList >::size_type index );
+			// should really use the one in ResolvExpr/AlternativeFinder, but it's too coupled with the object
+			template< typename InputIterator, typename OutputIterator >
+			void findMinCost( InputIterator begin, InputIterator end, OutputIterator out );
 
-      // should really use the one in ResolvExpr/AlternativeFinder, but it's too coupled with the object
-      template< typename InputIterator, typename OutputIterator >
-      void findMinCost( InputIterator begin, InputIterator end, OutputIterator out );
+			template< typename InputIterator, typename OutputIterator >
+			void lift_intersection( InputIterator begin, InputIterator end, OutputIterator out );
+		  private:
+			std::list< ResolvExpr::AltList > options;
+			std::vector< std::vector< ResolvExpr::Cost > > costMatrix;
+		};
 
-      template< typename InputIterator, typename OutputIterator >
-      void lift_intersection( InputIterator begin, InputIterator end, OutputIterator out );
-    private:
-      std::list< ResolvExpr::AltList > options;
-      std::vector< std::vector< ResolvExpr::Cost > > costMatrix;
-    };
+		class Matcher {
+		  public:
+			Matcher( /*TupleAssignSpotter &spot, */Expression *_lhs, Expression *_rhs );
+			virtual ~Matcher() {}
+			virtual bool match( std::list< Expression * > &out ) = 0;
+			virtual bool solve( std::list< Expression * > &assigns ) = 0;
+			static UntypedExpr *createAssgn( Expression *left, Expression *right );
+		  protected:
+			Matcher() /*: own_spotter( TupleAssignSpotter(0) ) */{}
+			void init(/* TupleAssignSpotter &, */Expression *_lhs, Expression *_rhs );
+			std::list< Expression * > lhs, rhs;
+			//TupleAssignSpotter &own_spotter;
+		};
 
-    class Matcher {
-    public:
-      Matcher( /*TupleAssignSpotter &spot, */Expression *_lhs, Expression *_rhs );
-      virtual ~Matcher() {}
-      virtual bool match( std::list< Expression * > &out ) = 0;
-      virtual bool solve( std::list< Expression * > &assigns ) = 0;
-      static UntypedExpr *createAssgn( Expression *left, Expression *right );
-    protected:
-      Matcher() /*: own_spotter( TupleAssignSpotter(0) ) */{}
-      void init(/* TupleAssignSpotter &, */Expression *_lhs, Expression *_rhs );
-      std::list< Expression * > lhs, rhs;
-      //TupleAssignSpotter &own_spotter;
-    };
+		class MassAssignMatcher : public Matcher {
+		  public:
+			MassAssignMatcher( Expression *_lhs, Expression *_rhs ) : Matcher( _lhs, _rhs ) {
+				rhs.push_back( _rhs );
+			}
+			virtual bool match( std::list< Expression * > &out );
+			virtual bool solve( std::list< Expression * > &assigns );
+		  private:
+			//std::vector< ResolvExpr::AltList > optMass;
+		};
 
-    class MassAssignMatcher : public Matcher {
-    public:
-      MassAssignMatcher( Expression *_lhs, Expression *_rhs ) : Matcher( _lhs, _rhs ) {
-	rhs.push_back( _rhs );
-      }
-      virtual bool match( std::list< Expression * > &out );
-      virtual bool solve( std::list< Expression * > &assigns );
-    private:
-      //std::vector< ResolvExpr::AltList > optMass;
-    };
+		class MultipleAssignMatcher : public Matcher {
+		  public:
+			MultipleAssignMatcher( Expression *_lhs, Expression *_rhs );
+			virtual bool match( std::list< Expression * > &out );
+			virtual bool solve( std::list< Expression * > &assigns );
+		  private:
+			//Options options;
+		};
 
-    class MultipleAssignMatcher : public Matcher {
-    public:
-      MultipleAssignMatcher( Expression *_lhs, Expression *_rhs );
-      virtual bool match( std::list< Expression * > &out );
-      virtual bool solve( std::list< Expression * > &assigns );
-    private:
-      //Options options;
-    };
+		friend class Matcher;
 
-    friend class Matcher;
+		ResolvExpr::AlternativeFinder *currentFinder;
+		//std::list<Expression *> rhs, lhs;
+		Expression *rhs, *lhs;
+		Matcher *matcher;
+		bool hasMatched;
+		Options options;
+		std::vector< ResolvExpr::AltList > optMass;
+	};
 
-    ResolvExpr::AlternativeFinder *currentFinder;
-    //std::list<Expression *> rhs, lhs;
-    Expression *rhs, *lhs;
-    Matcher *matcher;
-    bool hasMatched;
-    Options options;
-    std::vector< ResolvExpr::AltList > optMass;
-  };
+	ResolvExpr::Cost extract_cost( ResolvExpr::Alternative & );
 
+	template< typename InputIterator, typename OutputIterator >
+	void findMinCostAlt( InputIterator begin, InputIterator end, OutputIterator out ) {
+		using namespace ResolvExpr;
+		AltList alternatives;
 
-  ResolvExpr::Cost extract_cost( ResolvExpr::Alternative & );
-
-  template< typename InputIterator, typename OutputIterator >
-  void
-  findMinCostAlt( InputIterator begin, InputIterator end, OutputIterator out )
-  {
-    using namespace ResolvExpr;
-    AltList alternatives;
-
-    // select the alternatives that have the minimum parameter cost
-    Cost minCost = Cost::infinity;
-    for ( AltList::iterator i = begin; i != end; ++i ) {
-      if ( i->cost < minCost ) {
-        minCost = i->cost;
-        i->cost = i->cvtCost;
-        alternatives.clear();
-        alternatives.push_back( *i );
-      } else if ( i->cost == minCost ) {
-        i->cost = i->cvtCost;
-        alternatives.push_back( *i );
-      }
-    }
-    std::copy( alternatives.begin(), alternatives.end(), out );
-  }
-
+		// select the alternatives that have the minimum parameter cost
+		Cost minCost = Cost::infinity;
+		for ( AltList::iterator i = begin; i != end; ++i ) {
+			if ( i->cost < minCost ) {
+				minCost = i->cost;
+				i->cost = i->cvtCost;
+				alternatives.clear();
+				alternatives.push_back( *i );
+			} else if ( i->cost == minCost ) {
+				i->cost = i->cvtCost;
+				alternatives.push_back( *i );
+			}
+		}
+		std::copy( alternatives.begin(), alternatives.end(), out );
+	}
 } // namespace Tuples
 
+#endif // _TUPLE_ASSIGNMENT_H_
 
-#endif // #ifndef _TUPLE_ASSIGNMENT_H_
-
-/*
-  Local Variables:
-  mode: c++
-  End:
-*/
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
