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
24c618eb
Commit
24c618eb
authored
9 years ago
by
Etienne Kneuss
Browse files
Options
Downloads
Patches
Plain Diff
asString in AbstractZ3Solver
parent
97d7257f
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/solvers/z3/AbstractZ3Solver.scala
+9
-9
9 additions, 9 deletions
src/main/scala/leon/solvers/z3/AbstractZ3Solver.scala
with
9 additions
and
9 deletions
src/main/scala/leon/solvers/z3/AbstractZ3Solver.scala
+
9
−
9
View file @
24c618eb
...
@@ -260,7 +260,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -260,7 +260,7 @@ trait AbstractZ3Solver extends Solver {
case
other
=>
case
other
=>
sorts
.
cachedB
(
other
)
{
sorts
.
cachedB
(
other
)
{
reporter
.
warning
(
other
.
getPos
,
"Resorting to uninterpreted type for : "
+
other
)
reporter
.
warning
(
other
.
getPos
,
"Resorting to uninterpreted type for : "
+
other
.
asString
)
val
symbol
=
z3
.
mkIntSymbol
(
FreshIdentifier
(
"unint"
).
globalId
)
val
symbol
=
z3
.
mkIntSymbol
(
FreshIdentifier
(
"unint"
).
globalId
)
z3
.
mkUninterpretedSort
(
symbol
)
z3
.
mkUninterpretedSort
(
symbol
)
}
}
...
@@ -546,7 +546,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -546,7 +546,7 @@ trait AbstractZ3Solver extends Solver {
z3
.
mkApp
(
genericValueToDecl
(
gv
))
z3
.
mkApp
(
genericValueToDecl
(
gv
))
case
_
=>
{
case
_
=>
{
reporter
.
warning
(
ex
.
getPos
,
"Can't handle this in translation to Z3: "
+
ex
)
reporter
.
warning
(
ex
.
getPos
,
"Can't handle this in translation to Z3: "
+
ex
.
asString
)
throw
new
IllegalArgumentException
throw
new
IllegalArgumentException
}
}
}
}
...
@@ -558,7 +558,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -558,7 +558,7 @@ trait AbstractZ3Solver extends Solver {
case
rav
:
RawArrayValue
=>
case
rav
:
RawArrayValue
=>
fromRawArray
(
rav
,
tpe
)
fromRawArray
(
rav
,
tpe
)
case
_
=>
case
_
=>
scala
.
sys
.
error
(
"Unable to extract from raw array for "
+
r
)
scala
.
sys
.
error
(
"Unable to extract from raw array for "
+
r
.
asString
)
}
}
protected
def
fromRawArray
(
r
:
RawArrayValue
,
tpe
:
TypeTree
)
:
Expr
=
tpe
match
{
protected
def
fromRawArray
(
r
:
RawArrayValue
,
tpe
:
TypeTree
)
:
Expr
=
tpe
match
{
...
@@ -570,7 +570,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -570,7 +570,7 @@ trait AbstractZ3Solver extends Solver {
case
_
=>
case
_
=>
scala
.
sys
.
error
(
"Unable to extract from raw array for "
+
tpe
)
scala
.
sys
.
error
(
"Unable to extract from raw array for "
+
tpe
.
asString
)
}
}
protected
[
leon
]
def
fromZ3Formula
(
model
:
Z3Model
,
tree
:
Z3AST
,
tpe
:
TypeTree
)
:
Expr
=
{
protected
[
leon
]
def
fromZ3Formula
(
model
:
Z3Model
,
tree
:
Z3AST
,
tpe
:
TypeTree
)
:
Expr
=
{
...
@@ -588,7 +588,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -588,7 +588,7 @@ trait AbstractZ3Solver extends Solver {
case
Int32Type
=>
IntLiteral
(
hexa
.
toInt
)
case
Int32Type
=>
IntLiteral
(
hexa
.
toInt
)
case
CharType
=>
CharLiteral
(
hexa
.
toInt
.
toChar
)
case
CharType
=>
CharLiteral
(
hexa
.
toInt
.
toChar
)
case
_
=>
case
_
=>
reporter
.
warning
(
"Unexpected target type for BV value: "
+
tpe
)
reporter
.
warning
(
"Unexpected target type for BV value: "
+
tpe
.
asString
)
throw
new
IllegalArgumentException
throw
new
IllegalArgumentException
}
}
case
None
=>
{
case
None
=>
{
...
@@ -607,7 +607,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -607,7 +607,7 @@ trait AbstractZ3Solver extends Solver {
case
Int32Type
=>
IntLiteral
(
hexa
.
toInt
)
case
Int32Type
=>
IntLiteral
(
hexa
.
toInt
)
case
CharType
=>
CharLiteral
(
hexa
.
toInt
.
toChar
)
case
CharType
=>
CharLiteral
(
hexa
.
toInt
.
toChar
)
case
_
=>
case
_
=>
reporter
.
warning
(
"Unexpected target type for BV value: "
+
tpe
)
reporter
.
warning
(
"Unexpected target type for BV value: "
+
tpe
.
asString
)
throw
new
IllegalArgumentException
throw
new
IllegalArgumentException
}
}
case
None
=>
{
case
None
=>
{
...
@@ -680,10 +680,10 @@ trait AbstractZ3Solver extends Solver {
...
@@ -680,10 +680,10 @@ trait AbstractZ3Solver extends Solver {
// We expect a RawArrayValue with keys in from and values in Option[to],
// We expect a RawArrayValue with keys in from and values in Option[to],
// with default value == None
// with default value == None
if
(
r
.
default
.
getType
!=
library
.
noneType
(
to
))
{
if
(
r
.
default
.
getType
!=
library
.
noneType
(
to
))
{
reporter
.
warning
(
"Co-finite maps are not supported. (Default was "
+
r
.
default
+
")"
)
reporter
.
warning
(
"Co-finite maps are not supported. (Default was "
+
r
.
default
.
asString
+
")"
)
throw
new
IllegalArgumentException
throw
new
IllegalArgumentException
}
}
require
(
r
.
keyTpe
==
from
,
s
"Type error in solver model, expected $from, found ${r.keyTpe}"
)
require
(
r
.
keyTpe
==
from
,
s
"Type error in solver model, expected $
{
from
.asString}
, found ${r.keyTpe
.asString
}"
)
val
elems
=
r
.
elems
.
flatMap
{
val
elems
=
r
.
elems
.
flatMap
{
case
(
k
,
CaseClass
(
leonSome
,
Seq
(
x
)))
=>
Some
(
k
->
x
)
case
(
k
,
CaseClass
(
leonSome
,
Seq
(
x
)))
=>
Some
(
k
->
x
)
...
@@ -737,7 +737,7 @@ trait AbstractZ3Solver extends Solver {
...
@@ -737,7 +737,7 @@ trait AbstractZ3Solver extends Solver {
// case OpMod => Modulo(rargs(0), rargs(1))
// case OpMod => Modulo(rargs(0), rargs(1))
case
other
=>
case
other
=>
reporter
.
warning
(
"Don't know what to do with this declKind : "
+
other
)
reporter
.
warning
(
"Don't know what to do with this declKind : "
+
other
)
reporter
.
warning
(
"Expected type: "
+
tpe
)
reporter
.
warning
(
"Expected type: "
+
tpe
.
asString
)
reporter
.
warning
(
"Tree: "
+
t
)
reporter
.
warning
(
"Tree: "
+
t
)
reporter
.
warning
(
"The arguments are : "
+
args
)
reporter
.
warning
(
"The arguments are : "
+
args
)
throw
new
IllegalArgumentException
throw
new
IllegalArgumentException
...
...
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