Debian Codegraph @

clib/cSig.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 (** Missing pervasive types from OCaml stdlib *)
12
13 type ('a, 'b) union = Inl of 'a | Inr of 'b
14 (** Union type *)
15
16 type 'a until = Stop of 'a | Cont of 'a
17 (** Used for browsable-until structures. *)
18
19 type (_, _) eq = Refl : ('a, 'a) eq
20
21 module type USetS =
22 sig
23 type elt
24 type t
25 val empty: t
26 val is_empty: t -> bool
27 val mem: elt -> t -> bool
28 val add: elt -> t -> t
29 val singleton: elt -> t
30 val remove: elt -> t -> t
31 val union: t -> t -> t
32 val inter: t -> t -> t
33 val diff: t -> t -> t
34 val compare: t -> t -> int
35 val equal: t -> t -> bool
36 val subset: t -> t -> bool
37 val iter: (elt -> unit) -> t -> unit
38 val fold: (elt -> 'a -> 'a) -> t -> 'a -> 'a
39 val for_all: (elt -> bool) -> t -> bool
40 val exists: (elt -> bool) -> t -> bool
41 val filter: (elt -> bool) -> t -> t
42 val filter_map: (elt -> elt option) -> t -> t
43 val partition: (elt -> bool) -> t -> t * t
44 val cardinal: t -> int
45 val elements: t -> elt list
46 val choose: t -> elt
47 end
48 (** Redeclaration of OCaml set signature, to preserve compatibility.
49 See OCaml documentation for more information. Operations which
50 can't be efficiently implemented for HSets are moved to OSetS. *)
51
52 module type SetS = sig
53 include USetS
54
55 val disjoint: t -> t -> bool
56 val min_elt: t -> elt
57 val min_elt_opt: t -> elt option
58 val max_elt: t -> elt
59 val max_elt_opt: t -> elt option
60 val choose: t -> elt
61 val choose_opt: t -> elt option
62 val split: elt -> t -> t * bool * t
63 val find: elt -> t -> elt
64 val find_opt: elt -> t -> elt option
65 val find_first: (elt -> bool) -> t -> elt
66 val find_first_opt: (elt -> bool) -> t -> elt option
67 val find_last: (elt -> bool) -> t -> elt
68 val find_last_opt: (elt -> bool) -> t -> elt option
69 val of_list: elt list -> t
70 val to_seq_from : elt -> t -> elt Seq.t
71 val to_seq : t -> elt Seq.t
72 val to_rev_seq : t -> elt Seq.t
73 val add_seq : elt Seq.t -> t -> t
74 val of_seq : elt Seq.t -> t
75 end
76 (** OCaml set operations which require the order structure to be efficient. *)
77
78 module type UMapS =
79 sig
80 type key
81 type (+'a) t
82 val empty: 'a t
83 val is_empty: 'a t -> bool
84 val mem: key -> 'a t -> bool
85 val add: key -> 'a -> 'a t -> 'a t
86 val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
87 val singleton: key -> 'a -> 'a t
88 val remove: key -> 'a t -> 'a t
89 val merge:
90 (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
91 val union:
92 (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
93 val compare: ('a -> 'a -> int) -> 'a t -> 'a t -> int
94 val equal: ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
95 val iter: (key -> 'a -> unit) -> 'a t -> unit
96 val fold: (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
97 val for_all: (key -> 'a -> bool) -> 'a t -> bool
98 val exists: (key -> 'a -> bool) -> 'a t -> bool
99 val filter: (key -> 'a -> bool) -> 'a t -> 'a t
100 val filter_map: (key -> 'a -> 'b option) -> 'a t -> 'b t
101 val partition: (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
102 val cardinal: 'a t -> int
103 val bindings: 'a t -> (key * 'a) list
104 val choose: 'a t -> (key * 'a)
105 val choose_opt: 'a t -> (key * 'a) option
106 val find: key -> 'a t -> 'a
107 val find_opt : key -> 'a t -> 'a option
108 val map: ('a -> 'b) -> 'a t -> 'b t
109 val mapi: (key -> 'a -> 'b) -> 'a t -> 'b t
110 end
111
112 module type MapS = sig
113 include UMapS
114
115 val min_binding: 'a t -> (key * 'a)
116 val max_binding: 'a t -> (key * 'a)
117 val split: key -> 'a t -> 'a t * 'a option * 'a t
118 end