Skip to content
Snippets Groups Projects
Commit 594c86f3 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Only getModel if the solver returns SAT, not all solvers support models

parent 777828e5
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,13 @@ class PortfolioSolver[S <: Solver with Interruptible](val context: LeonContext, ...@@ -34,7 +34,13 @@ class PortfolioSolver[S <: Solver with Interruptible](val context: LeonContext,
// solving // solving
val fs = solversInsts.map { s => val fs = solversInsts.map { s =>
Future { Future {
(s, s.check, s.getModel) val result = s.check
val model: Map[Identifier, Expr] = if (result == Some(true)) {
s.getModel
} else {
Map()
}
(s, result, model)
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment