Index: src/GenPoly/DeclMutator.cc
===================================================================
--- src/GenPoly/DeclMutator.cc	(revision ac74057f200ca1db8599a011c8f8b2679a75beb0)
+++ 	(revision )
@@ -1,195 +1,0 @@
-//
-// 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.
-//
-// DeclMutator.cc --
-//
-// Author           : Aaron B. Moss
-// Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Thu Jun 22 13:49:00 2017
-// Update Count     : 4
-//
-
-#include "DeclMutator.h"
-
-#include <memory>                  // for allocator_traits<>::value_type
-
-#include "Common/SemanticError.h"  // for SemanticError
-#include "SynTree/Declaration.h"   // for Declaration
-#include "SynTree/Expression.h"    // for Expression
-#include "SynTree/Label.h"         // for Label, noLabels
-#include "SynTree/Statement.h"     // for CatchStmt, Statement, CompoundStmt
-
-namespace GenPoly {
-	DeclMutator::DeclMutator() : Mutator(), declsToAdd(1), declsToAddAfter(1) {}
-
-	DeclMutator::~DeclMutator() {}
-
-	void DeclMutator::mutateDeclarationList( std::list< Declaration* > &decls ) {
-		for ( std::list< Declaration* >::iterator decl = decls.begin(); ; ++decl ) {
-			// splice in new declarations after previous decl
-			decls.splice( decl, declsToAddAfter.back() );
-
-			if ( decl == decls.end() ) break;
-
-			// run mutator on declaration
-			*decl = maybeMutate( *decl, *this );
-
-			// splice in new declarations before current decl
-			decls.splice( decl, declsToAdd.back() );
-		}
-	}
-
-	void DeclMutator::doBeginScope() {
-		// add new decl lists for inside of scope
-		declsToAdd.resize( declsToAdd.size()+1 );
-		declsToAddAfter.resize( declsToAddAfter.size()+1 );
-	}
-
-	void DeclMutator::doEndScope() {
-		// splice any leftover declarations from this scope onto the containing scope
-		std::vector< std::list< Declaration* > >::reverse_iterator back = declsToAdd.rbegin();
-		std::vector< std::list< Declaration* > >::reverse_iterator newBack = back + 1;
-		newBack->splice( newBack->end(), *back );
-		declsToAdd.pop_back();
-
-		back = declsToAddAfter.rbegin();
-		newBack = back + 1;
-		newBack->splice( newBack->end(), *back );
-		declsToAddAfter.pop_back();
-	}
-
-	Statement* DeclMutator::mutateStatement( Statement *stmt ) {
-		// shunt over to compound statement handling if applicable
-		CompoundStmt *compoundStmt = dynamic_cast< CompoundStmt* >(stmt);
-		if ( compoundStmt ) return mutate( compoundStmt );
-
-		doBeginScope();
-
-		// run mutator on statement
-		stmt = maybeMutate( stmt, *this );
-		// return if no declarations to add
-		if ( declsToAdd.back().empty() && declsToAddAfter.back().empty() ) {
-			doEndScope();
-			return stmt;
-		}
-
-		// otherwise add declarations to new compound statement
-		CompoundStmt *compound = new CompoundStmt( noLabels );
-		for ( std::list< Declaration* >::iterator decl = declsToAdd.back().begin(); decl != declsToAdd.back().end(); ++decl ) {
-			DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-			compound->get_kids().push_back( declStmt );
-		}
-		declsToAdd.back().clear();
-
-		// add mutated statement
-		compound->get_kids().push_back( stmt );
-
-		// add declarations after to new compound statement
-		for ( std::list< Declaration* >::iterator decl = declsToAddAfter.back().begin(); decl != declsToAddAfter.back().end(); ++decl ) {
-			DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-			compound->get_kids().push_back( declStmt );
-		}
-		declsToAddAfter.back().clear();
-
-		doEndScope();
-		return compound;
-	}
-
-	void DeclMutator::mutateStatementList( std::list< Statement* > &stmts ) {
-		doBeginScope();
-
-
-		for ( std::list< Statement* >::iterator stmt = stmts.begin(); ; ++stmt ) {
-			// add any new declarations after the previous statement
-			for ( std::list< Declaration* >::iterator decl = declsToAddAfter.back().begin(); decl != declsToAddAfter.back().end(); ++decl ) {
-				DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-				stmts.insert( stmt, declStmt );
-			}
-			declsToAddAfter.back().clear();
-
-			if ( stmt == stmts.end() ) break;
-
-			// run mutator on statement
-			*stmt = maybeMutate( *stmt, *this );
-
-			// add any new declarations before the statement
-			for ( std::list< Declaration* >::iterator decl = declsToAdd.back().begin(); decl != declsToAdd.back().end(); ++decl ) {
-				DeclStmt *declStmt = new DeclStmt( noLabels, *decl );
-				stmts.insert( stmt, declStmt );
-			}
-			declsToAdd.back().clear();
-		}
-
-		doEndScope();
-	}
-
-	void DeclMutator::addDeclaration( Declaration *decl ) {
-		declsToAdd.back().push_back( decl );
-	}
-
-	void DeclMutator::addDeclarationAfter( Declaration *decl ) {
-		declsToAddAfter.back().push_back( decl );
-	}
-
-	CompoundStmt* DeclMutator::mutate(CompoundStmt *compoundStmt) {
-		mutateStatementList( compoundStmt->get_kids() );
-		return compoundStmt;
-	}
-
-	Statement* DeclMutator::mutate(IfStmt *ifStmt) {
-		ifStmt->set_condition( maybeMutate( ifStmt->get_condition(), *this ) );
-		ifStmt->set_thenPart( mutateStatement( ifStmt->get_thenPart() ) );
-		ifStmt->set_elsePart( mutateStatement( ifStmt->get_elsePart() ) );
-		return ifStmt;
-	}
-
-	Statement* DeclMutator::mutate(WhileStmt *whileStmt) {
-		whileStmt->set_condition( maybeMutate( whileStmt->get_condition(), *this ) );
-		whileStmt->set_body(  mutateStatement( whileStmt->get_body() ) );
-		return whileStmt;
-	}
-
-	Statement* DeclMutator::mutate(ForStmt *forStmt) {
-		mutateAll( forStmt->get_initialization(), *this );
-		forStmt->set_condition(  maybeMutate( forStmt->get_condition(), *this ) );
-		forStmt->set_increment(  maybeMutate( forStmt->get_increment(), *this ) );
-		forStmt->set_body(  mutateStatement( forStmt->get_body() ) );
-		return forStmt;
-	}
-
-	Statement* DeclMutator::mutate(SwitchStmt *switchStmt) {
-		switchStmt->set_condition( maybeMutate( switchStmt->get_condition(), *this ) );
-		mutateAll( switchStmt->get_statements(), *this );
-		return switchStmt;
-	}
-
-	Statement* DeclMutator::mutate(CaseStmt *caseStmt) {
-		caseStmt->set_condition( maybeMutate( caseStmt->get_condition(), *this ) );
-		mutateAll( caseStmt->get_statements(), *this );
-		return caseStmt;
-	}
-
-	Statement* DeclMutator::mutate(TryStmt *tryStmt) {
-		tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) );
-		mutateAll( tryStmt->get_catchers(), *this );
-		tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );
-		return tryStmt;
-	}
-
-	Statement* DeclMutator::mutate(CatchStmt *catchStmt) {
-		catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) );
-		catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );
-		catchStmt->set_body( mutateStatement( catchStmt->get_body() ) );
-		return catchStmt;
-	}
-}  // namespace GenPoly
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/DeclMutator.h
===================================================================
--- src/GenPoly/DeclMutator.h	(revision ac74057f200ca1db8599a011c8f8b2679a75beb0)
+++ 	(revision )
@@ -1,71 +1,0 @@
-//
-// 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.
-//
-// DeclMutator.h --
-//
-// Author           : Aaron B. Moss
-// Created On       : Fri Nov 27 14:44:00 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:21:12 2017
-// Update Count     : 4
-//
-
-#pragma once
-
-#include <list>               // for list
-#include <vector>             // for vector
-
-#include "SynTree/Mutator.h"  // for Mutator
-#include "SynTree/SynTree.h"  // for Visitor Nodes
-
-namespace GenPoly {
-	/// Mutates a list of declarations, providing a means of adding new declarations into the list
-	class DeclMutator : public Mutator {
-	  public:
-		typedef Mutator Parent;
-
-		DeclMutator();
-		virtual ~DeclMutator();
-
-		using Parent::mutate;
-		virtual CompoundStmt* mutate(CompoundStmt *compoundStmt);
-		virtual Statement* mutate(IfStmt *ifStmt);
-		virtual Statement* mutate(WhileStmt *whileStmt);
-		virtual Statement* mutate(ForStmt *forStmt);
-		virtual Statement* mutate(SwitchStmt *switchStmt);
-		virtual Statement* mutate(CaseStmt *caseStmt);
-		virtual Statement* mutate(TryStmt *tryStmt);
-		virtual Statement* mutate(CatchStmt *catchStmt);
-
-		/// Mutates a list of declarations with this visitor
-		void mutateDeclarationList(std::list< Declaration* >& decls);
-
-		/// Called on entry to a new scope; overriders should call this as a super-class call
-		virtual void doBeginScope();
-		/// Called on exit from a scope; overriders should call this as a super-class call
-		virtual void doEndScope();
-	  protected:
-		/// Mutate a statement that forms its own scope
-		Statement* mutateStatement( Statement *stmt );
-		/// Mutate a list of statements that form a scope
-		void mutateStatementList( std::list< Statement* > &stmts );
-		/// Add a declaration to the list to be added before the current position
-		void addDeclaration( Declaration* decl );
-		/// Add a declaration to the list to be added after the current position
-		void addDeclarationAfter( Declaration* decl );
-	  private:
-		/// A stack of declarations to add before the current declaration or statement
-		std::vector< std::list< Declaration* > > declsToAdd;
-		/// A stack of declarations to add after the current declaration or statement
-		std::vector< std::list< Declaration* > > declsToAddAfter;
-	};
-} // namespace
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/GenPoly/module.mk
===================================================================
--- src/GenPoly/module.mk	(revision ac74057f200ca1db8599a011c8f8b2679a75beb0)
+++ src/GenPoly/module.mk	(revision 92b3de18e700712b3d68077d08943feb95d6e9e4)
@@ -6,5 +6,5 @@
 ## file "LICENCE" distributed with Cforall.
 ##
-## module.mk -- 
+## module.mk --
 ##
 ## Author           : Richard C. Bilson
@@ -23,4 +23,3 @@
        GenPoly/CopyParams.cc \
        GenPoly/FindFunction.cc \
-       GenPoly/DeclMutator.cc \
        GenPoly/InstantiateGeneric.cc
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision ac74057f200ca1db8599a011c8f8b2679a75beb0)
+++ src/Makefile.in	(revision 92b3de18e700712b3d68077d08943feb95d6e9e4)
@@ -178,5 +178,4 @@
 	GenPoly/driver_cfa_cpp-CopyParams.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-FindFunction.$(OBJEXT) \
-	GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT) \
 	GenPoly/driver_cfa_cpp-InstantiateGeneric.$(OBJEXT) \
 	InitTweak/driver_cfa_cpp-GenInit.$(OBJEXT) \
@@ -500,29 +499,28 @@
 	GenPoly/ScrubTyVars.cc GenPoly/Lvalue.cc GenPoly/Specialize.cc \
 	GenPoly/CopyParams.cc GenPoly/FindFunction.cc \
-	GenPoly/DeclMutator.cc GenPoly/InstantiateGeneric.cc \
-	InitTweak/GenInit.cc InitTweak/FixInit.cc \
-	InitTweak/FixGlobalInit.cc InitTweak/InitTweak.cc \
-	Parser/parser.yy Parser/lex.ll Parser/TypedefTable.cc \
-	Parser/ParseNode.cc Parser/DeclarationNode.cc \
-	Parser/ExpressionNode.cc Parser/StatementNode.cc \
-	Parser/InitializerNode.cc Parser/TypeData.cc \
-	Parser/LinkageSpec.cc Parser/parserutility.cc \
-	ResolvExpr/AlternativeFinder.cc ResolvExpr/Alternative.cc \
-	ResolvExpr/Unify.cc ResolvExpr/PtrsAssignable.cc \
-	ResolvExpr/CommonType.cc ResolvExpr/ConversionCost.cc \
-	ResolvExpr/CastCost.cc ResolvExpr/PtrsCastable.cc \
-	ResolvExpr/AdjustExprType.cc ResolvExpr/AlternativePrinter.cc \
-	ResolvExpr/Resolver.cc ResolvExpr/ResolveTypeof.cc \
-	ResolvExpr/RenameVars.cc ResolvExpr/FindOpenVars.cc \
-	ResolvExpr/PolyCost.cc ResolvExpr/Occurs.cc \
-	ResolvExpr/TypeEnvironment.cc ResolvExpr/CurrentObject.cc \
-	SymTab/Indexer.cc SymTab/Mangler.cc SymTab/Validate.cc \
-	SymTab/FixFunction.cc SymTab/ImplementationType.cc \
-	SymTab/TypeEquality.cc SymTab/Autogen.cc SynTree/Type.cc \
-	SynTree/VoidType.cc SynTree/BasicType.cc \
-	SynTree/PointerType.cc SynTree/ArrayType.cc \
-	SynTree/ReferenceType.cc SynTree/FunctionType.cc \
-	SynTree/ReferenceToType.cc SynTree/TupleType.cc \
-	SynTree/TypeofType.cc SynTree/AttrType.cc \
+	GenPoly/InstantiateGeneric.cc InitTweak/GenInit.cc \
+	InitTweak/FixInit.cc InitTweak/FixGlobalInit.cc \
+	InitTweak/InitTweak.cc Parser/parser.yy Parser/lex.ll \
+	Parser/TypedefTable.cc Parser/ParseNode.cc \
+	Parser/DeclarationNode.cc Parser/ExpressionNode.cc \
+	Parser/StatementNode.cc Parser/InitializerNode.cc \
+	Parser/TypeData.cc Parser/LinkageSpec.cc \
+	Parser/parserutility.cc ResolvExpr/AlternativeFinder.cc \
+	ResolvExpr/Alternative.cc ResolvExpr/Unify.cc \
+	ResolvExpr/PtrsAssignable.cc ResolvExpr/CommonType.cc \
+	ResolvExpr/ConversionCost.cc ResolvExpr/CastCost.cc \
+	ResolvExpr/PtrsCastable.cc ResolvExpr/AdjustExprType.cc \
+	ResolvExpr/AlternativePrinter.cc ResolvExpr/Resolver.cc \
+	ResolvExpr/ResolveTypeof.cc ResolvExpr/RenameVars.cc \
+	ResolvExpr/FindOpenVars.cc ResolvExpr/PolyCost.cc \
+	ResolvExpr/Occurs.cc ResolvExpr/TypeEnvironment.cc \
+	ResolvExpr/CurrentObject.cc SymTab/Indexer.cc \
+	SymTab/Mangler.cc SymTab/Validate.cc SymTab/FixFunction.cc \
+	SymTab/ImplementationType.cc SymTab/TypeEquality.cc \
+	SymTab/Autogen.cc SynTree/Type.cc SynTree/VoidType.cc \
+	SynTree/BasicType.cc SynTree/PointerType.cc \
+	SynTree/ArrayType.cc SynTree/ReferenceType.cc \
+	SynTree/FunctionType.cc SynTree/ReferenceToType.cc \
+	SynTree/TupleType.cc SynTree/TypeofType.cc SynTree/AttrType.cc \
 	SynTree/VarArgsType.cc SynTree/ZeroOneType.cc \
 	SynTree/Constant.cc SynTree/Expression.cc SynTree/TupleExpr.cc \
@@ -729,6 +727,4 @@
 GenPoly/driver_cfa_cpp-FindFunction.$(OBJEXT):  \
 	GenPoly/$(am__dirstamp) GenPoly/$(DEPDIR)/$(am__dirstamp)
-GenPoly/driver_cfa_cpp-DeclMutator.$(OBJEXT): GenPoly/$(am__dirstamp) \
-	GenPoly/$(DEPDIR)/$(am__dirstamp)
 GenPoly/driver_cfa_cpp-InstantiateGeneric.$(OBJEXT):  \
 	GenPoly/$(am__dirstamp) GenPoly/$(DEPDIR)/$(am__dirstamp)
@@ -1008,5 +1004,4 @@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-Box.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-CopyParams.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-FindFunction.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@GenPoly/$(DEPDIR)/driver_cfa_cpp-GenPoly.Po@am__quote@
@@ -1534,18 +1529,4 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-FindFunction.obj `if test -f 'GenPoly/FindFunction.cc'; then $(CYGPATH_W) 'GenPoly/FindFunction.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/FindFunction.cc'; fi`
 
-GenPoly/driver_cfa_cpp-DeclMutator.o: GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-DeclMutator.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo -c -o GenPoly/driver_cfa_cpp-DeclMutator.o `test -f 'GenPoly/DeclMutator.cc' || echo '$(srcdir)/'`GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/DeclMutator.cc' object='GenPoly/driver_cfa_cpp-DeclMutator.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-DeclMutator.o `test -f 'GenPoly/DeclMutator.cc' || echo '$(srcdir)/'`GenPoly/DeclMutator.cc
-
-GenPoly/driver_cfa_cpp-DeclMutator.obj: GenPoly/DeclMutator.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-DeclMutator.obj -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo -c -o GenPoly/driver_cfa_cpp-DeclMutator.obj `if test -f 'GenPoly/DeclMutator.cc'; then $(CYGPATH_W) 'GenPoly/DeclMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/DeclMutator.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Tpo GenPoly/$(DEPDIR)/driver_cfa_cpp-DeclMutator.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='GenPoly/DeclMutator.cc' object='GenPoly/driver_cfa_cpp-DeclMutator.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o GenPoly/driver_cfa_cpp-DeclMutator.obj `if test -f 'GenPoly/DeclMutator.cc'; then $(CYGPATH_W) 'GenPoly/DeclMutator.cc'; else $(CYGPATH_W) '$(srcdir)/GenPoly/DeclMutator.cc'; fi`
-
 GenPoly/driver_cfa_cpp-InstantiateGeneric.o: GenPoly/InstantiateGeneric.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT GenPoly/driver_cfa_cpp-InstantiateGeneric.o -MD -MP -MF GenPoly/$(DEPDIR)/driver_cfa_cpp-InstantiateGeneric.Tpo -c -o GenPoly/driver_cfa_cpp-InstantiateGeneric.o `test -f 'GenPoly/InstantiateGeneric.cc' || echo '$(srcdir)/'`GenPoly/InstantiateGeneric.cc
