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
946add91
Commit
946add91
authored
8 years ago
by
Nicolas Voirol
Browse files
Options
Downloads
Patches
Plain Diff
More optimizations for assume lifting
parent
66ec1296
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/inox/ast/SymbolOps.scala
+7
-7
7 additions, 7 deletions
src/main/scala/inox/ast/SymbolOps.scala
src/main/scala/inox/solvers/unrolling/TemplateGenerator.scala
+8
-2
8 additions, 2 deletions
...main/scala/inox/solvers/unrolling/TemplateGenerator.scala
with
15 additions
and
9 deletions
src/main/scala/inox/ast/SymbolOps.scala
+
7
−
7
View file @
946add91
...
...
@@ -224,7 +224,7 @@ trait SymbolOps { self: TypeOps =>
* in order to increase the precision of polarity analysis for
* quantification instantiations.
*/
def
simplify
Quantification
s
(
e
:
Expr
)
:
Expr
=
{
def
simplify
Forall
s
(
e
:
Expr
)
:
Expr
=
{
def
inlineFunctions
(
e
:
Expr
)
:
Expr
=
{
val
fds
=
functionCallsOf
(
e
).
flatMap
{
fi
=>
...
...
@@ -246,7 +246,7 @@ trait SymbolOps { self: TypeOps =>
fixpoint
(
inline
)(
e
)
}
def
inline
Quantification
s
(
e
:
Expr
)
:
Expr
=
{
def
inline
Forall
s
(
e
:
Expr
)
:
Expr
=
{
def
liftForalls
(
args
:
Seq
[
ValDef
],
es
:
Seq
[
Expr
],
recons
:
Seq
[
Expr
]
=>
Expr
)
:
Expr
=
{
val
(
allArgs
,
allBodies
)
=
es
.
map
{
case
f
:
Forall
=>
...
...
@@ -315,7 +315,7 @@ trait SymbolOps { self: TypeOps =>
case
_
=>
e
}
normalizeClauses
(
inline
Quantification
s
(
inlineFunctions
(
e
)))
normalizeClauses
(
inline
Forall
s
(
inlineFunctions
(
e
)))
}
def
simplifyLets
(
expr
:
Expr
)
:
Expr
=
postMap
({
...
...
@@ -778,10 +778,10 @@ trait SymbolOps { self: TypeOps =>
def
simplifyFormula
(
e
:
Expr
,
simplify
:
Boolean
=
true
)
:
Expr
=
{
if
(
simplify
)
{
val
simp
:
Expr
=>
Expr
=
((
e
:
Expr
)
=>
simplifyHOFunctions
(
e
))
compose
((
e
:
Expr
)
=>
simplifyByConstructors
(
e
))
compose
((
e
:
Expr
)
=>
simplifyAssumptions
(
e
))
compose
((
e
:
Expr
)
=>
simplify
Quantification
s
(
e
))
((
e
:
Expr
)
=>
simplifyHOFunctions
(
e
))
compose
((
e
:
Expr
)
=>
simplifyByConstructors
(
e
))
compose
((
e
:
Expr
)
=>
simplifyAssumptions
(
e
))
compose
((
e
:
Expr
)
=>
simplify
Forall
s
(
e
))
fixpoint
(
simp
)(
e
)
}
else
{
simplifyHOFunctions
(
e
,
simplify
=
false
)
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/inox/solvers/unrolling/TemplateGenerator.scala
+
8
−
2
View file @
946add91
...
...
@@ -297,7 +297,7 @@ trait TemplateGenerator { self: Templates =>
}
}
case
l
@
Lambda
(
args
,
body
)
=>
case
l
:
Lambda
=>
val
idArgs
:
Seq
[
Variable
]
=
lambdaArgs
(
l
)
val
trArgs
:
Seq
[
Encoded
]
=
idArgs
.
map
(
id
=>
substMap
.
getOrElse
(
id
,
encodeSymbol
(
id
)))
...
...
@@ -386,7 +386,13 @@ trait TemplateGenerator { self: Templates =>
registerLambda
(
template
)
lid
case
f
@
Forall
(
args
,
body
)
=>
case
f
:
Forall
=>
val
(
assumptions
,
Forall
(
args
,
body
))
=
liftAssumptions
(
f
)
for
(
a
<-
assumptions
)
{
rec
(
pathVar
,
a
,
Some
(
true
))
}
val
TopLevelAnds
(
conjuncts
)
=
body
val
conjunctQs
=
conjuncts
.
map
{
conjunct
=>
...
...
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