let rec print_condition fmt = function
  | TCall (kf,None->
    Format.fprintf fmt "Call(%a)" Kernel_function.pretty kf
  | TCall (kf, Some b) ->
    Format.fprintf fmt "Call(%a::%s)" Kernel_function.pretty kf b.b_name
  | TReturn kf ->
    Format.fprintf fmt "Return(%a)" Kernel_function.pretty kf
  | TOr  (c1,c2) ->
    Format.fprintf fmt "@[<hov>(@[<2>%a@])@]@ or@ @[<hov>(@[<2>%a@])@]"
      print_condition c1 print_condition c2
  | TAnd (c1,c2) ->
    Format.fprintf fmt "@[<hov>(@[<2>%a@])@]@ and@ @[<hov>(@[<2>%a@])@]"
      print_condition c1 print_condition c2
  | TNot c ->
    Format.fprintf fmt "@[<hov 4>@[<hov 5>not(%a@])@]" print_condition c
  | TTrue            -> Format.pp_print_string fmt "True"
  | TFalse           -> Format.pp_print_string fmt "False"
  | TRel(rel,exp1,exp2) -> 
    (* \result will be printed as such, not as f().return *)
    Format.fprintf fmt "@[(%a)@]@ %a@ @[(%a)@]"
      !Ast_printer.d_term exp1 !Ast_printer.d_relation rel 
      !Ast_printer.d_term exp2