equal
deleted
inserted
replaced
335 fun make_quick_and_dirty_thm () = |
335 fun make_quick_and_dirty_thm () = |
336 let |
336 let |
337 val _ = if !trace_sat then |
337 val _ = if !trace_sat then |
338 tracing "'quick_and_dirty' is set: proof reconstruction skipped, using oracle instead." |
338 tracing "'quick_and_dirty' is set: proof reconstruction skipped, using oracle instead." |
339 else () |
339 else () |
340 val False_thm = SkipProof.make_thm (the_context ()) (HOLogic.Trueprop $ HOLogic.false_const) |
340 val False_thm = SkipProof.make_thm @{theory} (HOLogic.Trueprop $ HOLogic.false_const) |
341 in |
341 in |
342 (* 'fold Thm.weaken (rev sorted_clauses)' is linear, while 'fold *) |
342 (* 'fold Thm.weaken (rev sorted_clauses)' is linear, while 'fold *) |
343 (* Thm.weaken sorted_clauses' would be quadratic, since we sorted *) |
343 (* Thm.weaken sorted_clauses' would be quadratic, since we sorted *) |
344 (* clauses in ascending order (which is linear for *) |
344 (* clauses in ascending order (which is linear for *) |
345 (* 'Conjunction.intr_balanced', used below) *) |
345 (* 'Conjunction.intr_balanced', used below) *) |
386 | SatSolver.SATISFIABLE assignment => |
386 | SatSolver.SATISFIABLE assignment => |
387 let |
387 let |
388 val msg = "SAT solver found a countermodel:\n" |
388 val msg = "SAT solver found a countermodel:\n" |
389 ^ (commas |
389 ^ (commas |
390 o map (fn (term, idx) => |
390 o map (fn (term, idx) => |
391 Syntax.string_of_term_global (the_context ()) term ^ ": " |
391 Syntax.string_of_term_global @{theory} term ^ ": " |
392 ^ (case assignment idx of NONE => "arbitrary" | SOME true => "true" | SOME false => "false"))) |
392 ^ (case assignment idx of NONE => "arbitrary" | SOME true => "true" | SOME false => "false"))) |
393 (Termtab.dest atom_table) |
393 (Termtab.dest atom_table) |
394 in |
394 in |
395 raise THM (msg, 0, []) |
395 raise THM (msg, 0, []) |
396 end |
396 end |