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

Synthesis should be a UnitPhase

parent 978df2d3
No related branches found
No related tags found
No related merge requests found
...@@ -28,7 +28,7 @@ abstract class UnitPhase[T] extends LeonPhase[T, T] { ...@@ -28,7 +28,7 @@ abstract class UnitPhase[T] extends LeonPhase[T, T] {
def apply(ctx: LeonContext, p: T): Unit def apply(ctx: LeonContext, p: T): Unit
override def run(ctx: LeonContext, p: T) = { override def run(ctx: LeonContext, p: T) = {
ctx.reporter.debug("Running unit phase phase: " + name)(utils.DebugSectionLeon) ctx.reporter.debug("Running unit phase: " + name)(utils.DebugSectionLeon)
apply(ctx, p) apply(ctx, p)
(ctx, p) (ctx, p)
} }
......
...@@ -10,7 +10,7 @@ import purescala.Definitions.{Program, FunDef} ...@@ -10,7 +10,7 @@ import purescala.Definitions.{Program, FunDef}
import leon.utils._ import leon.utils._
import graph._ import graph._
object SynthesisPhase extends TransformationPhase { object SynthesisPhase extends UnitPhase[Program] {
val name = "Synthesis" val name = "Synthesis"
val description = "Partial synthesis of \"choose\" constructs. Also used by repair during the synthesis stage." val description = "Partial synthesis of \"choose\" constructs. Also used by repair during the synthesis stage."
...@@ -65,7 +65,7 @@ object SynthesisPhase extends TransformationPhase { ...@@ -65,7 +65,7 @@ object SynthesisPhase extends TransformationPhase {
) )
} }
def apply(ctx: LeonContext, program: Program): Program = { def apply(ctx: LeonContext, program: Program): Unit = {
val options = processOptions(ctx) val options = processOptions(ctx)
val chooses = SourceInfo.extractFromProgram(ctx, program) val chooses = SourceInfo.extractFromProgram(ctx, program)
...@@ -106,7 +106,6 @@ object SynthesisPhase extends TransformationPhase { ...@@ -106,7 +106,6 @@ object SynthesisPhase extends TransformationPhase {
ctx.reporter.info("") ctx.reporter.info("")
} }
program
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment