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
8af26bbf
Commit
8af26bbf
authored
12 years ago
by
Etienne Kneuss
Browse files
Options
Downloads
Patches
Plain Diff
Fix compilation and various things
parent
9c8b6e54
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/synthesis/DerivationTree.scala
+2
-2
2 additions, 2 deletions
src/main/scala/leon/synthesis/DerivationTree.scala
src/main/scala/leon/synthesis/Task.scala
+11
-6
11 additions, 6 deletions
src/main/scala/leon/synthesis/Task.scala
with
13 additions
and
8 deletions
src/main/scala/leon/synthesis/DerivationTree.scala
+
2
−
2
View file @
8af26bbf
...
@@ -37,7 +37,7 @@ class DerivationTree(root: RootTask) {
...
@@ -37,7 +37,7 @@ class DerivationTree(root: RootTask) {
res
append
" "
+
node
+
" [ label = <<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\"><TR><TD BORDER=\"0\">"
+
t
.
rule
+
"</TD></TR><TR><TD BGCOLOR=\"indianred1\">"
+
escapeHTML
(
t
.
problem
.
toString
)+
"</TD></TR><TR><TD BGCOLOR=\"greenyellow\">"
+
escapeHTML
(
t
.
solution
.
map
(
_
.
toString
).
getOrElse
(
"?"
))+
"</TD></TR></TABLE>> shape = \"none\" ];\n"
res
append
" "
+
node
+
" [ label = <<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLSPACING=\"0\"><TR><TD BORDER=\"0\">"
+
t
.
rule
+
"</TD></TR><TR><TD BGCOLOR=\"indianred1\">"
+
escapeHTML
(
t
.
problem
.
toString
)+
"</TD></TR><TR><TD BGCOLOR=\"greenyellow\">"
+
escapeHTML
(
t
.
solution
.
map
(
_
.
toString
).
getOrElse
(
"?"
))+
"</TD></TR></TABLE>> shape = \"none\" ];\n"
for
(
st
<-
t
.
s
teps
.
flatMap
(
_
.
subSolvers
.
values
))
{
for
(
st
<-
t
.
s
olver
.
map
(
_
.
allSteps
).
flatten
.
flatMap
(
_
.
subSolvers
.
values
))
{
res
.
append
(
" "
+
taskName
(
st
)+
" -> "
+
node
+
"\n"
)
res
.
append
(
" "
+
taskName
(
st
)+
" -> "
+
node
+
"\n"
)
printTask
(
st
)
printTask
(
st
)
}
}
...
@@ -45,7 +45,7 @@ class DerivationTree(root: RootTask) {
...
@@ -45,7 +45,7 @@ class DerivationTree(root: RootTask) {
}
}
root
.
solver
.
foreach
(
printTask
)
root
.
solver
Task
.
foreach
(
printTask
)
res
append
"}\n"
res
append
"}\n"
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/synthesis/Task.scala
+
11
−
6
View file @
8af26bbf
...
@@ -25,6 +25,8 @@ class Task(synth: Synthesizer,
...
@@ -25,6 +25,8 @@ class Task(synth: Synthesizer,
}
}
var
solution
:
Option
[
Solution
]
=
None
var
solution
:
Option
[
Solution
]
=
None
var
solver
:
Option
[
RuleApplication
]
=
None
var
alternatives
=
Set
[
RuleApplication
]()
var
alternatives
=
Set
[
RuleApplication
]()
var
minComplexity
:
AbsSolComplexity
=
new
FixedSolComplexity
(
0
)
var
minComplexity
:
AbsSolComplexity
=
new
FixedSolComplexity
(
0
)
...
@@ -66,9 +68,12 @@ class Task(synth: Synthesizer,
...
@@ -66,9 +68,12 @@ class Task(synth: Synthesizer,
}
else
{
}
else
{
onSuccess
(
solutions
)
match
{
onSuccess
(
solutions
)
match
{
case
(
s
,
true
)
=>
case
(
s
,
true
)
=>
solution
=
Some
(
s
)
if
(
isBetterSolutionThan
(
s
,
solution
))
{
solution
=
Some
(
s
)
solver
=
Some
(
this
)
parent
.
partlySolvedBy
(
Task
.
this
,
solution
.
get
)
parent
.
partlySolvedBy
(
Task
.
this
,
s
)
}
case
_
=>
case
_
=>
// solution is there, but it is incomplete (precondition not strongest)
// solution is there, but it is incomplete (precondition not strongest)
//parent.partlySolvedBy(this, Solution.choose(problem))
//parent.partlySolvedBy(this, Solution.choose(problem))
...
@@ -117,18 +122,18 @@ class Task(synth: Synthesizer,
...
@@ -117,18 +122,18 @@ class Task(synth: Synthesizer,
}
}
class
RootTask
(
synth
:
Synthesizer
,
problem
:
Problem
)
extends
Task
(
synth
,
null
,
problem
,
null
)
{
class
RootTask
(
synth
:
Synthesizer
,
problem
:
Problem
)
extends
Task
(
synth
,
null
,
problem
,
null
)
{
var
solver
:
Option
[
Task
]
=
None
var
solver
Task
:
Option
[
Task
]
=
None
override
def
run
()
=
{
override
def
run
()
=
{
List
(
problem
)
List
(
problem
)
}
}
override
def
isSolvedFor
(
problem
:
Problem
)
=
solver
.
isDefined
override
def
isSolvedFor
(
problem
:
Problem
)
=
solver
Task
.
isDefined
override
def
partlySolvedBy
(
t
:
Task
,
s
:
Solution
)
{
override
def
partlySolvedBy
(
t
:
Task
,
s
:
Solution
)
{
if
(
isBetterSolutionThan
(
s
,
solution
))
{
if
(
isBetterSolutionThan
(
s
,
solution
))
{
solution
=
Some
(
s
)
solution
=
Some
(
s
)
solver
=
Some
(
t
)
solver
Task
=
Some
(
t
)
}
}
}
}
}
}
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