Skip to content

Commit

Permalink
Statistics Bug fix (#15)
Browse files Browse the repository at this point in the history
-fixes a bug that caused the Statistics object to be initialized with the default constructor when a query is UNSAT. The variable was declared but not initialized because of try-catch control flow.
  • Loading branch information
clazarus authored and guykatzz committed Apr 16, 2018
1 parent 71c2f4a commit a4ed2a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions maraboupy/MarabouCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ std::pair<std::map<int, double>, Statistics> solve(InputQuery inputQuery, std::s
output=redirectOutputToFile(redirect);
try{
Engine engine;
if(!engine.processInputQuery(inputQuery)) return std::make_pair(ret, retStats);
if(!engine.processInputQuery(inputQuery)) return std::make_pair(ret, *(engine.getStatistics()));

if(!engine.solve()) return std::make_pair(ret, retStats);
if(!engine.solve()) return std::make_pair(ret, *(engine.getStatistics()));

engine.extractSolution(inputQuery);
retStats = *(engine.getStatistics());
Expand Down

0 comments on commit a4ed2a0

Please sign in to comment.