Skip to content
Snippets Groups Projects
Commit 716589bc authored by Regis Blanc's avatar Regis Blanc
Browse files

leon debug section to print current phase

parent 31db59f9
Branches
Tags
No related merge requests found
...@@ -5,6 +5,7 @@ package leon ...@@ -5,6 +5,7 @@ package leon
import purescala.Definitions.Program import purescala.Definitions.Program
trait LeonPhase[-F, +T] extends Pipeline[F, T] with LeonComponent { trait LeonPhase[-F, +T] extends Pipeline[F, T] with LeonComponent {
// def run(ac: LeonContext)(v: F): T // def run(ac: LeonContext)(v: F): T
} }
...@@ -12,6 +13,7 @@ abstract class TransformationPhase extends LeonPhase[Program, Program] { ...@@ -12,6 +13,7 @@ abstract class TransformationPhase extends LeonPhase[Program, Program] {
def apply(ctx: LeonContext, p: Program): Program def apply(ctx: LeonContext, p: Program): Program
override def run(ctx: LeonContext)(p: Program) = { override def run(ctx: LeonContext)(p: Program) = {
ctx.reporter.debug("Running transformation phase: " + name)(utils.DebugSectionLeon)
apply(ctx, p) apply(ctx, p)
} }
} }
...@@ -20,6 +22,7 @@ abstract class UnitPhase[T] extends LeonPhase[T, T] { ...@@ -20,6 +22,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)
apply(ctx, p) apply(ctx, p)
p p
} }
......
...@@ -19,6 +19,8 @@ case object DebugSectionPositions extends DebugSection("positions", 1 << 7 ...@@ -19,6 +19,8 @@ case object DebugSectionPositions extends DebugSection("positions", 1 << 7
case object DebugSectionDataGen extends DebugSection("datagen", 1 << 8) case object DebugSectionDataGen extends DebugSection("datagen", 1 << 8)
case object DebugSectionEvaluation extends DebugSection("eval", 1 << 9) case object DebugSectionEvaluation extends DebugSection("eval", 1 << 9)
case object DebugSectionRepair extends DebugSection("repair", 1 << 10) case object DebugSectionRepair extends DebugSection("repair", 1 << 10)
case object DebugSectionLeon extends DebugSection("leon", 1 << 11)
case object DebugSectionXLang extends DebugSection("xlang", 1 << 12)
object DebugSections { object DebugSections {
val all = Set[DebugSection]( val all = Set[DebugSection](
...@@ -32,6 +34,8 @@ object DebugSections { ...@@ -32,6 +34,8 @@ object DebugSections {
DebugSectionPositions, DebugSectionPositions,
DebugSectionDataGen, DebugSectionDataGen,
DebugSectionEvaluation, DebugSectionEvaluation,
DebugSectionRepair DebugSectionRepair,
DebugSectionLeon,
DebugSectionXLang
) )
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment