Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
120
Issues
120
List
Boards
Labels
Service Desk
Milestones
Merge Requests
17
Merge Requests
17
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
60ab9af2
Commit
60ab9af2
authored
Oct 09, 2012
by
Guillaume Melquiond
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flatten undone_proof in proof_attempt_status. Avoid producing "undone" reports.
parent
a6a67dff
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
82 additions
and
82 deletions
+82
-82
src/ide/gmain.ml
src/ide/gmain.ml
+20
-21
src/session/session.ml
src/session/session.ml
+18
-17
src/session/session.mli
src/session/session.mli
+5
-10
src/session/session_scheduler.ml
src/session/session_scheduler.ml
+19
-24
src/session/session_tools.ml
src/session/session_tools.ml
+1
-1
src/why3session/why3session_html.ml
src/why3session/why3session_html.ml
+15
-8
src/why3session/why3session_latex.ml
src/why3session/why3session_latex.ml
+4
-1
No files found.
src/ide/gmain.ml
View file @
60ab9af2
...
@@ -432,11 +432,11 @@ let clear model = model#clear ()
...
@@ -432,11 +432,11 @@ let clear model = model#clear ()
let
image_of_result
~
obsolete
result
=
let
image_of_result
~
obsolete
result
=
match
result
with
match
result
with
|
Session
.
Undone
Session
.
Interrupted
->
!
image_undone
|
Session
.
Interrupted
->
!
image_undone
|
Session
.
Un
done
Session
.
Unedited
|
Session
.
Un
edited
->
!
image_editor
|
Session
.
Undone
Session
.
JustEdited
->
!
image_unknown
|
Session
.
JustEdited
->
!
image_unknown
|
Session
.
Undone
Session
.
Scheduled
->
!
image_scheduled
|
Session
.
Scheduled
->
!
image_scheduled
|
Session
.
Undone
Session
.
Running
->
!
image_running
|
Session
.
Running
->
!
image_running
|
Session
.
InternalFailure
_
->
!
image_failure
|
Session
.
InternalFailure
_
->
!
image_failure
|
Session
.
Done
r
->
match
r
.
Call_provers
.
pr_answer
with
|
Session
.
Done
r
->
match
r
.
Call_provers
.
pr_answer
with
|
Call_provers
.
Valid
->
|
Call_provers
.
Valid
->
...
@@ -486,11 +486,11 @@ let set_proof_state a =
...
@@ -486,11 +486,11 @@ let set_proof_state a =
Format
.
sprintf
"%.2f [%d.0]"
time
a
.
S
.
proof_timelimit
Format
.
sprintf
"%.2f [%d.0]"
time
a
.
S
.
proof_timelimit
else
else
Format
.
sprintf
"%.2f"
time
Format
.
sprintf
"%.2f"
time
|
S
.
Un
done
S
.
Un
edited
->
"(not yet edited)"
|
S
.
Unedited
->
"(not yet edited)"
|
S
.
Undone
S
.
JustEdited
->
"(edited)"
|
S
.
JustEdited
->
"(edited)"
|
S
.
InternalFailure
_
->
"(internal failure)"
|
S
.
InternalFailure
_
->
"(internal failure)"
|
S
.
Undone
S
.
Interrupted
->
"(interrupted)"
|
S
.
Interrupted
->
"(interrupted)"
|
S
.
Undone
(
S
.
Scheduled
|
S
.
Running
)
->
|
S
.
Scheduled
|
S
.
Running
->
Format
.
sprintf
"[limit=%d sec., %d M]"
Format
.
sprintf
"[limit=%d sec., %d M]"
a
.
S
.
proof_timelimit
a
.
S
.
proof_memlimit
a
.
S
.
proof_timelimit
a
.
S
.
proof_memlimit
in
in
...
@@ -576,17 +576,16 @@ let update_task_view a =
...
@@ -576,17 +576,16 @@ let update_task_view a =
|
S
.
Proof_attempt
a
->
|
S
.
Proof_attempt
a
->
let
o
=
let
o
=
match
a
.
S
.
proof_state
with
match
a
.
S
.
proof_state
with
|
S
.
Undone
S
.
Interrupted
->
|
S
.
Interrupted
->
"proof not yet scheduled for running"
"proof not yet scheduled for running"
|
S
.
Unedited
->
"Interactive proof, not yet edited. Edit with
\"
Edit
\"
button"
|
S
.
Undone
S
.
Unedited
->
"Interactive proof, not yet edited. Edit with
\"
Edit
\"
button"
|
S
.
JustEdited
->
"Edited interactive proof. Run it with
\"
Replay
\"
button"
|
S
.
Undone
S
.
JustEdited
->
"Edited interactive proof. Run it with
\"
Replay
\"
button"
|
S
.
Done
({
Call_provers
.
pr_answer
=
Call_provers
.
HighFailure
}
as
r
)
->
|
S
.
Done
({
Call_provers
.
pr_answer
=
Call_provers
.
HighFailure
}
as
r
)
->
let
b
=
Buffer
.
create
37
in
let
b
=
Buffer
.
create
37
in
bprintf
b
"%a"
Call_provers
.
print_prover_result
r
;
bprintf
b
"%a"
Call_provers
.
print_prover_result
r
;
Buffer
.
contents
b
Buffer
.
contents
b
|
S
.
Done
r
->
r
.
Call_provers
.
pr_output
|
S
.
Done
r
->
r
.
Call_provers
.
pr_output
|
S
.
Undone
S
.
Scheduled
->
"proof scheduled but not running yet"
|
S
.
Scheduled
->
"proof scheduled but not running yet"
|
S
.
Undone
S
.
Running
->
"prover currently running"
|
S
.
Running
->
"prover currently running"
|
S
.
InternalFailure
e
->
|
S
.
InternalFailure
e
->
let
b
=
Buffer
.
create
37
in
let
b
=
Buffer
.
create
37
in
bprintf
b
"%a"
Exn_printer
.
exn_printer
e
;
bprintf
b
"%a"
Exn_printer
.
exn_printer
e
;
...
@@ -955,10 +954,10 @@ let bisect_proof_attempt pa =
...
@@ -955,10 +954,10 @@ let bisect_proof_attempt pa =
let
set_timelimit
res
=
let
set_timelimit
res
=
timelimit
:=
1
+
(
int_of_float
(
floor
res
.
Call_provers
.
pr_time
))
in
timelimit
:=
1
+
(
int_of_float
(
floor
res
.
Call_provers
.
pr_time
))
in
let
rec
callback
lp
pa
c
=
function
let
rec
callback
lp
pa
c
=
function
|
S
.
Undone
(
S
.
Running
|
S
.
Scheduled
)
->
()
|
S
.
Running
|
S
.
Scheduled
->
()
|
S
.
Undone
S
.
Interrupted
->
|
S
.
Interrupted
->
dprintf
debug
"Bisecting interrupted.@."
dprintf
debug
"Bisecting interrupted.@."
|
S
.
Un
done
(
S
.
Unedited
|
S
.
JustEdited
)
->
assert
false
|
S
.
Un
edited
|
S
.
JustEdited
->
assert
false
|
S
.
InternalFailure
exn
->
|
S
.
InternalFailure
exn
->
(** Perhaps the test can be considered false in this case? *)
(** Perhaps the test can be considered false in this case? *)
dprintf
debug
"Bisecting interrupted by an error %a.@."
dprintf
debug
"Bisecting interrupted by an error %a.@."
...
@@ -1005,10 +1004,10 @@ let bisect_proof_attempt pa =
...
@@ -1005,10 +1004,10 @@ let bisect_proof_attempt pa =
update the proof attempt *)
update the proof attempt *)
let
first_callback
pa
=
function
let
first_callback
pa
=
function
(** this pa can be different than the first pa *)
(** this pa can be different than the first pa *)
|
S
.
Undone
(
S
.
Running
|
S
.
Scheduled
)
->
()
|
S
.
Running
|
S
.
Scheduled
->
()
|
S
.
Undone
S
.
Interrupted
->
|
S
.
Interrupted
->
dprintf
debug
"Bisecting interrupted.@."
dprintf
debug
"Bisecting interrupted.@."
|
S
.
Un
done
(
S
.
Unedited
|
S
.
JustEdited
)
->
assert
false
|
S
.
Un
edited
|
S
.
JustEdited
->
assert
false
|
S
.
InternalFailure
exn
->
|
S
.
InternalFailure
exn
->
dprintf
debug
"proof of the initial task interrupted by an error %a.@."
dprintf
debug
"proof of the initial task interrupted by an error %a.@."
Exn_printer
.
exn_printer
exn
Exn_printer
.
exn_printer
exn
...
...
src/session/session.ml
View file @
60ab9af2
...
@@ -41,15 +41,12 @@ let debug = Debug.register_info_flag "session"
...
@@ -41,15 +41,12 @@ let debug = Debug.register_info_flag "session"
module
PHstr
=
Util
.
Hstr
module
PHstr
=
Util
.
Hstr
type
undone_proof
=
type
proof_attempt_status
=
|
Unedited
(** editor not yet run for interactive proof *)
|
JustEdited
(** edited but not run yet *)
|
Interrupted
(** external proof has never completed *)
|
Scheduled
(** external proof attempt is scheduled *)
|
Scheduled
(** external proof attempt is scheduled *)
|
Interrupted
|
Running
(** external proof attempt is in progress *)
|
Running
(** external proof attempt is in progress *)
|
Unedited
|
JustEdited
type
proof_attempt_status
=
|
Undone
of
undone_proof
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
...
@@ -491,9 +488,9 @@ let save_result fmt r =
...
@@ -491,9 +488,9 @@ let save_result fmt r =
let
save_status
fmt
s
=
let
save_status
fmt
s
=
match
s
with
match
s
with
|
Un
done
Un
edited
->
|
Unedited
->
fprintf
fmt
"@
\n
<unedited/>"
fprintf
fmt
"@
\n
<unedited/>"
|
Undone
_
->
|
Scheduled
|
Running
|
Interrupted
|
JustEdited
->
fprintf
fmt
"@
\n
<undone/>"
fprintf
fmt
"@
\n
<undone/>"
|
InternalFailure
msg
->
|
InternalFailure
msg
->
fprintf
fmt
"@
\n
<internalfailure reason=
\"
%a
\"
/>"
fprintf
fmt
"@
\n
<internalfailure reason=
\"
%a
\"
/>"
...
@@ -1025,11 +1022,11 @@ let load_result r =
...
@@ -1025,11 +1022,11 @@ let load_result r =
Call_provers
.
pr_output
=
""
;
Call_provers
.
pr_output
=
""
;
Call_provers
.
pr_status
=
Unix
.
WEXITED
0
Call_provers
.
pr_status
=
Unix
.
WEXITED
0
}
}
|
"undone"
->
Undone
Interrupted
|
"undone"
->
Interrupted
|
"unedited"
->
Un
done
Un
edited
|
"unedited"
->
Unedited
|
s
->
|
s
->
eprintf
"[Warning] Session.load_result: unexpected element '%s'@."
s
;
eprintf
"[Warning] Session.load_result: unexpected element '%s'@."
s
;
Undone
Interrupted
Interrupted
let
load_option
attr
g
=
let
load_option
attr
g
=
try
Some
(
List
.
assoc
attr
g
.
Xml
.
attributes
)
try
Some
(
List
.
assoc
attr
g
.
Xml
.
attributes
)
...
@@ -1091,7 +1088,7 @@ and load_proof_or_transf ~old_provers mg a =
...
@@ -1091,7 +1088,7 @@ and load_proof_or_transf ~old_provers mg a =
in
in
let
res
=
match
a
.
Xml
.
elements
with
let
res
=
match
a
.
Xml
.
elements
with
|
[
r
]
->
load_result
r
|
[
r
]
->
load_result
r
|
[]
->
Undone
Interrupted
|
[]
->
Interrupted
|
_
->
|
_
->
eprintf
"[Error] Too many result elements@."
;
eprintf
"[Error] Too many result elements@."
;
raise
(
LoadError
(
a
,
"too many result elements"
))
raise
(
LoadError
(
a
,
"too many result elements"
))
...
@@ -1753,10 +1750,9 @@ let update_edit_external_proof env_session a =
...
@@ -1753,10 +1750,9 @@ let update_edit_external_proof env_session a =
let
file
=
Sysutil
.
uniquify
file
in
let
file
=
Sysutil
.
uniquify
file
in
let
file
=
Sysutil
.
relativize_filename
session_dir
file
in
let
file
=
Sysutil
.
relativize_filename
session_dir
file
in
set_edited_as
(
Some
file
)
a
;
set_edited_as
(
Some
file
)
a
;
if
a
.
proof_state
=
Un
done
Un
edited
if
a
.
proof_state
=
Unedited
then
set_proof_state
~
notify
~
obsolete
:
a
.
proof_obsolete
then
set_proof_state
~
notify
~
obsolete
:
a
.
proof_obsolete
~
archived
:
a
.
proof_archived
~
archived
:
a
.
proof_archived
Interrupted
a
;
(
Undone
Interrupted
)
a
;
file
file
|
Some
f
->
f
|
Some
f
->
f
in
in
...
@@ -1781,7 +1777,12 @@ let update_edit_external_proof env_session a =
...
@@ -1781,7 +1777,12 @@ let update_edit_external_proof env_session a =
file
file
let
print_attempt_status
fmt
=
function
let
print_attempt_status
fmt
=
function
|
Undone
_
->
pp_print_string
fmt
"Undone"
|
Scheduled
|
Running
->
pp_print_string
fmt
"Running"
|
JustEdited
|
Interrupted
->
pp_print_string
fmt
"Not yet run"
|
Unedited
->
pp_print_string
fmt
"Not yet edited"
|
Done
pr
->
Call_provers
.
print_prover_result
fmt
pr
|
Done
pr
->
Call_provers
.
print_prover_result
fmt
pr
|
InternalFailure
_
->
pp_print_string
fmt
"Failure"
|
InternalFailure
_
->
pp_print_string
fmt
"Failure"
...
...
src/session/session.mli
View file @
60ab9af2
...
@@ -35,18 +35,13 @@ module PHprover : Util.PrivateHashtbl with type key = Whyconf.prover
...
@@ -35,18 +35,13 @@ module PHprover : Util.PrivateHashtbl with type key = Whyconf.prover
(** {2 Proof attempts} *)
(** {2 Proof attempts} *)
(** State of proof without result *)
type
undone_proof
=
|
Scheduled
(** external proof attempt is scheduled *)
|
Interrupted
(** external proof has been interrupted or
has never been scheduled*)
|
Running
(** external proof attempt is in progress *)
|
Unedited
(** unedited but editable *)
|
JustEdited
(** edited but not run yet *)
(** State of a proof *)
(** State of a proof *)
type
proof_attempt_status
=
type
proof_attempt_status
=
|
Undone
of
undone_proof
|
Unedited
(** editor not yet run for interactive proof *)
|
JustEdited
(** edited but not run yet *)
|
Interrupted
(** external proof has never completed *)
|
Scheduled
(** external proof attempt is scheduled *)
|
Running
(** external proof attempt is in progress *)
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
...
...
src/session/session_scheduler.ml
View file @
60ab9af2
...
@@ -87,9 +87,9 @@ let goals t = t.theory_goals
...
@@ -87,9 +87,9 @@ let goals t = t.theory_goals
let theory_expanded t = t.theory_expanded
let theory_expanded t = t.theory_expanded
*)
*)
let
running
a
=
match
a
.
proof_state
with
let
running
=
function
|
Undone
(
Scheduled
|
Running
)
->
true
|
Scheduled
|
Running
->
true
|
Un
done
(
Unedited
|
JustEdited
|
Interrupted
)
|
Un
edited
|
JustEdited
|
Interrupted
|
Done
_
|
InternalFailure
_
->
false
|
Done
_
|
InternalFailure
_
->
false
(*************************)
(*************************)
...
@@ -170,7 +170,7 @@ let timeout_handler t =
...
@@ -170,7 +170,7 @@ let timeout_handler t =
if
List
.
length
l
<
t
.
maximum_running_proofs
then
if
List
.
length
l
<
t
.
maximum_running_proofs
then
begin
try
begin
try
let
(
callback
,
pre_call
)
=
Queue
.
pop
t
.
proof_attempts_queue
in
let
(
callback
,
pre_call
)
=
Queue
.
pop
t
.
proof_attempts_queue
in
callback
(
Undone
Running
)
;
callback
Running
;
dprintf
debug
"[Sched] proof attempts started@."
;
dprintf
debug
"[Sched] proof attempts started@."
;
let
call
=
pre_call
()
in
let
call
=
pre_call
()
in
(
Check_prover
(
callback
,
call
))
::
l
(
Check_prover
(
callback
,
call
))
::
l
...
@@ -271,7 +271,7 @@ let cancel_scheduled_proofs t =
...
@@ -271,7 +271,7 @@ let cancel_scheduled_proofs t =
match
Queue
.
pop
t
.
actions_queue
with
match
Queue
.
pop
t
.
actions_queue
with
|
Action_proof_attempt
(
_timelimit
,_
memlimit
,_
old
,_
inplace
,_
command
,
|
Action_proof_attempt
(
_timelimit
,_
memlimit
,_
old
,_
inplace
,_
command
,
_driver
,
callback
,_
goal
)
->
_driver
,
callback
,_
goal
)
->
callback
(
Undone
Interrupted
)
callback
Interrupted
|
Action_delayed
_
as
a
->
|
Action_delayed
_
as
a
->
Queue
.
push
a
new_queue
Queue
.
push
a
new_queue
done
done
...
@@ -280,7 +280,7 @@ let cancel_scheduled_proofs t =
...
@@ -280,7 +280,7 @@ let cancel_scheduled_proofs t =
try
try
while
true
do
while
true
do
let
(
callback
,_
)
=
Queue
.
pop
t
.
proof_attempts_queue
in
let
(
callback
,_
)
=
Queue
.
pop
t
.
proof_attempts_queue
in
callback
(
Undone
Interrupted
)
callback
Interrupted
done
done
with
with
|
Queue
.
Empty
->
|
Queue
.
Empty
->
...
@@ -292,7 +292,7 @@ let schedule_proof_attempt ~timelimit ~memlimit ?old ~inplace
...
@@ -292,7 +292,7 @@ let schedule_proof_attempt ~timelimit ~memlimit ?old ~inplace
dprintf
debug
"[Sched] Scheduling a new proof attempt (goal : %a)@."
dprintf
debug
"[Sched] Scheduling a new proof attempt (goal : %a)@."
(
fun
fmt
g
->
Format
.
pp_print_string
fmt
(
fun
fmt
g
->
Format
.
pp_print_string
fmt
(
Task
.
task_goal
g
)
.
Decl
.
pr_name
.
Ident
.
id_string
)
goal
;
(
Task
.
task_goal
g
)
.
Decl
.
pr_name
.
Ident
.
id_string
)
goal
;
callback
(
Undone
Scheduled
)
;
callback
Scheduled
;
Queue
.
push
Queue
.
push
(
Action_proof_attempt
(
timelimit
,
memlimit
,
old
,
inplace
,
command
,
driver
,
(
Action_proof_attempt
(
timelimit
,
memlimit
,
old
,
inplace
,
command
,
driver
,
callback
,
goal
))
callback
,
goal
))
...
@@ -305,7 +305,7 @@ let schedule_edition t command filename callback =
...
@@ -305,7 +305,7 @@ let schedule_edition t command filename callback =
Call_provers
.
call_on_file
~
command
~
regexps
:
[]
~
timeregexps
:
[]
Call_provers
.
call_on_file
~
command
~
regexps
:
[]
~
timeregexps
:
[]
~
exitcodes
:
[(
0
,
Call_provers
.
Unknown
""
)]
filename
~
exitcodes
:
[(
0
,
Call_provers
.
Unknown
""
)]
filename
in
in
callback
(
Undone
Running
)
;
callback
Running
;
t
.
running_proofs
<-
(
Check_prover
(
callback
,
precall
()
))
::
t
.
running_proofs
;
t
.
running_proofs
<-
(
Check_prover
(
callback
,
precall
()
))
::
t
.
running_proofs
;
run_timeout_handler
t
run_timeout_handler
t
...
@@ -413,7 +413,7 @@ let adapt_timelimit a =
...
@@ -413,7 +413,7 @@ let adapt_timelimit a =
let
run_external_proof
eS
eT
?
callback
a
=
let
run_external_proof
eS
eT
?
callback
a
=
(* check that the state is not Scheduled or Running *)
(* check that the state is not Scheduled or Running *)
(* Perhaps this test, a.proof_archived, should be done somewhere else *)
(* Perhaps this test, a.proof_archived, should be done somewhere else *)
if
a
.
proof_archived
||
running
a
then
()
if
a
.
proof_archived
||
running
a
.
proof_state
then
()
else
else
match
find_prover
eS
a
with
match
find_prover
eS
a
with
|
None
->
|
None
->
...
@@ -457,7 +457,7 @@ let run_external_proof eS eT ?callback a =
...
@@ -457,7 +457,7 @@ let run_external_proof eS eT ?callback a =
npc
.
prover_config
.
Whyconf
.
interactive
then
npc
.
prover_config
.
Whyconf
.
interactive
then
begin
begin
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
(
Undone
Unedited
)
a
;
Unedited
a
;
Util
.
apply_option2
()
callback
a
a
.
proof_state
Util
.
apply_option2
()
callback
a
a
.
proof_state
end
end
else
else
...
@@ -467,7 +467,7 @@ let run_external_proof eS eT ?callback a =
...
@@ -467,7 +467,7 @@ let run_external_proof eS eT ?callback a =
let
memlimit
=
a
.
proof_memlimit
in
let
memlimit
=
a
.
proof_memlimit
in
let
callback
result
=
let
callback
result
=
begin
match
result
with
begin
match
result
with
|
Undone
Interrupted
->
|
Interrupted
->
set_proof_state
~
notify
set_proof_state
~
notify
~
obsolete
:
previous_obs
~
archived
:
false
previous_result
a
~
obsolete
:
previous_obs
~
archived
:
false
previous_result
a
|
_
->
|
_
->
...
@@ -510,7 +510,7 @@ let prover_on_goal eS eT ?callback ~timelimit ~memlimit p g =
...
@@ -510,7 +510,7 @@ let prover_on_goal eS eT ?callback ~timelimit ~memlimit p g =
with
Not_found
->
with
Not_found
->
let
ep
=
add_external_proof
~
keygen
:
O
.
create
~
obsolete
:
false
let
ep
=
add_external_proof
~
keygen
:
O
.
create
~
obsolete
:
false
~
archived
:
false
~
timelimit
~
memlimit
~
archived
:
false
~
timelimit
~
memlimit
~
edit
:
None
g
p
(
Undone
Interrupted
)
in
~
edit
:
None
g
p
Interrupted
in
O
.
init
ep
.
proof_key
(
Proof_attempt
ep
);
O
.
init
ep
.
proof_key
(
Proof_attempt
ep
);
ep
ep
in
in
...
@@ -558,7 +558,7 @@ let run_prover eS eT ~context_unproved_goals_only ~timelimit ~memlimit pr a =
...
@@ -558,7 +558,7 @@ let run_prover eS eT ~context_unproved_goals_only ~timelimit ~memlimit pr a =
let
proof_successful_or_just_edited
a
=
let
proof_successful_or_just_edited
a
=
match
a
.
proof_state
with
match
a
.
proof_state
with
|
Done
{
Call_provers
.
pr_answer
=
Call_provers
.
Valid
}
|
Done
{
Call_provers
.
pr_answer
=
Call_provers
.
Valid
}
|
Undone
JustEdited
->
true
|
JustEdited
->
true
|
_
->
false
|
_
->
false
let
rec
replay_on_goal_or_children
eS
eT
let
rec
replay_on_goal_or_children
eS
eT
...
@@ -674,7 +674,7 @@ let check_external_proof eS eT todo a =
...
@@ -674,7 +674,7 @@ let check_external_proof eS eT todo a =
dprintf
debug
"[Sched] Check external proof : %a@."
dprintf
debug
"[Sched] Check external proof : %a@."
(
fun
fmt
g
->
pp_print_string
fmt
g
.
goal_name
.
Ident
.
id_string
)
g
;
(
fun
fmt
g
->
pp_print_string
fmt
g
.
goal_name
.
Ident
.
id_string
)
g
;
(* check that the state is not Scheduled or Running *)
(* check that the state is not Scheduled or Running *)
if
a
.
proof_archived
||
running
a
then
()
if
a
.
proof_archived
||
running
a
.
proof_state
then
()
else
else
begin
begin
Todo
.
todo
todo
;
Todo
.
todo
todo
;
...
@@ -704,8 +704,8 @@ let check_external_proof eS eT todo a =
...
@@ -704,8 +704,8 @@ let check_external_proof eS eT todo a =
let
memlimit
=
a
.
proof_memlimit
in
let
memlimit
=
a
.
proof_memlimit
in
let
callback
result
=
let
callback
result
=
match
result
with
match
result
with
|
Undone
Scheduled
|
Undone
Running
|
Undone
Interrupted
->
()
|
Scheduled
|
Running
->
()
|
Un
done
(
Unedited
|
JustEdited
)
->
assert
false
|
Un
edited
|
Interrupted
|
JustEdited
->
assert
false
|
InternalFailure
msg
->
|
InternalFailure
msg
->
Todo
.
_done
todo
(
g
,
ap
,
timelimit
,
(
CallFailed
msg
));
Todo
.
_done
todo
(
g
,
ap
,
timelimit
,
(
CallFailed
msg
));
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
...
@@ -758,12 +758,7 @@ let check_all eS eT ~callback =
...
@@ -758,12 +758,7 @@ let check_all eS eT ~callback =
let
rec
play_on_goal_and_children
eS
eT
~
timelimit
~
memlimit
todo
l
g
=
let
rec
play_on_goal_and_children
eS
eT
~
timelimit
~
memlimit
todo
l
g
=
let
callback
_key
status
=
let
callback
_key
status
=
match
status
with
if
not
(
running
status
)
then
Todo
.
_done
todo
()
in
|
Undone
Running
|
Undone
Scheduled
->
()
|
_
->
Todo
.
_done
todo
()
;
(* eprintf "todo decreased to %d@." todo.Todo.todo *)
in
List
.
iter
List
.
iter
(
fun
p
->
(
fun
p
->
Todo
.
todo
todo
;
Todo
.
todo
todo
;
...
@@ -868,7 +863,7 @@ let rec transform eS sched ~context_unproved_goals_only ?callback tr a =
...
@@ -868,7 +863,7 @@ let rec transform eS sched ~context_unproved_goals_only ?callback tr a =
let
edit_proof
eS
sched
~
default_editor
a
=
let
edit_proof
eS
sched
~
default_editor
a
=
(* check that the state is not Scheduled or Running *)
(* check that the state is not Scheduled or Running *)
if
a
.
proof_archived
||
running
a
then
()
if
a
.
proof_archived
||
running
a
.
proof_state
then
()
(*
(*
info_window `ERROR "Edition already in progress"
info_window `ERROR "Edition already in progress"
*)
*)
...
@@ -910,7 +905,7 @@ let edit_proof eS sched ~default_editor a =
...
@@ -910,7 +905,7 @@ let edit_proof eS sched ~default_editor a =
match
res
with
match
res
with
|
Done
{
Call_provers
.
pr_answer
=
Call_provers
.
Unknown
""
}
->
|
Done
{
Call_provers
.
pr_answer
=
Call_provers
.
Unknown
""
}
->
set_proof_state
~
notify
~
obsolete
:
true
~
archived
:
false
set_proof_state
~
notify
~
obsolete
:
true
~
archived
:
false
(
Undone
JustEdited
)
a
JustEdited
a
|
_
->
|
_
->
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
set_proof_state
~
notify
~
obsolete
:
false
~
archived
:
false
res
a
res
a
...
...
src/session/session_tools.ml
View file @
60ab9af2
...
@@ -80,7 +80,7 @@ let transform_proof_attempt ?notify ~keygen env_session tr_name =
...
@@ -80,7 +80,7 @@ let transform_proof_attempt ?notify ~keygen env_session tr_name =
let
add_pa
sg
=
let
add_pa
sg
=
if
not
(
PHprover
.
mem
sg
.
goal_external_proofs
pr
.
proof_prover
)
then
if
not
(
PHprover
.
mem
sg
.
goal_external_proofs
pr
.
proof_prover
)
then
ignore
(
copy_external_proof
~
keygen
~
goal
:
sg
ignore
(
copy_external_proof
~
keygen
~
goal
:
sg
~
attempt_status
:
(
Undone
Interrupted
)
pr
)
~
attempt_status
:
Interrupted
pr
)
in
in
List
.
iter
add_pa
tr
.
transf_goals
in
List
.
iter
add_pa
tr
.
transf_goals
in
let
proofs
=
all_proof_attempts
env_session
.
session
in
let
proofs
=
all_proof_attempts
env_session
.
session
in
...
...
src/why3session/why3session_html.ml
View file @
60ab9af2
...
@@ -154,10 +154,13 @@ let print_results fmt provers proofs =
...
@@ -154,10 +154,13 @@ let print_results fmt provers proofs =
|
Call_provers
.
HighFailure
->
|
Call_provers
.
HighFailure
->
fprintf
fmt
"FF8000
\"
>High Failure"
fprintf
fmt
"FF8000
\"
>High Failure"
end
end
|
S
.
Undone
_
->
fprintf
fmt
"E0E0E0
\"
>Undone"
|
S
.
InternalFailure
_
->
fprintf
fmt
"E0E0E0
\"
>Internal Failure"
|
S
.
InternalFailure
_
->
fprintf
fmt
"E0E0E0
\"
>Internal Failure"
|
S
.
Interrupted
->
fprintf
fmt
"E0E0E0
\"
>Not yet run"
|
S
.
Unedited
->
fprintf
fmt
"E0E0E0
\"
>Not yet edited"
|
S
.
Scheduled
|
S
.
Running
|
S
.
JustEdited
->
assert
false
end
;
end
;
if
pr
.
S
.
proof_obsolete
then
fprintf
fmt
"(obsolete)"
if
pr
.
S
.
proof_obsolete
then
fprintf
fmt
"
(obsolete)"
with
Not_found
->
fprintf
fmt
"E0E0E0
\"
>---"
with
Not_found
->
fprintf
fmt
"E0E0E0
\"
>---"
end
;
end
;
fprintf
fmt
"</td>"
)
provers
fprintf
fmt
"</td>"
)
provers
...
@@ -264,10 +267,12 @@ struct
...
@@ -264,10 +267,12 @@ struct
let
print_prover
=
Whyconf
.
print_prover
let
print_prover
=
Whyconf
.
print_prover
let
print_proof_status
fmt
=
function
let
print_proof_status
fmt
=
function
|
Undone
_
->
fprintf
fmt
"Undone"
|
Interrupted
->
fprintf
fmt
"Not yet run"
|
Done
pr
->
fprintf
fmt
"Done : %a"
Call_provers
.
print_prover_result
pr
|
Unedited
->
fprintf
fmt
"Not yet edited"
|
JustEdited
|
Scheduled
|
Running
->
assert
false
|
Done
pr
->
fprintf
fmt
"Done: %a"
Call_provers
.
print_prover_result
pr
|
InternalFailure
exn
->
|
InternalFailure
exn
->
fprintf
fmt
"Failure
: %a"
Exn_printer
.
exn_printer
exn
fprintf
fmt
"Failure: %a"
Exn_printer
.
exn_printer
exn
let
print_proof_attempt
fmt
pa
=
let
print_proof_attempt
fmt
pa
=
fprintf
fmt
"<li>%a : %a</li>"
fprintf
fmt
"<li>%a : %a</li>"
...
@@ -334,11 +339,13 @@ struct
...
@@ -334,11 +339,13 @@ struct
let
print_prover
=
Whyconf
.
print_prover
let
print_prover
=
Whyconf
.
print_prover
let
print_proof_status
fmt
=
function
let
print_proof_status
fmt
=
function
|
Undone
_
->
fprintf
fmt
"<span class='notverified'>Undone</span>"
|
Interrupted
->
fprintf
fmt
"<span class='notverified'>Not yet run</span>"
|
Done
pr
->
fprintf
fmt
"<span class='verified'>Done : %a</span>"
|
Unedited
->
fprintf
fmt
"<span class='notverified'>Not yet edited</span>"
|
JustEdited
|
Scheduled
|
Running
->
assert
false
|
Done
pr
->
fprintf
fmt
"<span class='verified'>Done: %a</span>"
Call_provers
.
print_prover_result
pr
Call_provers
.
print_prover_result
pr
|
InternalFailure
exn
->
|
InternalFailure
exn
->
fprintf
fmt
"<span class='notverified'>Failure
: %a</span>"
fprintf
fmt
"<span class='notverified'>Failure: %a</span>"
Exn_printer
.
exn_printer
exn
Exn_printer
.
exn_printer
exn
let
cmd_regexp
=
Str
.
regexp
"%
\\
(.
\\
)"
let
cmd_regexp
=
Str
.
regexp
"%
\\
(.
\\
)"
...
...
src/why3session/why3session_latex.ml
View file @
60ab9af2
...
@@ -145,7 +145,10 @@ let print_result_prov proofs prov fmt=
...
@@ -145,7 +145,10 @@ let print_result_prov proofs prov fmt=
end
end
|
Session
.
InternalFailure
_
->
fprintf
fmt
"& Internal Failure"
|
Session
.
InternalFailure
_
->
fprintf
fmt
"& Internal Failure"
|
Session
.
Undone
_
->
fprintf
fmt
"& Undone"
|
Session
.
Interrupted
->
fprintf
fmt
"& Not yet run"
|
Session
.
Unedited
->
fprintf
fmt
"& Not yet edited"
|
Session
.
Scheduled
|
Session
.
Running
|
Session
.
JustEdited
->
assert
false
with
Not_found
->
fprintf
fmt
"&
\\
noresult"
)
prov
;
with
Not_found
->
fprintf
fmt
"&
\\
noresult"
)
prov
;
fprintf
fmt
"
\\\\
@."
fprintf
fmt
"
\\\\
@."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment