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
0b2eb621
Commit
0b2eb621
authored
12 years ago
by
Etienne Kneuss
Browse files
Options
Downloads
Patches
Plain Diff
Implement EqualitySplit We should check whether we do not always split on same variables
parent
e098fa41
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/leon/synthesis/Rules.scala
+22
-2
22 additions, 2 deletions
src/main/scala/leon/synthesis/Rules.scala
with
22 additions
and
2 deletions
src/main/scala/leon/synthesis/Rules.scala
+
22
−
2
View file @
0b2eb621
...
...
@@ -20,6 +20,7 @@ object Rules {
new
UnusedInput
(
_
),
new
UnconstrainedOutput
(
_
),
new
OptimisticGround
(
_
),
new
EqualitySplit
(
_
),
new
CEGIS
(
_
),
new
Assert
(
_
)
)
...
...
@@ -281,7 +282,7 @@ class ADTDual(synth: Synthesizer) extends Rule("ADTDual", synth, 200) {
}
}
class
CEGIS
(
synth
:
Synthesizer
)
extends
Rule
(
"CEGIS"
,
synth
,
50
)
{
class
CEGIS
(
synth
:
Synthesizer
)
extends
Rule
(
"CEGIS"
,
synth
,
1
50
)
{
def
applyOn
(
task
:
Task
)
:
RuleResult
=
{
val
p
=
task
.
problem
...
...
@@ -457,7 +458,7 @@ class CEGIS(synth: Synthesizer) extends Rule("CEGIS", synth, 50) {
}
}
class
OptimisticGround
(
synth
:
Synthesizer
)
extends
Rule
(
"Optimistic Ground"
,
synth
,
9
0
)
{
class
OptimisticGround
(
synth
:
Synthesizer
)
extends
Rule
(
"Optimistic Ground"
,
synth
,
15
0
)
{
def
applyOn
(
task
:
Task
)
:
RuleResult
=
{
val
p
=
task
.
problem
...
...
@@ -512,3 +513,22 @@ class OptimisticGround(synth: Synthesizer) extends Rule("Optimistic Ground", syn
}
}
}
class
EqualitySplit
(
synth
:
Synthesizer
)
extends
Rule
(
"Eq. Split."
,
synth
,
10
)
{
def
applyOn
(
task
:
Task
)
:
RuleResult
=
{
val
p
=
task
.
problem
val
asgroups
=
p
.
as
.
groupBy
(
_
.
getType
).
filter
(
_
.
_2
.
size
==
2
).
mapValues
(
_
.
toList
)
val
extraConds
=
for
(
List
(
a1
,
a2
)
<-
asgroups
.
values
)
yield
{
Or
(
Equals
(
Variable
(
a1
),
Variable
(
a2
)),
Not
(
Equals
(
Variable
(
a1
),
Variable
(
a2
))))
}
if
(!
extraConds
.
isEmpty
)
{
val
sub
=
p
.
copy
(
phi
=
And
(
And
(
extraConds
.
toSeq
),
p
.
phi
))
RuleStep
(
List
(
sub
),
forward
)
}
else
{
RuleInapplicable
}
}
}
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