Index: src/ControlStruct/ExceptDecl.cc
===================================================================
--- src/ControlStruct/ExceptDecl.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,482 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// ExceptDecl.cc -- Handles declarations of exception types.
-//
-// Author           : Henry Xue
-// Created On       : Tue Jul 20 04:10:50 2021
-// Last Modified By : Andrew Beach
-// Last Modified On : Wed May 25 16:43:00 2022
-// Update Count     : 5
-//
-
-#include "ExceptDecl.h"
-
-#include <cassert>               // for assert
-#include <string>                // for string
-#include <sstream>               // for stringstream
-
-#include "Common/PassVisitor.h"  // for PassVisitor
-#include "Common/utility.h"      // for cloneAll
-#include "SynTree/Mutator.h"     // for mutateAll
-#include "Virtual/Tables.h"      // for helpers
-
-namespace ControlStruct {
-
-const std::list< Expression *> & makeParameters(
-	const std::list< TypeDecl *> & forallClause
-) {
-	auto parameters = new std::list< Expression *>();
-	for ( auto it = forallClause.begin(); it != forallClause.end(); it++ ) {
-		parameters->emplace_back( new TypeExpr(
-			new TypeInstType( noQualifiers, ( *it )->get_name(), false )
-		) );
-	}
-	return *parameters;
-}
-
-StructInstType * makeExceptInstType(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	StructInstType * exceptInstType = new StructInstType(
-		noQualifiers,
-		exceptionName
-	);
-	cloneAll( parameters, exceptInstType->parameters );
-	return exceptInstType;
-}
-
-// void (*copy)(exception_name parameters * this, exception_name parameters * that);
-FunctionType * makeCopyFnType(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	FunctionType * copyFnType = new FunctionType( noQualifiers, false );
-	copyFnType->get_parameters().push_back( new ObjectDecl(
-		"this",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeExceptInstType( exceptionName, parameters ) ),
-		nullptr
-	) );
-	copyFnType->get_parameters().push_back( new ObjectDecl(
-		"that",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeExceptInstType( exceptionName, parameters ) ),
-		nullptr
-	) );
-	copyFnType->get_returnVals().push_back( new ObjectDecl(
-		"",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new VoidType( noQualifiers ),
-		nullptr
-	) );
-	return copyFnType;
-}
-
-// void (*^?{})(exception_name parameters & this);
-FunctionType * makeDtorFnType(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	FunctionType * dtorFnType = new FunctionType( noQualifiers, false );
-	dtorFnType->get_parameters().push_back( new ObjectDecl(
-		"this",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new ReferenceType( noQualifiers,
-			makeExceptInstType( exceptionName, parameters ) ),
-		nullptr
-	) );
-	dtorFnType->get_returnVals().push_back( new ObjectDecl(
-		"",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new VoidType( noQualifiers ),
-		nullptr
-	) );
-	return dtorFnType;
-}
-
-// const char * (*msg)(exception_name parameters * this);
-FunctionType * makeMsgFnType(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	FunctionType * msgFnType = new FunctionType( noQualifiers, false );
-	msgFnType->get_parameters().push_back( new ObjectDecl(
-		"this",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeExceptInstType( exceptionName, parameters ) ),
-		nullptr
-	) );
-	msgFnType->get_returnVals().push_back( new ObjectDecl(
-		"",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			new BasicType( Type::Const, BasicType::Char ) ),
-		nullptr
-	) );
-	return msgFnType;
-}
-
-StructDecl * ehmTypeIdStruct(
-	const std::string & exceptionName,
-	const std::list< TypeDecl *> & forallClause
-) {
-	StructDecl * structDecl = new StructDecl( Virtual::typeIdType( exceptionName ) );
-	structDecl->members.push_back( new ObjectDecl(
-		"parent",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			new StructInstType( Type::Const, "__cfavir_type_info" ) ),
-		nullptr
-	) );
-	structDecl->set_body( true );
-	cloneAll( forallClause, structDecl->parameters );
-	return structDecl;
-}
-
-ObjectDecl * ehmTypeIdValue(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	StructInstType * typeIdType = new StructInstType(
-		Type::Const,
-		Virtual::typeIdType( exceptionName )
-	);
-	cloneAll( parameters, typeIdType->parameters );
-	return new ObjectDecl(
-		Virtual::typeIdName( exceptionName ),
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		typeIdType,
-		new ListInit( { new SingleInit(
-			new AddressExpr( new NameExpr( "__cfatid_exception_t" ) )
-			) }, {}, true ),
-		{ new Attribute( "cfa_linkonce" ) }
-	);
-}
-
-StructDecl * ehmExceptionStructDecl(
-	const std::string & exceptionName,
-	const std::list< TypeDecl *> & forallClause
-) {
-	StructDecl * structDecl = new StructDecl( exceptionName );
-	cloneAll( forallClause, structDecl->parameters );
-	return structDecl;
-}
-
-StructDecl * ehmVirtualTableStruct(
-	const std::string & exceptionName,
-	const std::list< TypeDecl *> & forallClause,
-	const std::list< Expression *> & parameters
-) {
-	StructInstType * typeIdType = new StructInstType(
-		Type::Const,
-		Virtual::typeIdType( exceptionName )
-	);
-	cloneAll( parameters, typeIdType->parameters );
-	ObjectDecl * typeId = new ObjectDecl(
-		"__cfavir_typeid",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers, typeIdType ),
-		nullptr
-	);
-	ObjectDecl * size = new ObjectDecl(
-		"size",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new TypeInstType( noQualifiers, "size_t", false ),
-		nullptr
-	);
-	ObjectDecl * copy = new ObjectDecl(
-		"copy",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeCopyFnType( exceptionName, parameters ) ),
-		nullptr
-	);
-	ObjectDecl * dtor = new ObjectDecl(
-		"^?{}",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeDtorFnType( exceptionName, parameters ) ),
-		nullptr
-	);
-	ObjectDecl * msg = new ObjectDecl(
-		"msg",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers,
-			makeMsgFnType( exceptionName, parameters ) ),
-		nullptr
-	);
-	StructDecl * structDecl = new StructDecl( Virtual::vtableTypeName( exceptionName ) );
-	structDecl->members.push_back( typeId );
-	structDecl->members.push_back( size );
-	structDecl->members.push_back( copy );
-	structDecl->members.push_back( dtor );
-	structDecl->members.push_back( msg );
-	structDecl->set_body( true );
-	cloneAll( forallClause, structDecl->parameters );
-	return structDecl;
-}
-
-StructDecl * ehmExceptionStruct(
-	const std::string & exceptionName,
-	const std::list< TypeDecl *> & forallClause,
-	const std::list< Expression *> & parameters,
-	const std::list< Declaration *> & members
-) {
-	StructInstType * vtableType = new StructInstType(
-		Type::Const,
-		Virtual::vtableTypeName( exceptionName )
-	);
-	cloneAll( parameters, vtableType->parameters );
-	StructDecl * structDecl = new StructDecl( exceptionName );
-	structDecl->members = members;
-	structDecl->members.push_front( new ObjectDecl(
-		"virtual_table",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		new PointerType( noQualifiers, vtableType ),
-		nullptr
-	) );
-	structDecl->set_body( true );
-	cloneAll( forallClause, structDecl->parameters );
-	return structDecl;
-}
-
-ObjectDecl * ehmTypeIdExtern(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	StructInstType * typeIdType = new StructInstType(
-		Type::Const,
-		Virtual::typeIdType( exceptionName )
-	);
-	cloneAll( parameters, typeIdType->parameters );
-	return new ObjectDecl(
-		Virtual::typeIdName( exceptionName ),
-		Type::Extern,
-		LinkageSpec::Cforall,
-		nullptr,
-		typeIdType,
-		nullptr,
-		{ new Attribute( "cfa_linkonce" ) }
-	);
-}
-
-ObjectDecl * ehmExternVtable(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters,
-	const std::string & tableName
-) {
-	StructInstType * vtableType = new StructInstType(
-		Type::Const,
-		Virtual::vtableTypeName( exceptionName )
-	);
-	cloneAll( parameters, vtableType->parameters );
-	return new ObjectDecl(
-		tableName,
-		Type::Extern,
-		LinkageSpec::Cforall,
-		nullptr,
-		vtableType,
-		nullptr
-	);
-}
-
-FunctionDecl * ehmDefineCopy(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	return new FunctionDecl(
-		"copy",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		makeCopyFnType( exceptionName, parameters ),
-		new CompoundStmt( {
-			new ExprStmt( new UntypedExpr( new NameExpr( "?=?" ), {
-				new UntypedExpr( new NameExpr( "*?" ), { new NameExpr( "this" ) } ),
-				new UntypedExpr( new NameExpr( "*?" ), { new NameExpr( "that" ) } )
-			} ) )
-		} )
-	);
-}
-
-FunctionDecl * ehmDefineMsg(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters
-) {
-	std::stringstream msg;
-	msg << exceptionName;
-	if ( !parameters.empty() ) { // forall variant, add parameters
-		msg << "(";
-		for ( auto it = parameters.begin(); it != parameters.end(); it++ ) {
-			( *it )->print( msg );
-			if ( it + 1 == parameters.end() ) {
-				msg << ")"; // end of list, close bracket
-			} else {
-				msg << ", "; // otherwise use comma as separator
-			}
-		}
-	}
-	return new FunctionDecl(
-		"msg",
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		makeMsgFnType( exceptionName, parameters ),
-		new CompoundStmt( {
-			new ReturnStmt( new ConstantExpr( Constant::from_string( msg.str() ) ) )
-		} )
-	);
-}
-
-ObjectDecl * ehmVirtualTable(
-	const std::string & exceptionName,
-	const std::list< Expression *> & parameters,
-	const std::string & tableName
-) {
-	StructInstType * sizeofType = new StructInstType( noQualifiers, exceptionName );
-	cloneAll( parameters, sizeofType->parameters );
-	std::list< Initializer *> inits {
-		new SingleInit( new AddressExpr(
-			new NameExpr( Virtual::typeIdName( exceptionName ) ) ) ),
-		new SingleInit( new SizeofExpr( sizeofType ) ),
-		new SingleInit( new NameExpr( "copy" ) ),
-		new SingleInit( new NameExpr( "^?{}" ) ),
-		new SingleInit( new NameExpr( "msg" ) )
-	};
-	std::list< Designation *> desig {
-		new Designation( { new NameExpr( "__cfavir_typeid" ) } ),
-		new Designation( { new NameExpr( "size" ) } ),
-		new Designation( { new NameExpr( "copy" ) } ),
-		new Designation( { new NameExpr( "^?{}" ) } ),
-		new Designation( { new NameExpr( "msg" ) } )
-	};
-	StructInstType * vtableType = new StructInstType(
-		Type::Const,
-		Virtual::vtableTypeName( exceptionName )
-	);
-	cloneAll( parameters, vtableType->parameters );
-	return new ObjectDecl(
-		tableName,
-		noStorageClasses,
-		LinkageSpec::Cforall,
-		nullptr,
-		vtableType,
-		new ListInit( inits, desig )
-	);
-}
-
-class ExceptDeclCore : public WithDeclsToAdd {
-public:
-	// translates exception decls
-	Declaration * postmutate( StructDecl * structDecl );
-
-	// translates vtable decls
-	DeclarationWithType * postmutate( ObjectDecl * objectDecl );
-};
-
-Declaration * ExceptDeclCore::postmutate( StructDecl * structDecl ) {
-	if ( structDecl->is_exception() ) {
-		const std::string & exceptionName = structDecl->get_name();
-		const std::list< TypeDecl *> & forallClause = structDecl->get_parameters();
-		const std::list< Expression *> & parameters = makeParameters( forallClause );
-		const std::list< Declaration *> & members = structDecl->get_members();
-
-		declsToAddBefore.push_back( ehmTypeIdStruct( exceptionName, forallClause ) );
-		if ( forallClause.empty() ) { // non-forall variant
-			declsToAddBefore.push_back( ehmTypeIdValue( exceptionName, parameters ) );
-		}
-		declsToAddBefore.push_back( ehmExceptionStructDecl( exceptionName, forallClause ) );
-		declsToAddBefore.push_back( ehmVirtualTableStruct( exceptionName, forallClause, parameters ) );
-		return ehmExceptionStruct( exceptionName, forallClause, parameters, members );
-	}
-	return structDecl;
-}
-
-DeclarationWithType * ExceptDeclCore::postmutate( ObjectDecl * objectDecl ) {
-	// Check if it is VTableType
-	VTableType * vtableType = dynamic_cast< VTableType *>( objectDecl->get_type() );
-	if ( vtableType ) {
-		TypeInstType * base = dynamic_cast< TypeInstType *>( vtableType->get_base() );
-		assert( base ); // should be a TypeInstType
-		const std::string & exceptionName = base->get_name();
-		const std::string & tableName = objectDecl->get_name();
-		const std::list< Expression *> parameters = base->get_parameters();
-
-		if ( objectDecl->get_storageClasses().is_extern ) { // if extern
-			if ( !parameters.empty() ) { // forall variant
-				declsToAddBefore.push_back( ehmTypeIdExtern( exceptionName, parameters ) );
-			}
-			return ehmExternVtable( exceptionName, parameters, tableName );
-		}
-		// else, non-extern
-		if ( !parameters.empty() ) { // forall variant
-			declsToAddBefore.push_back( ehmTypeIdValue( exceptionName, parameters ) );
-		}
-		declsToAddBefore.push_back( ehmDefineCopy( exceptionName, parameters ) );
-		declsToAddBefore.push_back( ehmDefineMsg( exceptionName, parameters ) );
-		return ehmVirtualTable( exceptionName, parameters, tableName );
-	}
-	return objectDecl;
-}
-
-class VTableCore : public WithDeclsToAdd {
-public:
-	// Remove any remaining vtable type nodes in the tree.
-	Type * postmutate( VTableType * vtableType );
-};
-
-Type * VTableCore::postmutate( VTableType * vtableType ) {
-	auto inst = strict_dynamic_cast<ReferenceToType *>( vtableType->base );
-
-	std::string vtableName = Virtual::vtableTypeName( inst->name );
-	StructInstType * newType = new StructInstType( noQualifiers, vtableName );
-	cloneAll( inst->parameters, newType->parameters );
-
-	delete vtableType;
-	return newType;
-}
-
-void translateExcept( std::list< Declaration *> & translationUnit ) {
-	PassVisitor<ExceptDeclCore> translator;
-	mutateAll( translationUnit, translator );
-	PassVisitor<VTableCore> typeTranslator;
-	mutateAll( translationUnit, typeTranslator );
-}
-
-}
Index: src/ControlStruct/ExceptTranslate.cc
===================================================================
--- src/ControlStruct/ExceptTranslate.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,689 +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.
-//
-// ExceptTranslate.cc -- Conversion of exception control flow structures.
-//
-// Author           : Andrew Beach
-// Created On       : Wed Jun 14 16:49:00 2017
-// Last Modified By : Henry Xue
-// Last Modified On : Tue Aug 03 10:05:51 2021
-// Update Count     : 18
-//
-
-#include "ExceptTranslate.h"
-
-#include <stddef.h>                   // for NULL
-#include <cassert>                    // for assert, assertf
-#include <iterator>                   // for back_inserter, inserter
-#include <string>                     // for string, operator==
-
-#include "Common/PassVisitor.h"       // for PassVisitor, WithGuards
-#include "Common/SemanticError.h"     // for SemanticError
-#include "Common/utility.h"           // for CodeLocation
-#include "SynTree/LinkageSpec.h"      // for Cforall
-#include "SynTree/Attribute.h"        // for Attribute
-#include "SynTree/Constant.h"         // for Constant
-#include "SynTree/Declaration.h"      // for ObjectDecl, FunctionDecl, Struc...
-#include "SynTree/Expression.h"       // for UntypedExpr, ConstantExpr, Name...
-#include "SynTree/Initializer.h"      // for SingleInit, ListInit
-#include "SynTree/Label.h"            // for Label
-#include "SynTree/Mutator.h"          // for mutateAll
-#include "SynTree/Statement.h"        // for CompoundStmt, CatchStmt, ThrowStmt
-#include "SynTree/Type.h"             // for FunctionType, Type, noQualifiers
-#include "SynTree/DeclReplacer.h"     // for DeclReplacer
-#include "SynTree/Visitor.h"          // for acceptAll
-
-namespace ControlStruct {
-
-	// Buricratic Helpers (Not having to do with the paritular operation.)
-
-	typedef std::list<CatchStmt*> CatchList;
-
-	void split( CatchList& allHandlers, CatchList& terHandlers,
-				CatchList& resHandlers ) {
-		while ( !allHandlers.empty() ) {
-			CatchStmt * stmt = allHandlers.front();
-			allHandlers.pop_front();
-			if (CatchStmt::Terminate == stmt->get_kind()) {
-				terHandlers.push_back(stmt);
-			} else {
-				resHandlers.push_back(stmt);
-			}
-		}
-	}
-
-	void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
-		block->push_back(new DeclStmt(item));
-	}
-
-	Expression * nameOf( DeclarationWithType * decl ) {
-		return new VariableExpr( decl );
-	}
-
-	class ThrowMutatorCore : public WithGuards {
-		ObjectDecl * terminate_handler_except;
-		enum Context { NoHandler, TerHandler, ResHandler } cur_context;
-
-		// The helper functions for code/syntree generation.
-		Statement * create_either_throw(
-			ThrowStmt * throwStmt, const char * throwFunc );
-		Statement * create_terminate_rethrow( ThrowStmt * throwStmt );
-
-	public:
-		ThrowMutatorCore() :
-			terminate_handler_except( nullptr ),
-			cur_context( NoHandler )
-		{}
-
-		void premutate( CatchStmt *catchStmt );
-		Statement * postmutate( ThrowStmt *throwStmt );
-	};
-
-	// ThrowStmt Mutation Helpers
-
-	Statement * ThrowMutatorCore::create_either_throw(
-			ThrowStmt * throwStmt, const char * throwFunc ) {
-		// `throwFunc`( `throwStmt->get_name()` );
-		UntypedExpr * call = new UntypedExpr( new NameExpr( throwFunc ) );
-		call->get_args().push_back( throwStmt->get_expr() );
-		throwStmt->set_expr( nullptr );
-		delete throwStmt;
-		return new ExprStmt( call );
-	}
-
-	Statement * ThrowMutatorCore::create_terminate_rethrow(
-			ThrowStmt *throwStmt ) {
-		// { `terminate_handler_except` = 0p; __rethrow_terminate(); }
-		assert( nullptr == throwStmt->get_expr() );
-		assert( terminate_handler_except );
-
-		CompoundStmt * result = new CompoundStmt();
-		result->labels =  throwStmt->labels;
-		result->push_back( new ExprStmt( UntypedExpr::createAssign(
-			nameOf( terminate_handler_except ),
-			new ConstantExpr( Constant::null(
-				terminate_handler_except->get_type()->clone()
-				) )
-			) ) );
-		result->push_back( new ExprStmt(
-			new UntypedExpr( new NameExpr( "__cfaehm_rethrow_terminate" ) )
-			) );
-		delete throwStmt;
-		return result;
-	}
-
-	// Visiting/Mutating Functions
-
-	void ThrowMutatorCore::premutate( CatchStmt *catchStmt ) {
-		// Validate the statement's form.
-		ObjectDecl * decl = dynamic_cast<ObjectDecl *>( catchStmt->get_decl() );
-		// Also checking the type would be nice.
-		if ( !decl || !dynamic_cast<PointerType *>( decl->type ) ) {
-			std::string kind = (CatchStmt::Terminate == catchStmt->kind) ? "catch" : "catchResume";
-			SemanticError( catchStmt->location, kind + " must have pointer to an exception type" );
-		}
-
-		// Track the handler context.
-		GuardValue( cur_context );
-		if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
-			cur_context = TerHandler;
-
-			GuardValue( terminate_handler_except );
-			terminate_handler_except = decl;
-		} else {
-			cur_context = ResHandler;
-		}
-	}
-
-	Statement * ThrowMutatorCore::postmutate( ThrowStmt *throwStmt ) {
-		// Ignoring throwStmt->get_target() for now.
-		if ( ThrowStmt::Terminate == throwStmt->get_kind() ) {
-			if ( throwStmt->get_expr() ) {
-				return create_either_throw( throwStmt, "$throw" );
-			} else if ( TerHandler == cur_context ) {
-				return create_terminate_rethrow( throwStmt );
-			} else {
-				abort("Invalid throw in %s at %i\n",
-					throwStmt->location.filename.c_str(),
-					throwStmt->location.first_line);
-			}
-		} else {
-			if ( throwStmt->get_expr() ) {
-				return create_either_throw( throwStmt, "$throwResume" );
-			} else if ( ResHandler == cur_context ) {
-				// This has to be handled later.
-				return throwStmt;
-			} else {
-				abort("Invalid throwResume in %s at %i\n",
-					throwStmt->location.filename.c_str(),
-					throwStmt->location.first_line);
-			}
-		}
-	}
-
-	class TryMutatorCore {
-		// The built in types used in translation.
-		StructDecl * except_decl;
-		StructDecl * node_decl;
-		StructDecl * hook_decl;
-
-		// The many helper functions for code/syntree generation.
-		CompoundStmt * take_try_block( TryStmt * tryStmt );
-		FunctionDecl * create_try_wrapper( CompoundStmt * body );
-		FunctionDecl * create_terminate_catch( CatchList &handlers );
-		CompoundStmt * create_single_matcher(
-			DeclarationWithType * except_obj, CatchStmt * modded_handler );
-		FunctionDecl * create_terminate_match( CatchList &handlers );
-		CompoundStmt * create_terminate_caller( FunctionDecl * try_wrapper,
-			FunctionDecl * terminate_catch, FunctionDecl * terminate_match );
-		FunctionDecl * create_resume_handler( CatchList &handlers );
-		CompoundStmt * create_resume_wrapper(
-			Statement * wraps, FunctionDecl * resume_handler );
-		FunctionDecl * create_finally_wrapper( TryStmt * tryStmt );
-		ObjectDecl * create_finally_hook( FunctionDecl * finally_wrapper );
-		Statement * create_resume_rethrow( ThrowStmt * throwStmt );
-
-		// Types used in translation, make sure to use clone.
-		// void (*function)();
-		FunctionType try_func_t;
-		// void (*function)(int, exception);
-		FunctionType catch_func_t;
-		// int (*function)(exception);
-		FunctionType match_func_t;
-		// bool (*function)(exception);
-		FunctionType handle_func_t;
-		// void (*function)(__attribute__((unused)) void *);
-		FunctionType finally_func_t;
-
-		StructInstType * create_except_type() {
-			assert( except_decl );
-			return new StructInstType( noQualifiers, except_decl );
-		}
-		void init_func_types();
-
-	public:
-		TryMutatorCore() :
-			except_decl( nullptr ), node_decl( nullptr ), hook_decl( nullptr ),
-			try_func_t( noQualifiers, false ),
-			catch_func_t( noQualifiers, false ),
-			match_func_t( noQualifiers, false ),
-			handle_func_t( noQualifiers, false ),
-			finally_func_t( noQualifiers, false )
-		{}
-
-		void premutate( StructDecl *structDecl );
-		Statement * postmutate( TryStmt *tryStmt );
-		Statement * postmutate( ThrowStmt *throwStmt );
-	};
-
-	void TryMutatorCore::init_func_types() {
-		assert( except_decl );
-
-		ObjectDecl index_obj(
-			"__handler_index",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			/*bitfieldWidth*/ NULL,
-			new BasicType( noQualifiers, BasicType::SignedInt ),
-			/*init*/ NULL
-			);
-		ObjectDecl exception_obj(
-			"__exception_inst",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			/*bitfieldWidth*/ NULL,
-			new PointerType(
-				noQualifiers,
-				new StructInstType( noQualifiers, except_decl )
-				),
-			/*init*/ NULL
-			);
-		ObjectDecl bool_obj(
-			"__ret_bool",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			/*bitfieldWidth*/ NULL,
-			new BasicType( noQualifiers, BasicType::Bool ),
-			/*init*/ NULL,
-			std::list<Attribute *>{ new Attribute( "unused" ) }
-			);
-		ObjectDecl voidptr_obj(
-			"__hook",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			NULL,
-			new PointerType(
-				noQualifiers,
-				new VoidType(
-					noQualifiers
-					),
-				std::list<Attribute *>{ new Attribute( "unused" ) }
-				),
-			NULL
-			);
-
-		ObjectDecl * unused_index_obj = index_obj.clone();
-		unused_index_obj->attributes.push_back( new Attribute( "unused" ) );
-
-		catch_func_t.get_parameters().push_back( index_obj.clone() );
-		catch_func_t.get_parameters().push_back( exception_obj.clone() );
-		match_func_t.get_returnVals().push_back( unused_index_obj );
-		match_func_t.get_parameters().push_back( exception_obj.clone() );
-		handle_func_t.get_returnVals().push_back( bool_obj.clone() );
-		handle_func_t.get_parameters().push_back( exception_obj.clone() );
-		finally_func_t.get_parameters().push_back( voidptr_obj.clone() );
-	}
-
-	// TryStmt Mutation Helpers
-
-	CompoundStmt * TryMutatorCore::take_try_block( TryStmt *tryStmt ) {
-		CompoundStmt * block = tryStmt->get_block();
-		tryStmt->set_block( nullptr );
-		return block;
-	}
-
-	FunctionDecl * TryMutatorCore::create_try_wrapper(
-			CompoundStmt *body ) {
-
-		return new FunctionDecl( "try", Type::StorageClasses(),
-			LinkageSpec::Cforall, try_func_t.clone(), body );
-	}
-
-	FunctionDecl * TryMutatorCore::create_terminate_catch(
-			CatchList &handlers ) {
-		std::list<CaseStmt *> handler_wrappers;
-
-		FunctionType *func_type = catch_func_t.clone();
-		DeclarationWithType * index_obj = func_type->get_parameters().front();
-		DeclarationWithType * except_obj = func_type->get_parameters().back();
-
-		// Index 1..{number of handlers}
-		int index = 0;
-		CatchList::iterator it = handlers.begin();
-		for ( ; it != handlers.end() ; ++it ) {
-			++index;
-			CatchStmt * handler = *it;
-
-			// case `index`:
-			// {
-			//     `handler.decl` = { (virtual `decl.type`)`except` };
-			//     `handler.body`;
-			// }
-			// return;
-			CompoundStmt * block = new CompoundStmt();
-
-			// Just copy the exception value. (Post Validation)
-			ObjectDecl * handler_decl =
-				static_cast<ObjectDecl *>( handler->get_decl() );
-			ObjectDecl * local_except = handler_decl->clone();
-			VirtualCastExpr * vcex = new VirtualCastExpr(
-				nameOf( except_obj ),
-				local_except->get_type()
-				);
-			vcex->location = handler->location;
-			local_except->set_init( new ListInit({ new SingleInit( vcex ) }) );
-			block->push_back( new DeclStmt( local_except ) );
-
-			// Add the cleanup attribute.
-			local_except->get_attributes().push_back( new Attribute(
-				"cleanup",
-				{ new NameExpr( "__cfaehm_cleanup_terminate" ) }
-				) );
-
-			// Update variables in the body to point to this local copy.
-			{
-				DeclReplacer::DeclMap mapping;
-				mapping[ handler_decl ] = local_except;
-				DeclReplacer::replace( handler->body, mapping );
-			}
-
-			block->push_back( handler->body );
-			handler->body = nullptr;
-
-			std::list<Statement *> caseBody
-					{ block, new ReturnStmt( nullptr ) };
-			handler_wrappers.push_back( new CaseStmt(
-				new ConstantExpr( Constant::from_int( index ) ),
-				caseBody
-				) );
-		}
-		// TODO: Some sort of meaningful error on default perhaps?
-
-		std::list<Statement*> stmt_handlers;
-		while ( !handler_wrappers.empty() ) {
-			stmt_handlers.push_back( handler_wrappers.front() );
-			handler_wrappers.pop_front();
-		}
-
-		SwitchStmt * handler_lookup = new SwitchStmt(
-			nameOf( index_obj ),
-			stmt_handlers
-			);
-		CompoundStmt * body = new CompoundStmt();
-		body->push_back( handler_lookup );
-
-		return new FunctionDecl("catch", Type::StorageClasses(),
-			LinkageSpec::Cforall, func_type, body);
-	}
-
-	// Create a single check from a moddified handler.
-	// except_obj is referenced, modded_handler will be freed.
-	CompoundStmt * TryMutatorCore::create_single_matcher(
-			DeclarationWithType * except_obj, CatchStmt * modded_handler ) {
-		// {
-		//     `modded_handler.decl`
-		//     if ( `decl.name = (virtual `decl.type`)`except`
-		//             [&& `modded_handler.cond`] ) {
-		//         `modded_handler.body`
-		//     }
-		// }
-
-		CompoundStmt * block = new CompoundStmt();
-
-		// Local Declaration
-		ObjectDecl * local_except =
-			dynamic_cast<ObjectDecl *>( modded_handler->get_decl() );
-		assert( local_except );
-		block->push_back( new DeclStmt( local_except ) );
-
-		// Check for type match.
-		VirtualCastExpr * vcex = new VirtualCastExpr(
-			nameOf( except_obj ),
-			local_except->get_type()->clone()
-			);
-		vcex->location = modded_handler->location;
-		Expression * cond = UntypedExpr::createAssign(
-			nameOf( local_except ), vcex );
-
-		// Add the check on the conditional if it is provided.
-		if ( modded_handler->get_cond() ) {
-			cond = new LogicalExpr( cond, modded_handler->get_cond() );
-		}
-		// Construct the match condition.
-		block->push_back( new IfStmt(
-			cond, modded_handler->get_body(), nullptr ) );
-
-		modded_handler->set_decl( nullptr );
-		modded_handler->set_cond( nullptr );
-		modded_handler->set_body( nullptr );
-		delete modded_handler;
-		return block;
-	}
-
-	FunctionDecl * TryMutatorCore::create_terminate_match(
-			CatchList &handlers ) {
-		// int match(exception * except) {
-		//     HANDLER WRAPPERS { return `index`; }
-		// }
-
-		CompoundStmt * body = new CompoundStmt();
-
-		FunctionType * func_type = match_func_t.clone();
-		DeclarationWithType * except_obj = func_type->get_parameters().back();
-
-		// Index 1..{number of handlers}
-		int index = 0;
-		CatchList::iterator it;
-		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
-			++index;
-			CatchStmt * handler = *it;
-
-			// Body should have been taken by create_terminate_catch.
-			assert( nullptr == handler->get_body() );
-
-			// Create new body.
-			handler->set_body( new ReturnStmt(
-				new ConstantExpr( Constant::from_int( index ) ) ) );
-
-			// Create the handler.
-			body->push_back( create_single_matcher( except_obj, handler ) );
-			*it = nullptr;
-		}
-
-		body->push_back( new ReturnStmt(
-			new ConstantExpr( Constant::from_int( 0 ) ) ) );
-
-		return new FunctionDecl("match", Type::StorageClasses(),
-			LinkageSpec::Cforall, func_type, body);
-	}
-
-	CompoundStmt * TryMutatorCore::create_terminate_caller(
-			FunctionDecl * try_wrapper,
-			FunctionDecl * terminate_catch,
-			FunctionDecl * terminate_match ) {
-		// { __cfaehm_try_terminate(`try`, `catch`, `match`); }
-
-		UntypedExpr * caller = new UntypedExpr( new NameExpr(
-			"__cfaehm_try_terminate" ) );
-		std::list<Expression *>& args = caller->get_args();
-		args.push_back( nameOf( try_wrapper ) );
-		args.push_back( nameOf( terminate_catch ) );
-		args.push_back( nameOf( terminate_match ) );
-
-		CompoundStmt * callStmt = new CompoundStmt();
-		callStmt->push_back( new ExprStmt( caller ) );
-		return callStmt;
-	}
-
-	FunctionDecl * TryMutatorCore::create_resume_handler(
-			CatchList &handlers ) {
-		// bool handle(exception * except) {
-		//     HANDLER WRAPPERS { `hander->body`; return true; }
-		// }
-		CompoundStmt * body = new CompoundStmt();
-
-		FunctionType * func_type = handle_func_t.clone();
-		DeclarationWithType * except_obj = func_type->get_parameters().back();
-
-		CatchList::iterator it;
-		for ( it = handlers.begin() ; it != handlers.end() ; ++it ) {
-			CatchStmt * handler = *it;
-
-			// Modifiy body.
-			CompoundStmt * handling_code =
-				dynamic_cast<CompoundStmt*>( handler->get_body() );
-			if ( ! handling_code ) {
-				handling_code = new CompoundStmt();
-				handling_code->push_back( handler->get_body() );
-			}
-			handling_code->push_back( new ReturnStmt(
-				new ConstantExpr( Constant::from_bool( true ) ) ) );
-			handler->set_body( handling_code );
-
-			// Create the handler.
-			body->push_back( create_single_matcher( except_obj, handler ) );
-			*it = nullptr;
-		}
-
-		body->push_back( new ReturnStmt(
-			new ConstantExpr( Constant::from_bool( false ) ) ) );
-
-		return new FunctionDecl("handle", Type::StorageClasses(),
-			LinkageSpec::Cforall, func_type, body);
-	}
-
-	CompoundStmt * TryMutatorCore::create_resume_wrapper(
-			Statement * wraps,
-			FunctionDecl * resume_handler ) {
-		CompoundStmt * body = new CompoundStmt();
-
-		// struct __try_resume_node __resume_node
-		//  	__attribute__((cleanup( __cfaehm_try_resume_cleanup )));
-		// ** unwinding of the stack here could cause problems **
-		// ** however I don't think that can happen currently **
-		// __cfaehm_try_resume_setup( &__resume_node, resume_handler );
-
-		std::list< Attribute * > attributes;
-		{
-			std::list< Expression * > attr_params;
-			attr_params.push_back( new NameExpr(
-				"__cfaehm_try_resume_cleanup" ) );
-			attributes.push_back( new Attribute( "cleanup", attr_params ) );
-		}
-
-		ObjectDecl * obj = new ObjectDecl(
-			"__resume_node",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			nullptr,
-			new StructInstType(
-				Type::Qualifiers(),
-				node_decl
-				),
-			nullptr,
-			attributes
-			);
-		appendDeclStmt( body, obj );
-
-		UntypedExpr *setup = new UntypedExpr( new NameExpr(
-			"__cfaehm_try_resume_setup" ) );
-		setup->get_args().push_back( new AddressExpr( nameOf( obj ) ) );
-		setup->get_args().push_back( nameOf( resume_handler ) );
-
-		body->push_back( new ExprStmt( setup ) );
-
-		body->push_back( wraps );
-		return body;
-	}
-
-	FunctionDecl * TryMutatorCore::create_finally_wrapper(
-			TryStmt * tryStmt ) {
-		// void finally() { `finally->block` }
-		FinallyStmt * finally = tryStmt->get_finally();
-		CompoundStmt * body = finally->get_block();
-		finally->set_block( nullptr );
-		delete finally;
-		tryStmt->set_finally( nullptr );
-
-		return new FunctionDecl("finally", Type::StorageClasses(),
-			LinkageSpec::Cforall, finally_func_t.clone(), body);
-	}
-
-	ObjectDecl * TryMutatorCore::create_finally_hook(
-			FunctionDecl * finally_wrapper ) {
-		// struct __cfaehm_cleanup_hook __finally_hook
-		//   	__attribute__((cleanup( `finally_wrapper` )));
-
-		// Make Cleanup Attribute.
-		std::list< Attribute * > attributes;
-		{
-			std::list< Expression * > attr_params;
-			attr_params.push_back( nameOf( finally_wrapper ) );
-			attributes.push_back( new Attribute( "cleanup", attr_params ) );
-		}
-
-		return new ObjectDecl(
-			"__finally_hook",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			nullptr,
-			new StructInstType(
-				noQualifiers,
-				hook_decl
-				),
-			nullptr,
-			attributes
-			);
-	}
-
-	Statement * TryMutatorCore::create_resume_rethrow( ThrowStmt *throwStmt ) {
-		// return false;
-		Statement * result = new ReturnStmt(
-			new ConstantExpr( Constant::from_bool( false ) )
-			);
-		result->labels = throwStmt->labels;
-		delete throwStmt;
-		return result;
-	}
-
-	// Visiting/Mutating Functions
-	void TryMutatorCore::premutate( StructDecl *structDecl ) {
-		if ( !structDecl->has_body() ) {
-			// Skip children?
-			return;
-		} else if ( structDecl->get_name() == "__cfaehm_base_exception_t" ) {
-			assert( nullptr == except_decl );
-			except_decl = structDecl;
-			init_func_types();
-		} else if ( structDecl->get_name() == "__cfaehm_try_resume_node" ) {
-			assert( nullptr == node_decl );
-			node_decl = structDecl;
-		} else if ( structDecl->get_name() == "__cfaehm_cleanup_hook" ) {
-			assert( nullptr == hook_decl );
-			hook_decl = structDecl;
-		}
-	}
-
-	Statement * TryMutatorCore::postmutate( TryStmt *tryStmt ) {
-		assert( except_decl );
-		assert( node_decl );
-		assert( hook_decl );
-
-		// Generate a prefix for the function names?
-
-		CompoundStmt * block = new CompoundStmt();
-		CompoundStmt * inner = take_try_block( tryStmt );
-
-		if ( tryStmt->get_finally() ) {
-			// Define the helper function.
-			FunctionDecl * finally_block =
-				create_finally_wrapper( tryStmt );
-			appendDeclStmt( block, finally_block );
-			// Create and add the finally cleanup hook.
-			appendDeclStmt( block, create_finally_hook( finally_block ) );
-		}
-
-		CatchList termination_handlers;
-		CatchList resumption_handlers;
-		split( tryStmt->get_catchers(),
-			   termination_handlers, resumption_handlers );
-
-		if ( resumption_handlers.size() ) {
-			// Define the helper function.
-			FunctionDecl * resume_handler =
-				create_resume_handler( resumption_handlers );
-			appendDeclStmt( block, resume_handler );
-			// Prepare hooks
-			inner = create_resume_wrapper( inner, resume_handler );
-		}
-
-		if ( termination_handlers.size() ) {
-			// Define the three helper functions.
-			FunctionDecl * try_wrapper = create_try_wrapper( inner );
-			appendDeclStmt( block, try_wrapper );
-			FunctionDecl * terminate_catch =
-				create_terminate_catch( termination_handlers );
-			appendDeclStmt( block, terminate_catch );
-			FunctionDecl * terminate_match =
-				create_terminate_match( termination_handlers );
-			appendDeclStmt( block, terminate_match );
-			// Build the call to the try wrapper.
-			inner = create_terminate_caller(
-				try_wrapper, terminate_catch, terminate_match );
-		}
-
-		// Embed the try block.
-		block->push_back( inner );
-
-		return block;
-	}
-
-	Statement * TryMutatorCore::postmutate( ThrowStmt *throwStmt ) {
-		// Only valid `throwResume;` statements should remain. (2/3 checks)
-		assert( ThrowStmt::Resume == throwStmt->kind && ! throwStmt->expr );
-		return create_resume_rethrow( throwStmt );
-	}
-
-	void translateThrows( std::list< Declaration *> & translationUnit ) {
-		PassVisitor<ThrowMutatorCore> translator;
-		mutateAll( translationUnit, translator );
-	}
-
-	void translateTries( std::list< Declaration *> & translationUnit ) {
-		PassVisitor<TryMutatorCore> translator;
-		mutateAll( translationUnit, translator );
-	}
-}
Index: src/ControlStruct/ForExprMutator.cc
===================================================================
--- src/ControlStruct/ForExprMutator.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,56 +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.
-//
-// ForExprMutator.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Feb  1 09:26:12 2022
-// Update Count     : 16
-//
-
-#include <list>                 // for list, _List_iterator, list<>::iterator
-
-#include "ForExprMutator.h"
-#include "SynTree/Label.h"      // for Label
-#include "SynTree/Statement.h"  // for Statement (ptr only), ForStmt, Compou...
-
-namespace ControlStruct {
-	Statement * hoist( Statement * originalStmt, std::list<Statement *> & init ) {
-		// If no hoisting is needed, skip:
-		if ( 0 == init.size() ) {
-			return originalStmt;
-		}
-
-		// Create compound statement, move initializers outside,
-		// the resut of the original stays as is.
-		CompoundStmt * block = new CompoundStmt();
-		std::list<Statement *> & stmts = block->get_kids();
-		stmts.splice( stmts.end(), init );
-
-		// Add for to the new block.
-		stmts.push_back( originalStmt );
-		return block;
-	}
-
-	Statement * ForExprMutator::postmutate( IfStmt * ifStmt ) {
-		return hoist( ifStmt, ifStmt->initialization );
-	}
-	Statement * ForExprMutator::postmutate( ForStmt * forStmt ) {
-		// hoist any initializer declarations to make them C89 (rather than C99)
-		return hoist( forStmt, forStmt->initialization );
-	}
-	Statement * ForExprMutator::postmutate( WhileDoStmt * whileDoStmt ) {
-		return hoist( whileDoStmt, whileDoStmt->initialization );
-	}
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/ForExprMutator.h
===================================================================
--- src/ControlStruct/ForExprMutator.h	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,36 +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.
-//
-// ForExprMutator.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Feb  1 09:18:50 2022
-// Update Count     : 7
-//
-
-#pragma once
-
-class IfStmt;
-class ForStmt;
-class WhileDoStmt;
-class Statement;
-
-namespace ControlStruct {
-	class ForExprMutator {
-	  public:
-		Statement * postmutate( IfStmt * );
-		Statement * postmutate( ForStmt * );
-		Statement * postmutate( WhileDoStmt * );
-	};
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/LabelFixer.cc
===================================================================
--- src/ControlStruct/LabelFixer.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,138 +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.
-//
-// LabelFixer.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Feb  1 09:12:09 2022
-// Update Count     : 162
-//
-
-#include <cassert>                         // for assert
-#include <list>                            // for list, _List_iterator, list...
-#include <string>                          // for operator+, string, operator==
-#include <utility>                         // for pair
-
-#include "ControlStruct/LabelGenerator.h"  // for LabelGenerator
-#include "LabelFixer.h"
-#include "MLEMutator.h"                    // for MultiLevelExitMutator
-#include "SynTree/Declaration.h"           // for FunctionDecl
-#include "SynTree/Expression.h"            // for NameExpr, Expression, Unty...
-#include "SynTree/Statement.h"             // for Statement, BranchStmt, Com...
-
-namespace ControlStruct {
-bool LabelFixer::Entry::insideLoop() {
-	return ( dynamic_cast< ForStmt * > ( definition ) ||
-		dynamic_cast< WhileDoStmt * > ( definition )  );
-}
-
-LabelFixer::LabelFixer( LabelGenerator * gen ) : generator ( gen ) {
-	if ( generator == 0 )
-		generator = LabelGenerator::getGenerator();
-}
-
-void LabelFixer::previsit( FunctionDecl * ) {
-	// need to go into a nested function in a fresh state
-	GuardValue( labelTable );
-	labelTable.clear();
-}
-
-void LabelFixer::postvisit( FunctionDecl * functionDecl ) {
-	PassVisitor<MultiLevelExitMutator> mlem( resolveJumps(), generator );
-	// We start in the body so we can stop when we hit another FunctionDecl.
-	maybeMutate( functionDecl->statements, mlem );
-}
-
-// prune to at most one label definition for each statement
-void LabelFixer::previsit( Statement * stmt ) {
-	std::list< Label > &labels = stmt->get_labels();
-
-	if ( ! labels.empty() ) {
-		// only remember one label for each statement
-		Label current = setLabelsDef( labels, stmt );
-	} // if
-}
-
-void LabelFixer::previsit( BranchStmt * branchStmt ) {
-	previsit( ( Statement *)branchStmt );
-
-	// for labeled branches, add an entry to the label table
-	Label target = branchStmt->get_target();
-	if ( target != "" ) {
-		setLabelsUsg( target, branchStmt );
-	}
-}
-
-void LabelFixer::previsit( LabelAddressExpr * addrExpr ) {
-	Label & target = addrExpr->arg;
-	assert( target != "" );
-	setLabelsUsg( target, addrExpr );
-}
-
-
-// Sets the definition of the labelTable entry to be the provided statement for every label in
-// the list parameter. Happens for every kind of statement.
-Label LabelFixer::setLabelsDef( std::list< Label > & llabel, Statement * definition ) {
-	assert( definition != 0 );
-	assert( llabel.size() > 0 );
-
-	for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ ) {
-		Label & l = *i;
-		l.set_statement( definition ); // attach statement to the label to be used later
-		if ( labelTable.find( l ) == labelTable.end() ) {
-			// All labels on this statement need to use the same entry,
-			// so this should only be created once.
-			// undefined and unused until now, add an entry
-			labelTable[ l ] = new Entry( definition );
-		} else if ( labelTable[ l ]->defined() ) {
-			// defined twice, error
-			SemanticError( l.get_statement()->location,
-				"Duplicate definition of label: " + l.get_name() );
-		} else {
-			// used previously, but undefined until now -> link with this entry
-			// Question: Is changing objects important?
-			delete labelTable[ l ];
-			labelTable[ l ] = new Entry( definition );
-		} // if
-	} // for
-
-	// Produce one of the labels attached to this statement to be temporarily used as the
-	// canonical label.
-	return labelTable[ llabel.front() ]->get_label();
-}
-
-// A label was used, add it to the table if it isn't already there
-template< typename UsageNode >
-void LabelFixer::setLabelsUsg( Label orgValue, UsageNode *use ) {
-	assert( use != 0 );
-
-	// add label with an unknown origin
-	if ( labelTable.find( orgValue ) == labelTable.end() ) {
-		labelTable[ orgValue ] = new Entry( 0 );
-	}
-}
-
-// Builds a table that maps a label to its defining statement.
-std::map<Label, Statement * > * LabelFixer::resolveJumps() {
-	std::map< Label, Statement * > *ret = new std::map< Label, Statement * >();
-	for ( std::map< Label, Entry * >::iterator i = labelTable.begin(); i != labelTable.end(); ++i ) {
-		if ( ! i->second->defined() ) {
-			SemanticError( i->first.get_statement()->location, "Use of undefined label: " + i->first.get_name() );
-		}
-		(*ret)[ i->first ] = i->second->get_definition();
-	}
-
-	return ret;
-}
-}  // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/LabelFixer.h
===================================================================
--- src/ControlStruct/LabelFixer.h	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,79 +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.
-//
-// LabelFixer.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 31 22:28:04 2022
-// Update Count     : 35
-//
-
-#pragma once
-
-#include <list>                    // for list
-#include <map>                     // for map
-
-#include "Common/PassVisitor.h"
-#include "Common/SemanticError.h"  // for SemanticError
-#include "SynTree/Label.h"         // for Label
-#include "SynTree/Visitor.h"       // for Visitor
-#include "SynTree/SynTree.h"       // for Visitor Nodes
-
-namespace ControlStruct {
-// normalizes label definitions and generates multi-level exit labels
-class LabelGenerator;
-
-class LabelFixer final : public WithGuards {
-  public:
-	LabelFixer( LabelGenerator *gen = 0 );
-
-	std::map < Label, Statement * > *resolveJumps();
-
-	// Declarations
-	void previsit( FunctionDecl *functionDecl );
-	void postvisit( FunctionDecl *functionDecl );
-
-	// Statements
-	void previsit( Statement *stmt );
-	void previsit( BranchStmt *branchStmt );
-
-	// Expressions
-	void previsit( LabelAddressExpr *addrExpr );
-
-	Label setLabelsDef( std::list< Label > &, Statement *definition );
-	template< typename UsageNode >
-	void setLabelsUsg( Label, UsageNode *usage = 0 );
-
-  private:
-	class Entry {
-		public:
-		Entry( Statement *to ) : definition( to ) {}
-		bool defined() { return ( definition != 0 ); }
-		bool insideLoop();
-
-		Label get_label() const { return label; }
-		void set_label( Label lab ) { label = lab; }
-
-		Statement *get_definition() const { return definition; }
-		void set_definition( Statement *def ) { definition = def; }
-
-	  private:
-		Label label;
-		Statement *definition;
-	};
-
-	std::map < Label, Entry *> labelTable;
-	LabelGenerator *generator;
-};
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/LabelGenerator.cc
===================================================================
--- src/ControlStruct/LabelGenerator.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,52 +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.
-//
-// LabelGenerator.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 31 22:30:26 2022
-// Update Count     : 28
-//
-
-#include <iostream>             // for operator<<, basic_ostream
-#include <sstream>              // for ostringstream
-#include <list>                 // for list
-using namespace std;
-
-#include "LabelGenerator.h"
-
-#include "SynTree/Attribute.h"  // for Attribute
-#include "SynTree/Label.h"      // for Label, operator<<
-#include "SynTree/Statement.h"  // for Statement
-
-namespace ControlStruct {
-int LabelGenerator::current = 0;
-LabelGenerator * LabelGenerator::labelGenerator = nullptr;
-
-LabelGenerator * LabelGenerator::getGenerator() {
-	if ( LabelGenerator::labelGenerator == 0 )
-		LabelGenerator::labelGenerator = new LabelGenerator();
-	return labelGenerator;
-}
-
-Label LabelGenerator::newLabel( string suffix, Statement * stmt ) {
-	ostringstream os;
-	os << "__L_OLD" << current++ << "__" << suffix;
-	if ( stmt && ! stmt->get_labels().empty() ) {
-		os << "_" << stmt->get_labels().front() << "__";
-	} // if
-	string ret = os.str();
-	Label l( ret );
-	l.get_attributes().push_back( new Attribute( "unused" ) );
-	return l;
-}
-} // namespace ControlStruct
-
-// Local Variables: //
-// mode: c++ //
-// End: //
Index: src/ControlStruct/LabelGenerator.h
===================================================================
--- src/ControlStruct/LabelGenerator.h	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,45 +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.
-//
-// LabelGenerator.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 31 22:30:10 2022
-// Update Count     : 16
-//
-
-#pragma once
-
-#include <string>           // for string
-
-#include "SynTree/Label.h"  // for Label
-
-class Statement;
-
-namespace ast {
-class Stmt;
-class Label;
-}
-
-namespace ControlStruct {
-class LabelGenerator {
-	static int current;
-	static LabelGenerator *labelGenerator;
-  protected:
-	LabelGenerator() {}
-  public:
-	static LabelGenerator *getGenerator();
-	static Label newLabel(std::string suffix, Statement * stmt = nullptr);
-};
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/MLEMutator.cc
===================================================================
--- src/ControlStruct/MLEMutator.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,464 +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.
-//
-// MLEMutator.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb  2 20:18:57 2022
-// Update Count     : 227
-//
-
-// NOTE: There are two known subtle differences from the code that uC++ generates for the same input
-//   -CFA puts the break label inside at the end of a switch, uC++ puts it after
-//   -CFA puts the break label after a block, uC++ puts it inside at the end
-// It is unclear if these differences are important, but if they are, then the fix would go in this file, since this is
-// where these labels are generated.
-
-#include <ext/alloc_traits.h>              // for __alloc_traits<>::value_type
-#include <algorithm>                       // for find, find_if
-#include <cassert>                         // for assert, assertf
-#include <memory>                          // for allocator_traits<>::value_...
-
-#include "Common/ToString.hpp"             // for toString
-#include "ControlStruct/LabelGenerator.h"  // for LabelGenerator
-#include "MLEMutator.h"
-#include "SynTree/Attribute.h"             // for Attribute
-#include "SynTree/Expression.h"            // for Expression
-#include "SynTree/Statement.h"             // for BranchStmt, CompoundStmt
-
-namespace ControlStruct {
-	MultiLevelExitMutator::~MultiLevelExitMutator() {
-		delete targetTable;
-		targetTable = 0;
-	}
-	namespace {
-		bool isLoop( const MultiLevelExitMutator::Entry & e ) {
-			return dynamic_cast< WhileDoStmt * >( e.get_controlStructure() )
-				|| dynamic_cast< ForStmt * >( e.get_controlStructure() );
-		}
-		bool isSwitch( const MultiLevelExitMutator::Entry & e ) {
-			return dynamic_cast< SwitchStmt *>( e.get_controlStructure() );
-		}
-
-		bool isBreakTarget( const MultiLevelExitMutator::Entry & e ) {
-			return isLoop( e ) || isSwitch( e )
-				|| dynamic_cast< CompoundStmt *>( e.get_controlStructure() );
-		}
-		bool isContinueTarget( const MultiLevelExitMutator::Entry & e ) {
-			return isLoop( e );
-		}
-		bool isFallthroughTarget( const MultiLevelExitMutator::Entry & e ) {
-			return dynamic_cast< CaseStmt *>( e.get_controlStructure() );
-		}
-		bool isFallthroughDefaultTarget( const MultiLevelExitMutator::Entry & e ) {
-			return isSwitch( e );
-		}
-	} // namespace
-
-	void MultiLevelExitMutator::premutate( FunctionDecl * ) {
-		visit_children = false;
-	}
-
-	// break labels have to come after the statement they break out of, so mutate a statement, then if they inform us
-	// through the breakLabel field that they need a place to jump to on a break statement, add the break label to the
-	// body of statements
-	void MultiLevelExitMutator::fixBlock( std::list< Statement * > &kids, bool caseClause ) {
-		SemanticErrorException errors;
-
-		for ( std::list< Statement * >::iterator k = kids.begin(); k != kids.end(); k++ ) {
-			if ( caseClause ) {
-				// once a label is seen, it's no longer a valid fallthrough target
-				for ( Label & l : (*k)->labels ) {
-					fallthroughLabels.erase( l );
-				}
-			}
-
-			// aggregate errors since the PassVisitor mutate loop was unrollled
-			try {
-				*k = (*k)->acceptMutator(*visitor);
-			} catch( SemanticErrorException &e ) {
-				errors.append( e );
-			}
-
-			if ( ! get_breakLabel().empty() ) {
-				std::list< Statement * >::iterator next = k+1;
-				std::list<Label> ls; ls.push_back( get_breakLabel() );
-				kids.insert( next, new NullStmt( ls ) );
-				set_breakLabel("");
-			} // if
-		} // for
-
-		if ( ! errors.isEmpty() ) {
-			throw errors;
-		}
-	}
-
-	void MultiLevelExitMutator::premutate( CompoundStmt *cmpndStmt ) {
-		visit_children = false;
-		bool labeledBlock = !(cmpndStmt->labels.empty());
-		if ( labeledBlock ) {
-			Label brkLabel = generator->newLabel("blockBreak", cmpndStmt);
-			enclosingControlStructures.push_back( Entry( cmpndStmt, brkLabel ) );
-			GuardAction( [this]() { enclosingControlStructures.pop_back(); } );
-		} // if
-
-		// a child statement may set the break label - if they do, attach it to the next statement
-		std::list< Statement * > &kids = cmpndStmt->kids;
-		fixBlock( kids );
-
-		if ( labeledBlock ) {
-			assert( ! enclosingControlStructures.empty() );
-			if ( ! enclosingControlStructures.back().useBreakExit().empty() ) {
-				set_breakLabel( enclosingControlStructures.back().useBreakExit() );
-			} // if
-		} // if
-	}
-
-
-	void addUnused( Statement * stmt, const Label & originalTarget ) {
-		// break/continue without a label doesn't need unused attribute
-		if ( originalTarget == "" ) return;
-		// add unused attribute to the originalTarget of a labelled break/continue
-		for ( Label & l : stmt->get_labels() ) {
-			// find the label to add unused attribute to
-			if ( l == originalTarget ) {
-				for ( Attribute * attr : l.get_attributes() ) {
-					// ensure attribute isn't added twice
-					if ( attr->get_name() == "unused" ) return;
-				}
-				l.get_attributes().push_back( new Attribute( "unused" ) );
-				return;
-			}
-		}
-		assertf( false, "CFA internal error: could not find label '%s' on statement %s",
-			originalTarget.get_name().c_str(), toString( stmt ).c_str() );
-	}
-
-
-	Statement *MultiLevelExitMutator::postmutate( BranchStmt *branchStmt ) {
-		std::string originalTarget = branchStmt->originalTarget;
-
-		std::list< Entry >::reverse_iterator targetEntry;
-		switch ( branchStmt->get_type() ) {
-			case BranchStmt::Goto:
-				return branchStmt;
-			case BranchStmt::Continue:
-			case BranchStmt::Break: {
-				bool isContinue = branchStmt->get_type() == BranchStmt::Continue;
-				// unlabeled break/continue
-				if ( branchStmt->get_target() == "" ) {
-					if ( isContinue ) {
-						// continue target is outermost loop
-						targetEntry = std::find_if( enclosingControlStructures.rbegin(), enclosingControlStructures.rend(), isContinueTarget );
-					} else {
-						// break target is outermost loop, switch, or block control structure
-						if ( enclosingControlStructures.empty() ) SemanticError( branchStmt->location, "'break' outside a loop, 'switch', or labelled block" );
-						targetEntry = std::find_if( enclosingControlStructures.rbegin(), enclosingControlStructures.rend(), isBreakTarget );
-					} // if
-				} else {
-					// labeled break/continue - lookup label in table to find attached control structure
-					targetEntry = std::find( enclosingControlStructures.rbegin(), enclosingControlStructures.rend(), (*targetTable)[branchStmt->get_target()] );
-				} // if
-				// ensure that selected target is valid
-				if ( targetEntry == enclosingControlStructures.rend() || (isContinue && ! isContinueTarget( *targetEntry ) ) ) {
-					SemanticError( branchStmt->location, toString( (isContinue ? "'continue'" : "'break'"), " target must be an enclosing ", (isContinue ? "loop: " : "control structure: "), originalTarget ) );
-				} // if
-				break;
-			}
-			case BranchStmt::FallThrough:
-				targetEntry = std::find_if( enclosingControlStructures.rbegin(), enclosingControlStructures.rend(), isFallthroughTarget );
-				// ensure that selected target is valid
-				if ( targetEntry == enclosingControlStructures.rend() ) {
-					SemanticError( branchStmt->location, "'fallthrough' must be enclosed in a 'switch' or 'choose'" );
-				} // if
-				if ( branchStmt->get_target() != "" ) {
-					// labelled fallthrough
-					// target must be in the set of valid fallthrough labels
-					if ( ! fallthroughLabels.count( branchStmt->get_target() ) ) {
-						SemanticError( branchStmt->location, toString( "'fallthrough' target must be a later case statement: ", originalTarget ) );
-					}
-					return new BranchStmt( originalTarget, BranchStmt::Goto );
-				}
-				break;
-			case BranchStmt::FallThroughDefault: {
-				// fallthrough default
-				targetEntry = std::find_if( enclosingControlStructures.rbegin(), enclosingControlStructures.rend(), isFallthroughDefaultTarget );
-
-				// ensure that fallthrough is within a switch or choose
-				if ( targetEntry == enclosingControlStructures.rend() ) {
-					SemanticError( branchStmt->location, "'fallthrough' must be enclosed in a 'switch' or 'choose'" );
-				} // if
-
-				// ensure that switch or choose has a default clause
-				SwitchStmt * switchStmt = strict_dynamic_cast< SwitchStmt * >( targetEntry->get_controlStructure() );
-				bool foundDefault = false;
-				for ( Statement * stmt : switchStmt->statements ) {
-					CaseStmt * caseStmt = strict_dynamic_cast< CaseStmt * >( stmt );
-					if ( caseStmt->isDefault() ) {
-						foundDefault = true;
-					} // if
-				} // for
-				if ( ! foundDefault ) {
-					SemanticError( branchStmt->location, "'fallthrough default' must be enclosed in a 'switch' or 'choose' control structure with a 'default' clause" );
-				}
-				break;
-			}
-
-			default:
-				assert( false );
-		} // switch
-
-		// branch error checks, get the appropriate label name and create a goto
-		Label exitLabel;
-		switch ( branchStmt->type ) {
-		  case BranchStmt::Break:
-				assert( targetEntry->useBreakExit() != "");
-				exitLabel = targetEntry->useBreakExit();
-				break;
-		  case BranchStmt::Continue:
-				assert( targetEntry->useContExit() != "");
-				exitLabel = targetEntry->useContExit();
-				break;
-		  case BranchStmt::FallThrough:
-				assert( targetEntry->useFallExit() != "");
-				exitLabel = targetEntry->useFallExit();
-				break;
-		  case BranchStmt::FallThroughDefault:
-				assert( targetEntry->useFallDefaultExit() != "");
-				exitLabel = targetEntry->useFallDefaultExit();
-				// check that fallthrough default comes before the default clause
-				if ( ! targetEntry->isFallDefaultValid() ) {
-					SemanticError( branchStmt->location, "'fallthrough default' must precede the 'default' clause" );
-				}
-				break;
-		  default:
-				assert(0);					// shouldn't be here
-		} // switch
-
-		// add unused attribute to label to silence warnings
-		addUnused( targetEntry->get_controlStructure(), branchStmt->originalTarget );
-
-		// transform break/continue statements into goto to simplify later handling of branches
-		delete branchStmt;
-		return new BranchStmt( exitLabel, BranchStmt::Goto );
-	}
-
-	Statement *MultiLevelExitMutator::mutateLoop( Statement *bodyLoop, Entry &e ) {
-		// only generate these when needed
-		if( !e.isContUsed() && !e.isBreakUsed() ) return bodyLoop;
-
-		// ensure loop body is a block
-		CompoundStmt * newBody = new CompoundStmt();
-		newBody->get_kids().push_back( bodyLoop );
-
-		if ( e.isContUsed() ) {
-			// continue label goes in the body as the last statement
-			std::list< Label > labels; labels.push_back( e.useContExit() );
-			newBody->get_kids().push_back( new NullStmt( labels ) );
-		} // if
-
-		if ( e.isBreakUsed() ) {
-			// break label goes after the loop -- it'll get set by the outer mutator if we do this
-			set_breakLabel( e.useBreakExit() );
-		} // if
-
-		return newBody;
-	}
-
-	template< typename LoopClass >
-	void MultiLevelExitMutator::prehandleLoopStmt( LoopClass * loopStmt ) {
-		// remember this as the most recent enclosing loop, then mutate the body of the loop -- this will determine
-		// whether brkLabel and contLabel are used with branch statements and will recursively do the same to nested
-		// loops
-		Label brkLabel = generator->newLabel("loopBreak", loopStmt);
-		Label contLabel = generator->newLabel("loopContinue", loopStmt);
-		enclosingControlStructures.push_back( Entry( loopStmt, brkLabel, contLabel ) );
-		GuardAction( [this]() { enclosingControlStructures.pop_back(); } );
-	}
-
-	template< typename LoopClass >
-	Statement * MultiLevelExitMutator::posthandleLoopStmt( LoopClass * loopStmt ) {
-		assert( ! enclosingControlStructures.empty() );
-		Entry &e = enclosingControlStructures.back();
-		// sanity check that the enclosing loops have been popped correctly
-		assert ( e == loopStmt );
-
-		// this will take the necessary steps to add definitions of the previous two labels, if they are used.
-		loopStmt->body = mutateLoop( loopStmt->get_body(), e );
-		return loopStmt;
-	}
-
-	void MultiLevelExitMutator::premutate( WhileDoStmt * whileDoStmt ) {
-		return prehandleLoopStmt( whileDoStmt );
-	}
-
-	void MultiLevelExitMutator::premutate( ForStmt * forStmt ) {
-		return prehandleLoopStmt( forStmt );
-	}
-
-	Statement * MultiLevelExitMutator::postmutate( WhileDoStmt * whileDoStmt ) {
-		return posthandleLoopStmt( whileDoStmt );
-	}
-
-	Statement * MultiLevelExitMutator::postmutate( ForStmt * forStmt ) {
-		return posthandleLoopStmt( forStmt );
-	}
-
-	void MultiLevelExitMutator::premutate( IfStmt * ifStmt ) {
-		// generate a label for breaking out of a labeled if
-		bool labeledBlock = !(ifStmt->get_labels().empty());
-		if ( labeledBlock ) {
-			Label brkLabel = generator->newLabel("blockBreak", ifStmt);
-			enclosingControlStructures.push_back( Entry( ifStmt, brkLabel ) );
-			GuardAction( [this]() { enclosingControlStructures.pop_back(); } );
-		} // if
-	}
-
-	Statement * MultiLevelExitMutator::postmutate( IfStmt * ifStmt ) {
-		bool labeledBlock = !(ifStmt->get_labels().empty());
-		if ( labeledBlock ) {
-			if ( ! enclosingControlStructures.back().useBreakExit().empty() ) {
-				set_breakLabel( enclosingControlStructures.back().useBreakExit() );
-			} // if
-		} // if
-		return ifStmt;
-	}
-
-	void MultiLevelExitMutator::premutate( TryStmt * tryStmt ) {
-		// generate a label for breaking out of a labeled if
-		bool labeledBlock = !(tryStmt->get_labels().empty());
-		if ( labeledBlock ) {
-			Label brkLabel = generator->newLabel("blockBreak", tryStmt);
-			enclosingControlStructures.push_back( Entry( tryStmt, brkLabel ) );
-			GuardAction( [this]() { enclosingControlStructures.pop_back(); } );
-		} // if
-	}
-
-	Statement * MultiLevelExitMutator::postmutate( TryStmt * tryStmt ) {
-		bool labeledBlock = !(tryStmt->get_labels().empty());
-		if ( labeledBlock ) {
-			if ( ! enclosingControlStructures.back().useBreakExit().empty() ) {
-				set_breakLabel( enclosingControlStructures.back().useBreakExit() );
-			} // if
-		} // if
-		return tryStmt;
-	}
-
-	void MultiLevelExitMutator::premutate( FinallyStmt * ) {
-		GuardAction([this, old = std::move(enclosingControlStructures)]() {
-			enclosingControlStructures = std::move(old);
-		});
-		enclosingControlStructures = std::list<Entry>();
-		GuardValue( inFinally );
-		inFinally = true;
-	}
-
-	void MultiLevelExitMutator::premutate( ReturnStmt *returnStmt ) {
-		if ( inFinally ) {
-			SemanticError( returnStmt->location, "'return' may not appear in a finally clause" );
-		}
-	}
-
-	void MultiLevelExitMutator::premutate( CaseStmt *caseStmt ) {
-		visit_children = false;
-
-		// mark default as seen before visiting its statements to catch default loops
-		if ( caseStmt->isDefault() ) {
-			enclosingControlStructures.back().seenDefault();
-		} // if
-
-		caseStmt->condition = maybeMutate( caseStmt->condition, *visitor );
-		Label fallLabel = generator->newLabel( "fallThrough", caseStmt );
-		{
-			// ensure that stack isn't corrupted by exceptions in fixBlock
-			auto guard = makeFuncGuard( [&]() { enclosingControlStructures.push_back( Entry( caseStmt, fallLabel ) ); }, [this]() { enclosingControlStructures.pop_back(); } );
-
-			// empty case statement
-			if( ! caseStmt->stmts.empty() ) {
-				// the parser ensures that all statements in a case are grouped into a block
-				CompoundStmt * block = strict_dynamic_cast< CompoundStmt * >( caseStmt->stmts.front() );
-				fixBlock( block->kids, true );
-
-				// add fallthrough label if necessary
-				assert( ! enclosingControlStructures.empty() );
-				if ( enclosingControlStructures.back().isFallUsed() ) {
-					std::list<Label> ls{ enclosingControlStructures.back().useFallExit() };
-					caseStmt->stmts.push_back( new NullStmt( ls ) );
-				} // if
-			} // if
-		}
-		assert( ! enclosingControlStructures.empty() );
-		assertf( dynamic_cast<SwitchStmt *>( enclosingControlStructures.back().get_controlStructure() ),
-				 "CFA internal error: control structure enclosing a case clause must be a switch, but is: %s",
-				 toCString( enclosingControlStructures.back().get_controlStructure() ) );
-		if ( caseStmt->isDefault() ) {
-			if ( enclosingControlStructures.back().isFallDefaultUsed() ) {
-				// add fallthrough default label if necessary
-				std::list<Label> ls{ enclosingControlStructures.back().useFallDefaultExit() };
-				caseStmt->stmts.push_front( new NullStmt( ls ) );
-			} // if
-		} // if
-	}
-
-	void MultiLevelExitMutator::premutate( SwitchStmt *switchStmt ) {
-		// generate a label for breaking out of a labeled switch
-		Label brkLabel = generator->newLabel("switchBreak", switchStmt);
-		auto it = std::find_if( switchStmt->statements.rbegin(), switchStmt->statements.rend(), [](Statement * stmt) {
-			CaseStmt * caseStmt = strict_dynamic_cast< CaseStmt * >( stmt );
-			return caseStmt->isDefault();
-		});
-		CaseStmt * defaultCase = it != switchStmt->statements.rend() ? strict_dynamic_cast<CaseStmt *>( *it ) : nullptr;
-		Label fallDefaultLabel = defaultCase ? generator->newLabel( "fallThroughDefault", defaultCase ) : "";
-		enclosingControlStructures.push_back( Entry(switchStmt, brkLabel, fallDefaultLabel) );
-		GuardAction( [this]() { enclosingControlStructures.pop_back(); } );
-
-		// Collect valid labels for fallthrough. This is initially all labels at the same level as a case statement.
-		// As labels are seen during traversal, they are removed, since fallthrough is not allowed to jump backwards.
-		for ( Statement * stmt : switchStmt->statements ) {
-			CaseStmt * caseStmt = strict_dynamic_cast< CaseStmt * >( stmt );
-			if ( caseStmt->stmts.empty() ) continue;
-			CompoundStmt * block = dynamic_cast< CompoundStmt * >( caseStmt->stmts.front() );
-			for ( Statement * stmt : block->kids ) {
-				for ( Label & l : stmt->labels ) {
-					fallthroughLabels.insert( l );
-				}
-			}
-		}
-	}
-
-	Statement * MultiLevelExitMutator::postmutate( SwitchStmt * switchStmt ) {
-		Entry &e = enclosingControlStructures.back();
-		assert ( e == switchStmt );
-
-		// only generate break label if labeled break is used
-		if ( e.isBreakUsed() ) {
-			// for the purposes of keeping switch statements uniform (i.e. all statements that are direct children of a
-			// switch should be CastStmts), append the exit label + break to the last case statement; create a default
-			// case if there are no cases
-			std::list< Statement * > &statements = switchStmt->statements;
-			if ( statements.empty() ) {
-				statements.push_back( CaseStmt::makeDefault() );
-			} // if
-
-			if ( CaseStmt * c = dynamic_cast< CaseStmt * >( statements.back() ) ) {
-				Statement * stmt = new BranchStmt( Label("brkLabel"), BranchStmt::Break );
-				stmt->labels.push_back( e.useBreakExit() );
-				c->stmts.push_back( stmt );
-			} else assert(0); // as of this point, all statements of a switch are still CaseStmts
-		} // if
-
-		assert ( enclosingControlStructures.back() == switchStmt );
-		return switchStmt;
-	}
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/MLEMutator.h
===================================================================
--- src/ControlStruct/MLEMutator.h	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,134 +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.
-//
-// MLEMutator.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Feb  1 09:27:24 2022
-// Update Count     : 50
-//
-
-#pragma once
-
-#include <list>                    // for list
-#include <map>                     // for map
-#include <string>                  // for string
-#include <set>                     // for unordered_set
-
-#include "Common/PassVisitor.h"
-#include "Common/SemanticError.h"  // for SemanticError
-#include "SynTree/Label.h"         // for Label
-#include "SynTree/Mutator.h"       // for Mutator
-#include "SynTree/SynTree.h"       // for Visitor Nodes
-
-namespace ControlStruct {
-	class LabelGenerator;
-
-	class MultiLevelExitMutator : public WithVisitorRef<MultiLevelExitMutator>,
-			public WithShortCircuiting, public WithGuards {
-	  public:
-		class Entry;
-		MultiLevelExitMutator( std::map<Label, Statement *> *t, LabelGenerator *gen = 0 ) :
-			targetTable( t ), breakLabel(std::string("")), generator( gen ) {}
-		~MultiLevelExitMutator();
-
-		void premutate( FunctionDecl * );
-
-		void premutate( CompoundStmt *cmpndStmt );
-		Statement * postmutate( BranchStmt *branchStmt );
-		void premutate( WhileDoStmt *whileDoStmt );
-		Statement * postmutate( WhileDoStmt *whileDoStmt );
-		void premutate( ForStmt *forStmt );
-		Statement * postmutate( ForStmt *forStmt );
-		void premutate( CaseStmt *caseStmt );
-		void premutate( IfStmt *ifStmt );
-		Statement * postmutate( IfStmt *ifStmt );
-		void premutate( SwitchStmt *switchStmt );
-		Statement * postmutate( SwitchStmt *switchStmt );
-		void premutate( ReturnStmt *returnStmt );
-		void premutate( TryStmt *tryStmt );
-		Statement * postmutate( TryStmt *tryStmt );
-		void premutate( FinallyStmt *finallyStmt );
-
-		Statement *mutateLoop( Statement *bodyLoop, Entry &e );
-
-		Label &get_breakLabel() { return breakLabel; }
-		void set_breakLabel( Label newValue ) { breakLabel = newValue; }
-
-		class Entry {
-		  public:
-			// specialized constructors for each combination of statement with labelled break/continue/fallthrough that is valid to cleanup the use cases
-			explicit Entry( ForStmt *stmt, Label breakExit, Label contExit ) :
-				stmt( stmt ), breakExit( breakExit ), contExit( contExit ) {}
-
-			explicit Entry( WhileDoStmt *stmt, Label breakExit, Label contExit ) :
-				stmt( stmt ), breakExit( breakExit ), contExit( contExit ) {}
-
-			explicit Entry( CompoundStmt *stmt, Label breakExit ) :
-				stmt( stmt ), breakExit( breakExit ) {}
-
-			explicit Entry( IfStmt *stmt, Label breakExit ) :
-				stmt( stmt ), breakExit( breakExit ) {}
-
-			explicit Entry( CaseStmt *stmt, Label fallExit ) :
-				stmt( stmt ), fallExit( fallExit ) {}
-
-			explicit Entry( SwitchStmt *stmt, Label breakExit, Label fallDefaultExit ) :
-				stmt( stmt ), breakExit( breakExit ), fallDefaultExit( fallDefaultExit ) {}
-
-			explicit Entry( TryStmt *stmt, Label breakExit ) :
-				stmt( stmt ), breakExit( breakExit ) {}
-
-			bool operator==( const Statement *other ) { return stmt == other; }
-			bool operator!=( const Statement *other ) { return stmt != other; }
-
-			bool operator==( const Entry &other ) { return stmt == other.get_controlStructure(); }
-
-			Statement *get_controlStructure() const { return stmt; }
-
-			Label useContExit() { contUsed = true; return contExit; }
-			Label useBreakExit() { breakUsed = true; return breakExit; }
-			Label useFallExit() { fallUsed = true; return fallExit; }
-			Label useFallDefaultExit() { fallDefaultUsed = true; return fallDefaultExit; }
-
-			bool isContUsed() const { return contUsed; }
-			bool isBreakUsed() const { return breakUsed; }
-			bool isFallUsed() const { return fallUsed; }
-			bool isFallDefaultUsed() const { return fallDefaultUsed; }
-			void seenDefault() { fallDefaultValid = false; }
-			bool isFallDefaultValid() const { return fallDefaultValid; }
-		  private:
-			Statement *stmt;
-			Label breakExit, contExit, fallExit, fallDefaultExit;
-			bool breakUsed = false, contUsed = false, fallUsed = false, fallDefaultUsed = false;
-			bool fallDefaultValid = true;
-		};
-
-	  private:
-		std::map< Label, Statement * > *targetTable;
-		std::set< Label > fallthroughLabels;
-		std::list< Entry > enclosingControlStructures;
-		Label breakLabel;
-		LabelGenerator *generator;
-		bool inFinally = false;
-
-		template< typename LoopClass >
-		void prehandleLoopStmt( LoopClass * loopStmt );
-
-		template< typename LoopClass >
-		Statement * posthandleLoopStmt( LoopClass * loopStmt );
-
-		void fixBlock( std::list< Statement * > &kids, bool caseClause = false );
-	};
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/Mutate.cc
===================================================================
--- src/ControlStruct/Mutate.cc	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,45 +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.
-//
-// Mutate.cc --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 16 03:22:07 2020
-// Update Count     : 10
-//
-
-#include <iterator>                // for back_inserter, inserter
-#include <list>                    // for list
-
-#include "Common/PassVisitor.h"    // for mutateAll
-#include "ForExprMutator.h"        // for ForExprMutator
-#include "LabelFixer.h"            // for LabelFixer
-#include "Mutate.h"
-#include "SynTree/Declaration.h"   // for Declaration
-#include "SynTree/Mutator.h"       // for mutateAll
-
-#include "Common/PassVisitor.h"    // for PassVisitor
-#include "SynTree/Visitor.h"       // for acceptAll
-
-namespace ControlStruct {
-	void fixLabels( std::list< Declaration * > & translationUnit ) {
-		PassVisitor<LabelFixer> lfix;
-		acceptAll( translationUnit, lfix );
-	}
-
-	void hoistControlDecls( std::list< Declaration * > & translationUnit ) {
-		PassVisitor<ForExprMutator> formut;
-		mutateAll( translationUnit, formut );
-	}
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/Mutate.h
===================================================================
--- src/ControlStruct/Mutate.h	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ 	(revision )
@@ -1,35 +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.
-//
-// Mutate.h --
-//
-// Author           : Rodolfo G. Esteves
-// Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:17:59 2017
-// Update Count     : 3
-//
-
-#pragma once
-
-#include <list>  // for list
-
-class Declaration;
-
-/// Desugars Cforall control structures
-namespace ControlStruct {
-	/// normalizes label definitions and generates multi-level exit labels
-	void fixLabels( std::list< Declaration * > & translationUnit );
-
-	/// hoist initialization out of for statements
-	void hoistControlDecls( std::list< Declaration * > & translationUnit );
-} // namespace ControlStruct
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/ControlStruct/module.mk
===================================================================
--- src/ControlStruct/module.mk	(revision 553f032fc07a39fc4fc69943eb5e97e2504b74a1)
+++ src/ControlStruct/module.mk	(revision c6b4432f5c6c6679b981f5a6bded51ad30ac00d9)
@@ -16,27 +16,15 @@
 
 SRC += \
-	ControlStruct/ExceptDecl.cc \
 	ControlStruct/ExceptDeclNew.cpp \
 	ControlStruct/ExceptDecl.h \
 	ControlStruct/ExceptTranslateNew.cpp \
-	ControlStruct/ExceptTranslate.cc \
 	ControlStruct/ExceptTranslate.h \
 	ControlStruct/FixLabels.cpp \
 	ControlStruct/FixLabels.hpp \
-	ControlStruct/ForExprMutator.cc \
-	ControlStruct/ForExprMutator.h \
 	ControlStruct/HoistControlDecls.cpp \
 	ControlStruct/HoistControlDecls.hpp \
-	ControlStruct/LabelFixer.cc \
-	ControlStruct/LabelFixer.h \
-	ControlStruct/LabelGenerator.cc \
-	ControlStruct/LabelGenerator.h \
 	ControlStruct/LabelGeneratorNew.cpp \
 	ControlStruct/LabelGeneratorNew.hpp \
-	ControlStruct/MLEMutator.cc \
-	ControlStruct/MLEMutator.h \
 	ControlStruct/MultiLevelExit.cpp \
-	ControlStruct/MultiLevelExit.hpp \
-	ControlStruct/Mutate.cc \
-	ControlStruct/Mutate.h
+	ControlStruct/MultiLevelExit.hpp
 
