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
d39332d2
Commit
d39332d2
authored
9 years ago
by
Etienne Kneuss
Browse files
Options
Downloads
Patches
Plain Diff
Catch exceptions thrown in assertCnstr
parent
4b225124
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/leon/evaluators/RecursiveEvaluator.scala
+11
-7
11 additions, 7 deletions
src/main/scala/leon/evaluators/RecursiveEvaluator.scala
src/main/scala/leon/solvers/combinators/PortfolioSolver.scala
+1
-1
1 addition, 1 deletion
...main/scala/leon/solvers/combinators/PortfolioSolver.scala
with
12 additions
and
8 deletions
src/main/scala/leon/evaluators/RecursiveEvaluator.scala
+
11
−
7
View file @
d39332d2
...
...
@@ -652,15 +652,16 @@ abstract class RecursiveEvaluator(ctx: LeonContext, prog: Program, maxSteps: Int
val
solverf
=
SolverFactory
.
getFromSettings
(
ctx
,
program
)
val
solver
=
solverf
.
getNewSolver
()
val
eqs
=
p
.
as
.
map
{
case
id
=>
Equals
(
Variable
(
id
),
rctx
.
mappings
(
id
))
}
val
cnstr
=
andJoin
(
eqs
:::
p
.
pc
::
p
.
phi
::
Nil
)
solver
.
assertCnstr
(
cnstr
)
try
{
val
eqs
=
p
.
as
.
map
{
case
id
=>
Equals
(
Variable
(
id
),
rctx
.
mappings
(
id
))
}
val
cnstr
=
andJoin
(
eqs
:::
p
.
pc
::
p
.
phi
::
Nil
)
solver
.
assertCnstr
(
cnstr
)
solver
.
check
match
{
case
Some
(
true
)
=>
val
model
=
solver
.
getModel
...
...
@@ -681,6 +682,9 @@ abstract class RecursiveEvaluator(ctx: LeonContext, prog: Program, maxSteps: Int
case
_
=>
throw
RuntimeError
(
"Timeout exceeded"
)
}
}
catch
{
case
e
:
Throwable
=>
throw
EvalError
(
"Runtime synthesis of choose failed: "
+
e
.
getMessage
)
}
finally
{
solverf
.
reclaim
(
solver
)
solverf
.
shutdown
()
...
...
This diff is collapsed.
Click to expand it.
src/main/scala/leon/solvers/combinators/PortfolioSolver.scala
+
1
−
1
View file @
d39332d2
...
...
@@ -65,7 +65,7 @@ class PortfolioSolver[S <: Solver with Interruptible](val context: LeonContext,
r
case
None
=>
context
.
reporter
.
debug
(
"No solver succeeded"
)
fs
.
foreach
(
f
=>
println
(
f
.
value
))
//
fs.foreach(f => println(f.value))
None
}
...
...
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