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

Revert changes I no longer need

parent 6522fc50
No related branches found
No related tags found
No related merge requests found
......@@ -98,11 +98,6 @@ object ArrayTransformation extends Pass {
IfExpr(rc, rt, re).setType(rt.getType)
}
case c @ Choose(args, body) =>
val body2 = transform(body)
Choose(args, body2).setType(c.getType).setPosInfo(c)
case m @ MatchExpr(scrut, cses) => {
val scrutRec = transform(scrut)
val csesRec = cses.map{
......
......@@ -257,9 +257,9 @@ object ImperativeCodeElimination extends Pass {
val (argVal, argScope, argFun) = toFunction(a)
(recons(argVal).setType(u.getType), argScope, argFun)
}
case (t: Terminal) => (t, (body: Expr) => body, Map())
case _ => sys.error("not supported: " + expr)
}
//val codeRepresentation = res._2(Block(res._3.map{ case (id1, id2) => Assignment(id1, id2.toVariable)}.toSeq, res._1))
......
......@@ -4,9 +4,6 @@ import scala.tools.nsc.{Global,Settings=>NSCSettings,SubComponent,CompilerComman
import purescala.Definitions.Program
import synthesis.Synthesizer
import purescala.ScalaPrinter
object Main {
import leon.{Reporter,DefaultReporter,Analysis}
......@@ -35,10 +32,11 @@ object Main {
private def defaultAction(program: Program, reporter: Reporter) : Unit = {
Logger.debug("Default action on program: " + program, 3, "main")
//val passManager = new PassManager(Seq(ArrayTransformation, EpsilonElimination, ImperativeCodeElimination, /*UnitElimination,*/ FunctionClosure, /*FunctionHoisting,*/ Simplificator))
//val program2 = passManager.run(program)
assert(program.isPure)
val program2 = new Synthesizer().synthesizeAll(program)
val passManager = new PassManager(Seq(ArrayTransformation, EpsilonElimination, ImperativeCodeElimination, /*UnitElimination,*/ FunctionClosure, /*FunctionHoisting,*/ Simplificator))
val program2 = passManager.run(program)
assert(program2.isPure)
val analysis = new Analysis(program2, reporter)
analysis.analyse
}
private def runWithSettings(args : Array[String], settings : NSCSettings, printerFunction : String=>Unit, actionOnProgram : Option[Program=>Unit] = None) : Unit = {
......
......@@ -60,7 +60,7 @@ class Synthesizer(rules: List[Rule]) {
solution
}
def test1 = {
def test() {
import purescala.Common._
import purescala.Trees._
import purescala.TypeTrees._
......@@ -73,7 +73,6 @@ class Synthesizer(rules: List[Rule]) {
}
def synthesizeAll(p: Program): Program = {
test1
p
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment