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

Fix shape of postconditions

parent 2a09eb47
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ class IntInduction(synth: Synthesizer) extends Rule("Int Induction", synth, 80)
val newFun = new FunDef(FreshIdentifier("rec", true), tpe, Seq(VarDecl(inductOn, inductOn.getType)))
newFun.precondition = Some(preIn)
newFun.postcondition = Some(And(Equals(ResultVariable(), Tuple(p.xs.map(Variable(_)))), p.phi))
newFun.postcondition = Some(LetTuple(p.xs.toSeq, ResultVariable(), p.phi))
newFun.body = Some(
IfExpr(Equals(Variable(inductOn), IntLiteral(0)),
......@@ -248,7 +248,7 @@ class ADTInduction(synth: Synthesizer) extends Rule("ADT Induction", synth, 80)
val outerPre = Or(globalPre)
newFun.precondition = Some(funPre)
newFun.postcondition = Some(And(Equals(ResultVariable(), Tuple(p.xs.map(Variable(_)))), p.phi))
newFun.postcondition = Some(LetTuple(p.xs.toSeq, ResultVariable(), p.phi))
newFun.body = Some(MatchExpr(Variable(inductOn), cases))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment