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

Fix buggy stop() on non-parallel synthesis searches

parent e1b0a2e2
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,12 @@ class SimpleSearch(synth: Synthesizer,
}
}
var shouldStop = false
def search(): Option[Solution] = {
while (!g.tree.isSolved) {
shouldStop = false
while (!g.tree.isSolved && !shouldStop) {
nextLeaf() match {
case Some(l) =>
l match {
......@@ -86,4 +90,10 @@ class SimpleSearch(synth: Synthesizer,
}
g.tree.solution
}
override def stop() {
super.stop()
shouldStop = true
sctx.solver.halt()
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment