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
3df2a8d7
Commit
3df2a8d7
authored
13 years ago
by
Régis Blanc
Browse files
Options
Downloads
Patches
Plain Diff
special treatment of function that take a constant value
parent
086bac59
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mytest/Epsilon1.scala
+5
-1
5 additions, 1 deletion
mytest/Epsilon1.scala
src/main/scala/leon/FairZ3Solver.scala
+10
-1
10 additions, 1 deletion
src/main/scala/leon/FairZ3Solver.scala
with
15 additions
and
2 deletions
mytest/Epsilon1.scala
+
5
−
1
View file @
3df2a8d7
...
@@ -2,7 +2,11 @@ import leon.Utils._
...
@@ -2,7 +2,11 @@ import leon.Utils._
object
Epsilon1
{
object
Epsilon1
{
def
foo
(
x
:
Int
)
:
Int
=
{
def
greater
(
x
:
Int
)
:
Int
=
{
epsilon
((
y
:
Int
)
=>
y
>
x
)
}
ensuring
(
_
>=
x
)
def
greaterWrong
(
x
:
Int
)
:
Int
=
{
epsilon
((
y
:
Int
)
=>
y
>=
x
)
epsilon
((
y
:
Int
)
=>
y
>=
x
)
}
ensuring
(
_
>
x
)
}
ensuring
(
_
>
x
)
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/FairZ3Solver.scala
+
10
−
1
View file @
3df2a8d7
...
@@ -808,7 +808,16 @@ class FairZ3Solver(reporter: Reporter) extends Solver(reporter) with AbstractZ3S
...
@@ -808,7 +808,16 @@ class FairZ3Solver(reporter: Reporter) extends Solver(reporter) with AbstractZ3S
}
else
Seq
()
}
else
Seq
()
}
else
Seq
()
}
else
Seq
()
}).
toMap
}).
toMap
val
asMap
=
modelToMap
(
model
,
variables
)
++
functionsAsMap
val
constantFunctionsAsMap
:
Map
[
Identifier
,
Expr
]
=
model
.
getModelConstantInterpretations
.
flatMap
(
p
=>
{
if
(
isKnownDecl
(
p
.
_1
))
{
val
fd
=
functionDeclToDef
(
p
.
_1
)
if
(!
fd
.
hasImplementation
)
{
Seq
((
fd
.
id
,
fromZ3Formula
(
model
,
p
.
_2
,
Some
(
fd
.
returnType
))))
}
else
Seq
()
}
else
Seq
()
}).
toMap
//val undefinedFunctionIds = functionMap.keys.filterNot(fd => fd.hasImplementation || !fd.args.isEmpty).map(_.id)
val
asMap
=
modelToMap
(
model
,
variables
)
++
functionsAsMap
++
constantFunctionsAsMap
model
.
delete
model
.
delete
lazy
val
modelAsString
=
asMap
.
toList
.
map
(
p
=>
p
.
_1
+
" -> "
+
p
.
_2
).
mkString
(
"\n"
)
lazy
val
modelAsString
=
asMap
.
toList
.
map
(
p
=>
p
.
_1
+
" -> "
+
p
.
_2
).
mkString
(
"\n"
)
val
evalResult
=
eval
(
asMap
,
formula
,
evaluator
)
val
evalResult
=
eval
(
asMap
,
formula
,
evaluator
)
...
...
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