summaryrefslogtreecommitdiff
path: root/cil/src/ext/bitmap.mli
diff options
context:
space:
mode:
Diffstat (limited to 'cil/src/ext/bitmap.mli')
-rw-r--r--cil/src/ext/bitmap.mli50
1 files changed, 50 insertions, 0 deletions
diff --git a/cil/src/ext/bitmap.mli b/cil/src/ext/bitmap.mli
new file mode 100644
index 0000000..5247e35
--- /dev/null
+++ b/cil/src/ext/bitmap.mli
@@ -0,0 +1,50 @@
+
+ (* Imperative bitmaps *)
+
+type t
+ (* Create a bitmap given the number
+ * of bits *)
+val make : int -> t
+val init : int -> (int -> bool) -> t (* Also initialize it *)
+
+val size : t -> int (* How much space it is reserved *)
+
+ (* The cardinality of a set *)
+val card : t -> int
+
+ (* Make a copy of a bitmap *)
+val clone : t -> t
+
+val cloneEmpty : t -> t (* An empty set with the same
+ * dimentions *)
+
+val set : t -> int -> bool -> unit
+val get : t -> int -> bool
+ (* destructive union. The first
+ * element is updated. Returns true
+ * if any change was actually
+ * necessary *)
+val union : t -> t -> bool
+
+ (* accLive livein liveout def. Does
+ * liveIn += (liveout - def) *)
+val accLive : t -> t -> t -> bool
+
+ (* Copy the second argument onto the
+ * first *)
+val assign : t -> t -> unit
+
+
+val inters : t -> t -> unit
+val diff : t -> t -> unit
+
+
+val empty : t -> bool
+
+val equal : t -> t -> bool
+
+val toList : t -> int list
+
+val iter : (int -> unit) -> t -> unit
+val fold : ('a -> int -> 'a) -> t -> 'a -> 'a
+