src/HOL/Refute.thy
author wenzelm
Mon Mar 22 20:58:52 2010 +0100 (2010-03-22)
changeset 35898 c890a3835d15
parent 34120 f9920a3ddf50
child 39048 4006f5c3f421
permissions -rw-r--r--
recovered header;
     1 (*  Title:      HOL/Refute.thy
     2     Author:     Tjark Weber
     3     Copyright   2003-2007
     4 
     5 Basic setup and documentation for the 'refute' (and 'refute_params') command.
     6 *)
     7 
     8 header {* Refute *}
     9 
    10 theory Refute
    11 imports Hilbert_Choice List
    12 uses
    13   "Tools/refute.ML"
    14   "Tools/refute_isar.ML"
    15 begin
    16 
    17 setup Refute.setup
    18 
    19 text {*
    20 \small
    21 \begin{verbatim}
    22 (* ------------------------------------------------------------------------- *)
    23 (* REFUTE                                                                    *)
    24 (*                                                                           *)
    25 (* We use a SAT solver to search for a (finite) model that refutes a given   *)
    26 (* HOL formula.                                                              *)
    27 (* ------------------------------------------------------------------------- *)
    28 
    29 (* ------------------------------------------------------------------------- *)
    30 (* NOTE                                                                      *)
    31 (*                                                                           *)
    32 (* I strongly recommend that you install a stand-alone SAT solver if you     *)
    33 (* want to use 'refute'.  For details see 'HOL/Tools/sat_solver.ML'.  If you *)
    34 (* have installed (a supported version of) zChaff, simply set 'ZCHAFF_HOME'  *)
    35 (* in 'etc/settings'.                                                        *)
    36 (* ------------------------------------------------------------------------- *)
    37 
    38 (* ------------------------------------------------------------------------- *)
    39 (* USAGE                                                                     *)
    40 (*                                                                           *)
    41 (* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
    42 (* parameters are explained below.                                           *)
    43 (* ------------------------------------------------------------------------- *)
    44 
    45 (* ------------------------------------------------------------------------- *)
    46 (* CURRENT LIMITATIONS                                                       *)
    47 (*                                                                           *)
    48 (* 'refute' currently accepts formulas of higher-order predicate logic (with *)
    49 (* equality), including free/bound/schematic variables, lambda abstractions, *)
    50 (* sets and set membership, "arbitrary", "The", "Eps", records and           *)
    51 (* inductively defined sets.  Constants are unfolded automatically, and sort *)
    52 (* axioms are added as well.  Other, user-asserted axioms however are        *)
    53 (* ignored.  Inductive datatypes and recursive functions are supported, but  *)
    54 (* may lead to spurious countermodels.                                       *)
    55 (*                                                                           *)
    56 (* The (space) complexity of the algorithm is non-elementary.                *)
    57 (*                                                                           *)
    58 (* Schematic type variables are not supported.                               *)
    59 (* ------------------------------------------------------------------------- *)
    60 
    61 (* ------------------------------------------------------------------------- *)
    62 (* PARAMETERS                                                                *)
    63 (*                                                                           *)
    64 (* The following global parameters are currently supported (and required,    *)
    65 (* except for "expect"):                                                     *)
    66 (*                                                                           *)
    67 (* Name          Type    Description                                         *)
    68 (*                                                                           *)
    69 (* "minsize"     int     Only search for models with size at least           *)
    70 (*                       'minsize'.                                          *)
    71 (* "maxsize"     int     If >0, only search for models with size at most     *)
    72 (*                       'maxsize'.                                          *)
    73 (* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
    74 (*                       when transforming the term into a propositional     *)
    75 (*                       formula.                                            *)
    76 (* "maxtime"     int     If >0, terminate after at most 'maxtime' seconds.   *)
    77 (*                       This value is ignored under some ML compilers.      *)
    78 (* "satsolver"   string  Name of the SAT solver to be used.                  *)
    79 (* "no_assms"    bool    If "true", assumptions in structured proofs are     *)
    80 (*                       not considered.                                     *)
    81 (* "expect"      string  Expected result ("genuine", "potential", "none", or *)
    82 (*                       "unknown").                                         *)
    83 (*                                                                           *)
    84 (* See 'HOL/SAT.thy' for default values.                                     *)
    85 (*                                                                           *)
    86 (* The size of particular types can be specified in the form type=size       *)
    87 (* (where 'type' is a string, and 'size' is an int).  Examples:              *)
    88 (* "'a"=1                                                                    *)
    89 (* "List.list"=2                                                             *)
    90 (* ------------------------------------------------------------------------- *)
    91 
    92 (* ------------------------------------------------------------------------- *)
    93 (* FILES                                                                     *)
    94 (*                                                                           *)
    95 (* HOL/Tools/prop_logic.ML    Propositional logic                            *)
    96 (* HOL/Tools/sat_solver.ML    SAT solvers                                    *)
    97 (* HOL/Tools/refute.ML        Translation HOL -> propositional logic and     *)
    98 (*                            Boolean assignment -> HOL model                *)
    99 (* HOL/Tools/refute_isar.ML   Adds 'refute'/'refute_params' to Isabelle's    *)
   100 (*                            syntax                                         *)
   101 (* HOL/Refute.thy             This file: loads the ML files, basic setup,    *)
   102 (*                            documentation                                  *)
   103 (* HOL/SAT.thy                Sets default parameters                        *)
   104 (* HOL/ex/RefuteExamples.thy  Examples                                       *)
   105 (* ------------------------------------------------------------------------- *)
   106 \end{verbatim}
   107 *}
   108 
   109 end