-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathselect.exp
More file actions
86 lines (67 loc) · 1.31 KB
/
select.exp
File metadata and controls
86 lines (67 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
(* Generating: Example_Schema *)
SCHEMA select_schema;
(* ////////////// TYPE Definitions *)
TYPE color = ENUMERATION OF
(red,
green,
blue,
yellow,
orange,
white,
black,
brown);
END_TYPE;
TYPE label = string;
END_TYPE;
TYPE point = real;
END_TYPE;
TYPE length_measure = real;
END_TYPE;
TYPE myselect = SELECT
(label,
point,
length_measure
);
END_TYPE;
(* ////////////// ENTITY Definitions *)
ENTITY poly_line;
points : LIST OF line;
END_ENTITY;
ENTITY shape
SUPERTYPE OF (ONEOF (circle,triangle,rectangle));
item_name : label;
item_color : OPTIONAL color;
number_of_sides : integer;
END_ENTITY;
ENTITY rectangle
SUPERTYPE OF (square)
SUBTYPE OF (shape);
height : length_measure;
width : length_measure;
END_ENTITY;
ENTITY square
SUBTYPE OF (rectangle);
selaggr : LIST [1:10] of myselect;
END_ENTITY;
ENTITY triangle
SUBTYPE OF (shape);
side1_length : length_measure;
side2_length : length_measure;
side3_length : length_measure;
END_ENTITY;
ENTITY circle
SUBTYPE OF (shape);
radius : real;
(* UNIQUE *)
(* Hi Dave *)
END_ENTITY;
ENTITY line;
end_point_one : cartesian_point;
end_point_two : cartesian_point;
END_ENTITY;
ENTITY cartesian_point;
x : point;
y : point;
z : OPTIONAL point;
END_ENTITY;
END_SCHEMA;