src/HOL/Refute.thy
author wenzelm
Fri Apr 16 13:51:04 2004 +0200 (2004-04-16)
changeset 14589 feae7b5fd425
parent 14463 ed09706ecc5d
child 14771 c2bf21b5564e
permissions -rw-r--r--
tuned document;
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
use "Tools/prop_logic.ML"
wenzelm@14589
    19
use "Tools/sat_solver.ML"
wenzelm@14589
    20
use "Tools/refute.ML"
wenzelm@14589
    21
use "Tools/refute_isar.ML"
wenzelm@14589
    22
wenzelm@14589
    23
setup Refute.setup
wenzelm@14589
    24
wenzelm@14589
    25
text {*
wenzelm@14589
    26
\small
wenzelm@14589
    27
\begin{verbatim}
webertj@14350
    28
(* ------------------------------------------------------------------------- *)
webertj@14350
    29
(* REFUTE                                                                    *)
webertj@14350
    30
(*                                                                           *)
webertj@14350
    31
(* We use a SAT solver to search for a (finite) model that refutes a given   *)
webertj@14350
    32
(* HOL formula.                                                              *)
webertj@14350
    33
(* ------------------------------------------------------------------------- *)
webertj@14350
    34
webertj@14350
    35
(* ------------------------------------------------------------------------- *)
webertj@14457
    36
(* NOTE                                                                      *)
webertj@14350
    37
(*                                                                           *)
webertj@14457
    38
(* I strongly recommend that you install a stand-alone SAT solver if you     *)
webertj@14463
    39
(* want to use 'refute'.  For details see 'HOL/Tools/sat_solver.ML'.  If you *)
webertj@14463
    40
(* have installed ZChaff, simply set 'ZCHAFF_HOME' in 'etc/settings'.        *)
webertj@14350
    41
(* ------------------------------------------------------------------------- *)
webertj@14350
    42
webertj@14350
    43
(* ------------------------------------------------------------------------- *)
webertj@14350
    44
(* USAGE                                                                     *)
webertj@14350
    45
(*                                                                           *)
webertj@14350
    46
(* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
webertj@14350
    47
(* parameters are explained below.                                           *)
webertj@14350
    48
(* ------------------------------------------------------------------------- *)
webertj@14350
    49
webertj@14350
    50
(* ------------------------------------------------------------------------- *)
webertj@14350
    51
(* CURRENT LIMITATIONS                                                       *)
webertj@14350
    52
(*                                                                           *)
webertj@14350
    53
(* 'refute' currently accepts formulas of higher-order predicate logic (with *)
webertj@14350
    54
(* equality), including free/bound/schematic variables, lambda abstractions, *)
webertj@14457
    55
(* sets and set membership, "arbitrary", "The", and "Eps".  Constants for    *)
webertj@14463
    56
(* which a defining equation exists are unfolded automatically.  Non-        *)
webertj@14463
    57
(* recursive inductive datatypes are supported.                              *)
webertj@14463
    58
(*                                                                           *)
webertj@14463
    59
(* The (space) complexity of the algorithm is exponential in both the length *)
webertj@14463
    60
(* of the formula and the size of the model.                                 *)
webertj@14350
    61
(*                                                                           *)
webertj@14350
    62
(* NOT (YET) SUPPORTED ARE                                                   *)
webertj@14350
    63
(*                                                                           *)
webertj@14350
    64
(* - schematic type variables                                                *)
webertj@14463
    65
(* - axioms, sorts                                                           *)
webertj@14463
    66
(* - type constructors other than bool, =>, set, non-recursive IDTs          *)
webertj@14463
    67
(* - inductively defined sets                                                *)
webertj@14463
    68
(* - recursive functions                                                     *)
webertj@14463
    69
(* - ...                                                                     *)
webertj@14350
    70
(* ------------------------------------------------------------------------- *)
webertj@14350
    71
webertj@14350
    72
(* ------------------------------------------------------------------------- *)
webertj@14350
    73
(* PARAMETERS                                                                *)
webertj@14350
    74
(*                                                                           *)
webertj@14350
    75
(* The following global parameters are currently supported (and required):   *)
webertj@14350
    76
(*                                                                           *)
webertj@14350
    77
(* Name          Type    Description                                         *)
webertj@14350
    78
(*                                                                           *)
webertj@14350
    79
(* "minsize"     int     Only search for models with size at least           *)
webertj@14350
    80
(*                       'minsize'.                                          *)
webertj@14350
    81
(* "maxsize"     int     If >0, only search for models with size at most     *)
webertj@14350
    82
(*                       'maxsize'.                                          *)
webertj@14350
    83
(* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
webertj@14350
    84
(*                       when transforming the term into a propositional     *)
webertj@14350
    85
(*                       formula.                                            *)
webertj@14457
    86
(* "satsolver"   string  Name of the SAT solver to be used.                  *)
webertj@14457
    87
(*                                                                           *)
webertj@14457
    88
(* See 'HOL/Main.thy' for default values.                                    *)
webertj@14350
    89
(* ------------------------------------------------------------------------- *)
webertj@14350
    90
webertj@14350
    91
(* ------------------------------------------------------------------------- *)
webertj@14350
    92
(* FILES                                                                     *)
webertj@14350
    93
(*                                                                           *)
webertj@14457
    94
(* HOL/Tools/prop_logic.ML    Propositional logic                            *)
webertj@14457
    95
(* HOL/Tools/sat_solver.ML    SAT solvers                                    *)
webertj@14457
    96
(* HOL/Tools/refute.ML        Translation HOL -> propositional logic and     *)
webertj@14457
    97
(*                            boolean assignment -> HOL model                *)
webertj@14350
    98
(* HOL/Tools/refute_isar.ML   Adds 'refute'/'refute_params' to Isabelle's    *)
webertj@14457
    99
(*                            syntax                                         *)
webertj@14457
   100
(* HOL/Refute.thy             This file: loads the ML files, basic setup,    *)
webertj@14457
   101
(*                            documentation                                  *)
webertj@14457
   102
(* HOL/Main.thy               Sets default parameters                        *)
webertj@14457
   103
(* HOL/ex/RefuteExamples.thy  Examples                                       *)
webertj@14350
   104
(* ------------------------------------------------------------------------- *)
wenzelm@14589
   105
\end{verbatim}
wenzelm@14589
   106
*}
webertj@14350
   107
webertj@14350
   108
end