aboutsummaryrefslogtreecommitdiffhomepage
path: root/stm/dag.mli
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-04-25 19:46:30 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-04-25 21:17:11 +0200
commit8330f5cfd6a332df10fc806b0c0bdab6e0abe8e7 (patch)
tree56ab646154a576454a1ee34ad1cc0a8c6e7a70fe /stm/dag.mli
parent9e36fa1e7460d256a4f9f37571764f79050688e2 (diff)
Adding a stm/ folder, as asked during last workgroup. It was essentially moving
files around. A bunch of files from lib/ that were only used in the STM were moved, as well as part of toplevel/ related to the STM.
Diffstat (limited to 'stm/dag.mli')
-rw-r--r--stm/dag.mli52
1 files changed, 52 insertions, 0 deletions
diff --git a/stm/dag.mli b/stm/dag.mli
new file mode 100644
index 000000000..702ccd80f
--- /dev/null
+++ b/stm/dag.mli
@@ -0,0 +1,52 @@
+(************************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2013 *)
+(* \VV/ **************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(************************************************************************)
+
+module type S = sig
+
+ (* A cluster is just a set of nodes. This set holds some data.
+ Stm uses this to group nodes contribution to the same proofs and
+ that can be evaluated asynchronously *)
+ module Cluster :
+ sig
+ type 'd t
+ val equal : 'd t -> 'd t -> bool
+ val compare : 'd t -> 'd t -> int
+ val to_string : 'd t -> string
+ val data : 'd t -> 'd
+ end
+
+ type node
+ module NodeSet : Set.S with type elt = node
+
+ type ('edge,'info,'cdata) t
+
+ val empty : ('e,'i,'d) t
+
+ val add_edge : ('e,'i,'d) t -> node -> 'e -> node -> ('e,'i,'d) t
+ val from_node : ('e,'i,'d) t -> node -> (node * 'e) list
+ val mem : ('e,'i,'d) t -> node -> bool
+ val del_edge : ('e,'i,'d) t -> node -> node -> ('e,'i,'d) t
+ val del_nodes : ('e,'i,'d) t -> NodeSet.t -> ('e,'i,'d) t
+ val all_nodes : ('e,'i,'d) t -> NodeSet.t
+
+ val iter : ('e,'i,'d) t ->
+ (node -> 'd Cluster.t option -> 'i option ->
+ (node * 'e) list -> unit) -> unit
+
+ val create_cluster : ('e,'i,'d) t -> node list -> 'd -> ('e,'i,'d) t
+ val cluster_of : ('e,'i,'d) t -> node -> 'd Cluster.t option
+ val del_cluster : ('e,'i,'d) t -> 'd Cluster.t -> ('e,'i,'d) t
+
+ val get_info : ('e,'i,'d) t -> node -> 'i option
+ val set_info : ('e,'i,'d) t -> node -> 'i -> ('e,'i,'d) t
+ val clear_info : ('e,'i,'d) t -> node -> ('e,'i,'d) t
+
+end
+
+module Make(OT : Map.OrderedType) : S with type node = OT.t
+