Debian Codegraph @

stm/dag.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 module type S = sig
12
13 type node
14 module NodeSet : Set.S with type elt = node
15
16 type ('edge,'info,'cdata) t
17
18 val empty : ('e,'i,'d) t
19
20 val add_edge : ('e,'i,'d) t -> node -> 'e -> node -> ('e,'i,'d) t
21 val from_node : ('e,'i,'d) t -> node -> (node * 'e) list
22 val mem : ('e,'i,'d) t -> node -> bool
23 val del_edge : ('e,'i,'d) t -> node -> node -> ('e,'i,'d) t
24 val del_nodes : ('e,'i,'d) t -> NodeSet.t -> ('e,'i,'d) t
25 val all_nodes : ('e,'i,'d) t -> NodeSet.t
26
27 val get_info : ('e,'i,'d) t -> node -> 'i option
28 val set_info : ('e,'i,'d) t -> node -> 'i -> ('e,'i,'d) t
29 val clear_info : ('e,'i,'d) t -> node -> ('e,'i,'d) t
30
31 (* A property applies to a set of nodes and holds some data.
32 Stm uses this feature to group nodes contributing to the same proofs and
33 to structure proofs in boxes limiting the scope of errors *)
34 module Property :
35 sig
36 type 'd t
37 val equal : 'd t -> 'd t -> bool
38 val compare : 'd t -> 'd t -> int
39 val to_string : 'd t -> string
40 val data : 'd t -> 'd
41 val having_it : 'd t -> NodeSet.t
42 end
43
44 val create_property : ('e,'i,'d) t -> node list -> 'd -> ('e,'i,'d) t
45 val property_of : ('e,'i,'d) t -> node -> 'd Property.t list
46 val del_property : ('e,'i,'d) t -> 'd Property.t -> ('e,'i,'d) t
47
48 val iter : ('e,'i,'d) t ->
49 (node -> 'd Property.t list -> 'i option ->
50 (node * 'e) list -> unit) -> unit
51
52 end
53
54 module Make(OT : Map.OrderedType) : S
55 with type node = OT.t
56 and type NodeSet.t = Set.Make(OT).t
57 and type NodeSet.elt = OT.t
58