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
a415866d
Commit
a415866d
authored
12 years ago
by
Etienne Kneuss
Browse files
Options
Downloads
Patches
Plain Diff
In case !--inplace, report results nicely as well
parent
ed392f86
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/leon/synthesis/SynthesisPhase.scala
+7
-0
7 additions, 0 deletions
src/main/scala/leon/synthesis/SynthesisPhase.scala
src/main/scala/leon/synthesis/Synthesizer.scala
+0
-8
0 additions, 8 deletions
src/main/scala/leon/synthesis/Synthesizer.scala
with
7 additions
and
8 deletions
src/main/scala/leon/synthesis/SynthesisPhase.scala
+
7
−
0
View file @
a415866d
...
...
@@ -3,6 +3,7 @@ package synthesis
import
purescala.TreeOps.simplifyLets
import
purescala.Trees.Expr
import
purescala.ScalaPrinter
import
purescala.Definitions.Program
object
SynthesisPhase
extends
LeonPhase
[
Program
,
Program
]
{
...
...
@@ -46,6 +47,12 @@ object SynthesisPhase extends LeonPhase[Program, Program] {
for
(
file
<-
ctx
.
files
)
{
new
FileInterface
(
ctx
.
reporter
,
file
).
updateFile
(
chooseToExprs
)
}
}
else
{
for
((
chs
,
ex
)
<-
chooseToExprs
)
{
ctx
.
reporter
.
info
(
"-"
*
80
)
ctx
.
reporter
.
info
(
"For: "
+
chs
)
ctx
.
reporter
.
info
(
"Synthesized Code:\n"
+
ScalaPrinter
(
ex
))
}
}
p
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/synthesis/Synthesizer.scala
+
0
−
8
View file @
a415866d
...
...
@@ -110,18 +110,10 @@ class Synthesizer(val r: Reporter, val solvers: List[Solver], generateDerivation
val
as
=
(
variablesOf
(
pred
)--
xs
).
toList
val
phi
=
pred
info
(
""
)
info
(
""
)
info
(
"In Function "
+
f
.
id
+
":"
)
info
(
"-"
*
80
)
val
sol
=
synthesize
(
Problem
(
as
,
phi
,
xs
),
rules
)
solutions
+=
ch
->
sol
info
(
"Scala code:"
)
info
(
ScalaPrinter
(
simplifyLets
(
sol
.
toExpr
)))
a
case
_
=>
a
...
...
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