author | oheimb |
Thu, 01 Feb 2001 20:53:13 +0100 | |
changeset 11026 | a50365d21144 |
parent 10069 | c7226e6f9625 |
child 11070 | cc421547e744 |
permissions | -rw-r--r-- |
8011 | 1 |
(* Title: HOL/MicroJava/J/Type.thy |
2 |
ID: $Id$ |
|
3 |
Author: David von Oheimb |
|
4 |
Copyright 1999 Technische Universitaet Muenchen |
|
5 |
||
6 |
Java types |
|
7 |
*) |
|
8 |
||
11026
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
9 |
theory Type = JBasis: |
8011 | 10 |
|
11026
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
11 |
typedecl cname (* class name *) |
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
12 |
typedecl vnam (* variable or field name *) |
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
13 |
typedecl mname (* method name *) |
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
14 |
arities cname :: "term" |
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
15 |
vnam :: "term" |
a50365d21144
converted to Isar, simplifying recursion on class hierarchy
oheimb
parents:
10069
diff
changeset
|
16 |
mname :: "term" |
8011 | 17 |
|
10069 | 18 |
datatype vname (* names for This pointer and local/field variables *) |
10061
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
19 |
= This |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
20 |
| VName vnam |
8011 | 21 |
|
10061
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
22 |
datatype prim_ty (* primitive type, cf. 4.2 *) |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
23 |
= Void (* 'result type' of void methods *) |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
24 |
| Boolean |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
25 |
| Integer |
8011 | 26 |
|
10069 | 27 |
datatype ref_ty (* reference type, cf. 4.3 *) |
28 |
= NullT (* null type, cf. 4.1 *) |
|
10061
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
29 |
| ClassT cname (* class type *) |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
30 |
|
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
31 |
datatype ty (* any type, cf. 4.1 *) |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
32 |
= PrimT prim_ty (* primitive type *) |
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
33 |
| RefT ref_ty (* reference type *) |
8011 | 34 |
|
35 |
syntax |
|
10061
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
36 |
NT :: " ty" |
10069 | 37 |
Class :: "cname => ty" |
10061
fe82134773dc
added HTML syntax; added spaces in normal syntax for better documents
kleing
parents:
10042
diff
changeset
|
38 |
|
8011 | 39 |
translations |
10069 | 40 |
"NT" == "RefT NullT" |
41 |
"Class C" == "RefT (ClassT C)" |
|
8011 | 42 |
|
43 |
end |