-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModel.hs
More file actions
138 lines (133 loc) · 8.34 KB
/
Model.hs
File metadata and controls
138 lines (133 loc) · 8.34 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
module Model where
import AllTypes
g :: VarAssmt
g _ = Indv "j"
model :: Model
model = (indivs, i, j, f)
indivs :: [Denot]
indivs = [Indv "j", Indv "m", Indv "b"]
f :: LExpr -> Denot
f (LCon "j") = Ints $ (\(_,_) -> Indv "j")
f (LCon "m") = Ints $ (\(_,_) -> Indv "m")
f (LCon "b") = Ints $ (\(_,_) -> Indv "b")
f (LCon "man") = Ints $ (\(w,t) -> case (w,t) of
(W 1, T 1) -> Func (\(Ints i) -> case (i (W 1, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True)
(W 1, T 2) -> Func (\(Ints i) -> case (i (W 1, T 2)) of
Indv "j" -> TVal False
Indv "m" -> TVal False
Indv "b" -> TVal True)
(W 2, T 1) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True)
(W 2, T 2) -> Func (\(Ints i) -> case (i (W 2, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True))
f (LCon "woman") = Ints $ (\(w,t) -> case (w,t) of
(W 1, T 1) -> Func (\(Ints i) -> case (i (W 1, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False)
(W 1, T 2) -> Func (\(Ints i) -> case (i (W 1, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal True
Indv "b" -> TVal False)
(W 2, T 1) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False)
(W 2, T 2) -> Func (\(Ints i) -> case (i (W 2, T 2)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False))
f (LCon "talk") = Ints $ (\(w,t) -> case (w,t) of
(W 1, T 1) -> Func (\(Ints i) -> case (i (W 1, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True)
(W 1, T 2) -> Func (\(Ints i) -> case (i (W 1, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal True
Indv "b" -> TVal True)
(W 2, T 1) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal False)
(W 2, T 2) -> Func (\(Ints i) -> case (i (W 2, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True))
f (LCon "walk") = Ints $ (\(w,t) -> case (w,t) of
(W 1, T 1) -> Func (\(Ints i) -> case (i (W 1, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False)
(W 1, T 2) -> Func (\(Ints i) -> case (i (W 1, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal False)
(W 2, T 1) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal True)
(W 2, T 2) -> Func (\(Ints i) -> case (i (W 2, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal True
Indv "b" -> TVal False))
f (LCon "see") = Ints $ (\(w,t) -> case (w,t) of
(W 1, T 1) -> Func (\(Ints i) -> case (i (W 1, T 1)) of
Indv "j" -> Func (\(Ints j) -> case (j (W 1, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal True)
Indv "m" -> Func (\(Ints j) -> case (j (W 1, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True)
Indv "b" -> Func (\(Ints j) -> case (j (W 1, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal False
Indv "b" -> TVal False))
(W 1, T 2) -> Func (\(Ints i) -> case (i (W 1, T 2)) of
Indv "j" -> Func (\(Ints j) -> case (j (W 1, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal False)
Indv "m" -> Func (\(Ints j) -> case (j (W 1, T 2)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False)
Indv "b" -> Func (\(Ints j) -> case (j (W 1, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal True
Indv "b" -> TVal False))
(W 2, T 1) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> Func (\(Ints j) -> case (j (W 2, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal True)
Indv "m" -> Func (\(Ints j) -> case (j (W 2, T 1)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal True)
Indv "b" -> Func (\(Ints j) -> case (j (W 2, T 1)) of
Indv "j" -> TVal False
Indv "m" -> TVal False
Indv "b" -> TVal False))
(W 2, T 2) -> Func (\(Ints i) -> case (i (W 2, T 1)) of
Indv "j" -> Func (\(Ints j) -> case (j (W 2, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal False
Indv "b" -> TVal False)
Indv "m" -> Func (\(Ints j) -> case (j (W 2, T 2)) of
Indv "j" -> TVal False
Indv "m" -> TVal True
Indv "b" -> TVal False)
Indv "b" -> Func (\(Ints j) -> case (j (W 2, T 2)) of
Indv "j" -> TVal True
Indv "m" -> TVal True
Indv "b" -> TVal False)))