ignore error messages produced by CVC4 when generating BV
authorMathias Fleury <Mathias.Fleury@mpi-inf.mpg.de>
Fri, 08 Jan 2021 20:38:46 +0100
changeset 73104 6520d59fbdd7
parent 73103 b69fd6e19662
child 73107 f062d19c4b44
ignore error messages produced by CVC4 when generating BV
src/HOL/Tools/SMT/smt_systems.ML
--- a/src/HOL/Tools/SMT/smt_systems.ML	Fri Jan 08 16:07:34 2021 +0000
+++ b/src/HOL/Tools/SMT/smt_systems.ML	Fri Jan 08 20:38:46 2021 +0100
@@ -35,8 +35,15 @@
     " failed -- enable tracing using the " ^ quote (Config.name_of SMT_Config.trace) ^
     " option for details"))
 
+(* When used with bitvectors, CVC4 can produce error messages like:
+
+$ISABELLE_TMP_PREFIX/... No set-logic command was given before this point.
+
+These message should be ignored.
+*)
 fun is_blank_or_error_line "" = true
-  | is_blank_or_error_line s = String.isPrefix "(error " s
+  | is_blank_or_error_line s =
+  String.isPrefix "(error " s orelse String.isPrefix (getenv "ISABELLE_TMP_PREFIX") s
 
 fun on_first_line test_outcome solver_name lines =
   let