src/Tools/quickcheck.ML
changeset 59435 7789b349f478
parent 59184 830bb7ddb3ab
child 59436 570bea2407ea
equal deleted inserted replaced
59434:94194354e004 59435:7789b349f478
   386   end;
   386   end;
   387 
   387 
   388 
   388 
   389 (* pretty printing *)
   389 (* pretty printing *)
   390 
   390 
   391 fun tool_name auto = (if auto then "Auto " else "") ^ "Quickcheck";
   391 fun tool_name auto = if auto then "Auto Quickcheck" else "Quickcheck";
   392 
   392 
   393 fun pretty_counterex ctxt auto NONE =
   393 fun pretty_counterex ctxt auto NONE =
   394       Pretty.str (tool_name auto ^ " found no counterexample." ^ Config.get ctxt tag)
   394       Pretty.para (tool_name auto ^ " found no counterexample." ^ Config.get ctxt tag)
   395   | pretty_counterex ctxt auto (SOME ((genuine, cex), eval_terms)) =
   395   | pretty_counterex ctxt auto (SOME ((genuine, cex), eval_terms)) =
   396       (Pretty.text_fold o Pretty.fbreaks)
   396       (Pretty.text_fold o Pretty.fbreaks)
   397        (Pretty.str (tool_name auto ^ " found a " ^
   397        (Pretty.para (tool_name auto ^ " found a " ^
   398          (if genuine then "counterexample:"
   398          (if genuine then "counterexample:"
   399           else "potentially spurious counterexample due to underspecified functions:") ^
   399           else "potentially spurious counterexample due to underspecified functions:") ^
   400         Config.get ctxt tag) ::
   400         Config.get ctxt tag) ::
   401         Pretty.str "" ::
   401         Pretty.str "" ::
   402         map (fn (s, t) =>
   402         map (fn (s, t) =>