Stabler - Lx 185/209 2003 (19) The implementati<strong>on</strong> <strong>of</strong> the LC recognizer: /* * file: lc.pl */ :- op(1200,xfx,: ˜ ). % this is our object language "if" :- op(1100,xfx,? ˜ ). % metalanguage provability predicate [] ? ˜ []. (S0 ? ˜Goals0) :- infer(S0,Goals0,S,Goals), (S ? ˜Goals). infer(S,[-D,A|C],S,DC) :- (A : ˜ [D|Ds]), append(Ds,C,DC). % lc-complete infer(S,[-D|C],S,DAC) :- (A : ˜ [D|Ds]), append(Ds,[-A|C],DAC). % lc infer([W|S],[W|C],S,C). % shift-complete=scan infer([W|S],C,S,[-W|C]). % shift infer(S,[A|C],S,C) :- (A : ˜ []). % lc-e-complete infer(S,C,S,[-A|C]) :- (A : ˜ []). % lc-e append([],L,L). append([E|L],M,[E|N]) :- append(L,M,N). 83
Stabler - Lx 185/209 2003 (20) Like LR, this parser is stupid about empty categories. For example, using g3.pl which has an empty i0, we cannot prove [titus,laughs] ?˜[ip], unless we c<strong>on</strong>trol the search by hand: | ?- [g3,lc]. yes | ?- trace,([titus,laughs] ? ˜ [ip]). The debugger will first creep -- showing everything (trace) 1 1 Call: [titus,laughs]? ˜ [ip] ? 2 2 Call: infer([titus,laughs],[ip],_953,_954) ? ? 2 2 Exit: infer([titus,laughs],[ip],[laughs],[-(titus),ip]) ? 3 2 Call: [laughs]? ˜ [-(titus),ip] ? 4 3 Call: infer([laughs],[-(titus),ip],_2051,_2052) ? 5 4 Call: ip: ˜ [titus|_2424] ? f 5 4 Fail: ip: ˜ [titus|_2424] ? 6 4 Call: _2430: ˜ [titus|_2428] ? ? 6 4 Exit: dp(3,s,_2815): ˜ [titus] ? 7 4 Call: append([],[-(dp(3,s,_2815)),ip],_2052) ? s 7 4 Exit: append([],[-(dp(3,s,_2815)),ip],[-(dp(3,s,_2815)),ip]) ? ? 4 3 Exit: infer([laughs],[-(titus),ip],[laughs],[-(dp(3,s,_2815)),ip]) ? 8 3 Call: [laughs]? ˜ [-(dp(3,s,_2815)),ip] ? 9 4 Call: infer([laughs],[-(dp(3,s,_2815)),ip],_4649,_4650) ? 10 5 Call: ip: ˜ [dp(3,s,_2815)|_5028] ? 10 5 Exit: ip: ˜ [dp(3,s,nom),i1(3,s)] ? 11 5 Call: append([i1(3,s)],[],_4650) ? s 11 5 Exit: append([i1(3,s)],[],[i1(3,s)]) ? ? 9 4 Exit: infer([laughs],[-(dp(3,s,nom)),ip],[laughs],[i1(3,s)]) ? 12 4 Call: [laughs]? ˜ [i1(3,s)] ? 13 5 Call: infer([laughs],[i1(3,s)],_7267,_7268) ? ? 13 5 Exit: infer([laughs],[i1(3,s)],[],[-(laughs),i1(3,s)]) ? 14 5 Call: []? ˜ [-(laughs),i1(3,s)] ? f 14 5 Fail: []? ˜ [-(laughs),i1(3,s)] ? 13 5 Redo: infer([laughs],[i1(3,s)],[],[-(laughs),i1(3,s)]) ? 15 6 Call: i1(3,s): ˜ [] ? 15 6 Fail: i1(3,s): ˜ [] ? 16 6 Call: _7639: ˜ [] ? ? 16 6 Exit: i0: ˜ [] ? ? 13 5 Exit: infer([laughs],[i1(3,s)],[laughs],[-(i0),i1(3,s)]) ? 17 5 Call: [laughs]? ˜ [-(i0),i1(3,s)] ? 18 6 Call: infer([laughs],[-(i0),i1(3,s)],_9100,_9101) ? 19 7 Call: i1(3,s): ˜ [i0|_9478] ? 19 7 Exit: i1(3,s): ˜ [i0,vp(3,s)] ? 20 7 Call: append([vp(3,s)],[],_9101) ? s 20 7 Exit: append([vp(3,s)],[],[vp(3,s)]) ? ? 18 6 Exit: infer([laughs],[-(i0),i1(3,s)],[laughs],[vp(3,s)]) ? 21 6 Call: [laughs]? ˜ [vp(3,s)] ? 22 7 Call: infer([laughs],[vp(3,s)],_11713,_11714) ? ? 22 7 Exit: infer([laughs],[vp(3,s)],[],[-(laughs),vp(3,s)]) ? 23 7 Call: []? ˜ [-(laughs),vp(3,s)] ? 24 8 Call: infer([],[-(laughs),vp(3,s)],_12827,_12828) ? 25 9 Call: vp(3,s): ˜ [laughs|_13204] ? 25 9 Fail: vp(3,s): ˜ [laughs|_13204] ? 26 9 Call: _13210: ˜ [laughs|_13208] ? ? 26 9 Exit: v0(intrans,3,s): ˜ [laughs] ? 27 9 Call: append([],[-(v0(intrans,3,s)),vp(3,s)],_12828) ? s 27 9 Exit: append([],[-(v0(intrans,3,s)),vp(3,s)],[-(v0(intrans,3,s)),vp(3,s)]) ? ? 24 8 Exit: infer([],[-(laughs),vp(3,s)],[],[-(v0(intrans,3,s)),vp(3,s)]) ? 28 8 Call: []? ˜ [-(v0(intrans,3,s)),vp(3,s)] ? 29 9 Call: infer([],[-(v0(intrans,3,s)),vp(3,s)],_15456,_15457) ? 30 10 Call: vp(3,s): ˜ [v0(intrans,3,s)|_15839] ? 30 10 Fail: vp(3,s): ˜ [v0(intrans,3,s)|_15839] ? 31 10 Call: _15845: ˜ [v0(intrans,3,s)|_15843] ? ? 31 10 Exit: v1(3,s): ˜ [v0(intrans,3,s)] ? 32 10 Call: append([],[-(v1(3,s)),vp(3,s)],_15457) ? s 32 10 Exit: append([],[-(v1(3,s)),vp(3,s)],[-(v1(3,s)),vp(3,s)]) ? ? 29 9 Exit: infer([],[-(v0(intrans,3,s)),vp(3,s)],[],[-(v1(3,s)),vp(3,s)]) ? 33 9 Call: []? ˜ [-(v1(3,s)),vp(3,s)] ? 34 10 Call: infer([],[-(v1(3,s)),vp(3,s)],_18106,_18107) ? 35 11 Call: vp(3,s): ˜ [v1(3,s)|_18488] ? 35 11 Exit: vp(3,s): ˜ [v1(3,s)] ? 36 11 Call: append([],[],_18107) ? s 36 11 Exit: append([],[],[]) ? ? 34 10 Exit: infer([],[-(v1(3,s)),vp(3,s)],[],[]) ? 37 10 Call: []? ˜ [] ? ? 37 10 Exit: []? ˜ [] ? ? 33 9 Exit: []? ˜ [-(v1(3,s)),vp(3,s)] ? ? 28 8 Exit: []? ˜ [-(v0(intrans,3,s)),vp(3,s)] ? ? 23 7 Exit: []? ˜ [-(laughs),vp(3,s)] ? ? 21 6 Exit: [laughs]? ˜ [vp(3,s)] ? ? 17 5 Exit: [laughs]? ˜ [-(i0),i1(3,s)] ? ? 12 4 Exit: [laughs]? ˜ [i1(3,s)] ? ? 8 3 Exit: [laughs]? ˜ [-(dp(3,s,nom)),ip] ? ? 3 2 Exit: [laughs]? ˜ [-(titus),ip] ? ? 1 1 Exit: [titus,laughs]? ˜ [ip] ? yes 84
- Page 1 and 2:
Notes on computati
- Page 3 and 4:
Stabler - Lx 185/209 2003 Linguisti
- Page 5 and 6:
Stabler - Lx 185/209 2003 1 Setting
- Page 7 and 8:
Stabler - Lx 185/209 2003 1.2 Propo
- Page 9 and 10:
Stabler - Lx 185/209 2003 (8) Pitfa
- Page 11 and 12:
Stabler - Lx 185/209 2003 In fact,
- Page 13 and 14:
Stabler - Lx 185/209 2003 10. Call
- Page 15 and 16:
Stabler - Lx 185/209 2003 compute s
- Page 17 and 18:
Stabler - Lx 185/209 2003 (11) Pred
- Page 19 and 20:
Stabler - Lx 185/209 2003 1.6 The l
- Page 21 and 22:
Stabler - Lx 185/209 2003 L0 and L1
- Page 23 and 24:
Stabler - Lx 185/209 2003 Exercises
- Page 25 and 26:
Stabler - Lx 185/209 2003 3 more ex
- Page 27 and 28:
Stabler - Lx 185/209 2003 2 Recogni
- Page 29 and 30:
Stabler - Lx 185/209 2003 (8) Then
- Page 31 and 32:
Stabler - Lx 185/209 2003 (13) The
- Page 33 and 34: Stabler - Lx 185/209 2003 Exercises
- Page 35 and 36: Stabler - Lx 185/209 2003 Problem (
- Page 37 and 38: Stabler - Lx 185/209 2003 1 ?- [col
- Page 39 and 40: Stabler - Lx 185/209 2003 lex(’th
- Page 41 and 42: Stabler - Lx 185/209 2003 2 ?- ([
- Page 43 and 44: Stabler - Lx 185/209 2003 (3) Dalry
- Page 45 and 46: Stabler - Lx 185/209 2003 3.3 Recog
- Page 47 and 48: Stabler - Lx 185/209 2003 (22) Supp
- Page 49 and 50: Stabler - Lx 185/209 2003 (27) With
- Page 51 and 52: Stabler - Lx 185/209 2003 (31) tcl/
- Page 53 and 54: Stabler - Lx 185/209 2003 A c-comma
- Page 55 and 56: Stabler - Lx 185/209 2003 (46) Does
- Page 57 and 58: Stabler - Lx 185/209 2003 m. The id
- Page 59 and 60: Stabler - Lx 185/209 2003 4 Brief d
- Page 61 and 62: Stabler - Lx 185/209 2003 (50) Nem
- Page 63 and 64: Stabler - Lx 185/209 2003 5 Trees,
- Page 65 and 66: Stabler - Lx 185/209 2003 children(
- Page 67 and 68: Stabler - Lx 185/209 2003 5.3 Movem
- Page 69 and 70: Stabler - Lx 185/209 2003 a. d e c
- Page 71 and 72: Stabler - Lx 185/209 2003 children(
- Page 73 and 74: Stabler - Lx 185/209 2003 adjoin_no
- Page 75 and 76: Stabler - Lx 185/209 2003 (37) With
- Page 77 and 78: Stabler - Lx 185/209 2003 Mates’
- Page 79 and 80: Stabler - Lx 185/209 2003 81. ((A
- Page 81 and 82: Stabler - Lx 185/209 2003 6.2 LR pa
- Page 83: Stabler - Lx 185/209 2003 6.3 LC pa
- Page 87 and 88: Stabler - Lx 185/209 2003 6.4 All t
- Page 89 and 90: Stabler - Lx 185/209 2003 (26) GLC
- Page 91 and 92: Stabler - Lx 185/209 2003 (33) GLC
- Page 93 and 94: Stabler - Lx 185/209 2003 The secon
- Page 95 and 96: Stabler - Lx 185/209 2003 6.5.2 Bot
- Page 97 and 98: Stabler - Lx 185/209 2003 6.6 Asses
- Page 99 and 100: Stabler - Lx 185/209 2003 (56) Stru
- Page 101 and 102: Stabler - Lx 185/209 2003 6.6.4 A d
- Page 103 and 104: Stabler - Lx 185/209 2003 1. Downlo
- Page 105 and 106: Stabler - Lx 185/209 2003 It is ess
- Page 107 and 108: Stabler - Lx 185/209 2003 inference
- Page 109 and 110: Stabler - Lx 185/209 2003 1 (’SBA
- Page 111 and 112: Stabler - Lx 185/209 2003 7.2 Tree
- Page 113 and 114: Stabler - Lx 185/209 2003 (14) With
- Page 115 and 116: Stabler - Lx 185/209 2003 /* earley
- Page 117 and 118: Stabler - Lx 185/209 2003 8 Stochas
- Page 119 and 120: Stabler - Lx 185/209 2003 8.1.1 Cor
- Page 121 and 122: Stabler - Lx 185/209 2003 to punctu
- Page 123 and 124: Stabler - Lx 185/209 2003 jane aust
- Page 125 and 126: Stabler - Lx 185/209 2003 where usu
- Page 127 and 128: Stabler - Lx 185/209 2003 0.1 0.09
- Page 129 and 130: Stabler - Lx 185/209 2003 We get al
- Page 131 and 132: Stabler - Lx 185/209 2003 Word leng
- Page 133 and 134: Stabler - Lx 185/209 2003 8.1.4 Pro
- Page 135 and 136:
Stabler - Lx 185/209 2003 8.1.5 Ran
- Page 137 and 138:
Stabler - Lx 185/209 2003 Matrix ar
- Page 139 and 140:
Stabler - Lx 185/209 2003 (65) To a
- Page 141 and 142:
Stabler - Lx 185/209 2003 octave:18
- Page 143 and 144:
Stabler - Lx 185/209 2003 added pro
- Page 145 and 146:
Stabler - Lx 185/209 2003 P(q1 ...q
- Page 147 and 148:
Stabler - Lx 185/209 2003 c. Finall
- Page 149 and 150:
Stabler - Lx 185/209 2003 This is p
- Page 151 and 152:
Stabler - Lx 185/209 2003 (100) Abn
- Page 153 and 154:
Stabler - Lx 185/209 2003 3. If des
- Page 155 and 156:
Stabler - Lx 185/209 2003 It will b
- Page 157 and 158:
Stabler - Lx 185/209 2003 Entropy (
- Page 159 and 160:
Stabler - Lx 185/209 2003 One indir
- Page 161 and 162:
Stabler - Lx 185/209 2003 4. the fu
- Page 163 and 164:
Stabler - Lx 185/209 2003 8.2.3 Ass
- Page 165 and 166:
Stabler - Lx 185/209 2003 (142) We
- Page 167 and 168:
Stabler - Lx 185/209 2003 8.4 Next
- Page 169 and 170:
Stabler - Lx 185/209 2003 9.1 “Mi
- Page 171 and 172:
Stabler - Lx 185/209 2003 (4) More
- Page 173 and 174:
Stabler - Lx 185/209 2003 This is a
- Page 175 and 176:
Stabler - Lx 185/209 2003 (7) Let
- Page 177 and 178:
Stabler - Lx 185/209 2003 (9) Let
- Page 179 and 180:
Stabler - Lx 185/209 2003 dP3 maria
- Page 181 and 182:
Stabler - Lx 185/209 2003 The 4 Eng
- Page 183 and 184:
Stabler - Lx 185/209 2003 9.1.4 Fou
- Page 185 and 186:
Stabler - Lx 185/209 2003 (21) The
- Page 187 and 188:
Stabler - Lx 185/209 2003 :- [’pp
- Page 189 and 190:
Stabler - Lx 185/209 2003 9.2.2 Som
- Page 191 and 192:
Stabler - Lx 185/209 2003 who laugh
- Page 193 and 194:
Stabler - Lx 185/209 2003 Kayne ass
- Page 195 and 196:
Stabler - Lx 185/209 2003 (32) Vari
- Page 197 and 198:
Stabler - Lx 185/209 2003 dP t 3 v
- Page 199 and 200:
Stabler - Lx 185/209 2003 10 Toward
- Page 201 and 202:
Stabler - Lx 185/209 2003 We can en
- Page 203 and 204:
Stabler - Lx 185/209 2003 Head move
- Page 205 and 206:
Stabler - Lx 185/209 2003 D which w
- Page 207 and 208:
Stabler - Lx 185/209 2003 CP C’ C
- Page 209 and 210:
Stabler - Lx 185/209 2003 CP C’ C
- Page 211 and 212:
Stabler - Lx 185/209 2003 that::=T
- Page 213 and 214:
Stabler - Lx 185/209 2003 T t C C S
- Page 215 and 216:
Stabler - Lx 185/209 2003 10.3.4 AP
- Page 217 and 218:
Stabler - Lx 185/209 2003 T t C C C
- Page 219 and 220:
Stabler - Lx 185/209 2003 10.3.6 Co
- Page 221 and 222:
Stabler - Lx 185/209 2003 10.4 Modi
- Page 223 and 224:
Stabler - Lx 185/209 2003 10.5 Summ
- Page 225 and 226:
Stabler - Lx 185/209 2003 10.5.1 Re
- Page 227 and 228:
Stabler - Lx 185/209 2003 Exercises
- Page 229 and 230:
Stabler - Lx 185/209 2003 10.6.3 Mu
- Page 231 and 232:
Stabler - Lx 185/209 2003 10.6.5 Pi
- Page 233 and 234:
Stabler - Lx 185/209 2003 CP C’ C
- Page 235 and 236:
Stabler - Lx 185/209 2003 but also
- Page 237 and 238:
Stabler - Lx 185/209 2003 And if yo
- Page 239 and 240:
Stabler - Lx 185/209 2003 sentence:
- Page 241 and 242:
Stabler - Lx 185/209 2003 Example:
- Page 243 and 244:
Stabler - Lx 185/209 2003 15.1 Mono
- Page 245 and 246:
Stabler - Lx 185/209 2003 Example:
- Page 247 and 248:
Stabler - Lx 185/209 2003 16 Harder
- Page 249 and 250:
Stabler - Lx 185/209 2003 A first,
- Page 251 and 252:
Stabler - Lx 185/209 2003 non-demon
- Page 253 and 254:
Stabler - Lx 185/209 2003 16.4 Scop
- Page 255 and 256:
Stabler - Lx 185/209 2003 16.5 Infe
- Page 257 and 258:
Stabler - Lx 185/209 2003 Extra cre
- Page 259 and 260:
Stabler - Lx 185/209 2003 CP C’ C
- Page 261 and 262:
Stabler - Lx 185/209 2003 (5) In su
- Page 263 and 264:
Stabler - Lx 185/209 2003 (7) Anoth
- Page 265 and 266:
Stabler - Lx 185/209 2003 17.2.1 A
- Page 267 and 268:
Stabler - Lx 185/209 2003 Exercises
- Page 269 and 270:
Stabler - Lx 185/209 2003 Reference
- Page 271 and 272:
Stabler - Lx 185/209 2003 Cornell,
- Page 273 and 274:
Stabler - Lx 185/209 2003 Hale, Joh
- Page 275 and 276:
Stabler - Lx 185/209 2003 Kraft, L.
- Page 277 and 278:
Stabler - Lx 185/209 2003 Pollock,
- Page 279 and 280:
Stabler - Lx 185/209 2003 Stabler,
- Page 281 and 282:
Index (x, y), openintervalfromx to
- Page 283 and 284:
Stabler - Lx 185/209 2003 Herbrand,
- Page 285:
Stabler - Lx 185/209 2003 Seki, Hir