src/HOL/Refute.thy
author webertj
Wed Mar 10 22:35:37 2004 +0100 (2004-03-10)
changeset 14457 6d5d6e78d851
parent 14350 41b32020d0b3
child 14463 ed09706ecc5d
permissions -rw-r--r--
*** empty log message ***
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
webertj@14350
     9
(* ------------------------------------------------------------------------- *)
webertj@14350
    10
(* REFUTE                                                                    *)
webertj@14350
    11
(*                                                                           *)
webertj@14350
    12
(* We use a SAT solver to search for a (finite) model that refutes a given   *)
webertj@14350
    13
(* HOL formula.                                                              *)
webertj@14350
    14
(* ------------------------------------------------------------------------- *)
webertj@14350
    15
webertj@14350
    16
(* ------------------------------------------------------------------------- *)
webertj@14457
    17
(* NOTE                                                                      *)
webertj@14350
    18
(*                                                                           *)
webertj@14457
    19
(* I strongly recommend that you install a stand-alone SAT solver if you     *)
webertj@14457
    20
(* want to use 'refute'.  For details see 'HOL/Tools/sat_solver.ML'.         *)
webertj@14350
    21
(* ------------------------------------------------------------------------- *)
webertj@14350
    22
webertj@14350
    23
(* ------------------------------------------------------------------------- *)
webertj@14350
    24
(* USAGE                                                                     *)
webertj@14350
    25
(*                                                                           *)
webertj@14350
    26
(* See the file 'HOL/ex/Refute_Examples.thy' for examples.  The supported    *)
webertj@14350
    27
(* parameters are explained below.                                           *)
webertj@14350
    28
(* ------------------------------------------------------------------------- *)
webertj@14350
    29
webertj@14350
    30
(* ------------------------------------------------------------------------- *)
webertj@14350
    31
(* CURRENT LIMITATIONS                                                       *)
webertj@14350
    32
(*                                                                           *)
webertj@14350
    33
(* 'refute' currently accepts formulas of higher-order predicate logic (with *)
webertj@14350
    34
(* equality), including free/bound/schematic variables, lambda abstractions, *)
webertj@14457
    35
(* sets and set membership, "arbitrary", "The", and "Eps".  Constants for    *)
webertj@14457
    36
(* which a defining equation exists are unfolded automatically.              *)
webertj@14350
    37
(*                                                                           *)
webertj@14350
    38
(* NOT (YET) SUPPORTED ARE                                                   *)
webertj@14350
    39
(*                                                                           *)
webertj@14350
    40
(* - schematic type variables                                                *)
webertj@14457
    41
(* - type constructors other than bool, =>, set                              *)
webertj@14457
    42
(* - other constants, including constructors of inductive datatypes,         *)
webertj@14457
    43
(*   inductively defined sets and recursive functions                        *)
webertj@14350
    44
(*                                                                           *)
webertj@14350
    45
(* For formulas that contain (variables of) an inductive datatype, a         *)
webertj@14350
    46
(* spurious countermodel may be returned.  Currently no warning is issued in *)
webertj@14350
    47
(* this case.                                                                *)
webertj@14350
    48
(* ------------------------------------------------------------------------- *)
webertj@14350
    49
webertj@14350
    50
(* ------------------------------------------------------------------------- *)
webertj@14350
    51
(* PARAMETERS                                                                *)
webertj@14350
    52
(*                                                                           *)
webertj@14350
    53
(* The following global parameters are currently supported (and required):   *)
webertj@14350
    54
(*                                                                           *)
webertj@14350
    55
(* Name          Type    Description                                         *)
webertj@14350
    56
(*                                                                           *)
webertj@14350
    57
(* "minsize"     int     Only search for models with size at least           *)
webertj@14350
    58
(*                       'minsize'.                                          *)
webertj@14350
    59
(* "maxsize"     int     If >0, only search for models with size at most     *)
webertj@14350
    60
(*                       'maxsize'.                                          *)
webertj@14350
    61
(* "maxvars"     int     If >0, use at most 'maxvars' boolean variables      *)
webertj@14350
    62
(*                       when transforming the term into a propositional     *)
webertj@14350
    63
(*                       formula.                                            *)
webertj@14457
    64
(* "satsolver"   string  Name of the SAT solver to be used.                  *)
webertj@14457
    65
(*                                                                           *)
webertj@14457
    66
(* See 'HOL/Main.thy' for default values.                                    *)
webertj@14350
    67
(* ------------------------------------------------------------------------- *)
webertj@14350
    68
webertj@14350
    69
(* ------------------------------------------------------------------------- *)
webertj@14350
    70
(* FILES                                                                     *)
webertj@14350
    71
(*                                                                           *)
webertj@14457
    72
(* HOL/Tools/prop_logic.ML    Propositional logic                            *)
webertj@14457
    73
(* HOL/Tools/sat_solver.ML    SAT solvers                                    *)
webertj@14457
    74
(* HOL/Tools/refute.ML        Translation HOL -> propositional logic and     *)
webertj@14457
    75
(*                            boolean assignment -> HOL model                *)
webertj@14350
    76
(* HOL/Tools/refute_isar.ML   Adds 'refute'/'refute_params' to Isabelle's    *)
webertj@14457
    77
(*                            syntax                                         *)
webertj@14457
    78
(* HOL/Refute.thy             This file: loads the ML files, basic setup,    *)
webertj@14457
    79
(*                            documentation                                  *)
webertj@14457
    80
(* HOL/Main.thy               Sets default parameters                        *)
webertj@14457
    81
(* HOL/ex/RefuteExamples.thy  Examples                                       *)
webertj@14350
    82
(* ------------------------------------------------------------------------- *)
webertj@14350
    83
webertj@14350
    84
header {* Refute *}
webertj@14350
    85
webertj@14350
    86
theory Refute = Map
webertj@14350
    87
webertj@14457
    88
files "Tools/prop_logic.ML"
webertj@14457
    89
      "Tools/sat_solver.ML"
webertj@14457
    90
      "Tools/refute.ML"
webertj@14350
    91
      "Tools/refute_isar.ML":
webertj@14350
    92
webertj@14457
    93
use "Tools/prop_logic.ML"
webertj@14457
    94
use "Tools/sat_solver.ML"
webertj@14350
    95
use "Tools/refute.ML"
webertj@14350
    96
use "Tools/refute_isar.ML"
webertj@14350
    97
webertj@14350
    98
setup Refute.setup
webertj@14350
    99
webertj@14350
   100
end