let rec ltl_formula_to_string : Types.ltl_type -> string = function
    Pred(Ifnot(p)) -> "~ "^(ltl_formula_to_string (Pred(p)))
  | Pred(p) -> if_term_to_string "" p
  | Op1(f) -> "[] "^(ltl_formula_to_string f)
  | Op2(f) -> "<-> "^(ltl_formula_to_string f)
  | Op3(f) -> "(-) "^(ltl_formula_to_string f)
  | Op4(f) -> "[-] "^(ltl_formula_to_string f)
  | Op5(f) -> "~ "^(ltl_formula_to_string f)
  | Conj(f1,f2) -> "("^(ltl_formula_to_string f1)^" /\\ "^(ltl_formula_to_string f2)^")"
  | Dij(f1,f2) -> "("^(ltl_formula_to_string f1)^" \\/ "^(ltl_formula_to_string f2)^")"
  | Impl(f1,f2) -> "("^(ltl_formula_to_string f1)^" => "^(ltl_formula_to_string f2)^")"