-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShrdliteSem.gf
executable file
·66 lines (49 loc) · 1.17 KB
/
ShrdliteSem.gf
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
concrete ShrdliteSem of Shrdlite = {
lincat
S, Thing, Block, Location, Size, Color, Form = Str;
oper
p : Str -> Str;
px : Str -> Str -> Str;
pxy : Str -> Str -> Str -> Str;
pxyz : Str -> Str -> Str -> Str -> Str;
p pred = pred;
px pred x = "(" ++ pred ++ x ++ ")";
pxy pred x y = "(" ++ pred ++ x ++ y ++ ")";
pxyz pred x y z = "(" ++ pred ++ x ++ y ++ z ++ ")";
lin
take t = px "take" t;
put l = px "put" l;
move t l = pxy "move" t l;
beside t = px "beside" t;
leftof t = px "leftof" t;
rightof t = px "rightof" t;
above t = px "above" t;
ontop t = px "ontop" t;
under t = px "under" t;
inside t = px "inside" t;
thatis b l = pxy "thatis" b l;
the b = px "the" b;
any b = px "any" b;
all b = px "all" b;
floor = p "floor";
block f s c = pxyz "block" f s c;
anysize = p "_";
small = p "small";
medium = p "medium";
large = p "large";
wide = p "wide";
tall = p "tall";
anycolor = p "_";
black = p "black";
white = p "white";
blue = p "blue";
green = p "green";
yellow = p "yellow";
red = p "red";
anyblock = p "_";
box = p "box";
pyramid = p "pyramid";
rectangle= p "rectangle";
square = p "square";
ball = p "ball";
}