author | blanchet |
Fri, 06 Feb 2009 13:43:19 +0100 | |
changeset 29820 | 07f53494cf20 |
parent 26521 | f8c4e79db153 |
child 32857 | 394d37f19e0a |
permissions | -rw-r--r-- |
14350 | 1 |
(* Title: HOL/Refute.thy |
2 |
ID: $Id$ |
|
3 |
Author: Tjark Weber |
|
22058
49faa8c7a5d9
updated to mention the automatic unfolding of constants
webertj
parents:
21332
diff
changeset
|
4 |
Copyright 2003-2007 |
14350 | 5 |
|
6 |
Basic setup and documentation for the 'refute' (and 'refute_params') command. |
|
7 |
*) |
|
8 |
||
14589 | 9 |
header {* Refute *} |
10 |
||
15131 | 11 |
theory Refute |
29820
07f53494cf20
Rearrange Refute/SAT theory dependencies so as to use even more antiquotations in refute.ML +
blanchet
parents:
26521
diff
changeset
|
12 |
imports Hilbert_Choice List Record |
26521 | 13 |
uses |
14 |
"Tools/prop_logic.ML" |
|
15 |
"Tools/sat_solver.ML" |
|
16 |
"Tools/refute.ML" |
|
17 |
"Tools/refute_isar.ML" |
|
15131 | 18 |
begin |
14589 | 19 |
|
20 |
setup Refute.setup |
|
21 |
||
22 |
text {* |
|
23 |
\small |
|
24 |
\begin{verbatim} |
|
14350 | 25 |
(* ------------------------------------------------------------------------- *) |
26 |
(* REFUTE *) |
|
27 |
(* *) |
|
28 |
(* We use a SAT solver to search for a (finite) model that refutes a given *) |
|
29 |
(* HOL formula. *) |
|
30 |
(* ------------------------------------------------------------------------- *) |
|
31 |
||
32 |
(* ------------------------------------------------------------------------- *) |
|
14457 | 33 |
(* NOTE *) |
14350 | 34 |
(* *) |
14457 | 35 |
(* I strongly recommend that you install a stand-alone SAT solver if you *) |
14463 | 36 |
(* want to use 'refute'. For details see 'HOL/Tools/sat_solver.ML'. If you *) |
15293
7797a04cc188
removed explicit mentioning of zChaffs version number
webertj
parents:
15140
diff
changeset
|
37 |
(* have installed (a supported version of) zChaff, simply set 'ZCHAFF_HOME' *) |
7797a04cc188
removed explicit mentioning of zChaffs version number
webertj
parents:
15140
diff
changeset
|
38 |
(* in 'etc/settings'. *) |
14350 | 39 |
(* ------------------------------------------------------------------------- *) |
40 |
||
41 |
(* ------------------------------------------------------------------------- *) |
|
42 |
(* USAGE *) |
|
43 |
(* *) |
|
44 |
(* See the file 'HOL/ex/Refute_Examples.thy' for examples. The supported *) |
|
45 |
(* parameters are explained below. *) |
|
46 |
(* ------------------------------------------------------------------------- *) |
|
47 |
||
48 |
(* ------------------------------------------------------------------------- *) |
|
49 |
(* CURRENT LIMITATIONS *) |
|
50 |
(* *) |
|
51 |
(* 'refute' currently accepts formulas of higher-order predicate logic (with *) |
|
52 |
(* equality), including free/bound/schematic variables, lambda abstractions, *) |
|
16870 | 53 |
(* sets and set membership, "arbitrary", "The", "Eps", records and *) |
22058
49faa8c7a5d9
updated to mention the automatic unfolding of constants
webertj
parents:
21332
diff
changeset
|
54 |
(* inductively defined sets. Constants are unfolded automatically, and sort *) |
49faa8c7a5d9
updated to mention the automatic unfolding of constants
webertj
parents:
21332
diff
changeset
|
55 |
(* axioms are added as well. Other, user-asserted axioms however are *) |
49faa8c7a5d9
updated to mention the automatic unfolding of constants
webertj
parents:
21332
diff
changeset
|
56 |
(* ignored. Inductive datatypes and recursive functions are supported, but *) |
49faa8c7a5d9
updated to mention the automatic unfolding of constants
webertj
parents:
21332
diff
changeset
|
57 |
(* may lead to spurious countermodels. *) |
14463 | 58 |
(* *) |
14808 | 59 |
(* The (space) complexity of the algorithm is non-elementary. *) |
14350 | 60 |
(* *) |
16870 | 61 |
(* Schematic type variables are not supported. *) |
14350 | 62 |
(* ------------------------------------------------------------------------- *) |
63 |
||
64 |
(* ------------------------------------------------------------------------- *) |
|
65 |
(* PARAMETERS *) |
|
66 |
(* *) |
|
67 |
(* The following global parameters are currently supported (and required): *) |
|
68 |
(* *) |
|
69 |
(* Name Type Description *) |
|
70 |
(* *) |
|
71 |
(* "minsize" int Only search for models with size at least *) |
|
72 |
(* 'minsize'. *) |
|
73 |
(* "maxsize" int If >0, only search for models with size at most *) |
|
74 |
(* 'maxsize'. *) |
|
75 |
(* "maxvars" int If >0, use at most 'maxvars' boolean variables *) |
|
76 |
(* when transforming the term into a propositional *) |
|
77 |
(* formula. *) |
|
14808 | 78 |
(* "maxtime" int If >0, terminate after at most 'maxtime' seconds. *) |
79 |
(* This value is ignored under some ML compilers. *) |
|
14457 | 80 |
(* "satsolver" string Name of the SAT solver to be used. *) |
81 |
(* *) |
|
17721 | 82 |
(* See 'HOL/SAT.thy' for default values. *) |
14808 | 83 |
(* *) |
84 |
(* The size of particular types can be specified in the form type=size *) |
|
85 |
(* (where 'type' is a string, and 'size' is an int). Examples: *) |
|
86 |
(* "'a"=1 *) |
|
87 |
(* "List.list"=2 *) |
|
14350 | 88 |
(* ------------------------------------------------------------------------- *) |
89 |
||
90 |
(* ------------------------------------------------------------------------- *) |
|
91 |
(* FILES *) |
|
92 |
(* *) |
|
14457 | 93 |
(* HOL/Tools/prop_logic.ML Propositional logic *) |
94 |
(* HOL/Tools/sat_solver.ML SAT solvers *) |
|
95 |
(* HOL/Tools/refute.ML Translation HOL -> propositional logic and *) |
|
14808 | 96 |
(* Boolean assignment -> HOL model *) |
14350 | 97 |
(* HOL/Tools/refute_isar.ML Adds 'refute'/'refute_params' to Isabelle's *) |
14457 | 98 |
(* syntax *) |
99 |
(* HOL/Refute.thy This file: loads the ML files, basic setup, *) |
|
100 |
(* documentation *) |
|
17721 | 101 |
(* HOL/SAT.thy Sets default parameters *) |
14457 | 102 |
(* HOL/ex/RefuteExamples.thy Examples *) |
14350 | 103 |
(* ------------------------------------------------------------------------- *) |
14589 | 104 |
\end{verbatim} |
105 |
*} |
|
14350 | 106 |
|
107 |
end |