src/HOL/SMT/SMT.thy
author wenzelm
Mon, 01 Mar 2010 17:12:43 +0100
changeset 35414 cc8e4276d093
parent 34983 e5cb3a016094
child 36081 70deefb6c093
permissions -rw-r--r--
updated generated files;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     1
(*  Title:      HOL/SMT/SMT.thy
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     2
    Author:     Sascha Boehme, TU Muenchen
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     3
*)
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     4
33010
39f73a59e855 added proof reconstructon for Z3,
boehmes
parents: 32618
diff changeset
     5
header {* Bindings to several SMT solvers *}
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     6
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     7
theory SMT
33010
39f73a59e855 added proof reconstructon for Z3,
boehmes
parents: 32618
diff changeset
     8
imports SMT_Base Z3
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
     9
uses
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    10
  "Tools/cvc3_solver.ML"
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    11
  "Tools/yices_solver.ML"
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    12
begin
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    13
33010
39f73a59e855 added proof reconstructon for Z3,
boehmes
parents: 32618
diff changeset
    14
setup {* CVC3_Solver.setup #> Yices_Solver.setup *}
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    15
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    16
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    17
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    18
section {* Setup *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    19
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    20
text {*
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    21
Without further ado, the SMT solvers CVC3 and Z3 are provided
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    22
remotely via an SMT server. For faster responses, the solver
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    23
environment variables CVC3_SOLVER, YICES_SOLVER, and Z3_SOLVER
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    24
need to point to the respective SMT solver executable.
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    25
*}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    26
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    27
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    28
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    29
section {* Available configuration options *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    30
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    31
text {* Choose the SMT solver to be applied (one of cvc3, yices, or z3): *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    32
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    33
declare [[ smt_solver = z3 ]]
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    34
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    35
text {* Restrict the runtime of an SMT solver (in seconds): *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    36
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    37
declare [[ smt_timeout = 20 ]]
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    38
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    39
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    40
subsection {* Z3-specific options *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    41
34983
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    42
text {* Pass extra command-line arguments to Z3 to control its behaviour: *}
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    43
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    44
declare [[ z3_options = "" ]]
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    45
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    46
text {* Enable proof reconstruction for Z3: *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    47
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    48
declare [[ z3_proofs = false ]]
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    49
34983
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    50
text {* Enable or disable tracing of the theorems used for proving a
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    51
proposition: *}
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    52
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    53
declare [[ z3_trace_assms = false ]]
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    54
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    55
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    56
subsection {* Certificates *}
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    57
34983
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    58
text {* To avoid invocation of an SMT solver for the same problem
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    59
again and again, cache certificates in a file (the filename must
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    60
be given by an absolute path, an empty string disables the usage
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    61
of certificates): *}
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    62
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    63
declare [[ smt_certificates = "" ]]
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    64
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    65
text {* Enables or disables the addition of new certificates to
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    66
the current certificates file (when disabled, only existing
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    67
certificates are used and no SMT solver is invoked): *}
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    68
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    69
declare [[ smt_record = true ]]
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    70
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    71
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    72
subsection {* Special configuration options *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    73
34983
e5cb3a016094 collect certificates in a single file
boehmes
parents: 33472
diff changeset
    74
text {* Trace the problem file, the result of the SMT solver and
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    75
further information: *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    76
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    77
declare [[ smt_trace = false ]]
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    78
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    79
text {* Unfold (some) definitions passed to the SMT solver: *}
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    80
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    81
declare [[ smt_unfold_defs = true ]]
33472
e88f67d679c4 added documentation for local SMT solver setup and available SMT options,
boehmes
parents: 33010
diff changeset
    82
32618
42865636d006 added new method "smt": an oracle-based connection to external SMT solvers
boehmes
parents:
diff changeset
    83
end