src/ZF/Coind/Language.thy
author clasohm
Sat, 09 Dec 1995 13:36:11 +0100
changeset 1401 0c439768f45c
parent 932 b7ab04253326
child 1478 2b8c2a7547ab
permissions -rw-r--r--
removed quotes from consts and syntax sections
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     1
(*  Title: 	ZF/Coind/Language.thy
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     2
    ID:         $Id$
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     3
    Author: 	Jacob Frost, Cambridge University Computer Laboratory
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     4
    Copyright   1995  University of Cambridge
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     5
*)
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     6
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     7
Language ="Datatype" + QUniv +
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
     8
932
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
     9
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 932
diff changeset
    10
  Const :: i			(* Abstract type of constants *)
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 932
diff changeset
    11
  c_app :: [i,i] => i		(*Abstract constructor for fun application*)
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    12
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    13
rules
932
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    14
  constNEE  "c:Const ==> c ~= 0"
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    15
  c_appI    "[| c1:Const; c2:Const |] ==> c_app(c1,c2):Const"
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    16
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    17
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    18
consts
1401
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 932
diff changeset
    19
  Exp   :: i			(* Datatype of expressions *)
0c439768f45c removed quotes from consts and syntax sections
clasohm
parents: 932
diff changeset
    20
  ExVar :: i			(* Abstract type of variables *)
932
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    21
datatype <= "univ(Const Un ExVar)"
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    22
  "Exp" = e_const("c:Const")
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    23
        | e_var("x:ExVar")
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    24
        | e_fn("x:ExVar","e:Exp")
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    25
        | e_fix("x1:ExVar","x2:ExVar","e:Exp")
b7ab04253326 Got rid of exvarU and constU by
lcp
parents: 915
diff changeset
    26
        | e_app("e1:Exp","e2:Exp")
915
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    27
6dae0daf57b7 New example by Jacob Frost, tidied by lcp
lcp
parents:
diff changeset
    28
end