Skip to content
Snippets Groups Projects
Commit c19cd7b8 authored by Manos Koukoutos's avatar Manos Koukoutos
Browse files

Don't need to create untyped Expr

parent 76cd5058
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,6 @@ object ChooseInfo { ...@@ -42,7 +42,6 @@ object ChooseInfo {
def extractFromFunction(ctx: LeonContext, prog: Program, fd: FunDef): Seq[ChooseInfo] = { def extractFromFunction(ctx: LeonContext, prog: Program, fd: FunDef): Seq[ChooseInfo] = {
val actualBody = and(fd.precOrTrue, fd.body.get)
val term = Terminating(fd.typed, fd.params.map(_.id.toVariable)) val term = Terminating(fd.typed, fd.params.map(_.id.toVariable))
val eFinder = new ExamplesFinder(ctx, prog) val eFinder = new ExamplesFinder(ctx, prog)
...@@ -50,7 +49,7 @@ object ChooseInfo { ...@@ -50,7 +49,7 @@ object ChooseInfo {
// We are synthesizing, so all examples are valid ones // We are synthesizing, so all examples are valid ones
val functionEb = eFinder.extractFromFunDef(fd, partition = false) val functionEb = eFinder.extractFromFunDef(fd, partition = false)
for ((ch, path) <- new ChooseCollectorWithPaths().traverse(actualBody)) yield { for ((ch, path) <- new ChooseCollectorWithPaths().traverse(fd.fullBody)) yield {
val outerEb = if (path == BooleanLiteral(true)) { val outerEb = if (path == BooleanLiteral(true)) {
functionEb functionEb
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment