@tuprolog/arg2p-core 0.9.0 → 0.10.0
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 +2731 -2785
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +5 -1620
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +5 -949
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +5 -796
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +5 -69
- package/2p-dsl-unify.js.map +1 -1
- package/2p-parser-core.js +5 -1264
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-js.js +5 -29
- package/2p-parser-js.js.map +1 -1
- package/2p-parser-theory.js +5 -146
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve-classic.js +1027 -1034
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve.js +4051 -4409
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1634 -1649
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +252 -259
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +455 -542
- package/2p-utils.js.map +1 -1
- package/arg2p-core.js +6 -4823
- package/arg2p-core.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2047 -2732
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +2218 -2222
- package/kt-math.js.map +1 -1
- package/package.json +1 -1
package/2p-unify.js
CHANGED
|
@@ -19,60 +19,55 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
23
|
-
var plus = kotlin_kotlin.$_$.
|
|
24
|
-
var map = kotlin_kotlin.$_$.
|
|
25
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
26
|
-
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.
|
|
22
|
+
var asSequence = kotlin_kotlin.$_$.c2;
|
|
23
|
+
var plus = kotlin_kotlin.$_$.l7;
|
|
24
|
+
var map = kotlin_kotlin.$_$.h7;
|
|
25
|
+
var Unit_instance = kotlin_kotlin.$_$.r1;
|
|
26
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.r;
|
|
27
27
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
|
|
28
|
-
var toCollection = kotlin_kotlin.$_$.
|
|
29
|
-
var Pair = kotlin_kotlin.$_$.
|
|
28
|
+
var toCollection = kotlin_kotlin.$_$.r7;
|
|
29
|
+
var Pair = kotlin_kotlin.$_$.b9;
|
|
30
30
|
var VOID = kotlin_kotlin.$_$.d;
|
|
31
|
-
var lazy = kotlin_kotlin.$_$.
|
|
32
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
33
|
-
var asSequence_0 = kotlin_kotlin.$_$.
|
|
34
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
35
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
36
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
37
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
31
|
+
var lazy = kotlin_kotlin.$_$.i9;
|
|
32
|
+
var protoOf = kotlin_kotlin.$_$.q5;
|
|
33
|
+
var asSequence_0 = kotlin_kotlin.$_$.d2;
|
|
34
|
+
var classMeta = kotlin_kotlin.$_$.u4;
|
|
35
|
+
var setMetadataFor = kotlin_kotlin.$_$.r5;
|
|
36
|
+
var KProperty1 = kotlin_kotlin.$_$.j6;
|
|
37
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.a5;
|
|
38
38
|
var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
|
|
39
|
-
var Triple = kotlin_kotlin.$_$.
|
|
40
|
-
var Some = kotlin_it_unibo_tuprolog_utils.$_$.
|
|
41
|
-
var zip = kotlin_kotlin.$_$.
|
|
42
|
-
var flatMap = kotlin_kotlin.$_$.
|
|
43
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
44
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
45
|
-
var to = kotlin_kotlin.$_$.
|
|
46
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
39
|
+
var Triple = kotlin_kotlin.$_$.f9;
|
|
40
|
+
var Some = kotlin_it_unibo_tuprolog_utils.$_$.i;
|
|
41
|
+
var zip = kotlin_kotlin.$_$.y7;
|
|
42
|
+
var flatMap = kotlin_kotlin.$_$.z6;
|
|
43
|
+
var sequenceOf = kotlin_kotlin.$_$.m7;
|
|
44
|
+
var THROW_CCE = kotlin_kotlin.$_$.d9;
|
|
45
|
+
var to = kotlin_kotlin.$_$.n9;
|
|
46
|
+
var objectMeta = kotlin_kotlin.$_$.p5;
|
|
47
47
|
var getKClass = kotlin_kotlin.$_$.c;
|
|
48
48
|
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
49
|
-
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
49
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.q;
|
|
50
50
|
var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
|
|
51
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
52
|
-
var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.t1;
|
|
51
|
+
var defineProp = kotlin_kotlin.$_$.w4;
|
|
53
52
|
var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
|
|
54
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
53
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.f2;
|
|
55
54
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.e;
|
|
56
55
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
57
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
56
|
+
var interfaceMeta = kotlin_kotlin.$_$.d5;
|
|
58
57
|
//endregion
|
|
59
58
|
//region block: pre-declaration
|
|
60
|
-
function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
|
|
61
|
-
occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
|
|
62
|
-
return $super === VOID ? this.u1j(term1, term2, occurCheckEnabled) : $super.u1j.call(this, term1, term2, occurCheckEnabled);
|
|
63
|
-
}
|
|
64
59
|
function mgu(term1, term2) {
|
|
65
|
-
return this.
|
|
60
|
+
return this.t1h(term1, term2, true);
|
|
66
61
|
}
|
|
67
62
|
function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
68
|
-
return !(this.
|
|
63
|
+
return !(this.t1h(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
|
|
69
64
|
}
|
|
70
65
|
function match(term1, term2) {
|
|
71
66
|
return this.matchWithOccurCheck(term1, term2, true);
|
|
72
67
|
}
|
|
73
68
|
function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
74
|
-
var substitution = this.
|
|
75
|
-
return substitution.
|
|
69
|
+
var substitution = this.t1h(term1, term2, occurCheckEnabled);
|
|
70
|
+
return substitution.p10() ? null : term1.getSubstituted(substitution, []);
|
|
76
71
|
}
|
|
77
72
|
function unify(term1, term2) {
|
|
78
73
|
return this.unifyWithOccurCheck(term1, term2, true);
|
|
@@ -83,7 +78,7 @@
|
|
|
83
78
|
setMetadataFor(Unificator, 'Unificator', interfaceMeta);
|
|
84
79
|
setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, VOID, [Unificator]);
|
|
85
80
|
setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, VOID, [Unificator]);
|
|
86
|
-
setMetadataFor(Equation, 'Equation', classMeta, VOID, [
|
|
81
|
+
setMetadataFor(Equation, 'Equation', classMeta, VOID, [Castable]);
|
|
87
82
|
setMetadataFor(Identity, 'Identity', classMeta, Equation);
|
|
88
83
|
setMetadataFor(Assignment, 'Assignment', classMeta, Equation);
|
|
89
84
|
setMetadataFor(Comparison, 'Comparison', classMeta, Equation);
|
|
@@ -95,21 +90,21 @@
|
|
|
95
90
|
//endregion
|
|
96
91
|
function _get_contextEquations__x0dd77($this) {
|
|
97
92
|
// Inline function 'kotlin.getValue' call
|
|
98
|
-
var this_0 = $this.
|
|
93
|
+
var this_0 = $this.c1h_1;
|
|
99
94
|
contextEquations$factory();
|
|
100
|
-
return this_0.
|
|
95
|
+
return this_0.q2();
|
|
101
96
|
}
|
|
102
97
|
function occurrenceCheck($this, variable, term) {
|
|
103
98
|
var tmp;
|
|
104
|
-
if (term.
|
|
105
|
-
tmp = $this.
|
|
106
|
-
} else if (term.
|
|
99
|
+
if (term.gv()) {
|
|
100
|
+
tmp = $this.d1h(variable, term);
|
|
101
|
+
} else if (term.qu()) {
|
|
107
102
|
var tmp$ret$1;
|
|
108
103
|
$l$block: {
|
|
109
104
|
// Inline function 'kotlin.sequences.any' call
|
|
110
|
-
var tmp0_iterator = term.
|
|
111
|
-
while (tmp0_iterator.
|
|
112
|
-
var element = tmp0_iterator.
|
|
105
|
+
var tmp0_iterator = term.mu().o();
|
|
106
|
+
while (tmp0_iterator.p()) {
|
|
107
|
+
var element = tmp0_iterator.r();
|
|
113
108
|
// Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.occurrenceCheck.<anonymous>' call
|
|
114
109
|
if (occurrenceCheck($this, variable, element)) {
|
|
115
110
|
tmp$ret$1 = true;
|
|
@@ -126,7 +121,7 @@
|
|
|
126
121
|
}
|
|
127
122
|
function equationsFor($this, term1, term2) {
|
|
128
123
|
var tmp = Companion_instance_0;
|
|
129
|
-
return tmp.
|
|
124
|
+
return tmp.e1h(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
|
|
130
125
|
}
|
|
131
126
|
function equationsFor_0($this, substitution1, substitution2) {
|
|
132
127
|
var tmp = Companion_instance_0;
|
|
@@ -144,7 +139,7 @@
|
|
|
144
139
|
}
|
|
145
140
|
while (inductionVariable < exceptIndex);
|
|
146
141
|
var inductionVariable_0 = exceptIndex + 1 | 0;
|
|
147
|
-
var last = equations.
|
|
142
|
+
var last = equations.u();
|
|
148
143
|
if (inductionVariable_0 < last)
|
|
149
144
|
do {
|
|
150
145
|
var i_0 = inductionVariable_0;
|
|
@@ -158,32 +153,32 @@
|
|
|
158
153
|
var changed = true;
|
|
159
154
|
while (changed) {
|
|
160
155
|
changed = false;
|
|
161
|
-
var eqIterator = equations.
|
|
162
|
-
while (eqIterator.
|
|
163
|
-
var eq = eqIterator.
|
|
164
|
-
if (eq.
|
|
156
|
+
var eqIterator = equations.y1();
|
|
157
|
+
while (eqIterator.p()) {
|
|
158
|
+
var eq = eqIterator.r();
|
|
159
|
+
if (eq.j1h()) {
|
|
165
160
|
return Companion_getInstance().failed();
|
|
166
|
-
} else if (eq.
|
|
167
|
-
eqIterator.
|
|
161
|
+
} else if (eq.k1h()) {
|
|
162
|
+
eqIterator.q();
|
|
168
163
|
changed = true;
|
|
169
|
-
} else if (eq.
|
|
170
|
-
var assignment = eq.
|
|
171
|
-
if (occurCheckEnabled ? occurrenceCheck($this, assignment.
|
|
164
|
+
} else if (eq.r1h()) {
|
|
165
|
+
var assignment = eq.m1h();
|
|
166
|
+
if (occurCheckEnabled ? occurrenceCheck($this, assignment.p1h_1, eq.i1h()) : false) {
|
|
172
167
|
return Companion_getInstance().failed();
|
|
173
168
|
} else {
|
|
174
|
-
changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.
|
|
169
|
+
changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.l1());
|
|
175
170
|
}
|
|
176
|
-
} else if (eq.
|
|
177
|
-
eqIterator.
|
|
178
|
-
var tmp0_iterator = equationsFor($this, eq.
|
|
179
|
-
insertion: while (tmp0_iterator.
|
|
180
|
-
var it = tmp0_iterator.
|
|
181
|
-
if (it.
|
|
171
|
+
} else if (eq.l1h()) {
|
|
172
|
+
eqIterator.q();
|
|
173
|
+
var tmp0_iterator = equationsFor($this, eq.h1h(), eq.i1h()).o();
|
|
174
|
+
insertion: while (tmp0_iterator.p()) {
|
|
175
|
+
var it = tmp0_iterator.r();
|
|
176
|
+
if (it.k1h())
|
|
182
177
|
continue insertion;
|
|
183
|
-
else if (it.
|
|
178
|
+
else if (it.j1h())
|
|
184
179
|
return Companion_getInstance().failed();
|
|
185
180
|
else {
|
|
186
|
-
eqIterator.
|
|
181
|
+
eqIterator.o1(it);
|
|
187
182
|
}
|
|
188
183
|
}
|
|
189
184
|
changed = true;
|
|
@@ -193,12 +188,12 @@
|
|
|
193
188
|
// Inline function 'kotlin.collections.filter' call
|
|
194
189
|
// Inline function 'kotlin.collections.filterTo' call
|
|
195
190
|
var destination = ArrayList_init_$Create$();
|
|
196
|
-
var tmp0_iterator_0 = equations.
|
|
197
|
-
while (tmp0_iterator_0.
|
|
198
|
-
var element = tmp0_iterator_0.
|
|
191
|
+
var tmp0_iterator_0 = equations.o();
|
|
192
|
+
while (tmp0_iterator_0.p()) {
|
|
193
|
+
var element = tmp0_iterator_0.r();
|
|
199
194
|
// Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
|
|
200
|
-
if (element.
|
|
201
|
-
destination.
|
|
195
|
+
if (element.r1h()) {
|
|
196
|
+
destination.l(element);
|
|
202
197
|
}
|
|
203
198
|
}
|
|
204
199
|
return toSubstitution(destination);
|
|
@@ -209,62 +204,62 @@
|
|
|
209
204
|
return toCollection(items, tmp$ret$0);
|
|
210
205
|
}
|
|
211
206
|
function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
|
|
212
|
-
if ($equations.
|
|
207
|
+
if ($equations.a1(i).j1h() ? true : $equations.a1(i).k1h())
|
|
213
208
|
return Unit_instance;
|
|
214
|
-
var currentEq = $equations.
|
|
209
|
+
var currentEq = $equations.a1(i);
|
|
215
210
|
var tmp0_container = currentEq.apply($substitution).toPair();
|
|
216
|
-
var newLhs = tmp0_container.
|
|
217
|
-
var newRhs = tmp0_container.
|
|
218
|
-
if (!currentEq.
|
|
211
|
+
var newLhs = tmp0_container.dd();
|
|
212
|
+
var newRhs = tmp0_container.ed();
|
|
213
|
+
if (!currentEq.h1h().equals(newLhs) ? true : !currentEq.i1h().equals(newRhs)) {
|
|
219
214
|
var tmp = Companion_instance_0;
|
|
220
|
-
$equations.
|
|
215
|
+
$equations.v1(i, tmp.s1h(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
|
|
221
216
|
changed._v = true;
|
|
222
217
|
}
|
|
223
218
|
}
|
|
224
219
|
function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
|
|
225
220
|
return function () {
|
|
226
|
-
return toEquations(this$0.
|
|
221
|
+
return toEquations(this$0.jb());
|
|
227
222
|
};
|
|
228
223
|
}
|
|
229
224
|
function AbstractUnificator$checkTermsEquality$ref($boundThis) {
|
|
230
225
|
var l = function (p0, p1) {
|
|
231
|
-
return $boundThis.
|
|
226
|
+
return $boundThis.d1h(p0, p1);
|
|
232
227
|
};
|
|
233
228
|
l.callableName = 'checkTermsEquality';
|
|
234
229
|
return l;
|
|
235
230
|
}
|
|
236
231
|
function AbstractUnificator$equationsFor$lambda(it) {
|
|
237
232
|
// Inline function 'kotlin.collections.toPair' call
|
|
238
|
-
return new Pair(it.
|
|
233
|
+
return new Pair(it.p2(), it.q2());
|
|
239
234
|
}
|
|
240
235
|
function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
|
|
241
236
|
var l = function (p0, p1) {
|
|
242
|
-
return $boundThis.
|
|
237
|
+
return $boundThis.d1h(p0, p1);
|
|
243
238
|
};
|
|
244
239
|
l.callableName = 'checkTermsEquality';
|
|
245
240
|
return l;
|
|
246
241
|
}
|
|
247
242
|
function AbstractUnificator(context) {
|
|
248
243
|
context = context === VOID ? Companion_getInstance().empty() : context;
|
|
249
|
-
this.
|
|
244
|
+
this.b1h_1 = context;
|
|
250
245
|
var tmp = this;
|
|
251
|
-
tmp.
|
|
246
|
+
tmp.c1h_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
|
|
252
247
|
}
|
|
253
|
-
protoOf(AbstractUnificator).
|
|
254
|
-
return this.
|
|
248
|
+
protoOf(AbstractUnificator).jb = function () {
|
|
249
|
+
return this.b1h_1;
|
|
255
250
|
};
|
|
256
|
-
protoOf(AbstractUnificator).
|
|
257
|
-
if (this.
|
|
251
|
+
protoOf(AbstractUnificator).t1h = function (term1, term2, occurCheckEnabled) {
|
|
252
|
+
if (this.jb().p10())
|
|
258
253
|
return Companion_getInstance().failed();
|
|
259
254
|
var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
|
|
260
255
|
return mgu_0(this, equations, occurCheckEnabled);
|
|
261
256
|
};
|
|
262
|
-
protoOf(AbstractUnificator).
|
|
263
|
-
if ((this.
|
|
257
|
+
protoOf(AbstractUnificator).u1h = function (substitution1, substitution2, occurCheckEnabled) {
|
|
258
|
+
if ((this.jb().p10() ? true : substitution1.p10()) ? true : substitution2.p10())
|
|
264
259
|
return Companion_getInstance().failed();
|
|
265
260
|
if (!occurCheckEnabled) {
|
|
266
|
-
var quickMerge = this.
|
|
267
|
-
if (quickMerge.
|
|
261
|
+
var quickMerge = this.jb().plus(substitution1).plus(substitution2);
|
|
262
|
+
if (quickMerge.o10()) {
|
|
268
263
|
return quickMerge;
|
|
269
264
|
}
|
|
270
265
|
}
|
|
@@ -272,7 +267,7 @@
|
|
|
272
267
|
return mgu_0(this, equations, occurCheckEnabled);
|
|
273
268
|
};
|
|
274
269
|
protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
275
|
-
return this.
|
|
270
|
+
return this.u1h(substitution1, substitution2, occurCheckEnabled);
|
|
276
271
|
};
|
|
277
272
|
function contextEquations$factory() {
|
|
278
273
|
return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
|
|
@@ -280,37 +275,37 @@
|
|
|
280
275
|
}, null);
|
|
281
276
|
}
|
|
282
277
|
function CachedUnificator(decorated, cacheCapacity) {
|
|
283
|
-
this.
|
|
284
|
-
this.
|
|
278
|
+
this.v1h_1 = decorated;
|
|
279
|
+
this.w1h_1 = Companion_instance.cp(cacheCapacity);
|
|
285
280
|
}
|
|
286
|
-
protoOf(CachedUnificator).
|
|
281
|
+
protoOf(CachedUnificator).t1h = function (term1, term2, occurCheckEnabled) {
|
|
287
282
|
var mguRequest = new Triple(term1, term2, occurCheckEnabled);
|
|
288
|
-
var cached = this.
|
|
283
|
+
var cached = this.w1h_1.w2(mguRequest);
|
|
289
284
|
var tmp;
|
|
290
285
|
if (cached instanceof Some) {
|
|
291
|
-
tmp = cached.
|
|
286
|
+
tmp = cached.fp_1;
|
|
292
287
|
} else {
|
|
293
|
-
var mguResult = this.
|
|
294
|
-
this.
|
|
288
|
+
var mguResult = this.v1h_1.t1h(term1, term2, occurCheckEnabled);
|
|
289
|
+
this.w1h_1.dp(mguRequest, mguResult);
|
|
295
290
|
tmp = mguResult;
|
|
296
291
|
}
|
|
297
292
|
return tmp;
|
|
298
293
|
};
|
|
299
|
-
protoOf(CachedUnificator).
|
|
294
|
+
protoOf(CachedUnificator).u1h = function (substitution1, substitution2, occurCheckEnabled) {
|
|
300
295
|
var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
|
|
301
|
-
var cached = this.
|
|
296
|
+
var cached = this.w1h_1.w2(mguRequest);
|
|
302
297
|
var tmp;
|
|
303
298
|
if (cached instanceof Some) {
|
|
304
|
-
tmp = cached.
|
|
299
|
+
tmp = cached.fp_1;
|
|
305
300
|
} else {
|
|
306
|
-
var mguResult = this.
|
|
307
|
-
this.
|
|
301
|
+
var mguResult = this.v1h_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
|
|
302
|
+
this.w1h_1.dp(mguRequest, mguResult);
|
|
308
303
|
tmp = mguResult;
|
|
309
304
|
}
|
|
310
305
|
return tmp;
|
|
311
306
|
};
|
|
312
307
|
protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
313
|
-
return this.
|
|
308
|
+
return this.u1h(substitution1, substitution2, occurCheckEnabled);
|
|
314
309
|
};
|
|
315
310
|
function allOfLists($this, lhs, rhs, equalityChecker) {
|
|
316
311
|
var tmp = zip(lhs.unfold(), rhs.unfold());
|
|
@@ -343,7 +338,7 @@
|
|
|
343
338
|
}
|
|
344
339
|
function Equation$Companion$from$lambda($equalityChecker) {
|
|
345
340
|
return function (it) {
|
|
346
|
-
return Companion_instance_0.
|
|
341
|
+
return Companion_instance_0.x1h(it, $equalityChecker);
|
|
347
342
|
};
|
|
348
343
|
}
|
|
349
344
|
function Term$equals$ref_2() {
|
|
@@ -369,16 +364,16 @@
|
|
|
369
364
|
}
|
|
370
365
|
function Equation$Companion$allOfLists$lambda($equalityChecker) {
|
|
371
366
|
return function (_name_for_destructuring_parameter_0__wldtmu) {
|
|
372
|
-
var l = _name_for_destructuring_parameter_0__wldtmu.
|
|
373
|
-
var r = _name_for_destructuring_parameter_0__wldtmu.
|
|
374
|
-
return (l.
|
|
367
|
+
var l = _name_for_destructuring_parameter_0__wldtmu.dd();
|
|
368
|
+
var r = _name_for_destructuring_parameter_0__wldtmu.ed();
|
|
369
|
+
return (l.xu() ? r.xu() : false) ? sequenceOf([Companion_instance_0.s1h(l.castToCons().qw(), r.castToCons().qw(), $equalityChecker)]) : (l.wu() ? r.wu() : false) ? sequenceOf([Companion_instance_0.s1h(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_instance_0.e1h(l, r, $equalityChecker);
|
|
375
370
|
};
|
|
376
371
|
}
|
|
377
372
|
function Equation$Companion$allOfTuples$lambda($equalityChecker) {
|
|
378
373
|
return function (_name_for_destructuring_parameter_0__wldtmu) {
|
|
379
|
-
var l = _name_for_destructuring_parameter_0__wldtmu.
|
|
380
|
-
var r = _name_for_destructuring_parameter_0__wldtmu.
|
|
381
|
-
return (l.
|
|
374
|
+
var l = _name_for_destructuring_parameter_0__wldtmu.dd();
|
|
375
|
+
var r = _name_for_destructuring_parameter_0__wldtmu.ed();
|
|
376
|
+
return (l.vu() ? r.vu() : false) ? sequenceOf([Companion_instance_0.s1h(l.castToTuple().ew(), r.castToTuple().ew(), $equalityChecker)]) : Companion_instance_0.e1h(l, r, $equalityChecker);
|
|
382
377
|
};
|
|
383
378
|
}
|
|
384
379
|
function Term$equals$ref_5() {
|
|
@@ -390,29 +385,29 @@
|
|
|
390
385
|
}
|
|
391
386
|
function Equation$Companion$allOf$lambda($equalityChecker) {
|
|
392
387
|
return function (it) {
|
|
393
|
-
return Companion_instance_0.
|
|
388
|
+
return Companion_instance_0.x1h(it, $equalityChecker);
|
|
394
389
|
};
|
|
395
390
|
}
|
|
396
391
|
function Identity(lhs, rhs) {
|
|
397
392
|
Equation.call(this, lhs, rhs);
|
|
398
|
-
this.
|
|
399
|
-
this.
|
|
393
|
+
this.a1i_1 = lhs;
|
|
394
|
+
this.b1i_1 = rhs;
|
|
400
395
|
}
|
|
401
|
-
protoOf(Identity).
|
|
402
|
-
return this.
|
|
396
|
+
protoOf(Identity).h1h = function () {
|
|
397
|
+
return this.a1i_1;
|
|
403
398
|
};
|
|
404
|
-
protoOf(Identity).
|
|
405
|
-
return this.
|
|
399
|
+
protoOf(Identity).i1h = function () {
|
|
400
|
+
return this.b1i_1;
|
|
406
401
|
};
|
|
407
|
-
protoOf(Identity).
|
|
402
|
+
protoOf(Identity).k1h = function () {
|
|
408
403
|
return true;
|
|
409
404
|
};
|
|
410
405
|
protoOf(Identity).toString = function () {
|
|
411
|
-
return 'Identity(lhs=' + this.
|
|
406
|
+
return 'Identity(lhs=' + this.a1i_1 + ', rhs=' + this.b1i_1 + ')';
|
|
412
407
|
};
|
|
413
408
|
protoOf(Identity).hashCode = function () {
|
|
414
|
-
var result = this.
|
|
415
|
-
result = imul(result, 31) + this.
|
|
409
|
+
var result = this.a1i_1.hashCode();
|
|
410
|
+
result = imul(result, 31) + this.b1i_1.hashCode() | 0;
|
|
416
411
|
return result;
|
|
417
412
|
};
|
|
418
413
|
protoOf(Identity).equals = function (other) {
|
|
@@ -421,44 +416,44 @@
|
|
|
421
416
|
if (!(other instanceof Identity))
|
|
422
417
|
return false;
|
|
423
418
|
var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
|
|
424
|
-
if (!this.
|
|
419
|
+
if (!this.a1i_1.equals(tmp0_other_with_cast.a1i_1))
|
|
425
420
|
return false;
|
|
426
|
-
if (!this.
|
|
421
|
+
if (!this.b1i_1.equals(tmp0_other_with_cast.b1i_1))
|
|
427
422
|
return false;
|
|
428
423
|
return true;
|
|
429
424
|
};
|
|
430
425
|
function Assignment(lhs, rhs) {
|
|
431
426
|
Equation.call(this, lhs, rhs);
|
|
432
|
-
this.
|
|
433
|
-
this.
|
|
427
|
+
this.p1h_1 = lhs;
|
|
428
|
+
this.q1h_1 = rhs;
|
|
434
429
|
}
|
|
435
|
-
protoOf(Assignment).
|
|
436
|
-
return this.
|
|
430
|
+
protoOf(Assignment).h1h = function () {
|
|
431
|
+
return this.p1h_1;
|
|
437
432
|
};
|
|
438
|
-
protoOf(Assignment).
|
|
439
|
-
return this.
|
|
433
|
+
protoOf(Assignment).i1h = function () {
|
|
434
|
+
return this.q1h_1;
|
|
440
435
|
};
|
|
441
436
|
protoOf(Assignment).toSubstitution = function () {
|
|
442
|
-
return Companion_getInstance().unifier(this.
|
|
437
|
+
return Companion_getInstance().unifier(this.p1h_1, this.q1h_1);
|
|
443
438
|
};
|
|
444
|
-
protoOf(Assignment).
|
|
445
|
-
return to(this.
|
|
439
|
+
protoOf(Assignment).e1i = function () {
|
|
440
|
+
return to(this.p1h_1, this.q1h_1);
|
|
446
441
|
};
|
|
447
442
|
protoOf(Assignment).toPair = function () {
|
|
448
|
-
return this.
|
|
443
|
+
return this.e1i();
|
|
449
444
|
};
|
|
450
|
-
protoOf(Assignment).
|
|
445
|
+
protoOf(Assignment).r1h = function () {
|
|
451
446
|
return true;
|
|
452
447
|
};
|
|
453
|
-
protoOf(Assignment).
|
|
448
|
+
protoOf(Assignment).c1i = function () {
|
|
454
449
|
return this;
|
|
455
450
|
};
|
|
456
451
|
protoOf(Assignment).toString = function () {
|
|
457
|
-
return 'Assignment(lhs=' + this.
|
|
452
|
+
return 'Assignment(lhs=' + this.p1h_1 + ', rhs=' + this.q1h_1 + ')';
|
|
458
453
|
};
|
|
459
454
|
protoOf(Assignment).hashCode = function () {
|
|
460
|
-
var result = this.
|
|
461
|
-
result = imul(result, 31) + this.
|
|
455
|
+
var result = this.p1h_1.hashCode();
|
|
456
|
+
result = imul(result, 31) + this.q1h_1.hashCode() | 0;
|
|
462
457
|
return result;
|
|
463
458
|
};
|
|
464
459
|
protoOf(Assignment).equals = function (other) {
|
|
@@ -467,32 +462,32 @@
|
|
|
467
462
|
if (!(other instanceof Assignment))
|
|
468
463
|
return false;
|
|
469
464
|
var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
|
|
470
|
-
if (!this.
|
|
465
|
+
if (!this.p1h_1.equals(tmp0_other_with_cast.p1h_1))
|
|
471
466
|
return false;
|
|
472
|
-
if (!this.
|
|
467
|
+
if (!this.q1h_1.equals(tmp0_other_with_cast.q1h_1))
|
|
473
468
|
return false;
|
|
474
469
|
return true;
|
|
475
470
|
};
|
|
476
471
|
function Comparison(lhs, rhs) {
|
|
477
472
|
Equation.call(this, lhs, rhs);
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
473
|
+
this.h1i_1 = lhs;
|
|
474
|
+
this.i1i_1 = rhs;
|
|
480
475
|
}
|
|
481
|
-
protoOf(Comparison).
|
|
482
|
-
return this.
|
|
476
|
+
protoOf(Comparison).h1h = function () {
|
|
477
|
+
return this.h1i_1;
|
|
483
478
|
};
|
|
484
|
-
protoOf(Comparison).
|
|
485
|
-
return this.
|
|
479
|
+
protoOf(Comparison).i1h = function () {
|
|
480
|
+
return this.i1i_1;
|
|
486
481
|
};
|
|
487
|
-
protoOf(Comparison).
|
|
482
|
+
protoOf(Comparison).l1h = function () {
|
|
488
483
|
return true;
|
|
489
484
|
};
|
|
490
485
|
protoOf(Comparison).toString = function () {
|
|
491
|
-
return 'Comparison(lhs=' + this.
|
|
486
|
+
return 'Comparison(lhs=' + this.h1i_1 + ', rhs=' + this.i1i_1 + ')';
|
|
492
487
|
};
|
|
493
488
|
protoOf(Comparison).hashCode = function () {
|
|
494
|
-
var result = this.
|
|
495
|
-
result = imul(result, 31) + this.
|
|
489
|
+
var result = this.h1i_1.hashCode();
|
|
490
|
+
result = imul(result, 31) + this.i1i_1.hashCode() | 0;
|
|
496
491
|
return result;
|
|
497
492
|
};
|
|
498
493
|
protoOf(Comparison).equals = function (other) {
|
|
@@ -501,32 +496,32 @@
|
|
|
501
496
|
if (!(other instanceof Comparison))
|
|
502
497
|
return false;
|
|
503
498
|
var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
|
|
504
|
-
if (!this.
|
|
499
|
+
if (!this.h1i_1.equals(tmp0_other_with_cast.h1i_1))
|
|
505
500
|
return false;
|
|
506
|
-
if (!this.
|
|
501
|
+
if (!this.i1i_1.equals(tmp0_other_with_cast.i1i_1))
|
|
507
502
|
return false;
|
|
508
503
|
return true;
|
|
509
504
|
};
|
|
510
505
|
function Contradiction(lhs, rhs) {
|
|
511
506
|
Equation.call(this, lhs, rhs);
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
507
|
+
this.l1i_1 = lhs;
|
|
508
|
+
this.m1i_1 = rhs;
|
|
514
509
|
}
|
|
515
|
-
protoOf(Contradiction).
|
|
516
|
-
return this.
|
|
510
|
+
protoOf(Contradiction).h1h = function () {
|
|
511
|
+
return this.l1i_1;
|
|
517
512
|
};
|
|
518
|
-
protoOf(Contradiction).
|
|
519
|
-
return this.
|
|
513
|
+
protoOf(Contradiction).i1h = function () {
|
|
514
|
+
return this.m1i_1;
|
|
520
515
|
};
|
|
521
|
-
protoOf(Contradiction).
|
|
516
|
+
protoOf(Contradiction).j1h = function () {
|
|
522
517
|
return true;
|
|
523
518
|
};
|
|
524
519
|
protoOf(Contradiction).toString = function () {
|
|
525
|
-
return 'Contradiction(lhs=' + this.
|
|
520
|
+
return 'Contradiction(lhs=' + this.l1i_1 + ', rhs=' + this.m1i_1 + ')';
|
|
526
521
|
};
|
|
527
522
|
protoOf(Contradiction).hashCode = function () {
|
|
528
|
-
var result = this.
|
|
529
|
-
result = imul(result, 31) + this.
|
|
523
|
+
var result = this.l1i_1.hashCode();
|
|
524
|
+
result = imul(result, 31) + this.m1i_1.hashCode() | 0;
|
|
530
525
|
return result;
|
|
531
526
|
};
|
|
532
527
|
protoOf(Contradiction).equals = function (other) {
|
|
@@ -535,17 +530,17 @@
|
|
|
535
530
|
if (!(other instanceof Contradiction))
|
|
536
531
|
return false;
|
|
537
532
|
var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
|
|
538
|
-
if (!this.
|
|
533
|
+
if (!this.l1i_1.equals(tmp0_other_with_cast.l1i_1))
|
|
539
534
|
return false;
|
|
540
|
-
if (!this.
|
|
535
|
+
if (!this.m1i_1.equals(tmp0_other_with_cast.m1i_1))
|
|
541
536
|
return false;
|
|
542
537
|
return true;
|
|
543
538
|
};
|
|
544
539
|
function Companion() {
|
|
545
540
|
}
|
|
546
|
-
protoOf(Companion).
|
|
541
|
+
protoOf(Companion).s1h = function (lhs, rhs, equalityChecker) {
|
|
547
542
|
var tmp;
|
|
548
|
-
if (lhs.
|
|
543
|
+
if (lhs.gv() ? rhs.gv() : false) {
|
|
549
544
|
var tmp_0;
|
|
550
545
|
if (equalityChecker(lhs, rhs)) {
|
|
551
546
|
tmp_0 = new Identity(lhs, rhs);
|
|
@@ -553,11 +548,11 @@
|
|
|
553
548
|
tmp_0 = new Assignment(lhs.castToVar(), rhs);
|
|
554
549
|
}
|
|
555
550
|
tmp = tmp_0;
|
|
556
|
-
} else if (lhs.
|
|
551
|
+
} else if (lhs.gv()) {
|
|
557
552
|
tmp = new Assignment(lhs.castToVar(), rhs);
|
|
558
|
-
} else if (rhs.
|
|
553
|
+
} else if (rhs.gv()) {
|
|
559
554
|
tmp = new Assignment(rhs.castToVar(), lhs);
|
|
560
|
-
} else if (lhs.
|
|
555
|
+
} else if (lhs.jv() ? rhs.jv() : false) {
|
|
561
556
|
var tmp_1;
|
|
562
557
|
if (equalityChecker(lhs, rhs)) {
|
|
563
558
|
tmp_1 = new Identity(lhs, rhs);
|
|
@@ -565,13 +560,13 @@
|
|
|
565
560
|
tmp_1 = new Contradiction(lhs, rhs);
|
|
566
561
|
}
|
|
567
562
|
tmp = tmp_1;
|
|
568
|
-
} else if (lhs.
|
|
563
|
+
} else if (lhs.jv() ? true : rhs.jv()) {
|
|
569
564
|
tmp = new Contradiction(lhs, rhs);
|
|
570
|
-
} else if (lhs.
|
|
565
|
+
} else if (lhs.qu() ? rhs.qu() : false) {
|
|
571
566
|
var lhsStruct = lhs.castToStruct();
|
|
572
567
|
var rhsStruct = rhs.castToStruct();
|
|
573
568
|
var tmp_2;
|
|
574
|
-
if (!(lhsStruct.
|
|
569
|
+
if (!(lhsStruct.eu() === rhsStruct.eu()) ? true : !(lhsStruct.ku() === rhsStruct.ku())) {
|
|
575
570
|
tmp_2 = new Contradiction(lhsStruct, rhsStruct);
|
|
576
571
|
} else {
|
|
577
572
|
tmp_2 = new Comparison(lhsStruct, rhsStruct);
|
|
@@ -590,10 +585,10 @@
|
|
|
590
585
|
tmp = equalityChecker;
|
|
591
586
|
}
|
|
592
587
|
equalityChecker = tmp;
|
|
593
|
-
return $super === VOID ? this.
|
|
588
|
+
return $super === VOID ? this.s1h(lhs, rhs, equalityChecker) : $super.s1h.call(this, lhs, rhs, equalityChecker);
|
|
594
589
|
};
|
|
595
|
-
protoOf(Companion).
|
|
596
|
-
return this.
|
|
590
|
+
protoOf(Companion).n1i = function (pair, equalityChecker) {
|
|
591
|
+
return this.s1h(pair.md_1, pair.nd_1, equalityChecker);
|
|
597
592
|
};
|
|
598
593
|
protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
|
|
599
594
|
var tmp;
|
|
@@ -603,9 +598,9 @@
|
|
|
603
598
|
tmp = equalityChecker;
|
|
604
599
|
}
|
|
605
600
|
equalityChecker = tmp;
|
|
606
|
-
return $super === VOID ? this.
|
|
601
|
+
return $super === VOID ? this.n1i(pair, equalityChecker) : $super.n1i.call(this, pair, equalityChecker);
|
|
607
602
|
};
|
|
608
|
-
protoOf(Companion).
|
|
603
|
+
protoOf(Companion).o1i = function (pairs, equalityChecker) {
|
|
609
604
|
return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
|
|
610
605
|
};
|
|
611
606
|
protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
|
|
@@ -616,10 +611,10 @@
|
|
|
616
611
|
tmp = equalityChecker;
|
|
617
612
|
}
|
|
618
613
|
equalityChecker = tmp;
|
|
619
|
-
return $super === VOID ? this.
|
|
614
|
+
return $super === VOID ? this.o1i(pairs, equalityChecker) : $super.o1i.call(this, pairs, equalityChecker);
|
|
620
615
|
};
|
|
621
|
-
protoOf(Companion).
|
|
622
|
-
return this.
|
|
616
|
+
protoOf(Companion).p1i = function (pairs, equalityChecker) {
|
|
617
|
+
return this.o1i(asSequence_0(pairs), equalityChecker);
|
|
623
618
|
};
|
|
624
619
|
protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
|
|
625
620
|
var tmp;
|
|
@@ -629,10 +624,10 @@
|
|
|
629
624
|
tmp = equalityChecker;
|
|
630
625
|
}
|
|
631
626
|
equalityChecker = tmp;
|
|
632
|
-
return $super === VOID ? this.
|
|
627
|
+
return $super === VOID ? this.p1i(pairs, equalityChecker) : $super.p1i.call(this, pairs, equalityChecker);
|
|
633
628
|
};
|
|
634
|
-
protoOf(Companion).
|
|
635
|
-
return this.
|
|
629
|
+
protoOf(Companion).q1i = function (pairs, equalityChecker) {
|
|
630
|
+
return this.o1i(sequenceOf(pairs.slice()), equalityChecker);
|
|
636
631
|
};
|
|
637
632
|
protoOf(Companion).from = function (pairs, equalityChecker, $super) {
|
|
638
633
|
var tmp;
|
|
@@ -642,10 +637,10 @@
|
|
|
642
637
|
tmp = equalityChecker;
|
|
643
638
|
}
|
|
644
639
|
equalityChecker = tmp;
|
|
645
|
-
return $super === VOID ? this.
|
|
640
|
+
return $super === VOID ? this.q1i(pairs, equalityChecker) : $super.q1i.call(this, pairs, equalityChecker);
|
|
646
641
|
};
|
|
647
|
-
protoOf(Companion).
|
|
648
|
-
return this.
|
|
642
|
+
protoOf(Companion).x1h = function (pair, equalityChecker) {
|
|
643
|
+
return this.e1h(pair.md_1, pair.nd_1, equalityChecker);
|
|
649
644
|
};
|
|
650
645
|
protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
|
|
651
646
|
var tmp;
|
|
@@ -655,29 +650,29 @@
|
|
|
655
650
|
tmp = equalityChecker;
|
|
656
651
|
}
|
|
657
652
|
equalityChecker = tmp;
|
|
658
|
-
return $super === VOID ? this.
|
|
653
|
+
return $super === VOID ? this.x1h(pair, equalityChecker) : $super.x1h.call(this, pair, equalityChecker);
|
|
659
654
|
};
|
|
660
|
-
protoOf(Companion).
|
|
655
|
+
protoOf(Companion).e1h = function (lhs, rhs, equalityChecker) {
|
|
661
656
|
var tmp;
|
|
662
|
-
if (lhs.
|
|
663
|
-
tmp = sequenceOf([this.
|
|
664
|
-
} else if (lhs.
|
|
657
|
+
if (lhs.fu() ? rhs.fu() : false) {
|
|
658
|
+
tmp = sequenceOf([this.s1h(lhs, rhs, equalityChecker)]);
|
|
659
|
+
} else if (lhs.wu() ? rhs.wu() : false) {
|
|
665
660
|
tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
|
|
666
|
-
} else if (lhs.
|
|
661
|
+
} else if (lhs.vu() ? rhs.vu() : false) {
|
|
667
662
|
tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
|
|
668
|
-
} else if (lhs.
|
|
663
|
+
} else if (lhs.qu() ? rhs.qu() : false) {
|
|
669
664
|
var lhsStruct = lhs.castToStruct();
|
|
670
665
|
var rhsStruct = rhs.castToStruct();
|
|
671
666
|
var tmp_0;
|
|
672
|
-
if (lhsStruct.
|
|
673
|
-
var tmp_1 = zip(lhsStruct.
|
|
667
|
+
if (lhsStruct.eu() === rhsStruct.eu() ? lhsStruct.ku() === rhsStruct.ku() : false) {
|
|
668
|
+
var tmp_1 = zip(lhsStruct.dv(), rhsStruct.dv());
|
|
674
669
|
tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
|
|
675
670
|
} else {
|
|
676
|
-
tmp_0 = sequenceOf([this.
|
|
671
|
+
tmp_0 = sequenceOf([this.s1h(lhs, rhs, equalityChecker)]);
|
|
677
672
|
}
|
|
678
673
|
tmp = tmp_0;
|
|
679
674
|
} else {
|
|
680
|
-
tmp = sequenceOf([this.
|
|
675
|
+
tmp = sequenceOf([this.s1h(lhs, rhs, equalityChecker)]);
|
|
681
676
|
}
|
|
682
677
|
return tmp;
|
|
683
678
|
};
|
|
@@ -689,7 +684,7 @@
|
|
|
689
684
|
tmp = equalityChecker;
|
|
690
685
|
}
|
|
691
686
|
equalityChecker = tmp;
|
|
692
|
-
return $super === VOID ? this.
|
|
687
|
+
return $super === VOID ? this.e1h(lhs, rhs, equalityChecker) : $super.e1h.call(this, lhs, rhs, equalityChecker);
|
|
693
688
|
};
|
|
694
689
|
var Companion_instance_0;
|
|
695
690
|
function Companion_getInstance_1() {
|
|
@@ -703,54 +698,54 @@
|
|
|
703
698
|
return l;
|
|
704
699
|
}
|
|
705
700
|
function Equation(lhs, rhs) {
|
|
706
|
-
this.
|
|
707
|
-
this.
|
|
701
|
+
this.f1h_1 = lhs;
|
|
702
|
+
this.g1h_1 = rhs;
|
|
708
703
|
}
|
|
709
|
-
protoOf(Equation).
|
|
710
|
-
return this.
|
|
704
|
+
protoOf(Equation).h1h = function () {
|
|
705
|
+
return this.f1h_1;
|
|
711
706
|
};
|
|
712
|
-
protoOf(Equation).
|
|
713
|
-
return this.
|
|
707
|
+
protoOf(Equation).i1h = function () {
|
|
708
|
+
return this.g1h_1;
|
|
714
709
|
};
|
|
715
|
-
protoOf(Equation).
|
|
710
|
+
protoOf(Equation).k1h = function () {
|
|
716
711
|
return false;
|
|
717
712
|
};
|
|
718
|
-
protoOf(Equation).
|
|
713
|
+
protoOf(Equation).r1h = function () {
|
|
719
714
|
return false;
|
|
720
715
|
};
|
|
721
|
-
protoOf(Equation).
|
|
716
|
+
protoOf(Equation).c1i = function () {
|
|
722
717
|
return null;
|
|
723
718
|
};
|
|
724
|
-
protoOf(Equation).
|
|
725
|
-
var tmp0_elvis_lhs = this.
|
|
719
|
+
protoOf(Equation).m1h = function () {
|
|
720
|
+
var tmp0_elvis_lhs = this.c1i();
|
|
726
721
|
var tmp;
|
|
727
722
|
if (tmp0_elvis_lhs == null) {
|
|
728
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).
|
|
723
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).n6());
|
|
729
724
|
} else {
|
|
730
725
|
tmp = tmp0_elvis_lhs;
|
|
731
726
|
}
|
|
732
727
|
return tmp;
|
|
733
728
|
};
|
|
734
|
-
protoOf(Equation).
|
|
729
|
+
protoOf(Equation).l1h = function () {
|
|
735
730
|
return false;
|
|
736
731
|
};
|
|
737
|
-
protoOf(Equation).
|
|
732
|
+
protoOf(Equation).j1h = function () {
|
|
738
733
|
return false;
|
|
739
734
|
};
|
|
740
|
-
protoOf(Equation).
|
|
741
|
-
return Companion_getInstance_0().of('=', [this.
|
|
735
|
+
protoOf(Equation).k1g = function () {
|
|
736
|
+
return Companion_getInstance_0().of('=', [this.h1h(), this.i1h()]);
|
|
742
737
|
};
|
|
743
738
|
protoOf(Equation).toTerm = function () {
|
|
744
|
-
return this.
|
|
739
|
+
return this.k1g();
|
|
745
740
|
};
|
|
746
741
|
protoOf(Equation).toPair = function () {
|
|
747
|
-
return new Pair(this.
|
|
742
|
+
return new Pair(this.h1h(), this.i1h());
|
|
748
743
|
};
|
|
749
744
|
protoOf(Equation).swap = function () {
|
|
750
|
-
return Companion_instance_0.of(this.
|
|
745
|
+
return Companion_instance_0.of(this.i1h(), this.h1h());
|
|
751
746
|
};
|
|
752
|
-
protoOf(Equation).
|
|
753
|
-
return Companion_instance_0.
|
|
747
|
+
protoOf(Equation).d1i = function (substitution, equalityChecker) {
|
|
748
|
+
return Companion_instance_0.s1h(this.h1h().getSubstituted(substitution, []), this.i1h().getSubstituted(substitution, []), equalityChecker);
|
|
754
749
|
};
|
|
755
750
|
protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
|
|
756
751
|
var tmp;
|
|
@@ -760,23 +755,23 @@
|
|
|
760
755
|
tmp = equalityChecker;
|
|
761
756
|
}
|
|
762
757
|
equalityChecker = tmp;
|
|
763
|
-
return $super === VOID ? this.
|
|
758
|
+
return $super === VOID ? this.d1i(substitution, equalityChecker) : $super.d1i.call(this, substitution, equalityChecker);
|
|
764
759
|
};
|
|
765
760
|
function toEquations(_this__u8e3s4) {
|
|
766
761
|
// Inline function 'kotlin.collections.map' call
|
|
767
|
-
var this_0 = _this__u8e3s4.
|
|
762
|
+
var this_0 = _this__u8e3s4.o2();
|
|
768
763
|
// Inline function 'kotlin.collections.mapTo' call
|
|
769
764
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
770
|
-
var tmp0_iterator = this_0.
|
|
771
|
-
while (tmp0_iterator.
|
|
772
|
-
var item = tmp0_iterator.
|
|
765
|
+
var tmp0_iterator = this_0.o();
|
|
766
|
+
while (tmp0_iterator.p()) {
|
|
767
|
+
var item = tmp0_iterator.r();
|
|
773
768
|
// Inline function 'it.unibo.tuprolog.unify.toEquations.<anonymous>' call
|
|
774
769
|
// Inline function 'kotlin.collections.component1' call
|
|
775
|
-
var variable = item.
|
|
770
|
+
var variable = item.p2();
|
|
776
771
|
// Inline function 'kotlin.collections.component2' call
|
|
777
|
-
var term = item.
|
|
772
|
+
var term = item.q2();
|
|
778
773
|
var tmp$ret$2 = new Assignment(variable, term);
|
|
779
|
-
destination.
|
|
774
|
+
destination.l(tmp$ret$2);
|
|
780
775
|
}
|
|
781
776
|
return destination;
|
|
782
777
|
}
|
|
@@ -787,12 +782,12 @@
|
|
|
787
782
|
}
|
|
788
783
|
function toAssignmentPair(_this__u8e3s4) {
|
|
789
784
|
var tmp;
|
|
790
|
-
if (_this__u8e3s4.
|
|
791
|
-
tmp = _this__u8e3s4.
|
|
792
|
-
} else if (_this__u8e3s4.
|
|
793
|
-
tmp = to(_this__u8e3s4.
|
|
794
|
-
} else if (_this__u8e3s4.
|
|
795
|
-
tmp = to(_this__u8e3s4.
|
|
785
|
+
if (_this__u8e3s4.r1h()) {
|
|
786
|
+
tmp = _this__u8e3s4.m1h().e1i();
|
|
787
|
+
} else if (_this__u8e3s4.h1h().gv()) {
|
|
788
|
+
tmp = to(_this__u8e3s4.h1h().castToVar(), _this__u8e3s4.i1h());
|
|
789
|
+
} else if (_this__u8e3s4.i1h().gv()) {
|
|
790
|
+
tmp = to(_this__u8e3s4.i1h().castToVar(), _this__u8e3s4.h1h());
|
|
796
791
|
} else {
|
|
797
792
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
|
|
798
793
|
}
|
|
@@ -807,12 +802,12 @@
|
|
|
807
802
|
function Unificator$Companion$naive$1($context) {
|
|
808
803
|
AbstractUnificator.call(this, $context);
|
|
809
804
|
}
|
|
810
|
-
protoOf(Unificator$Companion$naive$1).
|
|
805
|
+
protoOf(Unificator$Companion$naive$1).d1h = function (first, second) {
|
|
811
806
|
var tmp;
|
|
812
|
-
if (first.
|
|
813
|
-
tmp = first.castToInteger().
|
|
814
|
-
} else if (first.
|
|
815
|
-
tmp = first.castToNumeric().
|
|
807
|
+
if (first.lv() ? second.lv() : false) {
|
|
808
|
+
tmp = first.castToInteger().q2().jj(second.castToInteger().q2()) === 0;
|
|
809
|
+
} else if (first.kv() ? second.kv() : false) {
|
|
810
|
+
tmp = first.castToNumeric().az().aj(second.castToNumeric().az()) === 0;
|
|
816
811
|
} else {
|
|
817
812
|
tmp = first.equals(second);
|
|
818
813
|
}
|
|
@@ -821,32 +816,32 @@
|
|
|
821
816
|
function Unificator$Companion$strict$1($context) {
|
|
822
817
|
AbstractUnificator.call(this, $context);
|
|
823
818
|
}
|
|
824
|
-
protoOf(Unificator$Companion$strict$1).
|
|
819
|
+
protoOf(Unificator$Companion$strict$1).d1h = function (first, second) {
|
|
825
820
|
return first.equals(second);
|
|
826
821
|
};
|
|
827
822
|
function Companion_0() {
|
|
828
823
|
Companion_instance_1 = this;
|
|
829
824
|
var tmp = this;
|
|
830
|
-
tmp.
|
|
831
|
-
this.
|
|
825
|
+
tmp.v1i_1 = lazy(Unificator$Companion$default$delegate$lambda);
|
|
826
|
+
this.w1i_1 = 32;
|
|
832
827
|
}
|
|
833
|
-
protoOf(Companion_0).
|
|
828
|
+
protoOf(Companion_0).x1i = function () {
|
|
834
829
|
// Inline function 'kotlin.getValue' call
|
|
835
|
-
var this_0 = this.
|
|
830
|
+
var this_0 = this.v1i_1;
|
|
836
831
|
default$factory();
|
|
837
|
-
return this_0.
|
|
832
|
+
return this_0.q2();
|
|
838
833
|
};
|
|
839
834
|
protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
|
|
840
|
-
return this.
|
|
835
|
+
return this.x1i().mgu(_this__u8e3s4, other);
|
|
841
836
|
};
|
|
842
837
|
protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
|
|
843
|
-
return this.
|
|
838
|
+
return this.x1i().match(_this__u8e3s4, other);
|
|
844
839
|
};
|
|
845
840
|
protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
|
|
846
|
-
return this.
|
|
841
|
+
return this.x1i().unify(_this__u8e3s4, other);
|
|
847
842
|
};
|
|
848
843
|
protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
|
|
849
|
-
return this.
|
|
844
|
+
return this.x1i().merge(_this__u8e3s4, other);
|
|
850
845
|
};
|
|
851
846
|
protoOf(Companion_0).naiveWithContext = function (context) {
|
|
852
847
|
return new Unificator$Companion$naive$1(context);
|
|
@@ -860,10 +855,10 @@
|
|
|
860
855
|
protoOf(Companion_0).strict = function () {
|
|
861
856
|
return this.strictWithContext(Companion_getInstance().empty());
|
|
862
857
|
};
|
|
863
|
-
protoOf(Companion_0).
|
|
858
|
+
protoOf(Companion_0).y1i = function (other, capacity) {
|
|
864
859
|
var tmp;
|
|
865
860
|
if (other instanceof CachedUnificator) {
|
|
866
|
-
tmp = new CachedUnificator(other.
|
|
861
|
+
tmp = new CachedUnificator(other.v1h_1, capacity);
|
|
867
862
|
} else {
|
|
868
863
|
tmp = new CachedUnificator(other, capacity);
|
|
869
864
|
}
|
|
@@ -871,7 +866,7 @@
|
|
|
871
866
|
};
|
|
872
867
|
protoOf(Companion_0).cached = function (other, capacity, $super) {
|
|
873
868
|
capacity = capacity === VOID ? 32 : capacity;
|
|
874
|
-
return $super === VOID ? this.
|
|
869
|
+
return $super === VOID ? this.y1i(other, capacity) : $super.y1i.call(this, other, capacity);
|
|
875
870
|
};
|
|
876
871
|
var Companion_instance_1;
|
|
877
872
|
function Companion_getInstance_2() {
|
|
@@ -883,7 +878,7 @@
|
|
|
883
878
|
}
|
|
884
879
|
function default$factory() {
|
|
885
880
|
return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
|
|
886
|
-
return receiver.
|
|
881
|
+
return receiver.x1i();
|
|
887
882
|
}, null);
|
|
888
883
|
}
|
|
889
884
|
//region block: post-declaration
|
|
@@ -899,23 +894,21 @@
|
|
|
899
894
|
protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
|
|
900
895
|
protoOf(CachedUnificator).unify = unify;
|
|
901
896
|
protoOf(CachedUnificator).merge = merge;
|
|
902
|
-
protoOf(Equation).
|
|
897
|
+
protoOf(Equation).mp = castTo;
|
|
903
898
|
defineProp(protoOf(Equation), 'lhs', function () {
|
|
904
|
-
return this.
|
|
899
|
+
return this.h1h();
|
|
905
900
|
});
|
|
906
901
|
defineProp(protoOf(Equation), 'rhs', function () {
|
|
907
|
-
return this.
|
|
902
|
+
return this.i1h();
|
|
908
903
|
});
|
|
909
|
-
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).
|
|
904
|
+
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).x1i);
|
|
910
905
|
//endregion
|
|
911
906
|
//region block: init
|
|
912
907
|
Companion_instance_0 = new Companion();
|
|
913
908
|
//endregion
|
|
914
909
|
//region block: exports
|
|
915
910
|
_.$_$ = _.$_$ || {};
|
|
916
|
-
_.$_$.a =
|
|
917
|
-
_.$_$.b = Companion_getInstance_2;
|
|
918
|
-
_.$_$.c = Unificator;
|
|
911
|
+
_.$_$.a = Companion_getInstance_2;
|
|
919
912
|
//endregion
|
|
920
913
|
return _;
|
|
921
914
|
}));
|