@tuprolog/arg2p 0.13.2 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2p-core.js +2267 -2267
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +442 -442
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +246 -246
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +152 -152
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +15 -15
- package/2p-parser-core.js +160 -160
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-js.js +1 -1
- package/2p-parser-theory.js +17 -17
- package/2p-solve-classic.js +869 -869
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve.js +3095 -3095
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1351 -1351
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +227 -227
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +323 -323
- package/2p-utils.js.map +1 -1
- package/arg2p-causality-solver.js +90 -90
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +1707 -1488
- package/arg2p-core.js.map +1 -1
- package/arg2p.js +89 -88
- package/arg2p.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +1784 -1225
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +1514 -1512
- package/kt-math.js.map +1 -1
- package/package.json +1 -1
package/2p-unify.js
CHANGED
|
@@ -19,61 +19,61 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
23
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
24
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
25
|
-
var plus = kotlin_kotlin.$_$.
|
|
26
|
-
var map = kotlin_kotlin.$_$.
|
|
27
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
22
|
+
var KProperty1 = kotlin_kotlin.$_$.h7;
|
|
23
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.x5;
|
|
24
|
+
var asSequence = kotlin_kotlin.$_$.z1;
|
|
25
|
+
var plus = kotlin_kotlin.$_$.k8;
|
|
26
|
+
var map = kotlin_kotlin.$_$.g8;
|
|
27
|
+
var Unit_instance = kotlin_kotlin.$_$.l1;
|
|
28
28
|
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
|
|
29
29
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
|
|
30
|
-
var toCollection = kotlin_kotlin.$_$.
|
|
31
|
-
var Pair = kotlin_kotlin.$_$.
|
|
30
|
+
var toCollection = kotlin_kotlin.$_$.t8;
|
|
31
|
+
var Pair = kotlin_kotlin.$_$.oa;
|
|
32
32
|
var VOID = kotlin_kotlin.$_$.b;
|
|
33
|
-
var lazy = kotlin_kotlin.$_$.
|
|
34
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
35
|
-
var asSequence_0 = kotlin_kotlin.$_$.
|
|
36
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
37
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
33
|
+
var lazy = kotlin_kotlin.$_$.wa;
|
|
34
|
+
var protoOf = kotlin_kotlin.$_$.n6;
|
|
35
|
+
var asSequence_0 = kotlin_kotlin.$_$.a2;
|
|
36
|
+
var THROW_CCE = kotlin_kotlin.$_$.qa;
|
|
37
|
+
var initMetadataForClass = kotlin_kotlin.$_$.a6;
|
|
38
38
|
var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
|
|
39
|
-
var Triple = kotlin_kotlin.$_$.
|
|
39
|
+
var Triple = kotlin_kotlin.$_$.sa;
|
|
40
40
|
var Some = kotlin_it_unibo_tuprolog_utils.$_$.l;
|
|
41
|
-
var zip = kotlin_kotlin.$_$.
|
|
42
|
-
var flatMap = kotlin_kotlin.$_$.
|
|
43
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
41
|
+
var zip = kotlin_kotlin.$_$.a9;
|
|
42
|
+
var flatMap = kotlin_kotlin.$_$.x7;
|
|
43
|
+
var sequenceOf = kotlin_kotlin.$_$.n8;
|
|
44
44
|
var to = kotlin_kotlin.$_$.cb;
|
|
45
|
-
var sequenceOf_0 = kotlin_kotlin.$_$.
|
|
46
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
47
|
-
var toString = kotlin_kotlin.$_$.
|
|
48
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
45
|
+
var sequenceOf_0 = kotlin_kotlin.$_$.m8;
|
|
46
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.b6;
|
|
47
|
+
var toString = kotlin_kotlin.$_$.q6;
|
|
48
|
+
var getKClass = kotlin_kotlin.$_$.f7;
|
|
49
49
|
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o;
|
|
50
50
|
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
|
|
51
51
|
var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
|
|
52
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
52
|
+
var defineProp = kotlin_kotlin.$_$.t5;
|
|
53
53
|
var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.u1;
|
|
54
54
|
var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
|
|
55
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
55
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.c2;
|
|
56
56
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.c;
|
|
57
57
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
58
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
58
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.c6;
|
|
59
59
|
//endregion
|
|
60
60
|
//region block: pre-declaration
|
|
61
61
|
function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
|
|
62
62
|
occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
|
|
63
|
-
return $super === VOID ? this.
|
|
63
|
+
return $super === VOID ? this.r1i(term1, term2, occurCheckEnabled) : $super.r1i.call(this, term1, term2, occurCheckEnabled);
|
|
64
64
|
}
|
|
65
65
|
function mgu(term1, term2) {
|
|
66
|
-
return this.
|
|
66
|
+
return this.r1i(term1, term2, true);
|
|
67
67
|
}
|
|
68
68
|
function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
69
|
-
return !(this.
|
|
69
|
+
return !(this.r1i(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
|
|
70
70
|
}
|
|
71
71
|
function match(term1, term2) {
|
|
72
72
|
return this.matchWithOccurCheck(term1, term2, true);
|
|
73
73
|
}
|
|
74
74
|
function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
75
|
-
var substitution = this.
|
|
76
|
-
return substitution.
|
|
75
|
+
var substitution = this.r1i(term1, term2, occurCheckEnabled);
|
|
76
|
+
return substitution.k11() ? null : term1.getSubstituted(substitution, []);
|
|
77
77
|
}
|
|
78
78
|
function unify(term1, term2) {
|
|
79
79
|
return this.unifyWithOccurCheck(term1, term2, true);
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
initMetadataForCompanion(Companion_0);
|
|
96
96
|
//endregion
|
|
97
97
|
function _get_contextEquations__x0dd77($this) {
|
|
98
|
-
var tmp0 = $this.
|
|
98
|
+
var tmp0 = $this.a1i_1;
|
|
99
99
|
var tmp = KProperty1;
|
|
100
100
|
// Inline function 'kotlin.getValue' call
|
|
101
101
|
getPropertyCallableRef('contextEquations', 1, tmp, AbstractUnificator$_get_contextEquations_$ref_7ajcte(), null);
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
}
|
|
104
104
|
function occurrenceCheck($this, variable, term) {
|
|
105
105
|
var tmp;
|
|
106
|
-
if (term.
|
|
107
|
-
tmp = $this.
|
|
108
|
-
} else if (term.
|
|
109
|
-
var tmp0 = term.
|
|
106
|
+
if (term.bw()) {
|
|
107
|
+
tmp = $this.b1i(variable, term);
|
|
108
|
+
} else if (term.lv()) {
|
|
109
|
+
var tmp0 = term.hv();
|
|
110
110
|
var tmp$ret$1;
|
|
111
111
|
$l$block: {
|
|
112
112
|
// Inline function 'kotlin.sequences.any' call
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
function equationsFor($this, term1, term2) {
|
|
130
130
|
var tmp = Companion_instance_0;
|
|
131
|
-
return tmp.
|
|
131
|
+
return tmp.c1i(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
|
|
132
132
|
}
|
|
133
133
|
function equationsFor_0($this, substitution1, substitution2) {
|
|
134
134
|
var tmp = Companion_instance_0;
|
|
@@ -163,26 +163,26 @@
|
|
|
163
163
|
var eqIterator = equations.b4();
|
|
164
164
|
while (eqIterator.s()) {
|
|
165
165
|
var eq = eqIterator.t();
|
|
166
|
-
if (eq.
|
|
166
|
+
if (eq.h1i()) {
|
|
167
167
|
return Companion_getInstance().failed();
|
|
168
|
-
} else if (eq.
|
|
168
|
+
} else if (eq.i1i()) {
|
|
169
169
|
eqIterator.c3();
|
|
170
170
|
changed = true;
|
|
171
|
-
} else if (eq.
|
|
172
|
-
var assignment = eq.
|
|
173
|
-
if (occurCheckEnabled && occurrenceCheck($this, assignment.
|
|
171
|
+
} else if (eq.p1i()) {
|
|
172
|
+
var assignment = eq.k1i();
|
|
173
|
+
if (occurCheckEnabled && occurrenceCheck($this, assignment.n1i_1, eq.g1i())) {
|
|
174
174
|
return Companion_getInstance().failed();
|
|
175
175
|
} else {
|
|
176
176
|
changed = changed || applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.r3());
|
|
177
177
|
}
|
|
178
|
-
} else if (eq.
|
|
178
|
+
} else if (eq.j1i()) {
|
|
179
179
|
eqIterator.c3();
|
|
180
|
-
var _iterator__ex2g4s = equationsFor($this, eq.
|
|
180
|
+
var _iterator__ex2g4s = equationsFor($this, eq.f1i(), eq.g1i()).p();
|
|
181
181
|
insertion: while (_iterator__ex2g4s.s()) {
|
|
182
182
|
var it = _iterator__ex2g4s.t();
|
|
183
|
-
if (it.
|
|
183
|
+
if (it.i1i())
|
|
184
184
|
continue insertion;
|
|
185
|
-
else if (it.
|
|
185
|
+
else if (it.h1i())
|
|
186
186
|
return Companion_getInstance().failed();
|
|
187
187
|
else {
|
|
188
188
|
eqIterator.u3(it);
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
var _iterator__ex2g4s_0 = equations.p();
|
|
199
199
|
while (_iterator__ex2g4s_0.s()) {
|
|
200
200
|
var element = _iterator__ex2g4s_0.t();
|
|
201
|
-
if (element.
|
|
201
|
+
if (element.p1i()) {
|
|
202
202
|
destination.m(element);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -209,19 +209,6 @@
|
|
|
209
209
|
var tmp$ret$0 = ArrayList_init_$Create$();
|
|
210
210
|
return toCollection(items, tmp$ret$0);
|
|
211
211
|
}
|
|
212
|
-
function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
|
|
213
|
-
if ($equations.w(i).k1h() || $equations.w(i).l1h())
|
|
214
|
-
return Unit_instance;
|
|
215
|
-
var currentEq = $equations.w(i);
|
|
216
|
-
var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
|
|
217
|
-
var newLhs = _destruct__k2r9zo.zb();
|
|
218
|
-
var newRhs = _destruct__k2r9zo.ac();
|
|
219
|
-
if (!currentEq.i1h().equals(newLhs) || !currentEq.j1h().equals(newRhs)) {
|
|
220
|
-
var tmp = Companion_instance_0;
|
|
221
|
-
$equations.z2(i, tmp.t1h(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
|
|
222
|
-
changed._v = true;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
212
|
function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
|
|
226
213
|
return function () {
|
|
227
214
|
return toEquations(this$0.h8());
|
|
@@ -234,7 +221,7 @@
|
|
|
234
221
|
}
|
|
235
222
|
function AbstractUnificator$checkTermsEquality$ref(p0) {
|
|
236
223
|
var l = function (_this__u8e3s4, p0_0) {
|
|
237
|
-
return p0.
|
|
224
|
+
return p0.b1i(_this__u8e3s4, p0_0);
|
|
238
225
|
};
|
|
239
226
|
l.callableName = 'checkTermsEquality';
|
|
240
227
|
return l;
|
|
@@ -245,22 +232,35 @@
|
|
|
245
232
|
}
|
|
246
233
|
function AbstractUnificator$checkTermsEquality$ref_0(p0) {
|
|
247
234
|
var l = function (_this__u8e3s4, p0_0) {
|
|
248
|
-
return p0.
|
|
235
|
+
return p0.b1i(_this__u8e3s4, p0_0);
|
|
249
236
|
};
|
|
250
237
|
l.callableName = 'checkTermsEquality';
|
|
251
238
|
return l;
|
|
252
239
|
}
|
|
240
|
+
function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
|
|
241
|
+
if ($equations.w(i).h1i() || $equations.w(i).i1i())
|
|
242
|
+
return Unit_instance;
|
|
243
|
+
var currentEq = $equations.w(i);
|
|
244
|
+
var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
|
|
245
|
+
var newLhs = _destruct__k2r9zo.zc();
|
|
246
|
+
var newRhs = _destruct__k2r9zo.ad();
|
|
247
|
+
if (!currentEq.f1i().equals(newLhs) || !currentEq.g1i().equals(newRhs)) {
|
|
248
|
+
var tmp = Companion_instance_0;
|
|
249
|
+
$equations.z2(i, tmp.q1i(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
|
|
250
|
+
changed._v = true;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
253
|
function AbstractUnificator(context) {
|
|
254
254
|
context = context === VOID ? Companion_getInstance().empty() : context;
|
|
255
|
-
this.
|
|
255
|
+
this.z1h_1 = context;
|
|
256
256
|
var tmp = this;
|
|
257
|
-
tmp.
|
|
257
|
+
tmp.a1i_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
|
|
258
258
|
}
|
|
259
259
|
protoOf(AbstractUnificator).h8 = function () {
|
|
260
|
-
return this.
|
|
260
|
+
return this.z1h_1;
|
|
261
261
|
};
|
|
262
|
-
protoOf(AbstractUnificator).
|
|
263
|
-
if (this.h8().
|
|
262
|
+
protoOf(AbstractUnificator).r1i = function (term1, term2, occurCheckEnabled) {
|
|
263
|
+
if (this.h8().k11())
|
|
264
264
|
return Companion_getInstance().failed();
|
|
265
265
|
var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
|
|
266
266
|
return mgu_0(this, equations, occurCheckEnabled);
|
|
@@ -268,12 +268,12 @@
|
|
|
268
268
|
protoOf(AbstractUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
269
269
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof AbstractUnificator) ? $super : THROW_CCE());
|
|
270
270
|
};
|
|
271
|
-
protoOf(AbstractUnificator).
|
|
272
|
-
if (this.h8().
|
|
271
|
+
protoOf(AbstractUnificator).s1i = function (substitution1, substitution2, occurCheckEnabled) {
|
|
272
|
+
if (this.h8().k11() || substitution1.k11() || substitution2.k11())
|
|
273
273
|
return Companion_getInstance().failed();
|
|
274
274
|
if (!occurCheckEnabled) {
|
|
275
275
|
var quickMerge = this.h8().plus(substitution1).plus(substitution2);
|
|
276
|
-
if (quickMerge.
|
|
276
|
+
if (quickMerge.j11()) {
|
|
277
277
|
return quickMerge;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
@@ -281,21 +281,21 @@
|
|
|
281
281
|
return mgu_0(this, equations, occurCheckEnabled);
|
|
282
282
|
};
|
|
283
283
|
protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
284
|
-
return this.
|
|
284
|
+
return this.s1i(substitution1, substitution2, occurCheckEnabled);
|
|
285
285
|
};
|
|
286
286
|
function CachedUnificator(decorated, cacheCapacity) {
|
|
287
|
-
this.
|
|
288
|
-
this.
|
|
287
|
+
this.t1i_1 = decorated;
|
|
288
|
+
this.u1i_1 = Companion_instance.up(cacheCapacity);
|
|
289
289
|
}
|
|
290
|
-
protoOf(CachedUnificator).
|
|
290
|
+
protoOf(CachedUnificator).r1i = function (term1, term2, occurCheckEnabled) {
|
|
291
291
|
var mguRequest = new Triple(term1, term2, occurCheckEnabled);
|
|
292
|
-
var cached = this.
|
|
292
|
+
var cached = this.u1i_1.h2(mguRequest);
|
|
293
293
|
var tmp;
|
|
294
294
|
if (cached instanceof Some) {
|
|
295
|
-
tmp = cached.
|
|
295
|
+
tmp = cached.xp_1;
|
|
296
296
|
} else {
|
|
297
|
-
var mguResult = this.
|
|
298
|
-
this.
|
|
297
|
+
var mguResult = this.t1i_1.r1i(term1, term2, occurCheckEnabled);
|
|
298
|
+
this.u1i_1.vp(mguRequest, mguResult);
|
|
299
299
|
tmp = mguResult;
|
|
300
300
|
}
|
|
301
301
|
return tmp;
|
|
@@ -303,21 +303,21 @@
|
|
|
303
303
|
protoOf(CachedUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
304
304
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof CachedUnificator) ? $super : THROW_CCE());
|
|
305
305
|
};
|
|
306
|
-
protoOf(CachedUnificator).
|
|
306
|
+
protoOf(CachedUnificator).s1i = function (substitution1, substitution2, occurCheckEnabled) {
|
|
307
307
|
var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
|
|
308
|
-
var cached = this.
|
|
308
|
+
var cached = this.u1i_1.h2(mguRequest);
|
|
309
309
|
var tmp;
|
|
310
310
|
if (cached instanceof Some) {
|
|
311
|
-
tmp = cached.
|
|
311
|
+
tmp = cached.xp_1;
|
|
312
312
|
} else {
|
|
313
|
-
var mguResult = this.
|
|
314
|
-
this.
|
|
313
|
+
var mguResult = this.t1i_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
|
|
314
|
+
this.u1i_1.vp(mguRequest, mguResult);
|
|
315
315
|
tmp = mguResult;
|
|
316
316
|
}
|
|
317
317
|
return tmp;
|
|
318
318
|
};
|
|
319
319
|
protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
320
|
-
return this.
|
|
320
|
+
return this.s1i(substitution1, substitution2, occurCheckEnabled);
|
|
321
321
|
};
|
|
322
322
|
function allOfLists($this, lhs, rhs, equalityChecker) {
|
|
323
323
|
var tmp = zip(lhs.unfold(), rhs.unfold());
|
|
@@ -350,7 +350,7 @@
|
|
|
350
350
|
}
|
|
351
351
|
function Equation$Companion$from$lambda($equalityChecker) {
|
|
352
352
|
return function (it) {
|
|
353
|
-
return Companion_instance_0.
|
|
353
|
+
return Companion_instance_0.v1i(it, $equalityChecker);
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
356
|
function Term$equals$ref_2() {
|
|
@@ -376,16 +376,16 @@
|
|
|
376
376
|
}
|
|
377
377
|
function Equation$Companion$allOfLists$lambda($equalityChecker) {
|
|
378
378
|
return function (_destruct__k2r9zo) {
|
|
379
|
-
var l = _destruct__k2r9zo.
|
|
380
|
-
var r = _destruct__k2r9zo.
|
|
381
|
-
return l.
|
|
379
|
+
var l = _destruct__k2r9zo.zc();
|
|
380
|
+
var r = _destruct__k2r9zo.ad();
|
|
381
|
+
return l.sv() && r.sv() ? sequenceOf(Companion_instance_0.q1i(l.castToCons().lx(), r.castToCons().lx(), $equalityChecker)) : l.rv() && r.rv() ? sequenceOf(Companion_instance_0.q1i(l.castToList(), r.castToList(), $equalityChecker)) : Companion_instance_0.c1i(l, r, $equalityChecker);
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function Equation$Companion$allOfTuples$lambda($equalityChecker) {
|
|
385
385
|
return function (_destruct__k2r9zo) {
|
|
386
|
-
var l = _destruct__k2r9zo.
|
|
387
|
-
var r = _destruct__k2r9zo.
|
|
388
|
-
return l.
|
|
386
|
+
var l = _destruct__k2r9zo.zc();
|
|
387
|
+
var r = _destruct__k2r9zo.ad();
|
|
388
|
+
return l.qv() && r.qv() ? sequenceOf(Companion_instance_0.q1i(l.castToTuple().zw(), r.castToTuple().zw(), $equalityChecker)) : Companion_instance_0.c1i(l, r, $equalityChecker);
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
391
|
function Term$equals$ref_5() {
|
|
@@ -397,29 +397,29 @@
|
|
|
397
397
|
}
|
|
398
398
|
function Equation$Companion$allOf$lambda($equalityChecker) {
|
|
399
399
|
return function (it) {
|
|
400
|
-
return Companion_instance_0.
|
|
400
|
+
return Companion_instance_0.v1i(it, $equalityChecker);
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
403
|
function Identity(lhs, rhs) {
|
|
404
404
|
Equation.call(this, lhs, rhs);
|
|
405
|
-
this.
|
|
406
|
-
this.
|
|
405
|
+
this.y1i_1 = lhs;
|
|
406
|
+
this.z1i_1 = rhs;
|
|
407
407
|
}
|
|
408
|
-
protoOf(Identity).
|
|
409
|
-
return this.
|
|
408
|
+
protoOf(Identity).f1i = function () {
|
|
409
|
+
return this.y1i_1;
|
|
410
410
|
};
|
|
411
|
-
protoOf(Identity).
|
|
412
|
-
return this.
|
|
411
|
+
protoOf(Identity).g1i = function () {
|
|
412
|
+
return this.z1i_1;
|
|
413
413
|
};
|
|
414
|
-
protoOf(Identity).
|
|
414
|
+
protoOf(Identity).i1i = function () {
|
|
415
415
|
return true;
|
|
416
416
|
};
|
|
417
417
|
protoOf(Identity).toString = function () {
|
|
418
|
-
return 'Identity(lhs=' + this.
|
|
418
|
+
return 'Identity(lhs=' + this.y1i_1.toString() + ', rhs=' + this.z1i_1.toString() + ')';
|
|
419
419
|
};
|
|
420
420
|
protoOf(Identity).hashCode = function () {
|
|
421
|
-
var result = this.
|
|
422
|
-
result = imul(result, 31) + this.
|
|
421
|
+
var result = this.y1i_1.hashCode();
|
|
422
|
+
result = imul(result, 31) + this.z1i_1.hashCode() | 0;
|
|
423
423
|
return result;
|
|
424
424
|
};
|
|
425
425
|
protoOf(Identity).equals = function (other) {
|
|
@@ -427,44 +427,44 @@
|
|
|
427
427
|
return true;
|
|
428
428
|
if (!(other instanceof Identity))
|
|
429
429
|
return false;
|
|
430
|
-
if (!this.
|
|
430
|
+
if (!this.y1i_1.equals(other.y1i_1))
|
|
431
431
|
return false;
|
|
432
|
-
if (!this.
|
|
432
|
+
if (!this.z1i_1.equals(other.z1i_1))
|
|
433
433
|
return false;
|
|
434
434
|
return true;
|
|
435
435
|
};
|
|
436
436
|
function Assignment(lhs, rhs) {
|
|
437
437
|
Equation.call(this, lhs, rhs);
|
|
438
|
-
this.
|
|
439
|
-
this.
|
|
438
|
+
this.n1i_1 = lhs;
|
|
439
|
+
this.o1i_1 = rhs;
|
|
440
440
|
}
|
|
441
|
-
protoOf(Assignment).
|
|
442
|
-
return this.
|
|
441
|
+
protoOf(Assignment).f1i = function () {
|
|
442
|
+
return this.n1i_1;
|
|
443
443
|
};
|
|
444
|
-
protoOf(Assignment).
|
|
445
|
-
return this.
|
|
444
|
+
protoOf(Assignment).g1i = function () {
|
|
445
|
+
return this.o1i_1;
|
|
446
446
|
};
|
|
447
447
|
protoOf(Assignment).toSubstitution = function () {
|
|
448
|
-
return Companion_getInstance().unifier(this.
|
|
448
|
+
return Companion_getInstance().unifier(this.n1i_1, this.o1i_1);
|
|
449
449
|
};
|
|
450
|
-
protoOf(Assignment).
|
|
451
|
-
return to(this.
|
|
450
|
+
protoOf(Assignment).c1j = function () {
|
|
451
|
+
return to(this.n1i_1, this.o1i_1);
|
|
452
452
|
};
|
|
453
453
|
protoOf(Assignment).toPair = function () {
|
|
454
|
-
return this.
|
|
454
|
+
return this.c1j();
|
|
455
455
|
};
|
|
456
|
-
protoOf(Assignment).
|
|
456
|
+
protoOf(Assignment).p1i = function () {
|
|
457
457
|
return true;
|
|
458
458
|
};
|
|
459
|
-
protoOf(Assignment).
|
|
459
|
+
protoOf(Assignment).a1j = function () {
|
|
460
460
|
return this;
|
|
461
461
|
};
|
|
462
462
|
protoOf(Assignment).toString = function () {
|
|
463
|
-
return 'Assignment(lhs=' + this.
|
|
463
|
+
return 'Assignment(lhs=' + this.n1i_1.toString() + ', rhs=' + this.o1i_1.toString() + ')';
|
|
464
464
|
};
|
|
465
465
|
protoOf(Assignment).hashCode = function () {
|
|
466
|
-
var result = this.
|
|
467
|
-
result = imul(result, 31) + this.
|
|
466
|
+
var result = this.n1i_1.hashCode();
|
|
467
|
+
result = imul(result, 31) + this.o1i_1.hashCode() | 0;
|
|
468
468
|
return result;
|
|
469
469
|
};
|
|
470
470
|
protoOf(Assignment).equals = function (other) {
|
|
@@ -472,32 +472,32 @@
|
|
|
472
472
|
return true;
|
|
473
473
|
if (!(other instanceof Assignment))
|
|
474
474
|
return false;
|
|
475
|
-
if (!this.
|
|
475
|
+
if (!this.n1i_1.equals(other.n1i_1))
|
|
476
476
|
return false;
|
|
477
|
-
if (!this.
|
|
477
|
+
if (!this.o1i_1.equals(other.o1i_1))
|
|
478
478
|
return false;
|
|
479
479
|
return true;
|
|
480
480
|
};
|
|
481
481
|
function Comparison(lhs, rhs) {
|
|
482
482
|
Equation.call(this, lhs, rhs);
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
483
|
+
this.f1j_1 = lhs;
|
|
484
|
+
this.g1j_1 = rhs;
|
|
485
485
|
}
|
|
486
|
-
protoOf(Comparison).
|
|
487
|
-
return this.
|
|
486
|
+
protoOf(Comparison).f1i = function () {
|
|
487
|
+
return this.f1j_1;
|
|
488
488
|
};
|
|
489
|
-
protoOf(Comparison).
|
|
490
|
-
return this.
|
|
489
|
+
protoOf(Comparison).g1i = function () {
|
|
490
|
+
return this.g1j_1;
|
|
491
491
|
};
|
|
492
|
-
protoOf(Comparison).
|
|
492
|
+
protoOf(Comparison).j1i = function () {
|
|
493
493
|
return true;
|
|
494
494
|
};
|
|
495
495
|
protoOf(Comparison).toString = function () {
|
|
496
|
-
return 'Comparison(lhs=' + this.
|
|
496
|
+
return 'Comparison(lhs=' + this.f1j_1.toString() + ', rhs=' + this.g1j_1.toString() + ')';
|
|
497
497
|
};
|
|
498
498
|
protoOf(Comparison).hashCode = function () {
|
|
499
|
-
var result = this.
|
|
500
|
-
result = imul(result, 31) + this.
|
|
499
|
+
var result = this.f1j_1.hashCode();
|
|
500
|
+
result = imul(result, 31) + this.g1j_1.hashCode() | 0;
|
|
501
501
|
return result;
|
|
502
502
|
};
|
|
503
503
|
protoOf(Comparison).equals = function (other) {
|
|
@@ -505,32 +505,32 @@
|
|
|
505
505
|
return true;
|
|
506
506
|
if (!(other instanceof Comparison))
|
|
507
507
|
return false;
|
|
508
|
-
if (!this.
|
|
508
|
+
if (!this.f1j_1.equals(other.f1j_1))
|
|
509
509
|
return false;
|
|
510
|
-
if (!this.
|
|
510
|
+
if (!this.g1j_1.equals(other.g1j_1))
|
|
511
511
|
return false;
|
|
512
512
|
return true;
|
|
513
513
|
};
|
|
514
514
|
function Contradiction(lhs, rhs) {
|
|
515
515
|
Equation.call(this, lhs, rhs);
|
|
516
|
-
this.
|
|
517
|
-
this.
|
|
516
|
+
this.j1j_1 = lhs;
|
|
517
|
+
this.k1j_1 = rhs;
|
|
518
518
|
}
|
|
519
|
-
protoOf(Contradiction).
|
|
520
|
-
return this.
|
|
519
|
+
protoOf(Contradiction).f1i = function () {
|
|
520
|
+
return this.j1j_1;
|
|
521
521
|
};
|
|
522
|
-
protoOf(Contradiction).
|
|
523
|
-
return this.
|
|
522
|
+
protoOf(Contradiction).g1i = function () {
|
|
523
|
+
return this.k1j_1;
|
|
524
524
|
};
|
|
525
|
-
protoOf(Contradiction).
|
|
525
|
+
protoOf(Contradiction).h1i = function () {
|
|
526
526
|
return true;
|
|
527
527
|
};
|
|
528
528
|
protoOf(Contradiction).toString = function () {
|
|
529
|
-
return 'Contradiction(lhs=' + this.
|
|
529
|
+
return 'Contradiction(lhs=' + this.j1j_1.toString() + ', rhs=' + this.k1j_1.toString() + ')';
|
|
530
530
|
};
|
|
531
531
|
protoOf(Contradiction).hashCode = function () {
|
|
532
|
-
var result = this.
|
|
533
|
-
result = imul(result, 31) + this.
|
|
532
|
+
var result = this.j1j_1.hashCode();
|
|
533
|
+
result = imul(result, 31) + this.k1j_1.hashCode() | 0;
|
|
534
534
|
return result;
|
|
535
535
|
};
|
|
536
536
|
protoOf(Contradiction).equals = function (other) {
|
|
@@ -538,17 +538,17 @@
|
|
|
538
538
|
return true;
|
|
539
539
|
if (!(other instanceof Contradiction))
|
|
540
540
|
return false;
|
|
541
|
-
if (!this.
|
|
541
|
+
if (!this.j1j_1.equals(other.j1j_1))
|
|
542
542
|
return false;
|
|
543
|
-
if (!this.
|
|
543
|
+
if (!this.k1j_1.equals(other.k1j_1))
|
|
544
544
|
return false;
|
|
545
545
|
return true;
|
|
546
546
|
};
|
|
547
547
|
function Companion() {
|
|
548
548
|
}
|
|
549
|
-
protoOf(Companion).
|
|
549
|
+
protoOf(Companion).q1i = function (lhs, rhs, equalityChecker) {
|
|
550
550
|
var tmp;
|
|
551
|
-
if (lhs.
|
|
551
|
+
if (lhs.bw() && rhs.bw()) {
|
|
552
552
|
var tmp_0;
|
|
553
553
|
if (equalityChecker(lhs, rhs)) {
|
|
554
554
|
tmp_0 = new Identity(lhs, rhs);
|
|
@@ -556,11 +556,11 @@
|
|
|
556
556
|
tmp_0 = new Assignment(lhs.castToVar(), rhs);
|
|
557
557
|
}
|
|
558
558
|
tmp = tmp_0;
|
|
559
|
-
} else if (lhs.
|
|
559
|
+
} else if (lhs.bw()) {
|
|
560
560
|
tmp = new Assignment(lhs.castToVar(), rhs);
|
|
561
|
-
} else if (rhs.
|
|
561
|
+
} else if (rhs.bw()) {
|
|
562
562
|
tmp = new Assignment(rhs.castToVar(), lhs);
|
|
563
|
-
} else if (lhs.
|
|
563
|
+
} else if (lhs.ew() && rhs.ew()) {
|
|
564
564
|
var tmp_1;
|
|
565
565
|
if (equalityChecker(lhs, rhs)) {
|
|
566
566
|
tmp_1 = new Identity(lhs, rhs);
|
|
@@ -568,13 +568,13 @@
|
|
|
568
568
|
tmp_1 = new Contradiction(lhs, rhs);
|
|
569
569
|
}
|
|
570
570
|
tmp = tmp_1;
|
|
571
|
-
} else if (lhs.
|
|
571
|
+
} else if (lhs.ew() || rhs.ew()) {
|
|
572
572
|
tmp = new Contradiction(lhs, rhs);
|
|
573
|
-
} else if (lhs.
|
|
573
|
+
} else if (lhs.lv() && rhs.lv()) {
|
|
574
574
|
var lhsStruct = lhs.castToStruct();
|
|
575
575
|
var rhsStruct = rhs.castToStruct();
|
|
576
576
|
var tmp_2;
|
|
577
|
-
if (!(lhsStruct.
|
|
577
|
+
if (!(lhsStruct.zu() === rhsStruct.zu()) || !(lhsStruct.fv() === rhsStruct.fv())) {
|
|
578
578
|
tmp_2 = new Contradiction(lhsStruct, rhsStruct);
|
|
579
579
|
} else {
|
|
580
580
|
tmp_2 = new Comparison(lhsStruct, rhsStruct);
|
|
@@ -593,10 +593,10 @@
|
|
|
593
593
|
tmp = equalityChecker;
|
|
594
594
|
}
|
|
595
595
|
equalityChecker = tmp;
|
|
596
|
-
return $super === VOID ? this.
|
|
596
|
+
return $super === VOID ? this.q1i(lhs, rhs, equalityChecker) : $super.q1i.call(this, lhs, rhs, equalityChecker);
|
|
597
597
|
};
|
|
598
|
-
protoOf(Companion).
|
|
599
|
-
return this.
|
|
598
|
+
protoOf(Companion).l1j = function (pair, equalityChecker) {
|
|
599
|
+
return this.q1i(pair.first, pair.second, equalityChecker);
|
|
600
600
|
};
|
|
601
601
|
protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
|
|
602
602
|
var tmp;
|
|
@@ -606,9 +606,9 @@
|
|
|
606
606
|
tmp = equalityChecker;
|
|
607
607
|
}
|
|
608
608
|
equalityChecker = tmp;
|
|
609
|
-
return $super === VOID ? this.
|
|
609
|
+
return $super === VOID ? this.l1j(pair, equalityChecker) : $super.l1j.call(this, pair, equalityChecker);
|
|
610
610
|
};
|
|
611
|
-
protoOf(Companion).
|
|
611
|
+
protoOf(Companion).m1j = function (pairs, equalityChecker) {
|
|
612
612
|
return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
|
|
613
613
|
};
|
|
614
614
|
protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
|
|
@@ -619,10 +619,10 @@
|
|
|
619
619
|
tmp = equalityChecker;
|
|
620
620
|
}
|
|
621
621
|
equalityChecker = tmp;
|
|
622
|
-
return $super === VOID ? this.
|
|
622
|
+
return $super === VOID ? this.m1j(pairs, equalityChecker) : $super.m1j.call(this, pairs, equalityChecker);
|
|
623
623
|
};
|
|
624
|
-
protoOf(Companion).
|
|
625
|
-
return this.
|
|
624
|
+
protoOf(Companion).n1j = function (pairs, equalityChecker) {
|
|
625
|
+
return this.m1j(asSequence_0(pairs), equalityChecker);
|
|
626
626
|
};
|
|
627
627
|
protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
|
|
628
628
|
var tmp;
|
|
@@ -632,10 +632,10 @@
|
|
|
632
632
|
tmp = equalityChecker;
|
|
633
633
|
}
|
|
634
634
|
equalityChecker = tmp;
|
|
635
|
-
return $super === VOID ? this.
|
|
635
|
+
return $super === VOID ? this.n1j(pairs, equalityChecker) : $super.n1j.call(this, pairs, equalityChecker);
|
|
636
636
|
};
|
|
637
|
-
protoOf(Companion).
|
|
638
|
-
return this.
|
|
637
|
+
protoOf(Companion).o1j = function (pairs, equalityChecker) {
|
|
638
|
+
return this.m1j(sequenceOf_0(pairs.slice()), equalityChecker);
|
|
639
639
|
};
|
|
640
640
|
protoOf(Companion).from = function (pairs, equalityChecker, $super) {
|
|
641
641
|
var tmp;
|
|
@@ -645,10 +645,10 @@
|
|
|
645
645
|
tmp = equalityChecker;
|
|
646
646
|
}
|
|
647
647
|
equalityChecker = tmp;
|
|
648
|
-
return $super === VOID ? this.
|
|
648
|
+
return $super === VOID ? this.o1j(pairs, equalityChecker) : $super.o1j.call(this, pairs, equalityChecker);
|
|
649
649
|
};
|
|
650
|
-
protoOf(Companion).
|
|
651
|
-
return this.
|
|
650
|
+
protoOf(Companion).v1i = function (pair, equalityChecker) {
|
|
651
|
+
return this.c1i(pair.first, pair.second, equalityChecker);
|
|
652
652
|
};
|
|
653
653
|
protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
|
|
654
654
|
var tmp;
|
|
@@ -658,29 +658,29 @@
|
|
|
658
658
|
tmp = equalityChecker;
|
|
659
659
|
}
|
|
660
660
|
equalityChecker = tmp;
|
|
661
|
-
return $super === VOID ? this.
|
|
661
|
+
return $super === VOID ? this.v1i(pair, equalityChecker) : $super.v1i.call(this, pair, equalityChecker);
|
|
662
662
|
};
|
|
663
|
-
protoOf(Companion).
|
|
663
|
+
protoOf(Companion).c1i = function (lhs, rhs, equalityChecker) {
|
|
664
664
|
var tmp;
|
|
665
|
-
if (lhs.
|
|
666
|
-
tmp = sequenceOf(this.
|
|
667
|
-
} else if (lhs.
|
|
665
|
+
if (lhs.av() && rhs.av()) {
|
|
666
|
+
tmp = sequenceOf(this.q1i(lhs, rhs, equalityChecker));
|
|
667
|
+
} else if (lhs.rv() && rhs.rv()) {
|
|
668
668
|
tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
|
|
669
|
-
} else if (lhs.
|
|
669
|
+
} else if (lhs.qv() && rhs.qv()) {
|
|
670
670
|
tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
|
|
671
|
-
} else if (lhs.
|
|
671
|
+
} else if (lhs.lv() && rhs.lv()) {
|
|
672
672
|
var lhsStruct = lhs.castToStruct();
|
|
673
673
|
var rhsStruct = rhs.castToStruct();
|
|
674
674
|
var tmp_0;
|
|
675
|
-
if (lhsStruct.
|
|
676
|
-
var tmp_1 = zip(lhsStruct.
|
|
675
|
+
if (lhsStruct.zu() === rhsStruct.zu() && lhsStruct.fv() === rhsStruct.fv()) {
|
|
676
|
+
var tmp_1 = zip(lhsStruct.yv(), rhsStruct.yv());
|
|
677
677
|
tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
|
|
678
678
|
} else {
|
|
679
|
-
tmp_0 = sequenceOf(this.
|
|
679
|
+
tmp_0 = sequenceOf(this.q1i(lhs, rhs, equalityChecker));
|
|
680
680
|
}
|
|
681
681
|
tmp = tmp_0;
|
|
682
682
|
} else {
|
|
683
|
-
tmp = sequenceOf(this.
|
|
683
|
+
tmp = sequenceOf(this.q1i(lhs, rhs, equalityChecker));
|
|
684
684
|
}
|
|
685
685
|
return tmp;
|
|
686
686
|
};
|
|
@@ -692,7 +692,7 @@
|
|
|
692
692
|
tmp = equalityChecker;
|
|
693
693
|
}
|
|
694
694
|
equalityChecker = tmp;
|
|
695
|
-
return $super === VOID ? this.
|
|
695
|
+
return $super === VOID ? this.c1i(lhs, rhs, equalityChecker) : $super.c1i.call(this, lhs, rhs, equalityChecker);
|
|
696
696
|
};
|
|
697
697
|
var Companion_instance_0;
|
|
698
698
|
function Companion_getInstance_1() {
|
|
@@ -706,26 +706,26 @@
|
|
|
706
706
|
return l;
|
|
707
707
|
}
|
|
708
708
|
function Equation(lhs, rhs) {
|
|
709
|
-
this.
|
|
710
|
-
this.
|
|
709
|
+
this.d1i_1 = lhs;
|
|
710
|
+
this.e1i_1 = rhs;
|
|
711
711
|
}
|
|
712
|
-
protoOf(Equation).
|
|
713
|
-
return this.
|
|
712
|
+
protoOf(Equation).f1i = function () {
|
|
713
|
+
return this.d1i_1;
|
|
714
714
|
};
|
|
715
|
-
protoOf(Equation).
|
|
716
|
-
return this.
|
|
715
|
+
protoOf(Equation).g1i = function () {
|
|
716
|
+
return this.e1i_1;
|
|
717
717
|
};
|
|
718
|
-
protoOf(Equation).
|
|
718
|
+
protoOf(Equation).i1i = function () {
|
|
719
719
|
return false;
|
|
720
720
|
};
|
|
721
|
-
protoOf(Equation).
|
|
721
|
+
protoOf(Equation).p1i = function () {
|
|
722
722
|
return false;
|
|
723
723
|
};
|
|
724
|
-
protoOf(Equation).
|
|
724
|
+
protoOf(Equation).a1j = function () {
|
|
725
725
|
return null;
|
|
726
726
|
};
|
|
727
|
-
protoOf(Equation).
|
|
728
|
-
var tmp0_elvis_lhs = this.
|
|
727
|
+
protoOf(Equation).k1i = function () {
|
|
728
|
+
var tmp0_elvis_lhs = this.a1j();
|
|
729
729
|
var tmp;
|
|
730
730
|
if (tmp0_elvis_lhs == null) {
|
|
731
731
|
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).b9());
|
|
@@ -734,26 +734,26 @@
|
|
|
734
734
|
}
|
|
735
735
|
return tmp;
|
|
736
736
|
};
|
|
737
|
-
protoOf(Equation).
|
|
737
|
+
protoOf(Equation).j1i = function () {
|
|
738
738
|
return false;
|
|
739
739
|
};
|
|
740
|
-
protoOf(Equation).
|
|
740
|
+
protoOf(Equation).h1i = function () {
|
|
741
741
|
return false;
|
|
742
742
|
};
|
|
743
|
-
protoOf(Equation).
|
|
744
|
-
return Companion_getInstance_0().of('=', [this.
|
|
743
|
+
protoOf(Equation).i1h = function () {
|
|
744
|
+
return Companion_getInstance_0().of('=', [this.f1i(), this.g1i()]);
|
|
745
745
|
};
|
|
746
746
|
protoOf(Equation).toTerm = function () {
|
|
747
|
-
return this.
|
|
747
|
+
return this.i1h();
|
|
748
748
|
};
|
|
749
749
|
protoOf(Equation).toPair = function () {
|
|
750
|
-
return new Pair(this.
|
|
750
|
+
return new Pair(this.f1i(), this.g1i());
|
|
751
751
|
};
|
|
752
752
|
protoOf(Equation).swap = function () {
|
|
753
|
-
return Companion_instance_0.of(this.
|
|
753
|
+
return Companion_instance_0.of(this.g1i(), this.f1i());
|
|
754
754
|
};
|
|
755
|
-
protoOf(Equation).
|
|
756
|
-
return Companion_instance_0.
|
|
755
|
+
protoOf(Equation).b1j = function (substitution, equalityChecker) {
|
|
756
|
+
return Companion_instance_0.q1i(this.f1i().getSubstituted(substitution, []), this.g1i().getSubstituted(substitution, []), equalityChecker);
|
|
757
757
|
};
|
|
758
758
|
protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
|
|
759
759
|
var tmp;
|
|
@@ -763,11 +763,11 @@
|
|
|
763
763
|
tmp = equalityChecker;
|
|
764
764
|
}
|
|
765
765
|
equalityChecker = tmp;
|
|
766
|
-
return $super === VOID ? this.
|
|
766
|
+
return $super === VOID ? this.b1j(substitution, equalityChecker) : $super.b1j.call(this, substitution, equalityChecker);
|
|
767
767
|
};
|
|
768
768
|
function toEquations(_this__u8e3s4) {
|
|
769
769
|
// Inline function 'kotlin.collections.map' call
|
|
770
|
-
var this_0 = _this__u8e3s4.
|
|
770
|
+
var this_0 = _this__u8e3s4.f1();
|
|
771
771
|
// Inline function 'kotlin.collections.mapTo' call
|
|
772
772
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
773
773
|
var _iterator__ex2g4s = this_0.p();
|
|
@@ -789,12 +789,12 @@
|
|
|
789
789
|
}
|
|
790
790
|
function toAssignmentPair(_this__u8e3s4) {
|
|
791
791
|
var tmp;
|
|
792
|
-
if (_this__u8e3s4.
|
|
793
|
-
tmp = _this__u8e3s4.
|
|
794
|
-
} else if (_this__u8e3s4.
|
|
795
|
-
tmp = to(_this__u8e3s4.
|
|
796
|
-
} else if (_this__u8e3s4.
|
|
797
|
-
tmp = to(_this__u8e3s4.
|
|
792
|
+
if (_this__u8e3s4.p1i()) {
|
|
793
|
+
tmp = _this__u8e3s4.k1i().c1j();
|
|
794
|
+
} else if (_this__u8e3s4.f1i().bw()) {
|
|
795
|
+
tmp = to(_this__u8e3s4.f1i().castToVar(), _this__u8e3s4.g1i());
|
|
796
|
+
} else if (_this__u8e3s4.g1i().bw()) {
|
|
797
|
+
tmp = to(_this__u8e3s4.g1i().castToVar(), _this__u8e3s4.f1i());
|
|
798
798
|
} else {
|
|
799
799
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(_this__u8e3s4));
|
|
800
800
|
}
|
|
@@ -808,18 +808,18 @@
|
|
|
808
808
|
}
|
|
809
809
|
function Unificator$Companion$_get_default_$ref_8i2tx3() {
|
|
810
810
|
return function (p0) {
|
|
811
|
-
return p0.
|
|
811
|
+
return p0.r1j();
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
814
|
function Unificator$Companion$naive$1($context) {
|
|
815
815
|
AbstractUnificator.call(this, $context);
|
|
816
816
|
}
|
|
817
|
-
protoOf(Unificator$Companion$naive$1).
|
|
817
|
+
protoOf(Unificator$Companion$naive$1).b1i = function (first, second) {
|
|
818
818
|
var tmp;
|
|
819
|
-
if (first.
|
|
820
|
-
tmp = first.castToInteger().e2().
|
|
821
|
-
} else if (first.
|
|
822
|
-
tmp = first.castToNumeric().
|
|
819
|
+
if (first.gw() && second.gw()) {
|
|
820
|
+
tmp = first.castToInteger().e2().bk(second.castToInteger().e2()) === 0;
|
|
821
|
+
} else if (first.fw() && second.fw()) {
|
|
822
|
+
tmp = first.castToNumeric().vz().sj(second.castToNumeric().vz()) === 0;
|
|
823
823
|
} else {
|
|
824
824
|
tmp = first.equals(second);
|
|
825
825
|
}
|
|
@@ -831,7 +831,7 @@
|
|
|
831
831
|
function Unificator$Companion$strict$1($context) {
|
|
832
832
|
AbstractUnificator.call(this, $context);
|
|
833
833
|
}
|
|
834
|
-
protoOf(Unificator$Companion$strict$1).
|
|
834
|
+
protoOf(Unificator$Companion$strict$1).b1i = function (first, second) {
|
|
835
835
|
return first.equals(second);
|
|
836
836
|
};
|
|
837
837
|
protoOf(Unificator$Companion$strict$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
@@ -840,27 +840,27 @@
|
|
|
840
840
|
function Companion_0() {
|
|
841
841
|
Companion_instance_1 = this;
|
|
842
842
|
var tmp = this;
|
|
843
|
-
tmp.
|
|
844
|
-
this.
|
|
843
|
+
tmp.p1j_1 = lazy(Unificator$Companion$default$delegate$lambda);
|
|
844
|
+
this.q1j_1 = 32;
|
|
845
845
|
}
|
|
846
|
-
protoOf(Companion_0).
|
|
847
|
-
var tmp0 = this.
|
|
846
|
+
protoOf(Companion_0).r1j = function () {
|
|
847
|
+
var tmp0 = this.p1j_1;
|
|
848
848
|
var tmp = KProperty1;
|
|
849
849
|
// Inline function 'kotlin.getValue' call
|
|
850
850
|
getPropertyCallableRef('default', 1, tmp, Unificator$Companion$_get_default_$ref_8i2tx3(), null);
|
|
851
851
|
return tmp0.e2();
|
|
852
852
|
};
|
|
853
853
|
protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
|
|
854
|
-
return this.
|
|
854
|
+
return this.r1j().mgu(_this__u8e3s4, other);
|
|
855
855
|
};
|
|
856
856
|
protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
|
|
857
|
-
return this.
|
|
857
|
+
return this.r1j().match(_this__u8e3s4, other);
|
|
858
858
|
};
|
|
859
859
|
protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
|
|
860
|
-
return this.
|
|
860
|
+
return this.r1j().unify(_this__u8e3s4, other);
|
|
861
861
|
};
|
|
862
862
|
protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
|
|
863
|
-
return this.
|
|
863
|
+
return this.r1j().merge(_this__u8e3s4, other);
|
|
864
864
|
};
|
|
865
865
|
protoOf(Companion_0).naiveWithContext = function (context) {
|
|
866
866
|
return new Unificator$Companion$naive$1(context);
|
|
@@ -874,10 +874,10 @@
|
|
|
874
874
|
protoOf(Companion_0).strict = function () {
|
|
875
875
|
return this.strictWithContext(Companion_getInstance().empty());
|
|
876
876
|
};
|
|
877
|
-
protoOf(Companion_0).
|
|
877
|
+
protoOf(Companion_0).w1j = function (other, capacity) {
|
|
878
878
|
var tmp;
|
|
879
879
|
if (other instanceof CachedUnificator) {
|
|
880
|
-
tmp = new CachedUnificator(other.
|
|
880
|
+
tmp = new CachedUnificator(other.t1i_1, capacity);
|
|
881
881
|
} else {
|
|
882
882
|
tmp = new CachedUnificator(other, capacity);
|
|
883
883
|
}
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
};
|
|
886
886
|
protoOf(Companion_0).cached = function (other, capacity, $super) {
|
|
887
887
|
capacity = capacity === VOID ? 32 : capacity;
|
|
888
|
-
return $super === VOID ? this.
|
|
888
|
+
return $super === VOID ? this.w1j(other, capacity) : $super.w1j.call(this, other, capacity);
|
|
889
889
|
};
|
|
890
890
|
var Companion_instance_1;
|
|
891
891
|
function Companion_getInstance_2() {
|
|
@@ -910,14 +910,14 @@
|
|
|
910
910
|
protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
|
|
911
911
|
protoOf(CachedUnificator).unify = unify;
|
|
912
912
|
protoOf(CachedUnificator).merge = merge;
|
|
913
|
-
protoOf(Equation).
|
|
913
|
+
protoOf(Equation).eq = castTo;
|
|
914
914
|
defineProp(protoOf(Equation), 'lhs', function () {
|
|
915
|
-
return this.
|
|
915
|
+
return this.f1i();
|
|
916
916
|
});
|
|
917
917
|
defineProp(protoOf(Equation), 'rhs', function () {
|
|
918
|
-
return this.
|
|
918
|
+
return this.g1i();
|
|
919
919
|
});
|
|
920
|
-
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).
|
|
920
|
+
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).r1j);
|
|
921
921
|
//endregion
|
|
922
922
|
//region block: init
|
|
923
923
|
Companion_instance_0 = new Companion();
|