let get_if_cond hlpsl_cond_list =
let res = ref [] in
List.iter
(function
(* BUG??? the name of the variable on the left-hand-side is lost!
no, because the Cons term is copied in the state predicate as
new value of the primed variable *)
Equal(Prime(t1), Cons(t2,t3)) ->
res:=!res@[Ifcontains(t2,t3)]
| Equal(Prime(t1), Delete(t2,t3)) ->
res:=!res@[Ifdelete(t2,t3)]
| New _
| Event _
| Equal _ -> () (* equalities are built in state terms: but useful
for detecting problems *)
| hlpsl_cond -> res:=!res@[get_if_term hlpsl_cond])
hlpsl_cond_list;
!res