CEGIS: Implement enumerate&test given known valid inputs
CE-Testing allows CEGIS to compile the program at the current unrolling level and test with provided Bs (the determinized program) on previously discovered inputs. This allows us to skip a SAT query in case one of them fails. Given a series of known valid inputs, it can prune program candidates by enumerating them and testing against these inputs. This should dramatically reduce the number of SAT queries. Currently we have no heuristic to disable enumarting when branching factor becomes too big. We might want to do random sampling. We start by figuring out one basic examples that we can use for pruning. In the presence of a path-condition, we need to perform a simple SAT query Also, B-Paths enforces sub-branches to use a fixed value if the parent branch is closed. This should prune the program exploration behind closed branches. We have observed no clear benefits in terms of performance yet. CEGIS will only use fully determined functions as candidates for gencalls. (e.g. no functions containing 'choose')
Showing
- src/main/scala/leon/codegen/CodeGeneration.scala 32 additions, 1 deletionsrc/main/scala/leon/codegen/CodeGeneration.scala
- src/main/scala/leon/codegen/CompilationUnit.scala 10 additions, 2 deletionssrc/main/scala/leon/codegen/CompilationUnit.scala
- src/main/scala/leon/evaluators/CodeGenEvaluator.scala 25 additions, 16 deletionssrc/main/scala/leon/evaluators/CodeGenEvaluator.scala
- src/main/scala/leon/evaluators/DefaultEvaluator.scala 6 additions, 1 deletionsrc/main/scala/leon/evaluators/DefaultEvaluator.scala
- src/main/scala/leon/solvers/z3/FairZ3Solver.scala 112 additions, 28 deletionssrc/main/scala/leon/solvers/z3/FairZ3Solver.scala
- src/main/scala/leon/solvers/z3/FunctionTemplate.scala 52 additions, 0 deletionssrc/main/scala/leon/solvers/z3/FunctionTemplate.scala
- src/main/scala/leon/synthesis/SynthesisContext.scala 2 additions, 0 deletionssrc/main/scala/leon/synthesis/SynthesisContext.scala
- src/main/scala/leon/synthesis/SynthesizerOptions.scala 12 additions, 7 deletionssrc/main/scala/leon/synthesis/SynthesizerOptions.scala
- src/main/scala/leon/synthesis/rules/Cegis.scala 432 additions, 105 deletionssrc/main/scala/leon/synthesis/rules/Cegis.scala
- src/main/scala/leon/synthesis/utils/Benchmarks.scala 1 addition, 0 deletionssrc/main/scala/leon/synthesis/utils/Benchmarks.scala
- src/test/scala/leon/test/evaluators/EvaluatorsTests.scala 25 additions, 6 deletionssrc/test/scala/leon/test/evaluators/EvaluatorsTests.scala
- src/test/scala/leon/test/synthesis/SynthesisSuite.scala 1 addition, 1 deletionsrc/test/scala/leon/test/synthesis/SynthesisSuite.scala
- src/test/scala/leon/test/verification/XLangVerificationRegression.scala 0 additions, 2 deletions.../leon/test/verification/XLangVerificationRegression.scala
Loading
Please register or sign in to comment