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
43bf7404
Commit
43bf7404
authored
4 years ago
by
Loïc Correnson
Committed by
Allan Blanchard
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] draft of why3-coq prover
parent
a1fbeef7
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
+48
-3
48 additions, 3 deletions
src/plugins/wp/ProverWhy3.ml
with
48 additions
and
3 deletions
src/plugins/wp/ProverWhy3.ml
+
48
−
3
View file @
43bf7404
...
...
@@ -1236,7 +1236,7 @@ let digest wpo drv prover task =
end
in
Digest
.
file
file
|>
Digest
.
to_hex
let
batch
pconf
driver
~
timeout
~
steplimit
prover
task
=
let
batch
pconf
driver
?
script
~
timeout
~
steplimit
prover
task
=
let
steps
=
match
steplimit
with
Some
0
->
None
|
_
->
steplimit
in
let
limit
=
let
def
=
Why3
.
Call_provers
.
empty_limit
in
...
...
@@ -1250,9 +1250,51 @@ let batch pconf driver ~timeout ~steplimit prover task =
|
Some
_
,
None
->
false
in
let
command
=
Why3
.
Whyconf
.
get_complete_command
pconf
~
with_steps
in
let
call
=
Why3
.
Driver
.
prove_task_prepared
~
command
~
limit
driver
task
in
let
inplace
=
if
script
<>
None
then
Some
true
else
None
in
let
call
=
Why3
.
Driver
.
prove_task_prepared
?
old
:
script
?
inplace
~
command
~
limit
driver
task
in
call_prover_task
~
timeout
~
steps
prover
call
(* -------------------------------------------------------------------------- *)
(* --- Interactive Prover (Coq) --- *)
(* -------------------------------------------------------------------------- *)
let
editor
pconf
=
let
config
=
Why3Provers
.
config
()
in
try
let
ed
=
Why3
.
Whyconf
.
editor_by_id
config
pconf
.
Why3
.
Whyconf
.
editor
in
String
.
concat
" "
(
ed
.
editor_command
::
ed
.
editor_options
)
with
Not_found
->
Why3
.
Whyconf
.(
default_editor
(
get_main
config
))
[
@@
warning
"-32"
]
let
script
~
force
wpo
=
let
dir
=
Wp_parameters
.
get_session_dir
~
force
"coq"
in
Format
.
sprintf
"%s/%s.v"
(
dir
:>
string
)
wpo
.
Wpo
.
po_sid
let
prepare
~
file
driver
task
=
Command
.
pp_to_file
file
(
fun
fmt
->
ignore
(
Why3
.
Driver
.
print_task_prepared
driver
fmt
task
)
)
let
editscript
~
file
pconf
=
let
call
=
Why3
.
Call_provers
.
call_editor
~
command
:
(
editor
pconf
)
file
in
call_prover_task
~
timeout
:
None
~
steps
:
None
pconf
.
prover
call
let
interactive
wpo
pconf
driver
prover
task
=
let
file
=
script
~
force
:
true
wpo
in
if
not
(
Sys
.
file_exists
file
)
then
prepare
~
file
driver
task
;
let
time
=
Wp_parameters
.
CoqTimeout
.
get
()
in
let
timeout
=
if
time
<=
0
then
None
else
Some
time
in
let
open
Task
in
batch
pconf
driver
~
script
:
file
~
timeout
~
steplimit
:
None
prover
task
>>=
fun
result
->
if
VCS
.
is_valid
result
then
Task
.
return
result
else
editscript
~
file
pconf
>>=
fun
_
->
batch
pconf
driver
~
script
:
file
~
timeout
~
steplimit
:
None
prover
task
(* -------------------------------------------------------------------------- *)
(* --- Prove WPO --- *)
(* -------------------------------------------------------------------------- *)
...
...
@@ -1273,10 +1315,13 @@ let build_proof_task ?timeout ?steplimit ~prover wpo () =
let
drv
,
pconf
,
task
=
prover_task
env
prover
task
in
if
is_trivial
task
then
Task
.
return
VCS
.
valid
else
if
prover
.
prover_name
=
"Coq"
then
interactive
wpo
pconf
drv
prover
task
else
Cache
.
get_result
~
digest
:
(
digest
wpo
drv
)
~
runner
:
(
batch
pconf
drv
)
~
runner
:
(
batch
pconf
drv
?
script
:
None
)
~
timeout
~
steplimit
prover
task
with
exn
->
if
Wp_parameters
.
has_dkey
dkey_api
then
...
...
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