src/HOL/Refute.thy
author wenzelm
Fri May 21 21:17:37 2004 +0200 (2004-05-21)
changeset 14771 c2bf21b5564e
parent 14589 feae7b5fd425
child 14808 1bf198c9828f
permissions -rw-r--r--
load ML files only once;
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@14463
    35
(* have installed ZChaff, simply set 'ZCHAFF_HOME' in 'etc/settings'.        *)
webertj@14350
    36
(* ------------------------------------------------------------------------- *)
webertj@14350
    37
webertj@14350
    38
(* ------------------------------------------------------------------------- *)
webertj@14350
    39
(* USAGE                                                                     *)
webertj@14350
    40
(*                                                                           *)
webertj@14350
    41
(* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
webertj@14350
    42
(* parameters are explained below.                                           *)
webertj@14350
    43
(* ------------------------------------------------------------------------- *)
webertj@14350
    44
webertj@14350
    45
(* ------------------------------------------------------------------------- *)
webertj@14350
    46
(* CURRENT LIMITATIONS                                                       *)
webertj@14350
    47
(*                                                                           *)
webertj@14350
    48
(* 'refute' currently accepts formulas of higher-order predicate logic (with *)
webertj@14350
    49
(* equality), including free/bound/schematic variables, lambda abstractions, *)
webertj@14457
    50
(* sets and set membership, "arbitrary", "The", and "Eps".  Constants for    *)
webertj@14463
    51
(* which a defining equation exists are unfolded automatically.  Non-        *)
webertj@14463
    52
(* recursive inductive datatypes are supported.                              *)
webertj@14463
    53
(*                                                                           *)
webertj@14463
    54
(* The (space) complexity of the algorithm is exponential in both the length *)
webertj@14463
    55
(* of the formula and the size of the model.                                 *)
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
(* - type constructors other than bool, =>, set, non-recursive IDTs          *)
webertj@14463
    62
(* - inductively defined sets                                                *)
webertj@14463
    63
(* - recursive functions                                                     *)
webertj@14463
    64
(* - ...                                                                     *)
webertj@14350
    65
(* ------------------------------------------------------------------------- *)
webertj@14350
    66
webertj@14350
    67
(* ------------------------------------------------------------------------- *)
webertj@14350
    68
(* PARAMETERS                                                                *)
webertj@14350
    69
(*                                                                           *)
webertj@14350
    70
(* The following global parameters are currently supported (and required):   *)
webertj@14350
    71
(*                                                                           *)
webertj@14350
    72
(* Name          Type    Description                                         *)
webertj@14350
    73
(*                                                                           *)
webertj@14350
    74
(* "minsize"     int     Only search for models with size at least           *)
webertj@14350
    75
(*                       'minsize'.                                          *)
webertj@14350
    76
(* "maxsize"     int     If >0, only search for models with size at most     *)
webertj@14350
    77
(*                       'maxsize'.                                          *)
webertj@14350
    78
(* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
webertj@14350
    79
(*                       when transforming the term into a propositional     *)
webertj@14350
    80
(*                       formula.                                            *)
webertj@14457
    81
(* "satsolver"   string  Name of the SAT solver to be used.                  *)
webertj@14457
    82
(*                                                                           *)
webertj@14457
    83
(* See 'HOL/Main.thy' for default values.                                    *)
webertj@14350
    84
(* ------------------------------------------------------------------------- *)
webertj@14350
    85
webertj@14350
    86
(* ------------------------------------------------------------------------- *)
webertj@14350
    87
(* FILES                                                                     *)
webertj@14350
    88
(*                                                                           *)
webertj@14457
    89
(* HOL/Tools/prop_logic.ML    Propositional logic                            *)
webertj@14457
    90
(* HOL/Tools/sat_solver.ML    SAT solvers                                    *)
webertj@14457
    91
(* HOL/Tools/refute.ML        Translation HOL -> propositional logic and     *)
webertj@14457
    92
(*                            boolean assignment -> HOL model                *)
webertj@14350
    93
(* HOL/Tools/refute_isar.ML   Adds 'refute'/'refute_params' to Isabelle's    *)
webertj@14457
    94
(*                            syntax                                         *)
webertj@14457
    95
(* HOL/Refute.thy             This file: loads the ML files, basic setup,    *)
webertj@14457
    96
(*                            documentation                                  *)
webertj@14457
    97
(* HOL/Main.thy               Sets default parameters                        *)
webertj@14457
    98
(* HOL/ex/RefuteExamples.thy  Examples                                       *)
webertj@14350
    99
(* ------------------------------------------------------------------------- *)
wenzelm@14589
   100
\end{verbatim}
wenzelm@14589
   101
*}
webertj@14350
   102
webertj@14350
   103
end