Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 8e18b8ea86cf04408f8b0f66aa04b875024216ee)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 1d7b0a8b3222b5be41c98932430124a3777a31a9)
@@ -233,8 +233,8 @@
 	}
 
-	void AlternativeFinder::find( Expression *expr, bool adjust, bool prune, bool failFast ) {
+	void AlternativeFinder::find( Expression *expr, ResolvMode mode ) {
 		PassVisitor<Finder> finder( *this );
 		expr->accept( finder );
-		if ( failFast && alternatives.empty() ) {
+		if ( mode.failFast && alternatives.empty() ) {
 			PRINT(
 				std::cerr << "No reasonable alternatives for expression " << expr << std::endl;
@@ -242,5 +242,5 @@
 			SemanticError( expr, "No reasonable alternatives for expression " );
 		}
-		if ( prune ) {
+		if ( mode.prune ) {
 			auto oldsize = alternatives.size();
 			PRINT(
@@ -250,5 +250,5 @@
 			AltList pruned;
 			pruneAlternatives( alternatives.begin(), alternatives.end(), back_inserter( pruned ) );
-			if ( failFast && pruned.empty() ) {
+			if ( mode.failFast && pruned.empty() ) {
 				std::ostringstream stream;
 				AltList winners;
@@ -269,7 +269,7 @@
 		}
 		// adjust types after pruning so that types substituted by pruneAlternatives are correctly adjusted
-		for ( AltList::iterator i = alternatives.begin(); i != alternatives.end(); ++i ) {
-			if ( adjust ) {
-				adjustExprType( i->expr->get_result(), i->env, indexer );
+		if ( mode.adjust ) {
+			for ( Alternative& i : alternatives ) {
+				adjustExprType( i.expr->result, i.env, indexer );
 			}
 		}
@@ -283,13 +283,13 @@
 
 	void AlternativeFinder::findWithAdjustment( Expression *expr ) {
-		find( expr, true );
+		find( expr, ResolvMode::withAdjustment() );
 	}
 
 	void AlternativeFinder::findWithoutPrune( Expression * expr ) {
-		find( expr, true, false );
+		find( expr, ResolvMode::withoutPrune() );
 	}
 
 	void AlternativeFinder::maybeFind( Expression * expr ) {
-		find( expr, true, true, false );
+		find( expr, ResolvMode::withoutFailFast() );
 	}
 
Index: src/ResolvExpr/AlternativeFinder.h
===================================================================
--- src/ResolvExpr/AlternativeFinder.h	(revision 8e18b8ea86cf04408f8b0f66aa04b875024216ee)
+++ src/ResolvExpr/AlternativeFinder.h	(revision 1d7b0a8b3222b5be41c98932430124a3777a31a9)
@@ -22,4 +22,5 @@
 #include "Alternative.h"                 // for AltList, Alternative
 #include "ExplodedActual.h"              // for ExplodedActual
+#include "ResolvMode.h"                  // for ResolvMode
 #include "ResolvExpr/Cost.h"             // for Cost, Cost::infinity
 #include "ResolvExpr/TypeEnvironment.h"  // for AssertionSet, OpenVarSet
@@ -68,5 +69,5 @@
 		}
 
-		void find( Expression *expr, bool adjust = false, bool prune = true, bool failFast = true );
+		void find( Expression *expr, ResolvMode mode = ResolvMode{} );
 		/// Calls find with the adjust flag set; adjustment turns array and function types into equivalent pointer types
 		void findWithAdjustment( Expression *expr );
Index: src/ResolvExpr/ResolvMode.h
===================================================================
--- src/ResolvExpr/ResolvMode.h	(revision 1d7b0a8b3222b5be41c98932430124a3777a31a9)
+++ src/ResolvExpr/ResolvMode.h	(revision 1d7b0a8b3222b5be41c98932430124a3777a31a9)
@@ -0,0 +1,52 @@
+//
+// 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.
+//
+// ResolvMode.h --
+//
+// Author           : Aaron B. Moss
+// Created On       : Mon Jun 11 13:28:00 2018
+// Last Modified By : Aaron B. Moss
+// Last Modified On : Mon Jun 11 13:28:00 2018
+// Update Count     : 1
+//
+
+#pragma once
+
+namespace ResolvExpr {
+	/// Flag set for resolution
+	struct ResolvMode {
+		const bool adjust;			 ///< Adjust array and function types to pointer types? [false]
+		const bool prune;            ///< Prune alternatives to min-cost per return type? [true]
+		const bool failFast;         ///< Fail on no resulting alternatives? [true]
+		const bool checkAssertions;  ///< Should assertions be checked? [false]
+
+	private:
+		constexpr ResolvMode(bool a, bool p, bool ff, bool ca)
+			: adjust(a), prune(p), failFast(ff), checkAssertions(ca) {}
+
+	public:
+		/// Default settings
+		constexpr ResolvMode()
+			: adjust(false), prune(true), failFast(true), checkAssertions(false) {}
+		
+		/// With adjust flag set; turns array and function types into equivalent pointers
+		static constexpr ResolvMode withAdjustment() { return { true, true, true, false }; }
+
+		/// With adjust flag set but prune unset; pruning ensures there is at least one alternative 
+		/// per result type
+		static constexpr ResolvMode withoutPrune() { return { true, false, true, false }; }
+
+		/// With adjust and prune flags set but failFast unset; failFast ensures there is at least 
+		/// one resulting alternative
+		static constexpr ResolvMode withoutFailFast() { return { true, true, false, false }; }
+	};
+} // namespace ResolvExpr
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 8e18b8ea86cf04408f8b0f66aa04b875024216ee)
+++ src/ResolvExpr/Resolver.cc	(revision 1d7b0a8b3222b5be41c98932430124a3777a31a9)
@@ -33,4 +33,5 @@
 #include "ResolveTypeof.h"               // for resolveTypeof
 #include "Resolver.h"
+#include "ResolvMode.h"                  // for ResolvMode
 #include "SymTab/Autogen.h"              // for SizeType
 #include "SymTab/Indexer.h"              // for Indexer
@@ -165,5 +166,5 @@
 
 	namespace {
-		void findUnfinishedKindExpression(Expression * untyped, Alternative & alt, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, bool adjust = false, bool prune = true, bool failFast = true) {
+		void findUnfinishedKindExpression( Expression * untyped, Alternative & alt, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, ResolvMode mode = ResolvMode{} ) {
 			assertf( untyped, "expected a non-null expression." );
 
@@ -172,5 +173,5 @@
 			TypeEnvironment env;
 			AlternativeFinder finder( indexer, env );
-			finder.find( untyped, adjust, prune, failFast );
+			finder.find( untyped, mode );
 
 			#if 0
@@ -218,8 +219,8 @@
 
 		/// resolve `untyped` to the expression whose alternative satisfies `pred` with the lowest cost; kindStr is used for providing better error messages
-		void findKindExpression(Expression *& untyped, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, bool adjust = false, bool prune = true, bool failFast = true) {
+		void findKindExpression(Expression *& untyped, const SymTab::Indexer & indexer, const std::string & kindStr, std::function<bool(const Alternative &)> pred, ResolvMode mode = ResolvMode{}) {
 			if ( ! untyped ) return;
 			Alternative choice;
-			findUnfinishedKindExpression( untyped, choice, indexer, kindStr, pred, adjust, prune, failFast );
+			findUnfinishedKindExpression( untyped, choice, indexer, kindStr, pred, mode );
 			finishExpr( choice.expr, choice.env, untyped->env );
 			untyped = choice.expr;
@@ -249,5 +250,5 @@
 		// set up and resolve expression cast to void
 		Alternative choice;
-		findUnfinishedKindExpression( untyped, choice, indexer, "", standardAlternativeFilter, true );
+		findUnfinishedKindExpression( untyped, choice, indexer, "", standardAlternativeFilter, ResolvMode::withAdjustment() );
 		CastExpr * castExpr = strict_dynamic_cast< CastExpr * >( choice.expr );
 		env = std::move( choice.env );
