@@ -31,16 +31,14 @@ type tindex = int
3131
3232type transition = {source : vindex ; target : vindex ; label : ToplAst .label option }
3333
34- (* * - INV1: Array.length states = Array.length outgoing = Array.length nondets
35- - INV2: Array.length transitions = Array.length skips
36- - INV3: each index of [transitions] occurs exactly once in one of [outgoing]'s lists
37- - INV4: max_args is the maximum length of the arguments list in a label on a transition
34+ (* * - INV1: Array.length transitions = Array.length skips
35+ - INV2: each index of [transitions] occurs exactly once in one of [outgoing]'s lists
36+ - INV3: max_args is the maximum length of the arguments list in a label on a transition
3837
3938 The fields marked as redundant are computed from the others (when the automaton is built), and
4039 are cached for speed. *)
4140type t =
4241 { states : vname array
43- ; nondets : bool array (* redundant *)
4442 ; transitions : transition array
4543 ; skips : bool array (* redundant *)
4644 ; outgoing : tindex list array
@@ -76,7 +74,7 @@ let make properties =
7674 Array. of_list (List. dedup_and_sort ~compare: Vname. compare (List. concat_map ~f properties))
7775 in
7876 Array. iteri ~f: (fun i (p , v ) -> tt " state[%d]=(%s,%s)@\n " i p v) states ;
79- let vindex_opt , vindex = index_in (module Vname. Table ) states in
77+ let _vindex_opt , vindex = index_in (module Vname. Table ) states in
8078 let vindex = vindex " vertex" in
8179 let transitions : transition array =
8280 let f p =
@@ -118,30 +116,12 @@ let make properties =
118116 |> Array. max_elt ~compare: Int. compare
119117 |> Option. value ~default: 0 |> succ
120118 in
121- let nondets : bool array =
122- let vcount = Array. length states in
123- let a = Array. create ~len: vcount false in
124- let f ToplAst. {nondet; name; _} =
125- let set_nondet state =
126- match vindex_opt (name, state) with
127- | Some i ->
128- a.(i) < - true
129- | None ->
130- L. user_warning
131- " TOPL: %s declared as nondet, but it appears in no transition of property %s" state
132- name
133- in
134- List. iter ~f: set_nondet nondet
135- in
136- List. iter ~f properties ;
137- a
138- in
139119 let skips : bool array =
140120 (* TODO(rgrigore): Rename "anys"? *)
141121 let is_skip {label} = Option. is_none label in
142122 Array. map ~f: is_skip transitions
143123 in
144- {states; nondets; transitions; skips; outgoing; vindex; max_args}
124+ {states; transitions; skips; outgoing; vindex; max_args}
145125
146126
147127let vname a i = a.states.(i)
0 commit comments