Drastically improve performances by simplifying the book-keeping
[tatoo.git] / src / ata.ml
index add2775..2f20b14 100644 (file)
@@ -227,7 +227,14 @@ let get_trans a tag states =
   ) states TransList.nil
 
 
   ) states TransList.nil
 
 
-
+let get_form a tag q =
+  try
+    let trs = Hashtbl.find a.transitions q in
+    List.fold_left (fun aphi (labs, phi) ->
+      if QNameSet.mem tag labs then Formula.or_ aphi phi else aphi
+    ) Formula.false_ trs
+  with
+    Not_found -> Formula.false_
 
 (*
   [complete transitions a] ensures that for each state q
 
 (*
   [complete transitions a] ensures that for each state q