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
80270b36
Commit
80270b36
authored
10 years ago
by
Emmanouil (Manos) Koukoutos
Committed by
Etienne Kneuss
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Only calculate values in CegisLike which are guarded by true guards
parent
1e8a21a7
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/CegisLike.scala
+13
-2
13 additions, 2 deletions
src/main/scala/leon/synthesis/rules/CegisLike.scala
with
13 additions
and
2 deletions
src/main/scala/leon/synthesis/rules/CegisLike.scala
+
13
−
2
View file @
80270b36
...
@@ -92,6 +92,15 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
...
@@ -92,6 +92,15 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
*/
*/
private
var
bTree
=
Map
[
Identifier
,
Map
[
Identifier
,
Set
[
Identifier
]]](
initGuard
->
p
.
xs
.
map
(
_
->
Set
[
Identifier
]()).
toMap
)
private
var
bTree
=
Map
[
Identifier
,
Map
[
Identifier
,
Set
[
Identifier
]]](
initGuard
->
p
.
xs
.
map
(
_
->
Set
[
Identifier
]()).
toMap
)
/**
* Stores which c's are guarded by which b's
*
* c1 -> Set(b2, b3)
*
* means c1 is protected by b2 and b3
*/
private
var
revBTree
:
Map
[
Identifier
,
Set
[
Identifier
]]
=
Map
()
/**
/**
* Computes dependencies of c's
* Computes dependencies of c's
*
*
...
@@ -201,7 +210,8 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
...
@@ -201,7 +210,8 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
def
composeWith
(
c
:
Identifier
)
{
def
composeWith
(
c
:
Identifier
)
{
cToExprs
.
get
(
c
)
match
{
cToExprs
.
get
(
c
)
match
{
case
Some
(
value
)
=>
case
Some
(
value
)
=>
res
=
Let
(
c
,
cToExprs
(
c
),
res
)
val
guards
=
(
revBTree
.
getOrElse
(
c
,
Set
())
-
initGuard
).
toSeq
map
{
_
.
toVariable
}
res
=
Let
(
c
,
if
(
guards
.
isEmpty
)
cToExprs
(
c
)
else
IfExpr
(
orJoin
(
guards
),
cToExprs
(
c
),
NoTree
(
c
.
getType
)),
res
)
case
None
=>
case
None
=>
res
=
Let
(
c
,
Error
(
c
.
getType
,
"No value available"
),
res
)
res
=
Let
(
c
,
Error
(
c
.
getType
,
"No value available"
),
res
)
}
}
...
@@ -332,7 +342,6 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
...
@@ -332,7 +342,6 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
var
newGuardedTerms
=
Map
[
Identifier
,
Set
[
Identifier
]]()
var
newGuardedTerms
=
Map
[
Identifier
,
Set
[
Identifier
]]()
var
newMappings
=
Map
[
Identifier
,
(
Identifier
,
Expr
)]()
var
newMappings
=
Map
[
Identifier
,
(
Identifier
,
Expr
)]()
var
cGroups
=
Map
[
Identifier
,
Set
[
Identifier
]]()
var
cGroups
=
Map
[
Identifier
,
Set
[
Identifier
]]()
for
((
parentGuard
,
recIds
)
<-
guardedTerms
;
recId
<-
recIds
)
{
for
((
parentGuard
,
recIds
)
<-
guardedTerms
;
recId
<-
recIds
)
{
...
@@ -409,6 +418,8 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
...
@@ -409,6 +418,8 @@ abstract class CEGISLike[T <% Typed](name: String) extends Rule(name) {
triedCompilation
=
false
triedCompilation
=
false
progEvaluator
=
None
progEvaluator
=
None
revBTree
++=
cGroups
(
newClauses
,
newGuardedTerms
.
keySet
)
(
newClauses
,
newGuardedTerms
.
keySet
)
}
}
...
...
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