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
e0d88b28
Commit
e0d88b28
authored
Dec 04, 2010
by
François Bobot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Schedule : add generic function for transformation of why value
parent
ef16ef8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
src/ide/scheduler.ml
src/ide/scheduler.ml
+24
-0
src/ide/scheduler.mli
src/ide/scheduler.mli
+3
-0
No files found.
src/ide/scheduler.ml
View file @
e0d88b28
...
...
@@ -26,9 +26,16 @@ let prover_attempts_queue : attempt Queue.t = Queue.create ()
let
proof_edition_queue
:
(
bool
*
string
*
string
*
Driver
.
driver
*
(
unit
->
unit
)
*
Task
.
task
)
Queue
.
t
=
Queue
.
create
()
type
(
'
a
,
'
b
)
doable
=
{
callback
:
'
b
->
unit
;
argument
:
'
a
;
funct
:
'
a
->
'
b
}
type
exists_doable
=
{
exists
:
'
a
'
b
.
(
'
a
,
'
b
)
doable
->
unit
}
type
job
=
|
TaskL
of
(
Task
.
task
list
->
unit
)
*
Task
.
task
list
Trans
.
trans
*
Task
.
task
|
Task
of
(
Task
.
task
->
unit
)
*
Task
.
task
Trans
.
trans
*
Task
.
task
|
Do
of
(
exists_doable
->
unit
)
(* queue of transformations *)
let
transf_queue
:
job
Queue
.
t
=
Queue
.
create
()
...
...
@@ -91,6 +98,11 @@ let event_handler () =
|
Task
(
cb
,
tf
,
task
)
->
let
task
=
Trans
.
apply
tf
task
in
!
async
(
fun
()
->
cb
task
)
()
|
Do
e
->
let
f
d
=
let
r
=
d
.
funct
d
.
argument
in
!
async
(
fun
()
->
d
.
callback
r
)
()
in
e
{
exists
=
f
}
with
Queue
.
Empty
->
try
(* priority 3: edit proofs *)
...
...
@@ -223,3 +235,15 @@ let apply_transformation_l ~callback transf goal =
Condition
.
signal
queue_condition
;
Mutex
.
unlock
queue_lock
;
()
let
do_why
~
callback
funct
argument
=
let
doable
=
{
callback
=
callback
;
argument
=
argument
;
funct
=
funct
}
in
let
exists
f
=
f
.
exists
doable
in
Mutex
.
lock
queue_lock
;
Queue
.
push
(
Do
exists
)
transf_queue
;
Condition
.
signal
queue_condition
;
Mutex
.
unlock
queue_lock
;
()
src/ide/scheduler.mli
View file @
e0d88b28
...
...
@@ -74,6 +74,9 @@ val apply_transformation_l :
callback
:
(
Why
.
Task
.
task
list
->
unit
)
->
Why
.
Task
.
task
list
Trans
.
trans
->
Task
.
task
->
unit
val
do_why
:
callback
:
(
'
b
->
unit
)
->
(
'
a
->
'
b
)
->
'
a
->
unit
(** use do why for all the function which deals with creating why value *)
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