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
ddf077dc
Commit
ddf077dc
authored
8 years ago
by
Nicolas Voirol
Browse files
Options
Downloads
Patches
Plain Diff
More heuristics...
parent
ab7e0b65
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/inox/solvers/unrolling/QuantificationTemplates.scala
+8
-10
8 additions, 10 deletions
...cala/inox/solvers/unrolling/QuantificationTemplates.scala
with
8 additions
and
10 deletions
src/main/scala/inox/solvers/unrolling/QuantificationTemplates.scala
+
8
−
10
View file @
ddf077dc
...
@@ -579,18 +579,16 @@ trait QuantificationTemplates { self: Templates =>
...
@@ -579,18 +579,16 @@ trait QuantificationTemplates { self: Templates =>
/* @nv: I reused the cost heuristic from Leon here, it worked pretty well
/* @nv: I reused the cost heuristic from Leon here, it worked pretty well
* on all our pre-existing benchmarks and regressions. */
* on all our pre-existing benchmarks and regressions. */
mappings
++=
newMappings
.
map
{
case
(
bs
,
map
,
gens
,
c
)
=>
mappings
++=
newMappings
.
map
{
case
(
bs
,
map
,
gens
,
c
)
=>
val
substituter
=
mkSubstituter
(
map
.
mapValues
(
_
.
encoded
))
val
msubst
=
map
.
collect
{
case
(
q
,
Right
(
m
))
=>
q
->
m
}
val
isOpt
=
optimizationQuorums
.
exists
{
ms
=>
ms
.
forall
(
m
=>
handledMatchers
.
contains
(
m
.
substitute
(
substituter
,
msubst
)))
}
val
cost
=
if
(
initGens
.
nonEmpty
)
{
val
cost
=
if
(
initGens
.
nonEmpty
)
{
1
+
3
*
map
.
values
.
collect
{
case
Right
(
m
)
=>
totalDepth
(
m
)
}.
sum
1
+
3
*
map
.
values
.
collect
{
case
Right
(
m
)
=>
totalDepth
(
m
)
}.
sum
}
else
if
(!
isOpt
)
{
3
}
else
{
}
else
{
0
val
substituter
=
mkSubstituter
(
map
.
mapValues
(
_
.
encoded
))
val
msubst
=
map
.
collect
{
case
(
q
,
Right
(
m
))
=>
q
->
m
}
val
isOpt
=
optimizationQuorums
.
exists
{
ms
=>
ms
.
forall
(
m
=>
handledMatchers
.
contains
(
m
.
substitute
(
substituter
,
msubst
)))
}
if
(
isOpt
)
0
else
3
}
}
(
bs
,
map
,
c
+
cost
)
(
bs
,
map
,
c
+
cost
)
...
@@ -967,7 +965,7 @@ trait QuantificationTemplates { self: Templates =>
...
@@ -967,7 +965,7 @@ trait QuantificationTemplates { self: Templates =>
}
}
def
requiresFiniteRangeCheck
:
Boolean
=
def
requiresFiniteRangeCheck
:
Boolean
=
ignoredMatchers
.
nonEmpty
||
ignoredSubsts
.
exists
(
_
.
_2
.
nonEmpty
)
ignoredGrounds
.
nonEmpty
||
ignoredMatchers
.
nonEmpty
||
ignoredSubsts
.
exists
(
_
.
_2
.
nonEmpty
)
def
getFiniteRangeClauses
:
Clauses
=
{
def
getFiniteRangeClauses
:
Clauses
=
{
val
clauses
=
new
scala
.
collection
.
mutable
.
ListBuffer
[
Encoded
]
val
clauses
=
new
scala
.
collection
.
mutable
.
ListBuffer
[
Encoded
]
...
...
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