Index: src/ResolvExpr/CandidatePrinter.cpp
===================================================================
--- src/ResolvExpr/CandidatePrinter.cpp	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
+++ src/ResolvExpr/CandidatePrinter.cpp	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
@@ -0,0 +1,62 @@
+//
+// 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.
+//
+// CandidatePrinter.cpp -- Print expression canditates.
+//
+// Author           : Andrew Beach
+// Created On       : Tue Nov  9  9:54:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Nov  9 15:47:00 2021
+// Update Count     : 0
+//
+
+#include "CandidatePrinter.hpp"
+
+#include "AST/Expr.hpp"
+#include "AST/Pass.hpp"
+#include "AST/Print.hpp"
+#include "AST/Stmt.hpp"
+#include "AST/TranslationUnit.hpp"
+#include "ResolvExpr/CandidateFinder.hpp"
+
+#include <iostream>
+
+namespace ResolvExpr {
+
+namespace {
+
+class CandidatePrintCore : public ast::WithSymbolTable {
+	std::ostream & os;
+public:
+	CandidatePrintCore( std::ostream & os ) : os( os ) {}
+
+	void postvisit( const ast::ExprStmt * stmt ) {
+		ast::TypeEnvironment env;
+		CandidateFinder finder( symtab, env );
+		finder.find( stmt->expr, ResolvMode::withAdjustment() );
+		int count = 1;
+		os << "There are " << finder.candidates.size() << " candidates\n";
+		for ( const std::shared_ptr<Candidate> & cand : finder ) {
+			os << "Candidate " << count++ << " ==============\n";
+			ast::print( os, cand->expr->result.get() );
+			os << std::endl;
+		}
+	}
+};
+
+} // namespace
+
+void printCandidates( ast::TranslationUnit & transUnit ) {
+	ast::Pass<CandidatePrintCore>::run( transUnit, std::cout );
+}
+
+} // namespace ResolvExpr
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/CandidatePrinter.hpp
===================================================================
--- src/ResolvExpr/CandidatePrinter.hpp	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
+++ src/ResolvExpr/CandidatePrinter.hpp	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
@@ -0,0 +1,35 @@
+//
+// 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.
+//
+// CandidatePrinter.hpp -- Print expression canditates.
+//
+// Author           : Andrew Beach
+// Created On       : Tue Nov  9  9:49:00 2021
+// Last Modified By : Andrew Beach
+// Last Modified On : Tue Nov  9 15:33:00 2021
+// Update Count     : 0
+//
+
+#pragma once
+
+namespace ast {
+    class TranslationUnit;
+}
+
+namespace ResolvExpr {
+
+void printCandidates( ast::TranslationUnit & transUnit );
+/* Traverse over the entire translation unit, printing candidates for each
+ * top level expression. See CandidateFinder.
+ */
+
+} // namespace ResolvExpr
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/ResolvExpr/module.mk
===================================================================
--- src/ResolvExpr/module.mk	(revision 5ee153dfb651602418e2f3ed39a2e82ab93bfea3)
+++ src/ResolvExpr/module.mk	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
@@ -61,5 +61,9 @@
       ResolvExpr/WidenMode.h
 
+SRC += $(SRC_RESOLVEXPR) \
+	ResolvExpr/AlternativePrinter.cc \
+	ResolvExpr/AlternativePrinter.h \
+	ResolvExpr/CandidatePrinter.cpp \
+	ResolvExpr/CandidatePrinter.hpp
 
-SRC += $(SRC_RESOLVEXPR) ResolvExpr/AlternativePrinter.cc ResolvExpr/AlternativePrinter.h
 SRCDEMANGLE += $(SRC_RESOLVEXPR)
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 5ee153dfb651602418e2f3ed39a2e82ab93bfea3)
+++ src/main.cc	(revision 1622af58aed4c83eebaa99e928f0b0358263b087)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Nov  8 11:42:00 2021
-// Update Count     : 656
+// Last Modified On : Tue Nov  9 11:10:00 2021
+// Update Count     : 657
 //
 
@@ -65,4 +65,5 @@
 #include "Parser/TypedefTable.h"            // for TypedefTable
 #include "ResolvExpr/AlternativePrinter.h"  // for AlternativePrinter
+#include "ResolvExpr/CandidatePrinter.hpp"  // for printCandidates
 #include "ResolvExpr/Resolver.h"            // for resolve
 #include "SymTab/Validate.h"                // for validate
@@ -318,19 +319,4 @@
 		// add the assignment statement after the initialization of a type parameter
 		PASS( "Validate", SymTab::validate( translationUnit, symtabp ) );
-		if ( symtabp ) {
-			deleteAll( translationUnit );
-			return EXIT_SUCCESS;
-		} // if
-
-		if ( expraltp ) {
-			PassVisitor<ResolvExpr::AlternativePrinter> printer( cout );
-			acceptAll( translationUnit, printer );
-			return EXIT_SUCCESS;
-		} // if
-
-		if ( validp ) {
-			dump( translationUnit );
-			return EXIT_SUCCESS;
-		} // if
 
 		CodeTools::fillLocations( translationUnit );
@@ -345,4 +331,18 @@
 			forceFillCodeLocations( transUnit );
 
+			if ( symtabp ) {
+				return EXIT_SUCCESS;
+			} // if
+
+			if ( expraltp ) {
+				ResolvExpr::printCandidates( transUnit );
+				return EXIT_SUCCESS;
+			} // if
+
+			if ( validp ) {
+				dump( move( transUnit ) );
+				return EXIT_SUCCESS;
+			} // if
+
 			PASS( "Translate Throws", ControlStruct::translateThrows( transUnit ) );
 			PASS( "Fix Labels", ControlStruct::fixLabels( transUnit ) );
@@ -383,4 +383,20 @@
 			translationUnit = convert( move( transUnit ) );
 		} else {
+			if ( symtabp ) {
+				deleteAll( translationUnit );
+				return EXIT_SUCCESS;
+			} // if
+
+			if ( expraltp ) {
+				PassVisitor<ResolvExpr::AlternativePrinter> printer( cout );
+				acceptAll( translationUnit, printer );
+				return EXIT_SUCCESS;
+			} // if
+
+			if ( validp ) {
+				dump( translationUnit );
+				return EXIT_SUCCESS;
+			} // if
+
 			PASS( "Translate Throws", ControlStruct::translateThrows( translationUnit ) );
 			PASS( "Fix Labels", ControlStruct::fixLabels( translationUnit ) );
