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
3184042f
Commit
3184042f
authored
8 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Concrete cvc4 and z3 solvers
parent
8e5ad90c
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
src/main/scala/inox/solvers/smtlib/SMTLIBCVC4Solver.scala
+7
-37
7 additions, 37 deletions
src/main/scala/inox/solvers/smtlib/SMTLIBCVC4Solver.scala
src/main/scala/inox/solvers/smtlib/SMTLIBZ3Solver.scala
+3
-15
3 additions, 15 deletions
src/main/scala/inox/solvers/smtlib/SMTLIBZ3Solver.scala
with
10 additions
and
52 deletions
src/main/scala/inox/solvers/smtlib/SMTLIBCVC4Solver.scala
+
7
−
37
View file @
3184042f
/* Copyright 2009-2016 EPFL, Lausanne */
package
leon
package
inox
package
solvers
package
smtlib
import
OptionParsers._
class
SMTLIBCVC4Solver
(
val
program
:
Program
,
val
options
:
SolverOptions
)
extends
SMTLIBSolver
with
SMTLIBCVC4Target
{
import
solvers.theories._
import
purescala.Definitions.Program
class
SMTLIBCVC4Solver
(
context
:
SolverContext
,
program
:
Program
)
extends
SMTLIBSolver
(
context
,
program
,
new
BagEncoder
(
context
.
context
,
program
)
>>
new
ArrayEncoder
(
context
.
context
,
program
))
with
SMTLIBCVC4Target
with
cvc4
.
CVC4Solver
{
def
targetName
=
"cvc4"
def
userDefinedOps
(
ctx
:
LeonContext
)
=
{
ctx
.
findOptionOrDefault
(
SMTLIBCVC4Component
.
optCVC4Options
)
}
def
interpreterOps
(
ctx
:
LeonContext
)
=
{
def
interpreterOps
(
ctx
:
InoxContext
)
=
{
Seq
(
"-q"
,
"--produce-models"
,
"--incremental"
,
// "--no-incremental",
// "--tear-down-incremental",
// "--dt-rewrite-error-sel", // Removing since it causes CVC4 to segfault on some inputs
// "--dt-rewrite-error-sel", // Removing since it causes CVC4 to segfault on some inputs
"--rewrite-divk"
,
"--print-success"
,
"--lang"
,
"smt2.5"
)
++
userDefinedOps
(
ctx
).
toSeq
)
}
}
object
SMTLIBCVC4Component
extends
LeonComponent
{
val
name
=
"CVC4 solver"
val
description
=
"Solver invoked with --solvers=smt-cvc4"
val
optCVC4Options
=
new
LeonOptionDef
[
Set
[
String
]]
{
val
name
=
"solver:cvc4"
val
description
=
"Pass extra arguments to CVC4"
val
default
=
Set
[
String
]()
val
parser
=
setParser
(
stringParser
)
val
usageRhs
=
"<cvc4-opt>"
}
override
val
definedOptions
:
Set
[
LeonOptionDef
[
Any
]]
=
Set
(
optCVC4Options
)
}
This diff is collapsed.
Click to expand it.
src/main/scala/inox/solvers/smtlib/SMTLIBZ3Solver.scala
+
3
−
15
View file @
3184042f
/* Copyright 2009-2016 EPFL, Lausanne */
package
leon
package
inox
package
solvers
package
smtlib
import
purescala.Definitions.Program
import
purescala.Common.Identifier
import
purescala.Expressions.Expr
import
_root_.smtlib.parser.Terms.
{
Identifier
=>
_
,
_
}
import
_root_.smtlib.parser.Commands.
{
FunDef
=>
SMTFunDef
,
_
}
import
_root_.smtlib.parser.CommandsResponses.GetModelResponseSuccess
import
_root_.smtlib.theories.Core.
{
Equals
=>
_
,
_
}
import
theories._
class
SMTLIBZ3Solver
(
sctx
:
SolverContext
,
program
:
Program
)
extends
SMTLIBSolver
(
sctx
,
program
,
new
StringEncoder
(
sctx
.
context
,
program
)
>>
new
ArrayEncoder
(
sctx
.
context
,
program
))
class
SMTLIBZ3Solver
(
val
program
:
Program
,
val
options
:
SolverOptions
)
extends
SMTLIBSolver
with
SMTLIBZ3Target
with
z3
.
Z3Solver
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