Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
bfb2abe8
Commit
bfb2abe8
authored
Dec 06, 2010
by
François Bobot
Browse files
whybench : use maximum_running_proofs of why.conf
Scheduler : add flag scheduler
parent
cce88691
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/bench/whybench.ml
View file @
bfb2abe8
...
...
@@ -203,7 +203,7 @@ let () =
let
main
=
get_main
config
in
Whyconf
.
load_plugins
main
;
Scheduler
.
maximum_running_proofs
:=
Whyconf
.
running_provers_max
main
;
(** listings*)
let
opt_list
=
ref
false
in
...
...
@@ -373,18 +373,18 @@ let count_result =
Mnm
.
add
res
.
B
.
tool
tr
m
in
List
.
fold_left
fold
m
let
()
=
(** WHY some outputs are mixed, altought there is a mutex? *)
let
m
=
Mutex
.
create
()
in
Scheduler
.
async
:=
(
fun
f
v
->
let
f
v
=
Mutex
.
lock
m
;
f
v
;
Mutex
.
unlock
m
in
ignore
(
Thread
.
create
f
v
))
let
()
=
Scheduler
.
async
:=
(
fun
f
v
->
ignore
(
Thread
.
create
f
v
))
let
()
=
let
m
=
Mutex
.
create
()
in
let
callback
tool
prob
task
i
res
=
eprintf
"%s %a %i with %s : %a@."
Mutex
.
lock
m
;
printf
"%s %a %i with %s : %a@."
prob
Pretty
.
print_pr
(
task_goal
task
)
i
tool
Scheduler
.
print_pas
res
in
Scheduler
.
print_pas
res
;
Mutex
.
unlock
m
in
let
l
=
B
.
all_list
~
callback
!
tools
!
probs
in
(* let print_result fmt res = *)
(* fprintf fmt "%s %a %i with %s : %a@." *)
...
...
src/ide/scheduler.ml
View file @
bfb2abe8
...
...
@@ -8,6 +8,8 @@ let coef_buf = 2
let
async
=
ref
(
fun
f
()
->
f
()
)
let
debug
=
Debug
.
register_flag
"scheduler"
type
proof_attempt_status
=
|
Scheduled
(** external proof attempt is scheduled *)
|
Running
(** external proof attempt is in progress *)
...
...
@@ -158,6 +160,9 @@ let event_handler () =
Queue
.
pop
prover_attempts_queue
in
incr
scheduled_proofs
;
Debug
.
dprintf
debug
"scheduled_proofs = %i; maximum_running_proofs = %i@."
!
scheduled_proofs
!
maximum_running_proofs
;
Mutex
.
unlock
queue_lock
;
(* build the prover task from goal in [a] *)
!
async
(
fun
()
->
callback
Scheduled
)
()
;
...
...
Write
Preview
Supports
Markdown
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