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
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
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
89ba7416
Commit
89ba7416
authored
Dec 05, 2010
by
François Bobot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scheduler : add do_why_sync which waits for completion.
parent
6007bad4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
src/ide/scheduler.ml
src/ide/scheduler.ml
+19
-1
src/ide/scheduler.mli
src/ide/scheduler.mli
+4
-0
No files found.
src/ide/scheduler.ml
View file @
89ba7416
...
...
@@ -13,6 +13,12 @@ type proof_attempt_status =
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
let
print_pas
fmt
=
function
|
Scheduled
->
fprintf
fmt
"Scheduled"
|
Running
->
fprintf
fmt
"Running"
|
InternalFailure
exn
->
fprintf
fmt
"InternalFailure %a"
Exn_printer
.
exn_printer
exn
|
Done
pr
->
Call_provers
.
print_prover_result
fmt
pr
(**** queues of events to process ****)
type
callback
=
proof_attempt_status
->
unit
...
...
@@ -197,7 +203,8 @@ let (_scheduler_thread : Thread.t) =
assert
false
with
e
->
eprintf
"Scheduler thread stopped unexpectedly@."
;
eprintf
"Scheduler thread stopped unexpectedly : %a@."
Exn_printer
.
exn_printer
e
;
raise
e
)
()
...
...
@@ -247,3 +254,14 @@ let do_why ~callback funct argument =
Condition
.
signal
queue_condition
;
Mutex
.
unlock
queue_lock
;
()
(* TODO : understand Thread.Event *)
let
do_why_sync
funct
argument
=
let
m
=
Mutex
.
create
()
in
let
c
=
Condition
.
create
()
in
let
r
=
ref
None
in
let
cb
res
=
Mutex
.
lock
m
;
r
:=
Some
res
;
Mutex
.
unlock
m
;
Condition
.
signal
c
in
do_why
~
callback
:
cb
funct
argument
;
Mutex
.
lock
m
;
Condition
.
wait
c
m
;
Util
.
of_option
!
r
src/ide/scheduler.mli
View file @
89ba7416
...
...
@@ -36,6 +36,8 @@ type proof_attempt_status =
|
Done
of
Call_provers
.
prover_result
(** external proof done *)
|
InternalFailure
of
exn
(** external proof aborted by internal error *)
val
print_pas
:
Format
.
formatter
->
proof_attempt_status
->
unit
val
schedule_proof_attempt
:
debug
:
bool
->
timelimit
:
int
->
memlimit
:
int
->
?
old
:
in_channel
->
...
...
@@ -77,6 +79,8 @@ val apply_transformation_l :
val
do_why
:
callback
:
(
'
b
->
unit
)
->
(
'
a
->
'
b
)
->
'
a
->
unit
(** use do why for all the function which deals with creating why value *)
val
do_why_sync
:
(
'
a
->
'
b
)
->
'
a
->
'
b
val
edit_proof
:
debug
:
bool
->
editor
:
string
->
...
...
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