From eaca4d39f176acbcc567d0cb18dd9fb6c92ad60d Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 10 Jul 2012 13:02:28 +1000 Subject: A few other changes that were needed for tests I must have forgotten to commit them earlier. How annoying. --- impl/main.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'impl/main.cpp') diff --git a/impl/main.cpp b/impl/main.cpp index 726fa3e..2b7a9a1 100644 --- a/impl/main.cpp +++ b/impl/main.cpp @@ -98,7 +98,7 @@ void treeToSystem(pANTLR3_BASE_TREE node, EquationSystem& system) { typedef Complete ZBar; int main (int argc, char* argv[]) { if (argc <= 3) { - cout << "Usage: " << argv[0] << " filename fixpoint strategy [log]" << endl + cerr << "Usage: " << argv[0] << " filename fixpoint strategy [log]" << endl << " fixpoint: naive | smart" << endl << " strategy: naive | repeat | smart" << endl << " log: section[,section[,section[...]]]" << endl; @@ -135,12 +135,12 @@ int main (int argc, char* argv[]) { FixpointAlgorithm* algorithm = NULL; if (!strcmp(argv[2], "naive")) { algorithm = new NaiveFixpointAlgorithm(system); - cout << "Naive fixpoint" << endl; + log::info << "Naive fixpoint" << endl; } else if (!strcmp(argv[2], "smart")) { algorithm = new SmartFixpointAlgorithm(system); - cout << "Smart fixpoint" << endl; + log::info << "Smart fixpoint" << endl; } else { - cout << "Unknown fixpoint algorithm." << endl; + cerr << "Unknown fixpoint algorithm." << endl; } // PARSE ARGUMENTS - strat improvement @@ -148,15 +148,15 @@ int main (int argc, char* argv[]) { ImprovementOperator* improvement = NULL; if (!strcmp(argv[3], "repeat")) { improvement = new RepeatedImprovementOperator(*naiveImprovement); - cout << "Repeated strategy improvement" << endl; + log::info << "Repeated strategy improvement" << endl; } else if (!strcmp(argv[3], "naive")) { improvement = naiveImprovement; - cout << "Naive strategy improvement" << endl; + log::info << "Naive strategy improvement" << endl; } else if (!strcmp(argv[3], "smart")) { improvement = new SmartImprovementOperator(system); - cout << "Smart strategy improvement" << endl; + log::info << "Smart strategy improvement" << endl; } else { - cout << "Unknown strategy improvement algorithm." << endl; + cerr << "Unknown strategy improvement algorithm." << endl; } if (!improvement || !algorithm) { exit(1); @@ -182,7 +182,6 @@ int main (int argc, char* argv[]) { log::debug << "Changed: " << (changed ? "true" : "false") << std::endl; } while(changed); - cout << endl; for (unsigned int i = 0, size = system.variableCount(); i < size; ++i) { Variable& var = system.variable(i); cout << var.name() << " = " << result[var] << endl; -- cgit v1.2.3