diff options
author | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-09-01 14:54:49 +0200 |
---|---|---|
committer | Enrico Tassi <Enrico.Tassi@inria.fr> | 2014-09-02 11:29:42 +0200 |
commit | cf6b12cb3a88fb3af6a7b3e91d17db8b06d23c81 (patch) | |
tree | 46ec306afd1ebf29b735e7f6679c8e1b8d9c5679 /stm/coqworkmgrApi.mli | |
parent | 7befcc7ea63ea4bd6e45e6f4b8ec01a69b586cc7 (diff) |
coqworkmgr
Diffstat (limited to 'stm/coqworkmgrApi.mli')
-rw-r--r-- | stm/coqworkmgrApi.mli | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/stm/coqworkmgrApi.mli b/stm/coqworkmgrApi.mli new file mode 100644 index 000000000..453029132 --- /dev/null +++ b/stm/coqworkmgrApi.mli @@ -0,0 +1,44 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2014 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(* High level api for clients of the service (like coqtop) *) + +(* Connects to a work manager if any. If no worker manager, then + -async-proofs-j and -async-proofs-tac-j are used *) +val init : Flags.priority -> unit + +(* blocking *) +val get : int -> int + +(* not blocking *) +val tryget : int -> int option +val giveback : int -> unit + +(* Low level *) +type request = + | Hello of Flags.priority + | Get of int + | TryGet of int + | GiveBack of int + | Ping + +type response = + | Tokens of int + | Noluck + | Pong of int * int * int (* cur, max, pid *) + +val connect : string -> Unix.file_descr option + +exception ParseError + +(* Intended to be used with input_line and output_string *) +val parse_request : string -> request +val parse_response : string -> response + +val print_request : request -> string +val print_response : response -> string |