Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 61718416c4ecce46bb8d5202cc875d5e197c5cfd)
+++ src/Makefile.in	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
@@ -211,4 +211,5 @@
 	ResolvExpr/driver_cfa_cpp-CurrentObject.$(OBJEXT) \
 	ResolvExpr/driver_cfa_cpp-ExplodedActual.$(OBJEXT) \
+	ResolvExpr/driver_cfa_cpp-ResolveAssertions.$(OBJEXT) \
 	SymTab/driver_cfa_cpp-Indexer.$(OBJEXT) \
 	SymTab/driver_cfa_cpp-Mangler.$(OBJEXT) \
@@ -509,11 +510,11 @@
 	ResolvExpr/Occurs.cc ResolvExpr/TypeEnvironment.cc \
 	ResolvExpr/CurrentObject.cc ResolvExpr/ExplodedActual.cc \
-	SymTab/Indexer.cc SymTab/Mangler.cc SymTab/Validate.cc \
-	SymTab/FixFunction.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 \
+	ResolvExpr/ResolveAssertions.cc SymTab/Indexer.cc \
+	SymTab/Mangler.cc SymTab/Validate.cc SymTab/FixFunction.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 \
@@ -824,4 +825,7 @@
 	ResolvExpr/$(am__dirstamp) \
 	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
+ResolvExpr/driver_cfa_cpp-ResolveAssertions.$(OBJEXT):  \
+	ResolvExpr/$(am__dirstamp) \
+	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
 SymTab/$(am__dirstamp):
 	@$(MKDIR_P) SymTab
@@ -1020,4 +1024,5 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/driver_cfa_cpp-PtrsCastable.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/driver_cfa_cpp-RenameVars.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveTypeof.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/driver_cfa_cpp-Resolver.Po@am__quote@
@@ -1966,4 +1971,18 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -c -o ResolvExpr/driver_cfa_cpp-ExplodedActual.obj `if test -f 'ResolvExpr/ExplodedActual.cc'; then $(CYGPATH_W) 'ResolvExpr/ExplodedActual.cc'; else $(CYGPATH_W) '$(srcdir)/ResolvExpr/ExplodedActual.cc'; fi`
 
+ResolvExpr/driver_cfa_cpp-ResolveAssertions.o: ResolvExpr/ResolveAssertions.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ResolvExpr/driver_cfa_cpp-ResolveAssertions.o -MD -MP -MF ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Tpo -c -o ResolvExpr/driver_cfa_cpp-ResolveAssertions.o `test -f 'ResolvExpr/ResolveAssertions.cc' || echo '$(srcdir)/'`ResolvExpr/ResolveAssertions.cc
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Tpo ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='ResolvExpr/ResolveAssertions.cc' object='ResolvExpr/driver_cfa_cpp-ResolveAssertions.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 ResolvExpr/driver_cfa_cpp-ResolveAssertions.o `test -f 'ResolvExpr/ResolveAssertions.cc' || echo '$(srcdir)/'`ResolvExpr/ResolveAssertions.cc
+
+ResolvExpr/driver_cfa_cpp-ResolveAssertions.obj: ResolvExpr/ResolveAssertions.cc
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT ResolvExpr/driver_cfa_cpp-ResolveAssertions.obj -MD -MP -MF ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Tpo -c -o ResolvExpr/driver_cfa_cpp-ResolveAssertions.obj `if test -f 'ResolvExpr/ResolveAssertions.cc'; then $(CYGPATH_W) 'ResolvExpr/ResolveAssertions.cc'; else $(CYGPATH_W) '$(srcdir)/ResolvExpr/ResolveAssertions.cc'; fi`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Tpo ResolvExpr/$(DEPDIR)/driver_cfa_cpp-ResolveAssertions.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='ResolvExpr/ResolveAssertions.cc' object='ResolvExpr/driver_cfa_cpp-ResolveAssertions.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 ResolvExpr/driver_cfa_cpp-ResolveAssertions.obj `if test -f 'ResolvExpr/ResolveAssertions.cc'; then $(CYGPATH_W) 'ResolvExpr/ResolveAssertions.cc'; else $(CYGPATH_W) '$(srcdir)/ResolvExpr/ResolveAssertions.cc'; fi`
+
 SymTab/driver_cfa_cpp-Indexer.o: SymTab/Indexer.cc
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) -MT SymTab/driver_cfa_cpp-Indexer.o -MD -MP -MF SymTab/$(DEPDIR)/driver_cfa_cpp-Indexer.Tpo -c -o SymTab/driver_cfa_cpp-Indexer.o `test -f 'SymTab/Indexer.cc' || echo '$(srcdir)/'`SymTab/Indexer.cc
Index: src/ResolvExpr/ResolveAssertions.cc
===================================================================
--- src/ResolvExpr/ResolveAssertions.cc	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
+++ src/ResolvExpr/ResolveAssertions.cc	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
@@ -0,0 +1,31 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ResolveAssertions.cc --
+//
+// Author           : Aaron B. Moss
+// Created On       : Mon Mar 12 17:05:00 2018
+// Last Modified By : Aaron B. Moss
+// Last Modified On : Mon Mar 12 17:05:00 2018
+// Update Count     : 1
+//
+
+#include "ResolveAssertions.h"
+
+#include "SynTree/SynTree.h"
+
+namespace ResolvExpr {
+	bool resolveAssertions( const Expression* expr ) {
+		// TODO FIXME
+		return expr != nullptr;
+	}
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/ResolveAssertions.h
===================================================================
--- src/ResolvExpr/ResolveAssertions.h	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
+++ src/ResolvExpr/ResolveAssertions.h	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
@@ -0,0 +1,28 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// ResolveAssertions.h --
+//
+// Author           : Aaron B. Moss
+// Created On       : Mon Mar 12 17:05:00 2018
+// Last Modified By : Aaron B. Moss
+// Last Modified On : Mon Mar 12 17:05:00 2018
+// Update Count     : 1
+//
+
+#pragma once
+
+#include "SynTree/SynTree.h"
+
+namespace ResolvExpr {
+	bool resolveAssertions( const Expression* expr );
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 61718416c4ecce46bb8d5202cc875d5e197c5cfd)
+++ src/ResolvExpr/Resolver.cc	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
@@ -15,4 +15,5 @@
 
 #include <stddef.h>                      // for NULL
+#include <algorithm>                     // for sort
 #include <cassert>                       // for strict_dynamic_cast, assert
 #include <memory>                        // for allocator, allocator_traits<...
@@ -29,4 +30,5 @@
 #include "InitTweak/InitTweak.h"         // for isIntrinsicSingleArgCallStmt
 #include "RenameVars.h"                  // for RenameVars, global_renamer
+#include "ResolveAssertions.h"           // for resolveAssertions
 #include "ResolvExpr/TypeEnvironment.h"  // for TypeEnvironment
 #include "ResolveTypeof.h"               // for resolveTypeof
@@ -169,8 +171,24 @@
 			}
 
-			// xxx - if > 1 alternative with same cost, ignore deleted and pick from remaining
-			// choose the lowest cost expression among the candidates
+			// sort candidates by cost
+			std::sort( candidates.begin(), candidates.end(), 
+				[](const Alternative& a, const Alternative& b) { return a.cost < b.cost; } );
+			// search for cheapest resolvable candidate
 			AltList winners;
-			findMinCost( candidates.begin(), candidates.end(), back_inserter( winners ) );
+			for ( const Alternative& r : candidates ) {
+				if ( ! winners.empty() ) {
+					// break if already have a cheaper candidate
+					if ( winners[0].cost < r.cost ) break;
+
+					// ignore min-cost deleted alternatives if already found one alternative
+					if ( findDeletedExpr( r.expr ) ) continue;
+				}
+				
+				// check candidate assertion resolution
+				if ( resolveAssertions( r.expr ) ) {
+					winners.push_back( r );
+				}
+			}
+			
 			if ( winners.size() == 0 ) {
 				SemanticError( untyped, toString( "No reasonable alternatives for ", kindStr, (kindStr != "" ? " " : ""), "expression: ") );
@@ -281,9 +299,9 @@
 		Type *new_type = resolveTypeof( objectDecl->get_type(), indexer );
 		objectDecl->set_type( new_type );
-		// To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that class-variable
-		// initContext is changed multiple time because the LHS is analysed twice. The second analysis changes
-		// initContext because of a function type can contain object declarations in the return and parameter types. So
-		// each value of initContext is retained, so the type on the first analysis is preserved and used for selecting
-		// the RHS.
+		// To handle initialization of routine pointers, e.g., int (*fp)(int) = foo(), means that 
+		// class-variable initContext is changed multiple time because the LHS is analysed twice. 
+		// The second analysis changes initContext because of a function type can contain object 
+		// declarations in the return and parameter types. So each value of initContext is retained,
+		// so the type on the first analysis is preserved and used for selecting the RHS.
 		GuardValue( currentObject );
 		currentObject = CurrentObject( objectDecl->get_type() );
@@ -329,7 +347,8 @@
 
 		{
-			// resolve with-exprs with parameters in scope and add any newly generated declarations to the
-			// front of the function body.
-			auto guard = makeFuncGuard( [this]() { indexer.enterScope(); }, [this](){ indexer.leaveScope(); } );
+			// resolve with-exprs with parameters in scope and add any newly generated declarations 
+			// to the front of the function body.
+			auto guard = makeFuncGuard( 
+				[this]() { indexer.enterScope(); }, [this](){ indexer.leaveScope(); } );
 			indexer.addFunctionType( functionDecl->type );
 			std::list< Statement * > newStmts;
@@ -344,7 +363,8 @@
 
 	void Resolver::postvisit( FunctionDecl *functionDecl ) {
-		// default value expressions have an environment which shouldn't be there and trips up later passes.
-		// xxx - it might be necessary to somehow keep the information from this environment, but I can't currently
-		// see how it's useful.
+		// default value expressions have an environment which shouldn't be there and trips up 
+		// later passes.
+		// xxx - it might be necessary to somehow keep the information from this environment, but I 
+		// can't currently see how it's useful.
 		for ( Declaration * d : functionDecl->type->parameters ) {
 			if ( ObjectDecl * obj = dynamic_cast< ObjectDecl * >( d ) ) {
Index: src/ResolvExpr/module.mk
===================================================================
--- src/ResolvExpr/module.mk	(revision 61718416c4ecce46bb8d5202cc875d5e197c5cfd)
+++ src/ResolvExpr/module.mk	(revision 85737291ec91b943b31a22825d1db3e0f43302c3)
@@ -33,3 +33,4 @@
        ResolvExpr/TypeEnvironment.cc \
        ResolvExpr/CurrentObject.cc \
-       ResolvExpr/ExplodedActual.cc
+       ResolvExpr/ExplodedActual.cc \
+       ResolvExpr/ResolveAssertions.cc
