src/HOL/Prolog/HOHH.thy
author wenzelm
Wed Sep 17 21:27:14 2008 +0200 (2008-09-17)
changeset 28263 69eaa97e7e96
parent 27229 f656a12e0f4e
child 30510 4120fc59dd85
permissions -rw-r--r--
moved global ML bindings to global place;
     1 (*  Title:    HOL/Prolog/HOHH.thy
     2     ID:       $Id$
     3     Author:   David von Oheimb (based on a lecture on Lambda Prolog by Nadathur)
     4 *)
     5 
     6 header {* Higher-order hereditary Harrop formulas *}
     7 
     8 theory HOHH
     9 imports HOL
    10 uses "prolog.ML"
    11 begin
    12 
    13 method_setup ptac =
    14   {* Method.thms_ctxt_args (fn thms => fn ctxt => Method.SIMPLE_METHOD' (Prolog.ptac ctxt thms)) *}
    15   "Basic Lambda Prolog interpreter"
    16 
    17 method_setup prolog =
    18   {* Method.thms_ctxt_args (fn thms => fn ctxt => Method.SIMPLE_METHOD (Prolog.prolog_tac ctxt thms)) *}
    19   "Lambda Prolog interpreter"
    20 
    21 consts
    22 
    23 (* D-formulas (programs):  D ::= !x. D | D .. D | D :- G | A            *)
    24   Dand        :: "[bool, bool] => bool"         (infixr ".." 28)
    25   Dif        :: "[bool, bool] => bool"         (infixl ":-" 29)
    26 
    27 (* G-formulas (goals):     G ::= A | G & G | G | G | ? x. G
    28                                | True | !x. G | D => G                  *)
    29 (*Dand'         :: "[bool, bool] => bool"         (infixr "," 35)*)
    30   Dimp          :: "[bool, bool] => bool"         (infixr "=>" 27)
    31 
    32 translations
    33 
    34   "D :- G"      =>      "G --> D"
    35   "D1 .. D2"    =>      "D1 & D2"
    36 (*"G1 , G2"     =>      "G1 & G2"*)
    37   "D => G"      =>      "D --> G"
    38 
    39 end