src/HOL/Refute.thy
author webertj
Wed May 26 18:06:38 2004 +0200 (2004-05-26)
changeset 14808 1bf198c9828f
parent 14771 c2bf21b5564e
child 15131 c69542757a4d
permissions -rw-r--r--
documentation updated
webertj@14350
     1
(*  Title:      HOL/Refute.thy
webertj@14350
     2
    ID:         $Id$
webertj@14350
     3
    Author:     Tjark Weber
webertj@14350
     4
    Copyright   2003-2004
webertj@14350
     5
webertj@14350
     6
Basic setup and documentation for the 'refute' (and 'refute_params') command.
webertj@14350
     7
*)
webertj@14350
     8
wenzelm@14589
     9
header {* Refute *}
wenzelm@14589
    10
wenzelm@14589
    11
theory Refute = Map
wenzelm@14589
    12
wenzelm@14589
    13
files "Tools/prop_logic.ML"
wenzelm@14589
    14
      "Tools/sat_solver.ML"
wenzelm@14589
    15
      "Tools/refute.ML"
wenzelm@14589
    16
      "Tools/refute_isar.ML":
wenzelm@14589
    17
wenzelm@14589
    18
setup Refute.setup
wenzelm@14589
    19
wenzelm@14589
    20
text {*
wenzelm@14589
    21
\small
wenzelm@14589
    22
\begin{verbatim}
webertj@14350
    23
(* ------------------------------------------------------------------------- *)
webertj@14350
    24
(* REFUTE                                                                    *)
webertj@14350
    25
(*                                                                           *)
webertj@14350
    26
(* We use a SAT solver to search for a (finite) model that refutes a given   *)
webertj@14350
    27
(* HOL formula.                                                              *)
webertj@14350
    28
(* ------------------------------------------------------------------------- *)
webertj@14350
    29
webertj@14350
    30
(* ------------------------------------------------------------------------- *)
webertj@14457
    31
(* NOTE                                                                      *)
webertj@14350
    32
(*                                                                           *)
webertj@14457
    33
(* I strongly recommend that you install a stand-alone SAT solver if you     *)
webertj@14463
    34
(* want to use 'refute'.  For details see 'HOL/Tools/sat_solver.ML'.  If you *)
webertj@14808
    35
(* have installed ZChaff Version 2003.12.04, simply set 'ZCHAFF_HOME' in     *)
webertj@14808
    36
(* 'etc/settings'.                                                           *)
webertj@14350
    37
(* ------------------------------------------------------------------------- *)
webertj@14350
    38
webertj@14350
    39
(* ------------------------------------------------------------------------- *)
webertj@14350
    40
(* USAGE                                                                     *)
webertj@14350
    41
(*                                                                           *)
webertj@14350
    42
(* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
webertj@14350
    43
(* parameters are explained below.                                           *)
webertj@14350
    44
(* ------------------------------------------------------------------------- *)
webertj@14350
    45
webertj@14350
    46
(* ------------------------------------------------------------------------- *)
webertj@14350
    47
(* CURRENT LIMITATIONS                                                       *)
webertj@14350
    48
(*                                                                           *)
webertj@14350
    49
(* 'refute' currently accepts formulas of higher-order predicate logic (with *)
webertj@14350
    50
(* equality), including free/bound/schematic variables, lambda abstractions, *)
webertj@14808
    51
(* sets and set membership, "arbitrary", "The", and "Eps".  Defining         *)
webertj@14808
    52
(* equations for constants are added automatically.  Inductive datatypes are *)
webertj@14808
    53
(* supported, but may lead to spurious countermodels.                        *)
webertj@14463
    54
(*                                                                           *)
webertj@14808
    55
(* The (space) complexity of the algorithm is non-elementary.                *)
webertj@14350
    56
(*                                                                           *)
webertj@14350
    57
(* NOT (YET) SUPPORTED ARE                                                   *)
webertj@14350
    58
(*                                                                           *)
webertj@14350
    59
(* - schematic type variables                                                *)
webertj@14463
    60
(* - axioms, sorts                                                           *)
webertj@14463
    61
(* - inductively defined sets                                                *)
webertj@14808
    62
(* - recursive functions on IDTs (case, recursion operators, size)           *)
webertj@14463
    63
(* - ...                                                                     *)
webertj@14350
    64
(* ------------------------------------------------------------------------- *)
webertj@14350
    65
webertj@14350
    66
(* ------------------------------------------------------------------------- *)
webertj@14350
    67
(* PARAMETERS                                                                *)
webertj@14350
    68
(*                                                                           *)
webertj@14350
    69
(* The following global parameters are currently supported (and required):   *)
webertj@14350
    70
(*                                                                           *)
webertj@14350
    71
(* Name          Type    Description                                         *)
webertj@14350
    72
(*                                                                           *)
webertj@14350
    73
(* "minsize"     int     Only search for models with size at least           *)
webertj@14350
    74
(*                       'minsize'.                                          *)
webertj@14350
    75
(* "maxsize"     int     If >0, only search for models with size at most     *)
webertj@14350
    76
(*                       'maxsize'.                                          *)
webertj@14350
    77
(* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
webertj@14350
    78
(*                       when transforming the term into a propositional     *)
webertj@14350
    79
(*                       formula.                                            *)
webertj@14808
    80
(* "maxtime"     int     If >0, terminate after at most 'maxtime' seconds.   *)
webertj@14808
    81
(*                       This value is ignored under some ML compilers.      *)
webertj@14457
    82
(* "satsolver"   string  Name of the SAT solver to be used.                  *)
webertj@14457
    83
(*                                                                           *)
webertj@14457
    84
(* See 'HOL/Main.thy' for default values.                                    *)
webertj@14808
    85
(*                                                                           *)
webertj@14808
    86
(* The size of particular types can be specified in the form type=size       *)
webertj@14808
    87
(* (where 'type' is a string, and 'size' is an int).  Examples:              *)
webertj@14808
    88
(* "'a"=1                                                                    *)
webertj@14808
    89
(* "List.list"=2                                                             *)
webertj@14350
    90
(* ------------------------------------------------------------------------- *)
webertj@14350
    91
webertj@14350
    92
(* ------------------------------------------------------------------------- *)
webertj@14350
    93
(* FILES                                                                     *)
webertj@14350
    94
(*                                                                           *)
webertj@14457
    95
(* HOL/Tools/prop_logic.ML    Propositional logic                            *)
webertj@14457
    96
(* HOL/Tools/sat_solver.ML    SAT solvers                                    *)
webertj@14457
    97
(* HOL/Tools/refute.ML        Translation HOL -> propositional logic and     *)
webertj@14808
    98
(*                            Boolean assignment -> HOL model                *)
webertj@14350
    99
(* HOL/Tools/refute_isar.ML   Adds 'refute'/'refute_params' to Isabelle's    *)
webertj@14457
   100
(*                            syntax                                         *)
webertj@14457
   101
(* HOL/Refute.thy             This file: loads the ML files, basic setup,    *)
webertj@14457
   102
(*                            documentation                                  *)
webertj@14457
   103
(* HOL/Main.thy               Sets default parameters                        *)
webertj@14457
   104
(* HOL/ex/RefuteExamples.thy  Examples                                       *)
webertj@14350
   105
(* ------------------------------------------------------------------------- *)
wenzelm@14589
   106
\end{verbatim}
wenzelm@14589
   107
*}
webertj@14350
   108
webertj@14350
   109
end