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

Cosmetics

parent 542a09ab
Branches
Tags
No related merge requests found
...@@ -8,7 +8,7 @@ import leon.purescala.Common._ ...@@ -8,7 +8,7 @@ import leon.purescala.Common._
// Defines a synthesis triple of the form: // Defines a synthesis triple of the form:
// ⟦ as ⟨ C | phi ⟩ xs ⟧ // ⟦ as ⟨ C | phi ⟩ xs ⟧
case class Problem(as: List[Identifier], pc: Expr, phi: Expr, xs: List[Identifier]) { case class Problem(as: List[Identifier], pc: Expr, phi: Expr, xs: List[Identifier]) {
override def toString = "⟦ "+as.mkString(";")+", "+(if (pc != BooleanLiteral(true)) pc+" " else "")+" ⟨ "+phi+" ⟩ "+xs.mkString(";")+" ⟧ " override def toString = "⟦ "+as.mkString(";")+", "+(if (pc != BooleanLiteral(true)) pc+" " else "")+" ⟨ "+phi+" ⟩ "+xs.mkString(";")+" ⟧ "
} }
object Problem { object Problem {
......
...@@ -107,7 +107,11 @@ object SynthesisPhase extends LeonPhase[Program, Program] { ...@@ -107,7 +107,11 @@ object SynthesisPhase extends LeonPhase[Program, Program] {
simplifyLets _ simplifyLets _
) )
val chooseToExprs = solutions.map { case (ch, sol) => (ch, simplifiers.foldLeft(sol.toExpr){ (x, sim) => sim(x) }) } def simplify(e: Expr): Expr = simplifiers.foldLeft(e){ (x, sim) => sim(x) }
val chooseToExprs = solutions.map {
case (ch, sol) => (ch, simplify(sol.toExpr))
}
if (inPlace) { if (inPlace) {
for (file <- ctx.files) { for (file <- ctx.files) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment