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
dc153c66
Commit
dc153c66
authored
13 years ago
by
Ali Sinan Köksal
Browse files
Options
Downloads
Patches
Plain Diff
make the compiler phase quiet by default
parent
e25d1553
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cp/CPComponent.scala
+12
-5
12 additions, 5 deletions
src/cp/CPComponent.scala
src/cp/CallTransformation.scala
+3
-1
3 additions, 1 deletion
src/cp/CallTransformation.scala
src/cp/LTrees.scala
+6
-1
6 additions, 1 deletion
src/cp/LTrees.scala
with
21 additions
and
7 deletions
src/cp/CPComponent.scala
+
12
−
5
View file @
dc153c66
...
@@ -33,20 +33,27 @@ class CPComponent(val global: Global, val pluginInstance: CPPlugin)
...
@@ -33,20 +33,27 @@ class CPComponent(val global: Global, val pluginInstance: CPPlugin)
//global ref to freshName creator
//global ref to freshName creator
fresh
=
unit
.
fresh
fresh
=
unit
.
fresh
println
(
"Starting CP phase"
)
if
(
Settings
.
verbose
)
println
(
"Starting CP phase"
)
val
prog
:
purescala.Definitions.Program
=
extractCode
(
unit
)
val
prog
:
purescala.Definitions.Program
=
extractCode
(
unit
)
println
(
"Analyzing specification functions"
)
if
(
Settings
.
verbose
)
val
analysis
=
new
purescala
.
Analysis
(
prog
)
println
(
"Analyzing specification functions"
)
val
analysisReporter
=
if
(
Settings
.
verbose
)
new
purescala
.
DefaultReporter
else
new
purescala
.
QuietReporter
val
analysis
=
new
purescala
.
Analysis
(
prog
,
analysisReporter
)
analysis
.
analyse
analysis
.
analyse
println
(
"Finished analysis, starting transformation"
)
if
(
Settings
.
verbose
)
println
(
"Finished analysis, starting transformation"
)
val
serializedProg
=
serialize
(
prog
)
val
serializedProg
=
serialize
(
prog
)
transformCalls
(
unit
,
prog
,
serializedProg
)
transformCalls
(
unit
,
prog
,
serializedProg
)
println
(
"Finished transformation"
)
if
(
Settings
.
verbose
)
println
(
"Finished transformation"
)
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
src/cp/CallTransformation.scala
+
3
−
1
View file @
dc153c66
...
@@ -37,7 +37,9 @@ trait CallTransformation
...
@@ -37,7 +37,9 @@ trait CallTransformation
case
_
=>
false
case
_
=>
false
}
}
val
purescalaReporter
=
purescala
.
Settings
.
reporter
val
purescalaReporter
=
if
(
Settings
.
verbose
)
purescala
.
Settings
.
reporter
else
new
purescala
.
QuietReporter
/** extract predicates and functions beforehand so the stored last used ID value is valid */
/** extract predicates and functions beforehand so the stored last used ID value is valid */
def
funDefMap
(
unit
:
CompilationUnit
)
:
Map
[
Position
,
FunDef
]
=
{
def
funDefMap
(
unit
:
CompilationUnit
)
:
Map
[
Position
,
FunDef
]
=
{
...
...
This diff is collapsed.
Click to expand it.
src/cp/LTrees.scala
+
6
−
1
View file @
dc153c66
...
@@ -41,6 +41,11 @@ object LTrees {
...
@@ -41,6 +41,11 @@ object LTrees {
cache
=
Some
(
toRet
)
cache
=
Some
(
toRet
)
toRet
toRet
}
}
override
def
toString
:
String
=
cache
match
{
case
Some
(
v
)
=>
"L["
+
v
.
toString
+
"]"
case
None
=>
"L["
+
ids
.
mkString
(
","
)
+
"]"
}
}
}
trait
LTuple
[
T
]
{
trait
LTuple
[
T
]
{
...
@@ -224,7 +229,7 @@ object LTrees {
...
@@ -224,7 +229,7 @@ object LTrees {
val
(
newConsts
,
newExpr
)
=
combineConstraint
(
instantiatedCnstr
)
val
(
newConsts
,
newExpr
)
=
combineConstraint
(
instantiatedCnstr
)
val
typedPlaceHolders
=
newConsts
map
{
val
typedPlaceHolders
=
newConsts
map
{
case
cst
=>
FreshIdentifier
(
"fresh"
,
true
).
setType
(
cst
.
getType
)
case
cst
=>
FreshIdentifier
(
cst
.
name
,
true
).
setType
(
cst
.
getType
)
}
}
// println("types : " + typedPlaceHolders.map(_.getType))
// println("types : " + typedPlaceHolders.map(_.getType))
val
subst1
=
((
newConsts
map
(
Variable
(
_
)))
zip
(
typedPlaceHolders
map
(
Variable
(
_
)))).
toMap
val
subst1
=
((
newConsts
map
(
Variable
(
_
)))
zip
(
typedPlaceHolders
map
(
Variable
(
_
)))).
toMap
...
...
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