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
7b01175f
Commit
7b01175f
authored
8 years ago
by
Nicolas Voirol
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some stuff with lambda equality
parent
4dd08350
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/LambdaTemplates.scala
+10
-10
10 additions, 10 deletions
src/main/scala/inox/solvers/unrolling/LambdaTemplates.scala
with
10 additions
and
10 deletions
src/main/scala/inox/solvers/unrolling/LambdaTemplates.scala
+
10
−
10
View file @
7b01175f
...
...
@@ -168,20 +168,19 @@ trait LambdaTemplates { self: Templates =>
* already been found, then the associated instantiations must already appear
* in those handled by the solver.
*/
lazy
val
(
key
,
instantiation
)
=
{
lazy
val
(
key
,
instantiation
,
locals
)
=
{
val
(
substMap
,
substInst
)
=
Template
.
substitution
(
condVars
,
exprVars
,
condTree
,
lambdas
,
quantifications
,
Map
.
empty
,
pathVar
.
_2
)
val
tmplInst
=
Template
.
instantiate
(
clauses
,
blockers
,
applications
,
matchers
,
substMap
)
val
instantiation
=
substInst
++
tmplInst
val
substituter
=
mkSubstituter
(
substMap
.
mapValues
(
_
.
encoded
))
val
key
=
(
lambda
,
pathVar
.
_2
,
dependencies
.
map
(
substituter
))
val
instantiation
=
substInst
++
tmplInst
(
key
,
instantiation
)
}
val
deps
=
dependencies
.
map
(
substituter
)
val
key
=
(
lambda
,
pathVar
.
_2
,
deps
)
lazy
val
locals
:
Seq
[(
Variable
,
Encoded
)]
=
{
val
sortedDeps
=
exprOps
.
variablesOf
(
lambda
).
toSeq
.
sortBy
(
_
.
id
.
uniqueName
)
sortedDeps
zip
dependencies
val
locals
=
sortedDeps
zip
deps
(
key
,
instantiation
,
locals
)
}
override
def
equals
(
that
:
Any
)
:
Boolean
=
that
match
{
...
...
@@ -297,7 +296,7 @@ trait LambdaTemplates { self: Templates =>
val
idT
=
encodeSymbol
(
template
.
ids
.
_1
)
val
newTemplate
=
template
.
withId
(
idT
)
val
orderingClauses
:
Clauses
=
newTemplate
.
structure
.
locals
.
flatMap
{
val
orderingClauses
=
newTemplate
.
structure
.
locals
.
flatMap
{
case
(
v
,
dep
)
=>
registerClosure
(
newTemplate
.
start
,
idT
->
newTemplate
.
tpe
,
dep
->
v
.
tpe
)
}
...
...
@@ -321,6 +320,7 @@ trait LambdaTemplates { self: Templates =>
extClauses
++
arglessEqClauses
byID
+=
idT
->
newTemplate
byType
+=
newTemplate
.
tpe
->
(
byType
(
newTemplate
.
tpe
)
+
(
newTemplate
.
structure
->
newTemplate
))
...
...
@@ -416,12 +416,12 @@ trait LambdaTemplates { self: Templates =>
mkImplies
(
mkAnd
(
template
.
start
,
that
.
start
),
if
(
template
.
structure
.
lambda
==
that
.
structure
.
lambda
)
{
val
pairs
=
template
.
structure
.
dependencie
s
zip
that
.
structure
.
dependencie
s
val
pairs
=
template
.
structure
.
local
s
zip
that
.
structure
.
local
s
val
filtered
=
pairs
.
filter
(
p
=>
p
.
_1
!=
p
.
_2
)
if
(
filtered
.
isEmpty
)
{
equals
}
else
{
val
eqs
=
filtered
.
map
(
p
=>
mkEquals
(
p
.
_1
,
p
.
_2
))
val
eqs
=
filtered
.
map
(
p
=>
mkEquals
(
p
.
_1
.
_2
,
p
.
_2
.
_2
))
mkEquals
(
mkAnd
(
eqs
:
_
*
),
equals
)
}
}
else
{
...
...
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