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
import purescala.Definitions.Program
trait LeonPhase[-F, +T] extends Pipeline[F, T] with LeonComponent {
// def run(ac: LeonContext)(v: F): T
}
......@@ -12,6 +13,7 @@ abstract class TransformationPhase extends LeonPhase[Program, Program] {
def apply(ctx: LeonContext, p: Program): Program
override def run(ctx: LeonContext)(p: Program) = {
ctx.reporter.debug("Running transformation phase: " + name)(utils.DebugSectionLeon)
apply(ctx, p)
}
}
......@@ -20,6 +22,7 @@ abstract class UnitPhase[T] extends LeonPhase[T, T] {
def apply(ctx: LeonContext, p: T): Unit
override def run(ctx: LeonContext)(p: T) = {
ctx.reporter.debug("Running unit phase phase: " + name)(utils.DebugSectionLeon)
apply(ctx, p)
p
}
......
......@@ -19,6 +19,8 @@ case object DebugSectionPositions extends DebugSection("positions", 1 << 7
case object DebugSectionDataGen extends DebugSection("datagen", 1 << 8)
case object DebugSectionEvaluation extends DebugSection("eval", 1 << 9)
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 {
val all = Set[DebugSection](
......@@ -32,6 +34,8 @@ object DebugSections {
DebugSectionPositions,
DebugSectionDataGen,
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