Debian Codegraph @

tests/ResolvedBugs/metaIntMatchOct2018.expected

raw
1 ==========================================
2 reduce in META-LEVEL : metaMatch(['MATCH], 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0)
3 .
4 *********** equation
5 eq [Q:Qid] = sth Q:Qid is
6 including Q:Qid .
7 sorts none .
8 none
9 none
10 none
11 none
12 none
13 none
14 none
15 endsth .
16 Q:Qid --> 'MATCH
17 ['MATCH]
18 --->
19 sth 'MATCH is
20 including 'MATCH .
21 sorts none .
22 none
23 none
24 none
25 none
26 none
27 none
28 none
29 endsth
30 *********** trial #1
31 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
32 X:Bar --> a
33 Y:Bar --> c
34 *********** solving condition fragment
35 h(X:Bar) = g(Y:Bar)
36 *********** equation
37 eq h(a) = b .
38 empty substitution
39 h(a)
40 --->
41 b
42 *********** equation
43 eq g(c) = b .
44 empty substitution
45 g(c)
46 --->
47 b
48 *********** success for condition fragment
49 h(X:Bar) = g(Y:Bar)
50 X:Bar --> a
51 Y:Bar --> c
52 *********** success #1
53 *********** membership axiom
54 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
55 X:Bar --> a
56 Y:Bar --> c
57 Bar: f(a, c) becomes Foo
58 *********** equation
59 (built-in equation for symbol metaMatch)
60 metaMatch(sth 'MATCH is
61 including 'MATCH .
62 sorts none .
63 none
64 none
65 none
66 none
67 none
68 none
69 none
70 endsth, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0)
71 --->
72
73 'Z:Foo <- 'f['a.Foo, 'c.Foo]
74 rewrites: 5
75 mb applications: 1 equational rewrites: 4 rule rewrites: 0 variant narrowing
76 steps: 0 narrowing steps: 0
77 result Assignment:
78 'Z:Foo <- 'f['a.Foo, 'c.Foo]
79 ==========================================
80 reduce in META-LEVEL : metaXmatch(['MATCH], 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0,
81 unbounded, 0) .
82 *********** equation
83 eq [Q:Qid] = sth Q:Qid is
84 including Q:Qid .
85 sorts none .
86 none
87 none
88 none
89 none
90 none
91 none
92 none
93 endsth .
94 Q:Qid --> 'MATCH
95 ['MATCH]
96 --->
97 sth 'MATCH is
98 including 'MATCH .
99 sorts none .
100 none
101 none
102 none
103 none
104 none
105 none
106 none
107 endsth
108 *********** trial #1
109 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
110 X:Bar --> a
111 Y:Bar --> c
112 *********** solving condition fragment
113 h(X:Bar) = g(Y:Bar)
114 *********** equation
115 eq h(a) = b .
116 empty substitution
117 h(a)
118 --->
119 b
120 *********** equation
121 eq g(c) = b .
122 empty substitution
123 g(c)
124 --->
125 b
126 *********** success for condition fragment
127 h(X:Bar) = g(Y:Bar)
128 X:Bar --> a
129 Y:Bar --> c
130 *********** success #1
131 *********** membership axiom
132 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
133 X:Bar --> a
134 Y:Bar --> c
135 Bar: f(a, c) becomes Foo
136 *********** equation
137 (built-in equation for symbol metaXmatch)
138 metaXmatch(sth 'MATCH is
139 including 'MATCH .
140 sorts none .
141 none
142 none
143 none
144 none
145 none
146 none
147 none
148 endsth, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0, unbounded, 0)
149 --->
150 {
151 'Z:Foo <- 'f['a.Foo, 'c.Foo], []}
152 rewrites: 5
153 mb applications: 1 equational rewrites: 4 rule rewrites: 0 variant narrowing
154 steps: 0 narrowing steps: 0
155 result MatchPair: {
156 'Z:Foo <- 'f['a.Foo, 'c.Foo], []}
157 ==========================================
158 erewrite in MATCH-TEST : <> < me : User | soln: 0 > createInterpreter(
159 interpreterManager, me, none) .
160 *********** rule
161 rl < X : User | AS > createdInterpreter(X, Y, Z) => < X : User | AS >
162 insertModule(Z, X, upModule('MATCH, true)) .
163 X --> me
164 AS --> soln: 0
165 Y --> interpreterManager
166 Z --> interpreter(0)
167 < me : User | soln: 0 > createdInterpreter(me, interpreterManager, interpreter(
168 0))
169 --->
170 < me : User | soln: 0 > insertModule(interpreter(0), me, upModule('MATCH,
171 true))
172 *********** equation
173 (built-in equation for symbol upModule)
174 upModule('MATCH, true)
175 --->
176 fmod 'MATCH is
177 nil
178 sorts 'Bool ; 'Foo ; 'Bar .
179 subsort 'Foo < 'Bar .
180 op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0)
181 special(
182 id-hook('BranchSymbol, nil)
183 term-hook('1, 'true.Bool)
184 term-hook('2, 'false.Bool))] .
185 op '_==_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
186 id-hook('EqualitySymbol, nil)
187 term-hook('equalTerm, 'true.Bool)
188 term-hook('notEqualTerm, 'false.Bool))] .
189 op '_=/=_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
190 id-hook('EqualitySymbol, nil)
191 term-hook('equalTerm, 'false.Bool)
192 term-hook('notEqualTerm, 'true.Bool))] .
193 op 'true : nil -> 'Bool [ctor special(
194 id-hook('SystemTrue, nil))] .
195 op 'false : nil -> 'Bool [ctor special(
196 id-hook('SystemFalse, nil))] .
197 op '_and_ : 'Bool 'Bool -> 'Bool [prec(55) assoc comm] .
198 op '_or_ : 'Bool 'Bool -> 'Bool [prec(59) assoc comm] .
199 op '_xor_ : 'Bool 'Bool -> 'Bool [prec(57) assoc comm] .
200 op 'not_ : 'Bool -> 'Bool [prec(53)] .
201 op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] .
202 op 'f : 'Bar 'Bar -> 'Bar [comm] .
203 op 'g : 'Foo -> 'Foo [none] .
204 op 'h : 'Foo -> 'Foo [none] .
205 op 'a : nil -> 'Foo [none] .
206 op 'b : nil -> 'Foo [none] .
207 op 'c : nil -> 'Foo [none] .
208 op 'd : nil -> 'Foo [none] .
209 op 'e : nil -> 'Foo [none] .
210 cmb 'f['X:Bar, 'Y:Bar] : 'Foo if 'h['X:Bar] = 'g['Y:Bar] [none] .
211 eq 'h['a.Foo] = 'b.Foo [none] .
212 eq 'g['c.Foo] = 'b.Foo [none] .
213 eq 'h['c.Foo] = 'd.Foo [none] .
214 eq 'g['a.Foo] = 'd.Foo [none] .
215 eq '_and_['true.Bool, 'A:Bool] = 'A:Bool [none] .
216 eq '_and_['false.Bool, 'A:Bool] = 'false.Bool [none] .
217 eq '_and_['A:Bool, 'A:Bool] = 'A:Bool [none] .
218 eq '_xor_['false.Bool, 'A:Bool] = 'A:Bool [none] .
219 eq '_xor_['A:Bool, 'A:Bool] = 'false.Bool [none] .
220 eq '_and_['A:Bool, '_xor_['B:Bool, 'C:Bool]] = '_xor_['_and_['A:Bool,
221 'B:Bool], '_and_['A:Bool, 'C:Bool]] [none] .
222 eq 'not_['A:Bool] = '_xor_['true.Bool, 'A:Bool] [none] .
223 eq '_or_['A:Bool, 'B:Bool] = '_xor_['_and_['A:Bool, 'B:Bool], '_xor_['A:Bool,
224 'B:Bool]] [none] .
225 eq '_implies_['A:Bool, 'B:Bool] = 'not_['_xor_['A:Bool, '_and_['A:Bool,
226 'B:Bool]]] [none] .
227 endfm
228 *********** rule
229 rl insertedModule(X, Y) < X : User | AS, soln: N > => < X : User | AS >
230 getMatch(Y, X, 'MATCH, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, N) .
231 X --> me
232 Y --> interpreter(0)
233 AS --> (none).AttributeSet
234 N --> 0
235 insertedModule(me, interpreter(0)) < me : User | soln: 0 >
236 --->
237 < me : User | none > getMatch(interpreter(0), me, 'MATCH, 'Z:Foo, 'f['a.Foo,
238 'c.Foo], nil, 0)
239 *********** trial #1
240 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
241 X:Bar --> a
242 Y:Bar --> c
243 *********** solving condition fragment
244 h(X:Bar) = g(Y:Bar)
245 *********** equation
246 eq h(a) = b .
247 empty substitution
248 h(a)
249 --->
250 b
251 *********** equation
252 eq g(c) = b .
253 empty substitution
254 g(c)
255 --->
256 b
257 *********** success for condition fragment
258 h(X:Bar) = g(Y:Bar)
259 X:Bar --> a
260 Y:Bar --> c
261 *********** success #1
262 *********** membership axiom
263 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
264 X:Bar --> a
265 Y:Bar --> c
266 Bar: f(a, c) becomes Foo
267 rewrites: 6
268 mb applications: 1 equational rewrites: 3 rule rewrites: 2 variant narrowing
269 steps: 0 narrowing steps: 0
270 result Configuration: <> < me : User | none > gotMatch(me, interpreter(0), 3,
271 'Z:Foo <- 'f['a.Foo, 'c.Foo])
272 ==========================================
273 erewrite in XMATCH-TEST : <> < me : User | soln: 0 > createInterpreter(
274 interpreterManager, me, none) .
275 *********** rule
276 rl < X : User | AS > createdInterpreter(X, Y, Z) => < X : User | AS >
277 insertModule(Z, X, upModule('MATCH, true)) .
278 X --> me
279 AS --> soln: 0
280 Y --> interpreterManager
281 Z --> interpreter(0)
282 < me : User | soln: 0 > createdInterpreter(me, interpreterManager, interpreter(
283 0))
284 --->
285 < me : User | soln: 0 > insertModule(interpreter(0), me, upModule('MATCH,
286 true))
287 *********** equation
288 (built-in equation for symbol upModule)
289 upModule('MATCH, true)
290 --->
291 fmod 'MATCH is
292 nil
293 sorts 'Bool ; 'Foo ; 'Bar .
294 subsort 'Foo < 'Bar .
295 op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0)
296 special(
297 id-hook('BranchSymbol, nil)
298 term-hook('1, 'true.Bool)
299 term-hook('2, 'false.Bool))] .
300 op '_==_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
301 id-hook('EqualitySymbol, nil)
302 term-hook('equalTerm, 'true.Bool)
303 term-hook('notEqualTerm, 'false.Bool))] .
304 op '_=/=_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
305 id-hook('EqualitySymbol, nil)
306 term-hook('equalTerm, 'false.Bool)
307 term-hook('notEqualTerm, 'true.Bool))] .
308 op 'true : nil -> 'Bool [ctor special(
309 id-hook('SystemTrue, nil))] .
310 op 'false : nil -> 'Bool [ctor special(
311 id-hook('SystemFalse, nil))] .
312 op '_and_ : 'Bool 'Bool -> 'Bool [prec(55) assoc comm] .
313 op '_or_ : 'Bool 'Bool -> 'Bool [prec(59) assoc comm] .
314 op '_xor_ : 'Bool 'Bool -> 'Bool [prec(57) assoc comm] .
315 op 'not_ : 'Bool -> 'Bool [prec(53)] .
316 op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] .
317 op 'f : 'Bar 'Bar -> 'Bar [comm] .
318 op 'g : 'Foo -> 'Foo [none] .
319 op 'h : 'Foo -> 'Foo [none] .
320 op 'a : nil -> 'Foo [none] .
321 op 'b : nil -> 'Foo [none] .
322 op 'c : nil -> 'Foo [none] .
323 op 'd : nil -> 'Foo [none] .
324 op 'e : nil -> 'Foo [none] .
325 cmb 'f['X:Bar, 'Y:Bar] : 'Foo if 'h['X:Bar] = 'g['Y:Bar] [none] .
326 eq 'h['a.Foo] = 'b.Foo [none] .
327 eq 'g['c.Foo] = 'b.Foo [none] .
328 eq 'h['c.Foo] = 'd.Foo [none] .
329 eq 'g['a.Foo] = 'd.Foo [none] .
330 eq '_and_['true.Bool, 'A:Bool] = 'A:Bool [none] .
331 eq '_and_['false.Bool, 'A:Bool] = 'false.Bool [none] .
332 eq '_and_['A:Bool, 'A:Bool] = 'A:Bool [none] .
333 eq '_xor_['false.Bool, 'A:Bool] = 'A:Bool [none] .
334 eq '_xor_['A:Bool, 'A:Bool] = 'false.Bool [none] .
335 eq '_and_['A:Bool, '_xor_['B:Bool, 'C:Bool]] = '_xor_['_and_['A:Bool,
336 'B:Bool], '_and_['A:Bool, 'C:Bool]] [none] .
337 eq 'not_['A:Bool] = '_xor_['true.Bool, 'A:Bool] [none] .
338 eq '_or_['A:Bool, 'B:Bool] = '_xor_['_and_['A:Bool, 'B:Bool], '_xor_['A:Bool,
339 'B:Bool]] [none] .
340 eq '_implies_['A:Bool, 'B:Bool] = 'not_['_xor_['A:Bool, '_and_['A:Bool,
341 'B:Bool]]] [none] .
342 endfm
343 *********** rule
344 rl insertedModule(X, Y) < X : User | AS, soln: N > => < X : User | AS >
345 getXmatch(Y, X, 'MATCH, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0, unbounded, N) .
346 X --> me
347 Y --> interpreter(0)
348 AS --> (none).AttributeSet
349 N --> 0
350 insertedModule(me, interpreter(0)) < me : User | soln: 0 >
351 --->
352 < me : User | none > getXmatch(interpreter(0), me, 'MATCH, 'Z:Foo, 'f['a.Foo,
353 'c.Foo], nil, 0, unbounded, 0)
354 *********** trial #1
355 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
356 X:Bar --> a
357 Y:Bar --> c
358 *********** solving condition fragment
359 h(X:Bar) = g(Y:Bar)
360 *********** equation
361 eq h(a) = b .
362 empty substitution
363 h(a)
364 --->
365 b
366 *********** equation
367 eq g(c) = b .
368 empty substitution
369 g(c)
370 --->
371 b
372 *********** success for condition fragment
373 h(X:Bar) = g(Y:Bar)
374 X:Bar --> a
375 Y:Bar --> c
376 *********** success #1
377 *********** membership axiom
378 cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
379 X:Bar --> a
380 Y:Bar --> c
381 Bar: f(a, c) becomes Foo
382 rewrites: 6
383 mb applications: 1 equational rewrites: 3 rule rewrites: 2 variant narrowing
384 steps: 0 narrowing steps: 0
385 result Configuration: <> < me : User | none > gotXmatch(me, interpreter(0), 3,
386 'Z:Foo <- 'f['a.Foo, 'c.Foo], [])
387 Bye.