Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
6b199a8f
Commit
6b199a8f
authored
5 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp/why3] fix context wrt tasks
parent
423e5f24
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/ProverWhy3.ml
+41
-43
41 additions, 43 deletions
src/plugins/wp/ProverWhy3.ml
with
41 additions
and
43 deletions
src/plugins/wp/ProverWhy3.ml
+
41
−
43
View file @
6b199a8f
...
@@ -1311,50 +1311,48 @@ let is_trivial (t : Why3.Task.task) =
...
@@ -1311,50 +1311,48 @@ let is_trivial (t : Why3.Task.task) =
let
build_proof_task
?
timeout
?
steplimit
~
prover
wpo
()
=
let
build_proof_task
?
timeout
?
steplimit
~
prover
wpo
()
=
try
try
WpContext
.
on_context
(
Wpo
.
get_context
wpo
)
(* Always generate common task *)
begin
fun
()
->
let
context
=
Wpo
.
get_context
wpo
in
(* Always generate common task *)
let
task
=
WpContext
.
on_context
context
task_of_wpo
wpo
in
let
task
=
task_of_wpo
wpo
in
if
Wp_parameters
.
Check
.
get
()
if
Wp_parameters
.
Check
.
get
()
then
Task
.
return
VCS
.
checked
(* Why3 tasks are type-checked *)
then
Task
.
return
VCS
.
checked
(* Why3 tasks are type-checked *)
else
else
if
Wp_parameters
.
Generate
.
get
()
if
Wp_parameters
.
Generate
.
get
()
then
Task
.
return
VCS
.
no_result
(* Only generate *)
then
Task
.
return
VCS
.
no_result
(* Only generate *)
else
else
let
drv
,
config
,
task
=
prover_task
prover
task
in
let
drv
,
config
,
task
=
prover_task
prover
task
in
if
is_trivial
task
then
if
is_trivial
task
then
Task
.
return
VCS
.
valid
Task
.
return
VCS
.
valid
else
else
let
mode
=
get_mode
()
in
let
mode
=
get_mode
()
in
match
mode
with
match
mode
with
|
NoCache
->
|
NoCache
->
call_prover
~
timeout
~
steplimit
drv
prover
config
task
call_prover
~
timeout
~
steplimit
drv
prover
config
task
|
Offline
->
|
Offline
->
let
hash
=
task_hash
wpo
drv
prover
task
in
let
hash
=
task_hash
wpo
drv
prover
task
in
let
result
=
get_cache_result
~
mode
hash
|>
VCS
.
cached
in
let
result
=
get_cache_result
~
mode
hash
|>
VCS
.
cached
in
if
VCS
.
is_verdict
result
then
incr
hits
else
incr
miss
;
if
VCS
.
is_verdict
result
then
incr
hits
else
incr
miss
;
Task
.
return
result
|
Update
|
Replay
|
Rebuild
|
Cleanup
->
let
hash
=
task_hash
wpo
drv
prover
task
in
let
result
=
get_cache_result
~
mode
hash
|>
promote
~
timeout
~
steplimit
|>
VCS
.
cached
in
if
VCS
.
is_verdict
result
then
begin
incr
hits
;
Task
.
return
result
Task
.
return
result
|
Update
|
Replay
|
Rebuild
|
Cleanup
->
end
let
hash
=
task_hash
wpo
drv
prover
task
in
else
let
result
=
Task
.
finally
get_cache_result
~
mode
hash
(
call_prover
~
timeout
~
steplimit
drv
prover
config
task
)
|>
promote
~
timeout
~
steplimit
|>
VCS
.
cached
in
begin
function
if
VCS
.
is_verdict
result
|
Task
.
Result
result
when
VCS
.
is_verdict
result
->
then
incr
miss
;
begin
set_cache_result
~
mode
hash
prover
result
incr
hits
;
|
_
->
()
Task
.
return
result
end
end
else
Task
.
finally
(
call_prover
~
timeout
~
steplimit
drv
prover
config
task
)
begin
function
|
Task
.
Result
result
when
VCS
.
is_verdict
result
->
incr
miss
;
set_cache_result
~
mode
hash
prover
result
|
_
->
()
end
end
()
with
exn
->
with
exn
->
if
Wp_parameters
.
has_dkey
dkey_api
then
if
Wp_parameters
.
has_dkey
dkey_api
then
Wp_parameters
.
fatal
"[Why3 Error] %a@
\n
%s"
Wp_parameters
.
fatal
"[Why3 Error] %a@
\n
%s"
...
...
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