| author | wenzelm | 
| Tue, 02 Jul 2024 23:29:46 +0200 | |
| changeset 80482 | 2136ecf06a4c | 
| parent 69605 | a96320074298 | 
| permissions | -rw-r--r-- | 
| 50530 | 1 | (* Title: HOL/Library/Refute.thy | 
| 14350 | 2 | Author: Tjark Weber | 
| 22058 
49faa8c7a5d9
updated to mention the automatic unfolding of constants
 webertj parents: 
21332diff
changeset | 3 | Copyright 2003-2007 | 
| 14350 | 4 | |
| 5 | Basic setup and documentation for the 'refute' (and 'refute_params') command. | |
| 6 | *) | |
| 7 | ||
| 60500 | 8 | section \<open>Refute\<close> | 
| 14589 | 9 | |
| 15131 | 10 | theory Refute | 
| 54556 | 11 | imports Main | 
| 63432 | 12 | keywords | 
| 13 | "refute" :: diag and | |
| 14 | "refute_params" :: thy_decl | |
| 15131 | 15 | begin | 
| 14589 | 16 | |
| 69605 | 17 | ML_file \<open>refute.ML\<close> | 
| 14589 | 18 | |
| 46960 | 19 | refute_params | 
| 20 | [itself = 1, | |
| 21 | minsize = 1, | |
| 22 | maxsize = 8, | |
| 23 | maxvars = 10000, | |
| 24 | maxtime = 60, | |
| 25 | satsolver = auto, | |
| 26 | no_assms = false] | |
| 27 | ||
| 60500 | 28 | text \<open> | 
| 14589 | 29 | \small | 
| 30 | \begin{verbatim}
 | |
| 14350 | 31 | (* ------------------------------------------------------------------------- *) | 
| 32 | (* REFUTE *) | |
| 33 | (* *) | |
| 34 | (* We use a SAT solver to search for a (finite) model that refutes a given *) | |
| 35 | (* HOL formula. *) | |
| 36 | (* ------------------------------------------------------------------------- *) | |
| 37 | ||
| 38 | (* ------------------------------------------------------------------------- *) | |
| 14457 | 39 | (* NOTE *) | 
| 14350 | 40 | (* *) | 
| 14457 | 41 | (* I strongly recommend that you install a stand-alone SAT solver if you *) | 
| 14463 | 42 | (* 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: 
15140diff
changeset | 43 | (* have installed (a supported version of) zChaff, simply set 'ZCHAFF_HOME' *) | 
| 
7797a04cc188
removed explicit mentioning of zChaffs version number
 webertj parents: 
15140diff
changeset | 44 | (* in 'etc/settings'. *) | 
| 14350 | 45 | (* ------------------------------------------------------------------------- *) | 
| 46 | ||
| 47 | (* ------------------------------------------------------------------------- *) | |
| 48 | (* USAGE *) | |
| 49 | (* *) | |
| 50 | (* See the file 'HOL/ex/Refute_Examples.thy' for examples. The supported *) | |
| 51 | (* parameters are explained below. *) | |
| 52 | (* ------------------------------------------------------------------------- *) | |
| 53 | ||
| 54 | (* ------------------------------------------------------------------------- *) | |
| 55 | (* CURRENT LIMITATIONS *) | |
| 56 | (* *) | |
| 57 | (* 'refute' currently accepts formulas of higher-order predicate logic (with *) | |
| 58 | (* equality), including free/bound/schematic variables, lambda abstractions, *) | |
| 16870 | 59 | (* sets and set membership, "arbitrary", "The", "Eps", records and *) | 
| 22058 
49faa8c7a5d9
updated to mention the automatic unfolding of constants
 webertj parents: 
21332diff
changeset | 60 | (* inductively defined sets. Constants are unfolded automatically, and sort *) | 
| 
49faa8c7a5d9
updated to mention the automatic unfolding of constants
 webertj parents: 
21332diff
changeset | 61 | (* axioms are added as well. Other, user-asserted axioms however are *) | 
| 
49faa8c7a5d9
updated to mention the automatic unfolding of constants
 webertj parents: 
21332diff
changeset | 62 | (* ignored. Inductive datatypes and recursive functions are supported, but *) | 
| 
49faa8c7a5d9
updated to mention the automatic unfolding of constants
 webertj parents: 
21332diff
changeset | 63 | (* may lead to spurious countermodels. *) | 
| 14463 | 64 | (* *) | 
| 14808 | 65 | (* The (space) complexity of the algorithm is non-elementary. *) | 
| 14350 | 66 | (* *) | 
| 16870 | 67 | (* Schematic type variables are not supported. *) | 
| 14350 | 68 | (* ------------------------------------------------------------------------- *) | 
| 69 | ||
| 70 | (* ------------------------------------------------------------------------- *) | |
| 71 | (* PARAMETERS *) | |
| 72 | (* *) | |
| 34120 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 73 | (* The following global parameters are currently supported (and required, *) | 
| 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 74 | (* except for "expect"): *) | 
| 14350 | 75 | (* *) | 
| 76 | (* Name Type Description *) | |
| 77 | (* *) | |
| 78 | (* "minsize" int Only search for models with size at least *) | |
| 79 | (* 'minsize'. *) | |
| 80 | (* "maxsize" int If >0, only search for models with size at most *) | |
| 81 | (* 'maxsize'. *) | |
| 82 | (* "maxvars" int If >0, use at most 'maxvars' boolean variables *) | |
| 83 | (* when transforming the term into a propositional *) | |
| 84 | (* formula. *) | |
| 14808 | 85 | (* "maxtime" int If >0, terminate after at most 'maxtime' seconds. *) | 
| 86 | (* This value is ignored under some ML compilers. *) | |
| 14457 | 87 | (* "satsolver" string Name of the SAT solver to be used. *) | 
| 34120 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 88 | (* "no_assms" bool If "true", assumptions in structured proofs are *) | 
| 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 89 | (* not considered. *) | 
| 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 90 | (* "expect"      string  Expected result ("genuine", "potential", "none", or *)
 | 
| 
f9920a3ddf50
added "no_assms" option to Refute, and include structured proof assumptions by default;
 blanchet parents: 
34018diff
changeset | 91 | (* "unknown"). *) | 
| 14457 | 92 | (* *) | 
| 14808 | 93 | (* The size of particular types can be specified in the form type=size *) | 
| 94 | (* (where 'type' is a string, and 'size' is an int). Examples: *) | |
| 95 | (* "'a"=1 *) | |
| 96 | (* "List.list"=2 *) | |
| 14350 | 97 | (* ------------------------------------------------------------------------- *) | 
| 98 | ||
| 99 | (* ------------------------------------------------------------------------- *) | |
| 100 | (* FILES *) | |
| 101 | (* *) | |
| 39048 | 102 | (* HOL/Tools/prop_logic.ML Propositional logic *) | 
| 103 | (* HOL/Tools/sat_solver.ML SAT solvers *) | |
| 104 | (* HOL/Tools/refute.ML Translation HOL -> propositional logic and *) | |
| 105 | (* Boolean assignment -> HOL model *) | |
| 106 | (* HOL/Refute.thy This file: loads the ML files, basic setup, *) | |
| 107 | (* documentation *) | |
| 108 | (* HOL/SAT.thy Sets default parameters *) | |
| 109 | (* HOL/ex/Refute_Examples.thy Examples *) | |
| 14350 | 110 | (* ------------------------------------------------------------------------- *) | 
| 14589 | 111 | \end{verbatim}
 | 
| 60500 | 112 | \<close> | 
| 14350 | 113 | |
| 114 | end |