Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
716589bc
Commit
716589bc
authored
10 years ago
by
Regis Blanc
Browse files
Options
Downloads
Patches
Plain Diff
leon debug section to print current phase
parent
31db59f9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/leon/LeonPhase.scala
+3
-0
3 additions, 0 deletions
src/main/scala/leon/LeonPhase.scala
src/main/scala/leon/utils/DebugSections.scala
+5
-1
5 additions, 1 deletion
src/main/scala/leon/utils/DebugSections.scala
with
8 additions
and
1 deletion
src/main/scala/leon/LeonPhase.scala
+
3
−
0
View file @
716589bc
...
...
@@ -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
}
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/utils/DebugSections.scala
+
5
−
1
View file @
716589bc
...
...
@@ -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
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment