let convert_ltl_exprs t =
let rec convert_cond cond =
match cond with
POr(c1,c2) -> POr (convert_cond c1, convert_cond c2)
| PAnd(c1,c2) -> PAnd(convert_cond c1, convert_cond c2)
| PNot c -> PNot (convert_cond c)
| PCall _ | PReturn _ | PTrue | PFalse -> cond
| PRel(Neq,PVar x,PCst _) ->
(try
let (rel,t1,t2) = Hashtbl.find ltl_to_promela x in PRel(rel,t1,t2)
with Not_found -> cond)
| PRel _ -> cond
in
let rec convert_seq_elt e =
{ e with
condition = Extlib.opt_map convert_cond e.condition;
nested = convert_seq e.nested; }
and convert_seq s = List.map convert_seq_elt s in
let convert_parsed c =
match c with
Seq l -> Seq (convert_seq l)
| Otherwise -> Otherwise
in
let convert_trans t = { t with cross = convert_parsed t.cross } in
List.map convert_trans t