- Format.fprintf f "@]@;[%s] by %s@]"
- (String.concat ", " (List.map string_of_int vars))
- (match proof with
- | Terms.Exact _ -> "axiom"
- | Terms.Step (rule, id1, id2, _, p, _) ->
- Printf.sprintf "%s %d with %d at %s"
- (string_of_rule rule)
- id1 id2 (String.concat
- "," (List.map string_of_int p)))
-;;
-
-let pp_bag ~formatter:f bag =
+ Format.fprintf f "@]@;[%s] by "
+ (String.concat ", " (List.map string_of_int vars));
+ (match proof with
+ | Terms.Exact t -> pp_foterm f t
+ | Terms.Step (rule, id1, id2, _, p, _) ->
+ Format.fprintf f "%s %d with %d at %s"
+ (string_of_rule rule) id1 id2 (String.concat
+ "," (List.map string_of_int p)));
+ Format.fprintf f "@]"
+;;
+
+let pp_clause ~formatter:f c =
+ let (id, nlit, plit, vars, proof) = c in
+ Format.fprintf f "Id : %3d, " id ;
+ let pr_literals l =
+ if l <> [] then begin
+ pp_literal f (List.hd l);
+ List.iter (fun lit -> Format.fprintf f "\\/"; pp_literal f lit) (List.tl l);
+ end
+ in
+ pr_literals nlit;
+ Format.fprintf f " -> ";
+ pr_literals plit;
+ Format.fprintf f "[%s] by " (String.concat ", " (List.map string_of_int vars));
+ match proof with
+ | Terms.Exact t -> pp_foterm f t
+ | Terms.Step (rule, id1, id2, _, p, _) ->
+ Format.fprintf f "%s %d with %d at %s"
+ (string_of_rule rule) id1 id2 (String.concat
+ "," (List.map string_of_int p))
+;;
+
+let pp_bag ~formatter:f (_,bag) =