@tuprolog/arg2p-causality-solver 0.17.2 → 0.18.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 +3496 -3242
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +1511 -5
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +945 -5
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +791 -5
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +68 -5
- package/2p-dsl-unify.js.map +1 -1
- package/2p-io-lib.js +3700 -5
- package/2p-io-lib.js.map +1 -1
- package/2p-parser-core.js +624 -5
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-impl.js +5647 -5
- package/2p-parser-impl.js.map +1 -1
- package/2p-parser-theory.js +295 -5
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve.js +4825 -4276
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1511 -1496
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +363 -360
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +554 -468
- package/2p-utils.js.map +1 -1
- package/README.md +26 -19
- package/arg2p-causality-solver.js +881 -8
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +14892 -5
- package/arg2p-core.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +4775 -2444
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +1542 -1539
- package/kt-math.js.map +1 -1
- package/okio-parent-okio-nodefilesystem.js +201 -5
- package/okio-parent-okio-nodefilesystem.js.map +1 -1
- package/okio-parent-okio.js +3863 -5
- package/okio-parent-okio.js.map +1 -1
- package/package.json +1 -1
- package/2p-solve-prolog.js +0 -2854
- package/2p-solve-prolog.js.map +0 -1
package/2p-unify.js
CHANGED
|
@@ -19,66 +19,67 @@
|
|
|
19
19
|
'use strict';
|
|
20
20
|
//region block: imports
|
|
21
21
|
var imul = Math.imul;
|
|
22
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
23
|
-
var getBooleanHashCode = kotlin_kotlin.$_$.
|
|
24
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
25
|
-
var toString = kotlin_kotlin.$_$.
|
|
26
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
27
|
-
var equals = kotlin_kotlin.$_$.
|
|
28
|
-
var KProperty1 = kotlin_kotlin.$_$.
|
|
29
|
-
var getPropertyCallableRef = kotlin_kotlin.$_$.
|
|
30
|
-
var asSequence = kotlin_kotlin.$_$.
|
|
31
|
-
var plus = kotlin_kotlin.$_$.
|
|
32
|
-
var map = kotlin_kotlin.$_$.
|
|
33
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
34
|
-
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.
|
|
35
|
-
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.
|
|
36
|
-
var toCollection = kotlin_kotlin.$_$.
|
|
37
|
-
var constructCallableReference = kotlin_kotlin.$_$.
|
|
38
|
-
var Pair = kotlin_kotlin.$_$.
|
|
39
|
-
var lazy = kotlin_kotlin.$_$.
|
|
40
|
-
var asSequence_0 = kotlin_kotlin.$_$.
|
|
41
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
22
|
+
var protoOf = kotlin_kotlin.$_$.e8;
|
|
23
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.n7;
|
|
24
|
+
var initMetadataForClass = kotlin_kotlin.$_$.r7;
|
|
25
|
+
var toString = kotlin_kotlin.$_$.h8;
|
|
26
|
+
var hashCode = kotlin_kotlin.$_$.q7;
|
|
27
|
+
var equals = kotlin_kotlin.$_$.k7;
|
|
28
|
+
var KProperty1 = kotlin_kotlin.$_$.y8;
|
|
29
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.o7;
|
|
30
|
+
var asSequence = kotlin_kotlin.$_$.s2;
|
|
31
|
+
var plus = kotlin_kotlin.$_$.ba;
|
|
32
|
+
var map = kotlin_kotlin.$_$.x9;
|
|
33
|
+
var Unit_instance = kotlin_kotlin.$_$.r;
|
|
34
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
|
|
35
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
36
|
+
var toCollection = kotlin_kotlin.$_$.ja;
|
|
37
|
+
var constructCallableReference = kotlin_kotlin.$_$.i7;
|
|
38
|
+
var Pair = kotlin_kotlin.$_$.nc;
|
|
39
|
+
var lazy = kotlin_kotlin.$_$.yc;
|
|
40
|
+
var asSequence_0 = kotlin_kotlin.$_$.t2;
|
|
41
|
+
var THROW_CCE = kotlin_kotlin.$_$.pc;
|
|
42
42
|
var VOID = kotlin_kotlin.$_$.b;
|
|
43
43
|
var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
|
|
44
|
-
var Triple = kotlin_kotlin.$_$.
|
|
45
|
-
var Some = kotlin_it_unibo_tuprolog_utils.$_$.
|
|
46
|
-
var zip = kotlin_kotlin.$_$.
|
|
47
|
-
var flatMap = kotlin_kotlin.$_$.
|
|
48
|
-
var sequenceOf = kotlin_kotlin.$_$.
|
|
49
|
-
var defineProp = kotlin_kotlin.$_$.
|
|
50
|
-
var sequenceOf_0 = kotlin_kotlin.$_$.
|
|
51
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
52
|
-
var getKClass = kotlin_kotlin.$_$.
|
|
53
|
-
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.
|
|
54
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
55
|
-
var to = kotlin_kotlin.$_$.
|
|
56
|
-
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.
|
|
44
|
+
var Triple = kotlin_kotlin.$_$.rc;
|
|
45
|
+
var Some = kotlin_it_unibo_tuprolog_utils.$_$.o;
|
|
46
|
+
var zip = kotlin_kotlin.$_$.qa;
|
|
47
|
+
var flatMap = kotlin_kotlin.$_$.n9;
|
|
48
|
+
var sequenceOf = kotlin_kotlin.$_$.ea;
|
|
49
|
+
var defineProp = kotlin_kotlin.$_$.j7;
|
|
50
|
+
var sequenceOf_0 = kotlin_kotlin.$_$.da;
|
|
51
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.s7;
|
|
52
|
+
var getKClass = kotlin_kotlin.$_$.w8;
|
|
53
|
+
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
54
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
55
|
+
var to = kotlin_kotlin.$_$.dd;
|
|
56
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
|
|
57
57
|
var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
|
|
58
|
+
var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.d2;
|
|
58
59
|
var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
|
|
59
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
60
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
61
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
60
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.x2;
|
|
61
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.t;
|
|
62
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.t7;
|
|
62
63
|
//endregion
|
|
63
64
|
//region block: pre-declaration
|
|
64
65
|
initMetadataForClass(Mgu, 'Mgu');
|
|
65
66
|
initMetadataForClass(Merge, 'Merge');
|
|
66
67
|
function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
|
|
67
68
|
occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
|
|
68
|
-
return $super === VOID ? this.
|
|
69
|
+
return $super === VOID ? this.z1l(term1, term2, occurCheckEnabled) : $super.z1l.call(this, term1, term2, occurCheckEnabled);
|
|
69
70
|
}
|
|
70
71
|
function mgu(term1, term2) {
|
|
71
|
-
return this.
|
|
72
|
+
return this.z1l(term1, term2, true);
|
|
72
73
|
}
|
|
73
74
|
function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
74
|
-
return !(this.
|
|
75
|
+
return !(this.z1l(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
|
|
75
76
|
}
|
|
76
77
|
function match(term1, term2) {
|
|
77
78
|
return this.matchWithOccurCheck(term1, term2, true);
|
|
78
79
|
}
|
|
79
80
|
function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
80
|
-
var substitution = this.
|
|
81
|
-
return substitution.
|
|
81
|
+
var substitution = this.z1l(term1, term2, occurCheckEnabled);
|
|
82
|
+
return substitution.j13() ? null : term1.getSubstituted(substitution, []);
|
|
82
83
|
}
|
|
83
84
|
function unify(term1, term2) {
|
|
84
85
|
return this.unifyWithOccurCheck(term1, term2, true);
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
initMetadataForInterface(Unificator, 'Unificator');
|
|
90
91
|
initMetadataForClass(AbstractUnificator, 'AbstractUnificator', VOID, VOID, [Unificator]);
|
|
91
92
|
initMetadataForClass(CachedUnificator, 'CachedUnificator', VOID, VOID, [Unificator]);
|
|
92
|
-
initMetadataForClass(Equation, 'Equation', VOID, VOID, [Castable]);
|
|
93
|
+
initMetadataForClass(Equation, 'Equation', VOID, VOID, [TermConvertible, Castable]);
|
|
93
94
|
initMetadataForClass(Identity, 'Identity', VOID, Equation);
|
|
94
95
|
initMetadataForClass(Assignment, 'Assignment', VOID, Equation);
|
|
95
96
|
initMetadataForClass(LeftAssignment, 'LeftAssignment', VOID, Assignment);
|
|
@@ -102,17 +103,17 @@
|
|
|
102
103
|
initMetadataForCompanion(Companion_0);
|
|
103
104
|
//endregion
|
|
104
105
|
function Mgu(term1, term2, occurCheckEnabled) {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
106
|
+
this.x1k_1 = term1;
|
|
107
|
+
this.y1k_1 = term2;
|
|
108
|
+
this.z1k_1 = occurCheckEnabled;
|
|
108
109
|
}
|
|
109
110
|
protoOf(Mgu).toString = function () {
|
|
110
|
-
return 'Mgu(term1=' + this.
|
|
111
|
+
return 'Mgu(term1=' + this.x1k_1.toString() + ', term2=' + this.y1k_1.toString() + ', occurCheckEnabled=' + this.z1k_1 + ')';
|
|
111
112
|
};
|
|
112
113
|
protoOf(Mgu).hashCode = function () {
|
|
113
|
-
var result = this.
|
|
114
|
-
result = imul(result, 31) + this.
|
|
115
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
114
|
+
var result = this.x1k_1.hashCode();
|
|
115
|
+
result = imul(result, 31) + this.y1k_1.hashCode() | 0;
|
|
116
|
+
result = imul(result, 31) + getBooleanHashCode(this.z1k_1) | 0;
|
|
116
117
|
return result;
|
|
117
118
|
};
|
|
118
119
|
protoOf(Mgu).equals = function (other) {
|
|
@@ -120,26 +121,26 @@
|
|
|
120
121
|
return true;
|
|
121
122
|
if (!(other instanceof Mgu))
|
|
122
123
|
return false;
|
|
123
|
-
if (!this.
|
|
124
|
+
if (!this.x1k_1.equals(other.x1k_1))
|
|
124
125
|
return false;
|
|
125
|
-
if (!this.
|
|
126
|
+
if (!this.y1k_1.equals(other.y1k_1))
|
|
126
127
|
return false;
|
|
127
|
-
if (!(this.
|
|
128
|
+
if (!(this.z1k_1 === other.z1k_1))
|
|
128
129
|
return false;
|
|
129
130
|
return true;
|
|
130
131
|
};
|
|
131
132
|
function Merge(substitution1, substitution2, occurCheckEnabled) {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
133
|
+
this.a1l_1 = substitution1;
|
|
134
|
+
this.b1l_1 = substitution2;
|
|
135
|
+
this.c1l_1 = occurCheckEnabled;
|
|
135
136
|
}
|
|
136
137
|
protoOf(Merge).toString = function () {
|
|
137
|
-
return 'Merge(substitution1=' + toString(this.
|
|
138
|
+
return 'Merge(substitution1=' + toString(this.a1l_1) + ', substitution2=' + toString(this.b1l_1) + ', occurCheckEnabled=' + this.c1l_1 + ')';
|
|
138
139
|
};
|
|
139
140
|
protoOf(Merge).hashCode = function () {
|
|
140
|
-
var result = hashCode(this.
|
|
141
|
-
result = imul(result, 31) + hashCode(this.
|
|
142
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
141
|
+
var result = hashCode(this.a1l_1);
|
|
142
|
+
result = imul(result, 31) + hashCode(this.b1l_1) | 0;
|
|
143
|
+
result = imul(result, 31) + getBooleanHashCode(this.c1l_1) | 0;
|
|
143
144
|
return result;
|
|
144
145
|
};
|
|
145
146
|
protoOf(Merge).equals = function (other) {
|
|
@@ -147,27 +148,27 @@
|
|
|
147
148
|
return true;
|
|
148
149
|
if (!(other instanceof Merge))
|
|
149
150
|
return false;
|
|
150
|
-
if (!equals(this.
|
|
151
|
+
if (!equals(this.a1l_1, other.a1l_1))
|
|
151
152
|
return false;
|
|
152
|
-
if (!equals(this.
|
|
153
|
+
if (!equals(this.b1l_1, other.b1l_1))
|
|
153
154
|
return false;
|
|
154
|
-
if (!(this.
|
|
155
|
+
if (!(this.c1l_1 === other.c1l_1))
|
|
155
156
|
return false;
|
|
156
157
|
return true;
|
|
157
158
|
};
|
|
158
159
|
function _get_contextEquations__x0dd77($this) {
|
|
159
|
-
var tmp0 = $this.
|
|
160
|
+
var tmp0 = $this.e1l_1;
|
|
160
161
|
var tmp = KProperty1;
|
|
161
162
|
// Inline function 'kotlin.getValue' call
|
|
162
163
|
/* dead property reference removed */
|
|
163
|
-
return tmp0.
|
|
164
|
+
return tmp0.h2();
|
|
164
165
|
}
|
|
165
166
|
function occurrenceCheck($this, variable, term) {
|
|
166
167
|
var tmp;
|
|
167
|
-
if (term.
|
|
168
|
-
tmp = $this.
|
|
169
|
-
} else if (term.
|
|
170
|
-
var tmp0 = term.
|
|
168
|
+
if (term.ay()) {
|
|
169
|
+
tmp = $this.f1l(variable, term);
|
|
170
|
+
} else if (term.kx()) {
|
|
171
|
+
var tmp0 = term.gx();
|
|
171
172
|
var tmp$ret$0;
|
|
172
173
|
$l$block: {
|
|
173
174
|
// Inline function 'kotlin.sequences.any' call
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
}
|
|
190
191
|
function equationsFor($this, term1, term2) {
|
|
191
192
|
var tmp = Companion_instance_0;
|
|
192
|
-
return tmp.
|
|
193
|
+
return tmp.g1l(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
|
|
193
194
|
}
|
|
194
195
|
function equationsFor_0($this, substitution1, substitution2) {
|
|
195
196
|
var tmp = Companion_instance_0;
|
|
@@ -207,7 +208,7 @@
|
|
|
207
208
|
}
|
|
208
209
|
while (inductionVariable < exceptIndex);
|
|
209
210
|
var inductionVariable_0 = exceptIndex + 1 | 0;
|
|
210
|
-
var last = equations.
|
|
211
|
+
var last = equations.s();
|
|
211
212
|
if (inductionVariable_0 < last)
|
|
212
213
|
do {
|
|
213
214
|
var i_0 = inductionVariable_0;
|
|
@@ -221,33 +222,33 @@
|
|
|
221
222
|
var changed = true;
|
|
222
223
|
while (changed) {
|
|
223
224
|
changed = false;
|
|
224
|
-
var eqIterator = equations.
|
|
225
|
+
var eqIterator = equations.f2();
|
|
225
226
|
while (eqIterator.q()) {
|
|
226
|
-
var eq = $this.
|
|
227
|
-
if (eq.
|
|
227
|
+
var eq = $this.h1l(request, eqIterator.r());
|
|
228
|
+
if (eq.m1l()) {
|
|
228
229
|
return Companion_getInstance().failed();
|
|
229
|
-
} else if (eq.
|
|
230
|
-
eqIterator.
|
|
230
|
+
} else if (eq.n1l()) {
|
|
231
|
+
eqIterator.m3();
|
|
231
232
|
changed = true;
|
|
232
|
-
} else if (eq.
|
|
233
|
+
} else if (eq.w1l()) {
|
|
233
234
|
var assignment = eq.castToAssignment();
|
|
234
|
-
if (occurCheckEnabled && occurrenceCheck($this, assignment.
|
|
235
|
+
if (occurCheckEnabled && occurrenceCheck($this, assignment.u1l(), assignment.v1l())) {
|
|
235
236
|
return Companion_getInstance().failed();
|
|
236
237
|
} else {
|
|
237
|
-
changed = changed || applySubstitutionToEquations($this, assignment.
|
|
238
|
+
changed = changed || applySubstitutionToEquations($this, assignment.t1l(), equations, eqIterator.b4());
|
|
238
239
|
}
|
|
239
|
-
} else if (eq.
|
|
240
|
-
eqIterator.
|
|
241
|
-
var _iterator__ex2g4s = equationsFor($this, eq.
|
|
240
|
+
} else if (eq.o1l()) {
|
|
241
|
+
eqIterator.m3();
|
|
242
|
+
var _iterator__ex2g4s = equationsFor($this, eq.k1l(), eq.l1l()).n();
|
|
242
243
|
$l$loop: while (_iterator__ex2g4s.q()) {
|
|
243
244
|
var it = _iterator__ex2g4s.r();
|
|
244
|
-
var subEq = it.
|
|
245
|
-
if (subEq.
|
|
245
|
+
var subEq = it.m1l() || it.n1l() ? $this.h1l(request, it) : it;
|
|
246
|
+
if (subEq.n1l())
|
|
246
247
|
continue $l$loop;
|
|
247
|
-
else if (subEq.
|
|
248
|
+
else if (subEq.m1l())
|
|
248
249
|
return Companion_getInstance().failed();
|
|
249
250
|
else {
|
|
250
|
-
eqIterator.
|
|
251
|
+
eqIterator.e4(subEq);
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
changed = true;
|
|
@@ -260,11 +261,11 @@
|
|
|
260
261
|
var _iterator__ex2g4s_0 = equations.n();
|
|
261
262
|
while (_iterator__ex2g4s_0.q()) {
|
|
262
263
|
var element = _iterator__ex2g4s_0.r();
|
|
263
|
-
if (element.
|
|
264
|
+
if (element.w1l()) {
|
|
264
265
|
destination.l(element);
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
return $this.
|
|
268
|
+
return $this.x1l(request, toSubstitution(destination));
|
|
268
269
|
}
|
|
269
270
|
function newDeque($this, items) {
|
|
270
271
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
@@ -273,52 +274,52 @@
|
|
|
273
274
|
}
|
|
274
275
|
function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
|
|
275
276
|
return function () {
|
|
276
|
-
return toEquations(this$0.
|
|
277
|
+
return toEquations(this$0.x8());
|
|
277
278
|
};
|
|
278
279
|
}
|
|
279
280
|
function AbstractUnificator$_get_contextEquations_$ref_7ajcte() {
|
|
280
281
|
return constructCallableReference(function (p0) {
|
|
281
282
|
return _get_contextEquations__x0dd77(p0);
|
|
282
|
-
}, 1, 0,
|
|
283
|
+
}, 1, 0, 28);
|
|
283
284
|
}
|
|
284
285
|
function AbstractUnificator$checkTermsEquality$ref(p0) {
|
|
285
286
|
return constructCallableReference(function (p0_0, p1) {
|
|
286
|
-
return p0.
|
|
287
|
-
}, 2, 0,
|
|
287
|
+
return p0.f1l(p0_0, p1);
|
|
288
|
+
}, 2, 0, 29, 'checkTermsEquality', [p0]);
|
|
288
289
|
}
|
|
289
290
|
function AbstractUnificator$equationsFor$lambda(it) {
|
|
290
291
|
// Inline function 'kotlin.collections.toPair' call
|
|
291
|
-
return new Pair(it.
|
|
292
|
+
return new Pair(it.g2(), it.h2());
|
|
292
293
|
}
|
|
293
294
|
function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
|
|
294
|
-
if ($equations.
|
|
295
|
+
if ($equations.t(i).m1l() || $equations.t(i).n1l())
|
|
295
296
|
return Unit_instance;
|
|
296
|
-
var currentEq = $equations.
|
|
297
|
+
var currentEq = $equations.t(i);
|
|
297
298
|
var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
|
|
298
|
-
var newLhs = _destruct__k2r9zo.
|
|
299
|
-
var newRhs = _destruct__k2r9zo.
|
|
300
|
-
if (!currentEq.
|
|
299
|
+
var newLhs = _destruct__k2r9zo.he();
|
|
300
|
+
var newRhs = _destruct__k2r9zo.ie();
|
|
301
|
+
if (!currentEq.k1l().equals(newLhs) || !currentEq.l1l().equals(newRhs)) {
|
|
301
302
|
var tmp = Companion_instance_0;
|
|
302
|
-
$equations.
|
|
303
|
+
$equations.j3(i, tmp.y1l(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref(this$0)));
|
|
303
304
|
changed._v = true;
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
307
|
function AbstractUnificator(context) {
|
|
307
|
-
this.
|
|
308
|
+
this.d1l_1 = context;
|
|
308
309
|
var tmp = this;
|
|
309
|
-
tmp.
|
|
310
|
+
tmp.e1l_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
|
|
310
311
|
}
|
|
311
|
-
protoOf(AbstractUnificator).
|
|
312
|
-
return this.
|
|
312
|
+
protoOf(AbstractUnificator).x8 = function () {
|
|
313
|
+
return this.d1l_1;
|
|
313
314
|
};
|
|
314
|
-
protoOf(AbstractUnificator).
|
|
315
|
+
protoOf(AbstractUnificator).x1l = function (request, result) {
|
|
315
316
|
return result;
|
|
316
317
|
};
|
|
317
|
-
protoOf(AbstractUnificator).
|
|
318
|
+
protoOf(AbstractUnificator).h1l = function (request, equation) {
|
|
318
319
|
return equation;
|
|
319
320
|
};
|
|
320
|
-
protoOf(AbstractUnificator).
|
|
321
|
-
if (this.
|
|
321
|
+
protoOf(AbstractUnificator).z1l = function (term1, term2, occurCheckEnabled) {
|
|
322
|
+
if (this.x8().j13())
|
|
322
323
|
return Companion_getInstance().failed();
|
|
323
324
|
var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
|
|
324
325
|
return mgu_0(this, new Mgu(term1, term2, occurCheckEnabled), equations, occurCheckEnabled);
|
|
@@ -326,12 +327,12 @@
|
|
|
326
327
|
protoOf(AbstractUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
327
328
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof AbstractUnificator) ? $super : THROW_CCE());
|
|
328
329
|
};
|
|
329
|
-
protoOf(AbstractUnificator).
|
|
330
|
-
if (this.
|
|
330
|
+
protoOf(AbstractUnificator).a1m = function (substitution1, substitution2, occurCheckEnabled) {
|
|
331
|
+
if (this.x8().j13() || substitution1.j13() || substitution2.j13())
|
|
331
332
|
return Companion_getInstance().failed();
|
|
332
333
|
if (!occurCheckEnabled) {
|
|
333
|
-
var quickMerge = this.
|
|
334
|
-
if (quickMerge.
|
|
334
|
+
var quickMerge = this.x8().plus(substitution1).plus(substitution2);
|
|
335
|
+
if (quickMerge.i13()) {
|
|
335
336
|
return quickMerge;
|
|
336
337
|
}
|
|
337
338
|
}
|
|
@@ -339,21 +340,21 @@
|
|
|
339
340
|
return mgu_0(this, new Merge(substitution1, substitution2, occurCheckEnabled), equations, occurCheckEnabled);
|
|
340
341
|
};
|
|
341
342
|
protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
342
|
-
return this.
|
|
343
|
+
return this.a1m(substitution1, substitution2, occurCheckEnabled);
|
|
343
344
|
};
|
|
344
345
|
function CachedUnificator(decorated, cacheCapacity) {
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
346
|
+
this.b1m_1 = decorated;
|
|
347
|
+
this.c1m_1 = Companion_instance.hr(cacheCapacity);
|
|
347
348
|
}
|
|
348
|
-
protoOf(CachedUnificator).
|
|
349
|
+
protoOf(CachedUnificator).z1l = function (term1, term2, occurCheckEnabled) {
|
|
349
350
|
var mguRequest = new Triple(term1, term2, occurCheckEnabled);
|
|
350
|
-
var cached = this.
|
|
351
|
+
var cached = this.c1m_1.k2(mguRequest);
|
|
351
352
|
var tmp;
|
|
352
353
|
if (cached instanceof Some) {
|
|
353
|
-
tmp = cached.
|
|
354
|
+
tmp = cached.kr_1;
|
|
354
355
|
} else {
|
|
355
|
-
var mguResult = this.
|
|
356
|
-
this.
|
|
356
|
+
var mguResult = this.b1m_1.z1l(term1, term2, occurCheckEnabled);
|
|
357
|
+
this.c1m_1.ir(mguRequest, mguResult);
|
|
357
358
|
tmp = mguResult;
|
|
358
359
|
}
|
|
359
360
|
return tmp;
|
|
@@ -361,21 +362,21 @@
|
|
|
361
362
|
protoOf(CachedUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
362
363
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof CachedUnificator) ? $super : THROW_CCE());
|
|
363
364
|
};
|
|
364
|
-
protoOf(CachedUnificator).
|
|
365
|
+
protoOf(CachedUnificator).a1m = function (substitution1, substitution2, occurCheckEnabled) {
|
|
365
366
|
var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
|
|
366
|
-
var cached = this.
|
|
367
|
+
var cached = this.c1m_1.k2(mguRequest);
|
|
367
368
|
var tmp;
|
|
368
369
|
if (cached instanceof Some) {
|
|
369
|
-
tmp = cached.
|
|
370
|
+
tmp = cached.kr_1;
|
|
370
371
|
} else {
|
|
371
|
-
var mguResult = this.
|
|
372
|
-
this.
|
|
372
|
+
var mguResult = this.b1m_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
|
|
373
|
+
this.c1m_1.ir(mguRequest, mguResult);
|
|
373
374
|
tmp = mguResult;
|
|
374
375
|
}
|
|
375
376
|
return tmp;
|
|
376
377
|
};
|
|
377
378
|
protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
378
|
-
return this.
|
|
379
|
+
return this.a1m(substitution1, substitution2, occurCheckEnabled);
|
|
379
380
|
};
|
|
380
381
|
function allOfLists($this, lhs, rhs, equalityChecker) {
|
|
381
382
|
var tmp;
|
|
@@ -402,64 +403,64 @@
|
|
|
402
403
|
function Term$equals$ref() {
|
|
403
404
|
return constructCallableReference(function (p0, p1) {
|
|
404
405
|
return p0.equals(p1);
|
|
405
|
-
}, 2, 0,
|
|
406
|
+
}, 2, 0, 30, 'equals');
|
|
406
407
|
}
|
|
407
408
|
function Equation$Companion$from$lambda($equalityChecker) {
|
|
408
409
|
return function (it) {
|
|
409
|
-
return Companion_instance_0.
|
|
410
|
+
return Companion_instance_0.d1m(it, $equalityChecker);
|
|
410
411
|
};
|
|
411
412
|
}
|
|
412
413
|
function Equation$Companion$allOfLists$lambda($equalityChecker) {
|
|
413
414
|
return function (_destruct__k2r9zo) {
|
|
414
|
-
var l = _destruct__k2r9zo.
|
|
415
|
-
var r = _destruct__k2r9zo.
|
|
416
|
-
return l.
|
|
415
|
+
var l = _destruct__k2r9zo.he();
|
|
416
|
+
var r = _destruct__k2r9zo.ie();
|
|
417
|
+
return l.rx() && r.rx() ? sequenceOf(Companion_instance_0.y1l(l.castToCons().kz(), r.castToCons().kz(), $equalityChecker)) : l.qx() && r.qx() ? sequenceOf(Companion_instance_0.y1l(l.castToList(), r.castToList(), $equalityChecker)) : Companion_instance_0.g1l(l, r, $equalityChecker);
|
|
417
418
|
};
|
|
418
419
|
}
|
|
419
420
|
function Equation$Companion$allOfTuples$lambda($equalityChecker) {
|
|
420
421
|
return function (_destruct__k2r9zo) {
|
|
421
|
-
var l = _destruct__k2r9zo.
|
|
422
|
-
var r = _destruct__k2r9zo.
|
|
423
|
-
return l.
|
|
422
|
+
var l = _destruct__k2r9zo.he();
|
|
423
|
+
var r = _destruct__k2r9zo.ie();
|
|
424
|
+
return l.px() && r.px() ? sequenceOf(Companion_instance_0.y1l(l.castToTuple().yy(), r.castToTuple().yy(), $equalityChecker)) : Companion_instance_0.g1l(l, r, $equalityChecker);
|
|
424
425
|
};
|
|
425
426
|
}
|
|
426
427
|
function Equation$Companion$allOf$lambda($equalityChecker) {
|
|
427
428
|
return function (it) {
|
|
428
|
-
return Companion_instance_0.
|
|
429
|
+
return Companion_instance_0.d1m(it, $equalityChecker);
|
|
429
430
|
};
|
|
430
431
|
}
|
|
431
432
|
function Identity(lhs, rhs) {
|
|
432
433
|
Equation.call(this, lhs, rhs);
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
434
|
+
this.g1m_1 = lhs;
|
|
435
|
+
this.h1m_1 = rhs;
|
|
435
436
|
}
|
|
436
|
-
protoOf(Identity).
|
|
437
|
-
return this.
|
|
437
|
+
protoOf(Identity).k1l = function () {
|
|
438
|
+
return this.g1m_1;
|
|
438
439
|
};
|
|
439
|
-
protoOf(Identity).
|
|
440
|
-
return this.
|
|
440
|
+
protoOf(Identity).l1l = function () {
|
|
441
|
+
return this.h1m_1;
|
|
441
442
|
};
|
|
442
|
-
protoOf(Identity).
|
|
443
|
+
protoOf(Identity).n1l = function () {
|
|
443
444
|
return true;
|
|
444
445
|
};
|
|
445
|
-
protoOf(Identity).
|
|
446
|
+
protoOf(Identity).i1m = function () {
|
|
446
447
|
return this;
|
|
447
448
|
};
|
|
448
449
|
protoOf(Identity).asIdentity = function () {
|
|
449
|
-
return this.
|
|
450
|
+
return this.i1m();
|
|
450
451
|
};
|
|
451
|
-
protoOf(Identity).
|
|
452
|
-
return this.
|
|
452
|
+
protoOf(Identity).j1m = function (lhs, rhs) {
|
|
453
|
+
return this.k1m(lhs, rhs);
|
|
453
454
|
};
|
|
454
|
-
protoOf(Identity).
|
|
455
|
+
protoOf(Identity).k1m = function (lhs, rhs) {
|
|
455
456
|
return new Identity(lhs, rhs);
|
|
456
457
|
};
|
|
457
458
|
protoOf(Identity).toString = function () {
|
|
458
|
-
return 'Identity(lhs=' + this.
|
|
459
|
+
return 'Identity(lhs=' + this.g1m_1.toString() + ', rhs=' + this.h1m_1.toString() + ')';
|
|
459
460
|
};
|
|
460
461
|
protoOf(Identity).hashCode = function () {
|
|
461
|
-
var result = this.
|
|
462
|
-
result = imul(result, 31) + this.
|
|
462
|
+
var result = this.g1m_1.hashCode();
|
|
463
|
+
result = imul(result, 31) + this.h1m_1.hashCode() | 0;
|
|
463
464
|
return result;
|
|
464
465
|
};
|
|
465
466
|
protoOf(Identity).equals = function (other) {
|
|
@@ -467,90 +468,90 @@
|
|
|
467
468
|
return true;
|
|
468
469
|
if (!(other instanceof Identity))
|
|
469
470
|
return false;
|
|
470
|
-
if (!this.
|
|
471
|
+
if (!this.g1m_1.equals(other.g1m_1))
|
|
471
472
|
return false;
|
|
472
|
-
if (!this.
|
|
473
|
+
if (!this.h1m_1.equals(other.h1m_1))
|
|
473
474
|
return false;
|
|
474
475
|
return true;
|
|
475
476
|
};
|
|
476
477
|
function Assignment(lhs, rhs) {
|
|
477
478
|
Equation.call(this, lhs, rhs);
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
479
|
+
this.r1l_1 = lhs;
|
|
480
|
+
this.s1l_1 = rhs;
|
|
480
481
|
}
|
|
481
|
-
protoOf(Assignment).
|
|
482
|
-
return this.
|
|
482
|
+
protoOf(Assignment).k1l = function () {
|
|
483
|
+
return this.r1l_1;
|
|
483
484
|
};
|
|
484
|
-
protoOf(Assignment).
|
|
485
|
-
return this.
|
|
485
|
+
protoOf(Assignment).l1l = function () {
|
|
486
|
+
return this.s1l_1;
|
|
486
487
|
};
|
|
487
|
-
protoOf(Assignment).
|
|
488
|
+
protoOf(Assignment).w1l = function () {
|
|
488
489
|
return true;
|
|
489
490
|
};
|
|
490
|
-
protoOf(Assignment).
|
|
491
|
+
protoOf(Assignment).o1m = function () {
|
|
491
492
|
return this;
|
|
492
493
|
};
|
|
493
494
|
protoOf(Assignment).asAssignment = function () {
|
|
494
|
-
return this.
|
|
495
|
+
return this.o1m();
|
|
495
496
|
};
|
|
496
|
-
protoOf(Assignment).
|
|
497
|
-
return new Pair(this.
|
|
497
|
+
protoOf(Assignment).p1m = function () {
|
|
498
|
+
return new Pair(this.u1l(), this.v1l());
|
|
498
499
|
};
|
|
499
500
|
protoOf(Assignment).toAssignmentPair = function () {
|
|
500
|
-
return this.
|
|
501
|
+
return this.p1m();
|
|
501
502
|
};
|
|
502
|
-
protoOf(Assignment).
|
|
503
|
-
return Companion_getInstance().unifier(this.
|
|
503
|
+
protoOf(Assignment).t1l = function () {
|
|
504
|
+
return Companion_getInstance().unifier(this.u1l(), this.v1l());
|
|
504
505
|
};
|
|
505
506
|
protoOf(Assignment).toSubstitution = function () {
|
|
506
|
-
return this.
|
|
507
|
+
return this.t1l();
|
|
507
508
|
};
|
|
508
509
|
function LeftAssignment(lhs, rhs) {
|
|
509
510
|
Assignment.call(this, lhs, rhs);
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
511
|
+
this.u1m_1 = lhs;
|
|
512
|
+
this.v1m_1 = rhs;
|
|
513
|
+
this.w1m_1 = this.u1m_1;
|
|
514
|
+
this.x1m_1 = this.v1m_1;
|
|
514
515
|
}
|
|
515
|
-
protoOf(LeftAssignment).
|
|
516
|
-
return this.
|
|
516
|
+
protoOf(LeftAssignment).k1l = function () {
|
|
517
|
+
return this.u1m_1;
|
|
517
518
|
};
|
|
518
|
-
protoOf(LeftAssignment).
|
|
519
|
-
return this.
|
|
519
|
+
protoOf(LeftAssignment).l1l = function () {
|
|
520
|
+
return this.v1m_1;
|
|
520
521
|
};
|
|
521
|
-
protoOf(LeftAssignment).
|
|
522
|
-
return this.
|
|
522
|
+
protoOf(LeftAssignment).u1l = function () {
|
|
523
|
+
return this.w1m_1;
|
|
523
524
|
};
|
|
524
|
-
protoOf(LeftAssignment).
|
|
525
|
-
return this.
|
|
525
|
+
protoOf(LeftAssignment).v1l = function () {
|
|
526
|
+
return this.x1m_1;
|
|
526
527
|
};
|
|
527
|
-
protoOf(LeftAssignment).
|
|
528
|
+
protoOf(LeftAssignment).l1m = function () {
|
|
528
529
|
return true;
|
|
529
530
|
};
|
|
530
|
-
protoOf(LeftAssignment).
|
|
531
|
+
protoOf(LeftAssignment).y1m = function () {
|
|
531
532
|
return this;
|
|
532
533
|
};
|
|
533
534
|
protoOf(LeftAssignment).asLeftAssignment = function () {
|
|
534
|
-
return this.
|
|
535
|
+
return this.y1m();
|
|
535
536
|
};
|
|
536
|
-
protoOf(LeftAssignment).
|
|
537
|
-
return this.
|
|
537
|
+
protoOf(LeftAssignment).j1m = function (lhs, rhs) {
|
|
538
|
+
return this.z1m(lhs.castToVar(), rhs);
|
|
538
539
|
};
|
|
539
|
-
protoOf(LeftAssignment).
|
|
540
|
-
return new Pair(this.
|
|
540
|
+
protoOf(LeftAssignment).a1n = function () {
|
|
541
|
+
return new Pair(this.u1m_1, this.v1m_1);
|
|
541
542
|
};
|
|
542
543
|
protoOf(LeftAssignment).toPair = function () {
|
|
543
|
-
return this.
|
|
544
|
+
return this.a1n();
|
|
544
545
|
};
|
|
545
|
-
protoOf(LeftAssignment).
|
|
546
|
+
protoOf(LeftAssignment).z1m = function (lhs, rhs) {
|
|
546
547
|
return new LeftAssignment(lhs, rhs);
|
|
547
548
|
};
|
|
548
549
|
protoOf(LeftAssignment).toString = function () {
|
|
549
|
-
return 'LeftAssignment(lhs=' + this.
|
|
550
|
+
return 'LeftAssignment(lhs=' + this.u1m_1.toString() + ', rhs=' + this.v1m_1.toString() + ')';
|
|
550
551
|
};
|
|
551
552
|
protoOf(LeftAssignment).hashCode = function () {
|
|
552
|
-
var result = this.
|
|
553
|
-
result = imul(result, 31) + this.
|
|
553
|
+
var result = this.u1m_1.hashCode();
|
|
554
|
+
result = imul(result, 31) + this.v1m_1.hashCode() | 0;
|
|
554
555
|
return result;
|
|
555
556
|
};
|
|
556
557
|
protoOf(LeftAssignment).equals = function (other) {
|
|
@@ -558,58 +559,58 @@
|
|
|
558
559
|
return true;
|
|
559
560
|
if (!(other instanceof LeftAssignment))
|
|
560
561
|
return false;
|
|
561
|
-
if (!this.
|
|
562
|
+
if (!this.u1m_1.equals(other.u1m_1))
|
|
562
563
|
return false;
|
|
563
|
-
if (!this.
|
|
564
|
+
if (!this.v1m_1.equals(other.v1m_1))
|
|
564
565
|
return false;
|
|
565
566
|
return true;
|
|
566
567
|
};
|
|
567
568
|
function RightAssignment(lhs, rhs) {
|
|
568
569
|
Assignment.call(this, lhs, rhs);
|
|
569
|
-
this.
|
|
570
|
-
this.
|
|
571
|
-
this.
|
|
572
|
-
this.
|
|
570
|
+
this.f1n_1 = lhs;
|
|
571
|
+
this.g1n_1 = rhs;
|
|
572
|
+
this.h1n_1 = this.g1n_1;
|
|
573
|
+
this.i1n_1 = this.f1n_1;
|
|
573
574
|
}
|
|
574
|
-
protoOf(RightAssignment).
|
|
575
|
-
return this.
|
|
575
|
+
protoOf(RightAssignment).k1l = function () {
|
|
576
|
+
return this.f1n_1;
|
|
576
577
|
};
|
|
577
|
-
protoOf(RightAssignment).
|
|
578
|
-
return this.
|
|
578
|
+
protoOf(RightAssignment).l1l = function () {
|
|
579
|
+
return this.g1n_1;
|
|
579
580
|
};
|
|
580
|
-
protoOf(RightAssignment).
|
|
581
|
-
return this.
|
|
581
|
+
protoOf(RightAssignment).u1l = function () {
|
|
582
|
+
return this.h1n_1;
|
|
582
583
|
};
|
|
583
|
-
protoOf(RightAssignment).
|
|
584
|
-
return this.
|
|
584
|
+
protoOf(RightAssignment).v1l = function () {
|
|
585
|
+
return this.i1n_1;
|
|
585
586
|
};
|
|
586
|
-
protoOf(RightAssignment).
|
|
587
|
+
protoOf(RightAssignment).m1m = function () {
|
|
587
588
|
return true;
|
|
588
589
|
};
|
|
589
|
-
protoOf(RightAssignment).
|
|
590
|
+
protoOf(RightAssignment).j1n = function () {
|
|
590
591
|
return this;
|
|
591
592
|
};
|
|
592
593
|
protoOf(RightAssignment).asRightAssignment = function () {
|
|
593
|
-
return this.
|
|
594
|
+
return this.j1n();
|
|
594
595
|
};
|
|
595
|
-
protoOf(RightAssignment).
|
|
596
|
-
return this.
|
|
596
|
+
protoOf(RightAssignment).j1m = function (lhs, rhs) {
|
|
597
|
+
return this.k1n(lhs, rhs.castToVar());
|
|
597
598
|
};
|
|
598
|
-
protoOf(RightAssignment).
|
|
599
|
-
return new Pair(this.
|
|
599
|
+
protoOf(RightAssignment).a1n = function () {
|
|
600
|
+
return new Pair(this.f1n_1, this.g1n_1);
|
|
600
601
|
};
|
|
601
602
|
protoOf(RightAssignment).toPair = function () {
|
|
602
|
-
return this.
|
|
603
|
+
return this.a1n();
|
|
603
604
|
};
|
|
604
|
-
protoOf(RightAssignment).
|
|
605
|
+
protoOf(RightAssignment).k1n = function (lhs, rhs) {
|
|
605
606
|
return new RightAssignment(lhs, rhs);
|
|
606
607
|
};
|
|
607
608
|
protoOf(RightAssignment).toString = function () {
|
|
608
|
-
return 'RightAssignment(lhs=' + this.
|
|
609
|
+
return 'RightAssignment(lhs=' + this.f1n_1.toString() + ', rhs=' + this.g1n_1.toString() + ')';
|
|
609
610
|
};
|
|
610
611
|
protoOf(RightAssignment).hashCode = function () {
|
|
611
|
-
var result = this.
|
|
612
|
-
result = imul(result, 31) + this.
|
|
612
|
+
var result = this.f1n_1.hashCode();
|
|
613
|
+
result = imul(result, 31) + this.g1n_1.hashCode() | 0;
|
|
613
614
|
return result;
|
|
614
615
|
};
|
|
615
616
|
protoOf(RightAssignment).equals = function (other) {
|
|
@@ -617,44 +618,44 @@
|
|
|
617
618
|
return true;
|
|
618
619
|
if (!(other instanceof RightAssignment))
|
|
619
620
|
return false;
|
|
620
|
-
if (!this.
|
|
621
|
+
if (!this.f1n_1.equals(other.f1n_1))
|
|
621
622
|
return false;
|
|
622
|
-
if (!this.
|
|
623
|
+
if (!this.g1n_1.equals(other.g1n_1))
|
|
623
624
|
return false;
|
|
624
625
|
return true;
|
|
625
626
|
};
|
|
626
627
|
function Comparison(lhs, rhs) {
|
|
627
628
|
Equation.call(this, lhs, rhs);
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
629
|
+
this.n1n_1 = lhs;
|
|
630
|
+
this.o1n_1 = rhs;
|
|
630
631
|
}
|
|
631
|
-
protoOf(Comparison).
|
|
632
|
-
return this.
|
|
632
|
+
protoOf(Comparison).k1l = function () {
|
|
633
|
+
return this.n1n_1;
|
|
633
634
|
};
|
|
634
|
-
protoOf(Comparison).
|
|
635
|
-
return this.
|
|
635
|
+
protoOf(Comparison).l1l = function () {
|
|
636
|
+
return this.o1n_1;
|
|
636
637
|
};
|
|
637
|
-
protoOf(Comparison).
|
|
638
|
+
protoOf(Comparison).o1l = function () {
|
|
638
639
|
return true;
|
|
639
640
|
};
|
|
640
|
-
protoOf(Comparison).
|
|
641
|
+
protoOf(Comparison).p1n = function () {
|
|
641
642
|
return this;
|
|
642
643
|
};
|
|
643
644
|
protoOf(Comparison).asComparison = function () {
|
|
644
|
-
return this.
|
|
645
|
+
return this.p1n();
|
|
645
646
|
};
|
|
646
|
-
protoOf(Comparison).
|
|
647
|
-
return this.
|
|
647
|
+
protoOf(Comparison).j1m = function (lhs, rhs) {
|
|
648
|
+
return this.k1m(lhs, rhs);
|
|
648
649
|
};
|
|
649
|
-
protoOf(Comparison).
|
|
650
|
+
protoOf(Comparison).k1m = function (lhs, rhs) {
|
|
650
651
|
return new Comparison(lhs, rhs);
|
|
651
652
|
};
|
|
652
653
|
protoOf(Comparison).toString = function () {
|
|
653
|
-
return 'Comparison(lhs=' + this.
|
|
654
|
+
return 'Comparison(lhs=' + this.n1n_1.toString() + ', rhs=' + this.o1n_1.toString() + ')';
|
|
654
655
|
};
|
|
655
656
|
protoOf(Comparison).hashCode = function () {
|
|
656
|
-
var result = this.
|
|
657
|
-
result = imul(result, 31) + this.
|
|
657
|
+
var result = this.n1n_1.hashCode();
|
|
658
|
+
result = imul(result, 31) + this.o1n_1.hashCode() | 0;
|
|
658
659
|
return result;
|
|
659
660
|
};
|
|
660
661
|
protoOf(Comparison).equals = function (other) {
|
|
@@ -662,50 +663,50 @@
|
|
|
662
663
|
return true;
|
|
663
664
|
if (!(other instanceof Comparison))
|
|
664
665
|
return false;
|
|
665
|
-
if (!this.
|
|
666
|
+
if (!this.n1n_1.equals(other.n1n_1))
|
|
666
667
|
return false;
|
|
667
|
-
if (!this.
|
|
668
|
+
if (!this.o1n_1.equals(other.o1n_1))
|
|
668
669
|
return false;
|
|
669
670
|
return true;
|
|
670
671
|
};
|
|
671
672
|
function Contradiction(lhs, rhs) {
|
|
672
673
|
Equation.call(this, lhs, rhs);
|
|
673
|
-
this.
|
|
674
|
-
this.
|
|
674
|
+
this.s1n_1 = lhs;
|
|
675
|
+
this.t1n_1 = rhs;
|
|
675
676
|
}
|
|
676
|
-
protoOf(Contradiction).
|
|
677
|
-
return this.
|
|
677
|
+
protoOf(Contradiction).k1l = function () {
|
|
678
|
+
return this.s1n_1;
|
|
678
679
|
};
|
|
679
|
-
protoOf(Contradiction).
|
|
680
|
-
return this.
|
|
680
|
+
protoOf(Contradiction).l1l = function () {
|
|
681
|
+
return this.t1n_1;
|
|
681
682
|
};
|
|
682
|
-
protoOf(Contradiction).
|
|
683
|
+
protoOf(Contradiction).m1l = function () {
|
|
683
684
|
return true;
|
|
684
685
|
};
|
|
685
|
-
protoOf(Contradiction).
|
|
686
|
+
protoOf(Contradiction).u1n = function () {
|
|
686
687
|
return this;
|
|
687
688
|
};
|
|
688
689
|
protoOf(Contradiction).asContradiction = function () {
|
|
689
|
-
return this.
|
|
690
|
+
return this.u1n();
|
|
690
691
|
};
|
|
691
|
-
protoOf(Contradiction).
|
|
692
|
-
return this.
|
|
692
|
+
protoOf(Contradiction).j1m = function (lhs, rhs) {
|
|
693
|
+
return this.k1m(lhs, rhs);
|
|
693
694
|
};
|
|
694
|
-
protoOf(Contradiction).
|
|
695
|
+
protoOf(Contradiction).t1l = function () {
|
|
695
696
|
return Companion_getInstance().failed();
|
|
696
697
|
};
|
|
697
698
|
protoOf(Contradiction).toSubstitution = function () {
|
|
698
|
-
return this.
|
|
699
|
+
return this.t1l();
|
|
699
700
|
};
|
|
700
|
-
protoOf(Contradiction).
|
|
701
|
+
protoOf(Contradiction).k1m = function (lhs, rhs) {
|
|
701
702
|
return new Contradiction(lhs, rhs);
|
|
702
703
|
};
|
|
703
704
|
protoOf(Contradiction).toString = function () {
|
|
704
|
-
return 'Contradiction(lhs=' + this.
|
|
705
|
+
return 'Contradiction(lhs=' + this.s1n_1.toString() + ', rhs=' + this.t1n_1.toString() + ')';
|
|
705
706
|
};
|
|
706
707
|
protoOf(Contradiction).hashCode = function () {
|
|
707
|
-
var result = this.
|
|
708
|
-
result = imul(result, 31) + this.
|
|
708
|
+
var result = this.s1n_1.hashCode();
|
|
709
|
+
result = imul(result, 31) + this.t1n_1.hashCode() | 0;
|
|
709
710
|
return result;
|
|
710
711
|
};
|
|
711
712
|
protoOf(Contradiction).equals = function (other) {
|
|
@@ -713,17 +714,17 @@
|
|
|
713
714
|
return true;
|
|
714
715
|
if (!(other instanceof Contradiction))
|
|
715
716
|
return false;
|
|
716
|
-
if (!this.
|
|
717
|
+
if (!this.s1n_1.equals(other.s1n_1))
|
|
717
718
|
return false;
|
|
718
|
-
if (!this.
|
|
719
|
+
if (!this.t1n_1.equals(other.t1n_1))
|
|
719
720
|
return false;
|
|
720
721
|
return true;
|
|
721
722
|
};
|
|
722
723
|
function Companion() {
|
|
723
724
|
}
|
|
724
|
-
protoOf(Companion).
|
|
725
|
+
protoOf(Companion).y1l = function (lhs, rhs, equalityChecker) {
|
|
725
726
|
var tmp;
|
|
726
|
-
if (lhs.
|
|
727
|
+
if (lhs.ay() && rhs.ay()) {
|
|
727
728
|
var tmp_0;
|
|
728
729
|
if (equalityChecker(lhs, rhs)) {
|
|
729
730
|
tmp_0 = new Identity(lhs, rhs);
|
|
@@ -731,11 +732,11 @@
|
|
|
731
732
|
tmp_0 = new LeftAssignment(lhs.castToVar(), rhs);
|
|
732
733
|
}
|
|
733
734
|
tmp = tmp_0;
|
|
734
|
-
} else if (lhs.
|
|
735
|
+
} else if (lhs.ay()) {
|
|
735
736
|
tmp = new LeftAssignment(lhs.castToVar(), rhs);
|
|
736
|
-
} else if (rhs.
|
|
737
|
+
} else if (rhs.ay()) {
|
|
737
738
|
tmp = new RightAssignment(lhs, rhs.castToVar());
|
|
738
|
-
} else if (lhs.
|
|
739
|
+
} else if (lhs.dy() && rhs.dy()) {
|
|
739
740
|
var tmp_1;
|
|
740
741
|
if (equalityChecker(lhs, rhs)) {
|
|
741
742
|
tmp_1 = new Identity(lhs, rhs);
|
|
@@ -743,13 +744,13 @@
|
|
|
743
744
|
tmp_1 = new Contradiction(lhs, rhs);
|
|
744
745
|
}
|
|
745
746
|
tmp = tmp_1;
|
|
746
|
-
} else if (lhs.
|
|
747
|
+
} else if (lhs.dy() || rhs.dy()) {
|
|
747
748
|
tmp = new Contradiction(lhs, rhs);
|
|
748
|
-
} else if (lhs.
|
|
749
|
+
} else if (lhs.kx() && rhs.kx()) {
|
|
749
750
|
var lhsStruct = lhs.castToStruct();
|
|
750
751
|
var rhsStruct = rhs.castToStruct();
|
|
751
752
|
var tmp_2;
|
|
752
|
-
if (!(lhsStruct.
|
|
753
|
+
if (!(lhsStruct.yw() === rhsStruct.yw()) || !(lhsStruct.ex() === rhsStruct.ex())) {
|
|
753
754
|
tmp_2 = new Contradiction(lhsStruct, rhsStruct);
|
|
754
755
|
} else {
|
|
755
756
|
tmp_2 = new Comparison(lhsStruct, rhsStruct);
|
|
@@ -768,10 +769,10 @@
|
|
|
768
769
|
tmp = equalityChecker;
|
|
769
770
|
}
|
|
770
771
|
equalityChecker = tmp;
|
|
771
|
-
return $super === VOID ? this.
|
|
772
|
+
return $super === VOID ? this.y1l(lhs, rhs, equalityChecker) : $super.y1l.call(this, lhs, rhs, equalityChecker);
|
|
772
773
|
};
|
|
773
|
-
protoOf(Companion).
|
|
774
|
-
return this.
|
|
774
|
+
protoOf(Companion).v1n = function (pair, equalityChecker) {
|
|
775
|
+
return this.y1l(pair.first, pair.second, equalityChecker);
|
|
775
776
|
};
|
|
776
777
|
protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
|
|
777
778
|
var tmp;
|
|
@@ -781,9 +782,9 @@
|
|
|
781
782
|
tmp = equalityChecker;
|
|
782
783
|
}
|
|
783
784
|
equalityChecker = tmp;
|
|
784
|
-
return $super === VOID ? this.
|
|
785
|
+
return $super === VOID ? this.v1n(pair, equalityChecker) : $super.v1n.call(this, pair, equalityChecker);
|
|
785
786
|
};
|
|
786
|
-
protoOf(Companion).
|
|
787
|
+
protoOf(Companion).w1n = function (pairs, equalityChecker) {
|
|
787
788
|
return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
|
|
788
789
|
};
|
|
789
790
|
protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
|
|
@@ -794,10 +795,10 @@
|
|
|
794
795
|
tmp = equalityChecker;
|
|
795
796
|
}
|
|
796
797
|
equalityChecker = tmp;
|
|
797
|
-
return $super === VOID ? this.
|
|
798
|
+
return $super === VOID ? this.w1n(pairs, equalityChecker) : $super.w1n.call(this, pairs, equalityChecker);
|
|
798
799
|
};
|
|
799
|
-
protoOf(Companion).
|
|
800
|
-
return this.
|
|
800
|
+
protoOf(Companion).x1n = function (pairs, equalityChecker) {
|
|
801
|
+
return this.w1n(asSequence_0(pairs), equalityChecker);
|
|
801
802
|
};
|
|
802
803
|
protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
|
|
803
804
|
var tmp;
|
|
@@ -807,10 +808,10 @@
|
|
|
807
808
|
tmp = equalityChecker;
|
|
808
809
|
}
|
|
809
810
|
equalityChecker = tmp;
|
|
810
|
-
return $super === VOID ? this.
|
|
811
|
+
return $super === VOID ? this.x1n(pairs, equalityChecker) : $super.x1n.call(this, pairs, equalityChecker);
|
|
811
812
|
};
|
|
812
|
-
protoOf(Companion).
|
|
813
|
-
return this.
|
|
813
|
+
protoOf(Companion).y1n = function (pairs, equalityChecker) {
|
|
814
|
+
return this.w1n(sequenceOf_0(pairs.slice()), equalityChecker);
|
|
814
815
|
};
|
|
815
816
|
protoOf(Companion).from = function (pairs, equalityChecker, $super) {
|
|
816
817
|
var tmp;
|
|
@@ -820,10 +821,10 @@
|
|
|
820
821
|
tmp = equalityChecker;
|
|
821
822
|
}
|
|
822
823
|
equalityChecker = tmp;
|
|
823
|
-
return $super === VOID ? this.
|
|
824
|
+
return $super === VOID ? this.y1n(pairs, equalityChecker) : $super.y1n.call(this, pairs, equalityChecker);
|
|
824
825
|
};
|
|
825
|
-
protoOf(Companion).
|
|
826
|
-
return this.
|
|
826
|
+
protoOf(Companion).d1m = function (pair, equalityChecker) {
|
|
827
|
+
return this.g1l(pair.first, pair.second, equalityChecker);
|
|
827
828
|
};
|
|
828
829
|
protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
|
|
829
830
|
var tmp;
|
|
@@ -833,29 +834,29 @@
|
|
|
833
834
|
tmp = equalityChecker;
|
|
834
835
|
}
|
|
835
836
|
equalityChecker = tmp;
|
|
836
|
-
return $super === VOID ? this.
|
|
837
|
+
return $super === VOID ? this.d1m(pair, equalityChecker) : $super.d1m.call(this, pair, equalityChecker);
|
|
837
838
|
};
|
|
838
|
-
protoOf(Companion).
|
|
839
|
+
protoOf(Companion).g1l = function (lhs, rhs, equalityChecker) {
|
|
839
840
|
var tmp;
|
|
840
|
-
if (lhs.
|
|
841
|
-
tmp = sequenceOf(this.
|
|
842
|
-
} else if (lhs.
|
|
841
|
+
if (lhs.zw() && rhs.zw()) {
|
|
842
|
+
tmp = sequenceOf(this.y1l(lhs, rhs, equalityChecker));
|
|
843
|
+
} else if (lhs.qx() && rhs.qx()) {
|
|
843
844
|
tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
|
|
844
|
-
} else if (lhs.
|
|
845
|
+
} else if (lhs.px() && rhs.px()) {
|
|
845
846
|
tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
|
|
846
|
-
} else if (lhs.
|
|
847
|
+
} else if (lhs.kx() && rhs.kx()) {
|
|
847
848
|
var lhsStruct = lhs.castToStruct();
|
|
848
849
|
var rhsStruct = rhs.castToStruct();
|
|
849
850
|
var tmp_0;
|
|
850
|
-
if (lhsStruct.
|
|
851
|
-
var tmp_1 = zip(lhsStruct.
|
|
851
|
+
if (lhsStruct.yw() === rhsStruct.yw() && lhsStruct.ex() === rhsStruct.ex()) {
|
|
852
|
+
var tmp_1 = zip(lhsStruct.xx(), rhsStruct.xx());
|
|
852
853
|
tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
|
|
853
854
|
} else {
|
|
854
|
-
tmp_0 = sequenceOf(this.
|
|
855
|
+
tmp_0 = sequenceOf(this.y1l(lhs, rhs, equalityChecker));
|
|
855
856
|
}
|
|
856
857
|
tmp = tmp_0;
|
|
857
858
|
} else {
|
|
858
|
-
tmp = sequenceOf(this.
|
|
859
|
+
tmp = sequenceOf(this.y1l(lhs, rhs, equalityChecker));
|
|
859
860
|
}
|
|
860
861
|
return tmp;
|
|
861
862
|
};
|
|
@@ -867,23 +868,23 @@
|
|
|
867
868
|
tmp = equalityChecker;
|
|
868
869
|
}
|
|
869
870
|
equalityChecker = tmp;
|
|
870
|
-
return $super === VOID ? this.
|
|
871
|
+
return $super === VOID ? this.g1l(lhs, rhs, equalityChecker) : $super.g1l.call(this, lhs, rhs, equalityChecker);
|
|
871
872
|
};
|
|
872
873
|
var Companion_instance_0;
|
|
873
874
|
function Companion_getInstance_1() {
|
|
874
875
|
return Companion_instance_0;
|
|
875
876
|
}
|
|
876
877
|
function Equation(lhs, rhs) {
|
|
877
|
-
this.
|
|
878
|
-
this.
|
|
878
|
+
this.i1l_1 = lhs;
|
|
879
|
+
this.j1l_1 = rhs;
|
|
879
880
|
}
|
|
880
|
-
protoOf(Equation).
|
|
881
|
-
return this.
|
|
881
|
+
protoOf(Equation).k1l = function () {
|
|
882
|
+
return this.i1l_1;
|
|
882
883
|
};
|
|
883
|
-
protoOf(Equation).
|
|
884
|
-
return this.
|
|
884
|
+
protoOf(Equation).l1l = function () {
|
|
885
|
+
return this.j1l_1;
|
|
885
886
|
};
|
|
886
|
-
protoOf(Equation).
|
|
887
|
+
protoOf(Equation).n1l = function () {
|
|
887
888
|
return false;
|
|
888
889
|
};
|
|
889
890
|
protoOf(Equation).asIdentity = function () {
|
|
@@ -893,13 +894,13 @@
|
|
|
893
894
|
var tmp0_elvis_lhs = this.asIdentity();
|
|
894
895
|
var tmp;
|
|
895
896
|
if (tmp0_elvis_lhs == null) {
|
|
896
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Identity).
|
|
897
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Identity).r9());
|
|
897
898
|
} else {
|
|
898
899
|
tmp = tmp0_elvis_lhs;
|
|
899
900
|
}
|
|
900
901
|
return tmp;
|
|
901
902
|
};
|
|
902
|
-
protoOf(Equation).
|
|
903
|
+
protoOf(Equation).w1l = function () {
|
|
903
904
|
return false;
|
|
904
905
|
};
|
|
905
906
|
protoOf(Equation).asAssignment = function () {
|
|
@@ -909,13 +910,13 @@
|
|
|
909
910
|
var tmp0_elvis_lhs = this.asAssignment();
|
|
910
911
|
var tmp;
|
|
911
912
|
if (tmp0_elvis_lhs == null) {
|
|
912
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).
|
|
913
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).r9());
|
|
913
914
|
} else {
|
|
914
915
|
tmp = tmp0_elvis_lhs;
|
|
915
916
|
}
|
|
916
917
|
return tmp;
|
|
917
918
|
};
|
|
918
|
-
protoOf(Equation).
|
|
919
|
+
protoOf(Equation).l1m = function () {
|
|
919
920
|
return false;
|
|
920
921
|
};
|
|
921
922
|
protoOf(Equation).asLeftAssignment = function () {
|
|
@@ -925,13 +926,13 @@
|
|
|
925
926
|
var tmp0_elvis_lhs = this.asLeftAssignment();
|
|
926
927
|
var tmp;
|
|
927
928
|
if (tmp0_elvis_lhs == null) {
|
|
928
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(LeftAssignment).
|
|
929
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(LeftAssignment).r9());
|
|
929
930
|
} else {
|
|
930
931
|
tmp = tmp0_elvis_lhs;
|
|
931
932
|
}
|
|
932
933
|
return tmp;
|
|
933
934
|
};
|
|
934
|
-
protoOf(Equation).
|
|
935
|
+
protoOf(Equation).m1m = function () {
|
|
935
936
|
return false;
|
|
936
937
|
};
|
|
937
938
|
protoOf(Equation).asRightAssignment = function () {
|
|
@@ -941,13 +942,13 @@
|
|
|
941
942
|
var tmp0_elvis_lhs = this.asRightAssignment();
|
|
942
943
|
var tmp;
|
|
943
944
|
if (tmp0_elvis_lhs == null) {
|
|
944
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(RightAssignment).
|
|
945
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(RightAssignment).r9());
|
|
945
946
|
} else {
|
|
946
947
|
tmp = tmp0_elvis_lhs;
|
|
947
948
|
}
|
|
948
949
|
return tmp;
|
|
949
950
|
};
|
|
950
|
-
protoOf(Equation).
|
|
951
|
+
protoOf(Equation).o1l = function () {
|
|
951
952
|
return false;
|
|
952
953
|
};
|
|
953
954
|
protoOf(Equation).asComparison = function () {
|
|
@@ -957,13 +958,13 @@
|
|
|
957
958
|
var tmp0_elvis_lhs = this.asComparison();
|
|
958
959
|
var tmp;
|
|
959
960
|
if (tmp0_elvis_lhs == null) {
|
|
960
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Comparison).
|
|
961
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Comparison).r9());
|
|
961
962
|
} else {
|
|
962
963
|
tmp = tmp0_elvis_lhs;
|
|
963
964
|
}
|
|
964
965
|
return tmp;
|
|
965
966
|
};
|
|
966
|
-
protoOf(Equation).
|
|
967
|
+
protoOf(Equation).m1l = function () {
|
|
967
968
|
return false;
|
|
968
969
|
};
|
|
969
970
|
protoOf(Equation).asContradiction = function () {
|
|
@@ -973,26 +974,26 @@
|
|
|
973
974
|
var tmp0_elvis_lhs = this.asContradiction();
|
|
974
975
|
var tmp;
|
|
975
976
|
if (tmp0_elvis_lhs == null) {
|
|
976
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Contradiction).
|
|
977
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Contradiction).r9());
|
|
977
978
|
} else {
|
|
978
979
|
tmp = tmp0_elvis_lhs;
|
|
979
980
|
}
|
|
980
981
|
return tmp;
|
|
981
982
|
};
|
|
982
983
|
protoOf(Equation).clone = function (lhs, rhs, $super) {
|
|
983
|
-
lhs = lhs === VOID ? this.
|
|
984
|
-
rhs = rhs === VOID ? this.
|
|
985
|
-
return $super === VOID ? this.
|
|
984
|
+
lhs = lhs === VOID ? this.k1l() : lhs;
|
|
985
|
+
rhs = rhs === VOID ? this.l1l() : rhs;
|
|
986
|
+
return $super === VOID ? this.j1m(lhs, rhs) : $super.j1m.call(this, lhs, rhs);
|
|
986
987
|
};
|
|
987
988
|
protoOf(Equation).toContradiction = function () {
|
|
988
|
-
return new Contradiction(this.
|
|
989
|
+
return new Contradiction(this.k1l(), this.l1l());
|
|
989
990
|
};
|
|
990
991
|
protoOf(Equation).toAssignmentPair = function () {
|
|
991
992
|
var tmp;
|
|
992
|
-
if (this.
|
|
993
|
-
tmp = to(this.
|
|
994
|
-
} else if (this.
|
|
995
|
-
tmp = to(this.
|
|
993
|
+
if (this.k1l().ay()) {
|
|
994
|
+
tmp = to(this.k1l().castToVar(), this.l1l());
|
|
995
|
+
} else if (this.l1l().ay()) {
|
|
996
|
+
tmp = to(this.l1l().castToVar(), this.k1l());
|
|
996
997
|
} else {
|
|
997
998
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(this));
|
|
998
999
|
}
|
|
@@ -1000,29 +1001,29 @@
|
|
|
1000
1001
|
};
|
|
1001
1002
|
protoOf(Equation).toSubstitution = function () {
|
|
1002
1003
|
var tmp;
|
|
1003
|
-
if (this.
|
|
1004
|
-
tmp = Companion_getInstance().unifier(this.
|
|
1005
|
-
} else if (this.
|
|
1006
|
-
tmp = Companion_getInstance().unifier(this.
|
|
1004
|
+
if (this.k1l().ay()) {
|
|
1005
|
+
tmp = Companion_getInstance().unifier(this.k1l().castToVar(), this.l1l());
|
|
1006
|
+
} else if (this.l1l().ay()) {
|
|
1007
|
+
tmp = Companion_getInstance().unifier(this.l1l().castToVar(), this.k1l());
|
|
1007
1008
|
} else {
|
|
1008
1009
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(this));
|
|
1009
1010
|
}
|
|
1010
1011
|
return tmp;
|
|
1011
1012
|
};
|
|
1012
|
-
protoOf(Equation).
|
|
1013
|
-
return Companion_getInstance_0().of('=', [this.
|
|
1013
|
+
protoOf(Equation).g1k = function () {
|
|
1014
|
+
return Companion_getInstance_0().of('=', [this.k1l(), this.l1l()]);
|
|
1014
1015
|
};
|
|
1015
1016
|
protoOf(Equation).toTerm = function () {
|
|
1016
|
-
return this.
|
|
1017
|
+
return this.g1k();
|
|
1017
1018
|
};
|
|
1018
1019
|
protoOf(Equation).toPair = function () {
|
|
1019
|
-
return new Pair(this.
|
|
1020
|
+
return new Pair(this.k1l(), this.l1l());
|
|
1020
1021
|
};
|
|
1021
1022
|
protoOf(Equation).swap = function () {
|
|
1022
|
-
return Companion_instance_0.of(this.
|
|
1023
|
+
return Companion_instance_0.of(this.l1l(), this.k1l());
|
|
1023
1024
|
};
|
|
1024
|
-
protoOf(Equation).
|
|
1025
|
-
return Companion_instance_0.
|
|
1025
|
+
protoOf(Equation).n1m = function (substitution, equalityChecker) {
|
|
1026
|
+
return Companion_instance_0.y1l(this.k1l().getSubstituted(substitution, []), this.l1l().getSubstituted(substitution, []), equalityChecker);
|
|
1026
1027
|
};
|
|
1027
1028
|
protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
|
|
1028
1029
|
var tmp;
|
|
@@ -1032,20 +1033,20 @@
|
|
|
1032
1033
|
tmp = equalityChecker;
|
|
1033
1034
|
}
|
|
1034
1035
|
equalityChecker = tmp;
|
|
1035
|
-
return $super === VOID ? this.
|
|
1036
|
+
return $super === VOID ? this.n1m(substitution, equalityChecker) : $super.n1m.call(this, substitution, equalityChecker);
|
|
1036
1037
|
};
|
|
1037
1038
|
function toEquations(_this__u8e3s4) {
|
|
1038
1039
|
// Inline function 'kotlin.collections.map' call
|
|
1039
|
-
var this_0 = _this__u8e3s4.
|
|
1040
|
+
var this_0 = _this__u8e3s4.d1();
|
|
1040
1041
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1041
1042
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1042
1043
|
var _iterator__ex2g4s = this_0.n();
|
|
1043
1044
|
while (_iterator__ex2g4s.q()) {
|
|
1044
1045
|
var item = _iterator__ex2g4s.r();
|
|
1045
1046
|
// Inline function 'kotlin.collections.component1' call
|
|
1046
|
-
var variable = item.
|
|
1047
|
+
var variable = item.g2();
|
|
1047
1048
|
// Inline function 'kotlin.collections.component2' call
|
|
1048
|
-
var term = item.
|
|
1049
|
+
var term = item.h2();
|
|
1049
1050
|
var tmp$ret$2 = new LeftAssignment(variable, term);
|
|
1050
1051
|
destination.l(tmp$ret$2);
|
|
1051
1052
|
}
|
|
@@ -1064,18 +1065,18 @@
|
|
|
1064
1065
|
}
|
|
1065
1066
|
function Unificator$Companion$_get_default_$ref_8i2tx3() {
|
|
1066
1067
|
return constructCallableReference(function (p0) {
|
|
1067
|
-
return p0.
|
|
1068
|
-
}, 1, 0,
|
|
1068
|
+
return p0.b1o();
|
|
1069
|
+
}, 1, 0, 31);
|
|
1069
1070
|
}
|
|
1070
1071
|
function Unificator$Companion$naive$1($context) {
|
|
1071
1072
|
AbstractUnificator.call(this, $context);
|
|
1072
1073
|
}
|
|
1073
|
-
protoOf(Unificator$Companion$naive$1).
|
|
1074
|
+
protoOf(Unificator$Companion$naive$1).f1l = function (first, second) {
|
|
1074
1075
|
var tmp;
|
|
1075
|
-
if (first.
|
|
1076
|
-
tmp = first.castToInteger().
|
|
1077
|
-
} else if (first.
|
|
1078
|
-
tmp = first.castToNumeric().
|
|
1076
|
+
if (first.fy() && second.fy()) {
|
|
1077
|
+
tmp = first.castToInteger().h2().ol(second.castToInteger().h2()) === 0;
|
|
1078
|
+
} else if (first.ey() && second.ey()) {
|
|
1079
|
+
tmp = first.castToNumeric().u11().fl(second.castToNumeric().u11()) === 0;
|
|
1079
1080
|
} else {
|
|
1080
1081
|
tmp = first.equals(second);
|
|
1081
1082
|
}
|
|
@@ -1087,7 +1088,7 @@
|
|
|
1087
1088
|
function Unificator$Companion$strict$1($context) {
|
|
1088
1089
|
AbstractUnificator.call(this, $context);
|
|
1089
1090
|
}
|
|
1090
|
-
protoOf(Unificator$Companion$strict$1).
|
|
1091
|
+
protoOf(Unificator$Companion$strict$1).f1l = function (first, second) {
|
|
1091
1092
|
return first.equals(second);
|
|
1092
1093
|
};
|
|
1093
1094
|
protoOf(Unificator$Companion$strict$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
@@ -1096,27 +1097,27 @@
|
|
|
1096
1097
|
function Companion_0() {
|
|
1097
1098
|
Companion_instance_1 = this;
|
|
1098
1099
|
var tmp = this;
|
|
1099
|
-
tmp.
|
|
1100
|
-
this.
|
|
1100
|
+
tmp.z1n_1 = lazy(Unificator$Companion$default$delegate$lambda);
|
|
1101
|
+
this.a1o_1 = 32;
|
|
1101
1102
|
}
|
|
1102
|
-
protoOf(Companion_0).
|
|
1103
|
-
var tmp0 = this.
|
|
1103
|
+
protoOf(Companion_0).b1o = function () {
|
|
1104
|
+
var tmp0 = this.z1n_1;
|
|
1104
1105
|
var tmp = KProperty1;
|
|
1105
1106
|
// Inline function 'kotlin.getValue' call
|
|
1106
1107
|
/* dead property reference removed */
|
|
1107
|
-
return tmp0.
|
|
1108
|
+
return tmp0.h2();
|
|
1108
1109
|
};
|
|
1109
1110
|
protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
|
|
1110
|
-
return this.
|
|
1111
|
+
return this.b1o().mgu(_this__u8e3s4, other);
|
|
1111
1112
|
};
|
|
1112
1113
|
protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
|
|
1113
|
-
return this.
|
|
1114
|
+
return this.b1o().match(_this__u8e3s4, other);
|
|
1114
1115
|
};
|
|
1115
1116
|
protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
|
|
1116
|
-
return this.
|
|
1117
|
+
return this.b1o().unify(_this__u8e3s4, other);
|
|
1117
1118
|
};
|
|
1118
1119
|
protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
|
|
1119
|
-
return this.
|
|
1120
|
+
return this.b1o().merge(_this__u8e3s4, other);
|
|
1120
1121
|
};
|
|
1121
1122
|
protoOf(Companion_0).naiveWithContext = function (context) {
|
|
1122
1123
|
return new Unificator$Companion$naive$1(context);
|
|
@@ -1130,10 +1131,10 @@
|
|
|
1130
1131
|
protoOf(Companion_0).strict = function () {
|
|
1131
1132
|
return this.strictWithContext(Companion_getInstance().empty());
|
|
1132
1133
|
};
|
|
1133
|
-
protoOf(Companion_0).
|
|
1134
|
+
protoOf(Companion_0).g1o = function (other, capacity) {
|
|
1134
1135
|
var tmp;
|
|
1135
1136
|
if (other instanceof CachedUnificator) {
|
|
1136
|
-
tmp = new CachedUnificator(other.
|
|
1137
|
+
tmp = new CachedUnificator(other.b1m_1, capacity);
|
|
1137
1138
|
} else {
|
|
1138
1139
|
tmp = new CachedUnificator(other, capacity);
|
|
1139
1140
|
}
|
|
@@ -1141,7 +1142,7 @@
|
|
|
1141
1142
|
};
|
|
1142
1143
|
protoOf(Companion_0).cached = function (other, capacity, $super) {
|
|
1143
1144
|
capacity = capacity === VOID ? 32 : capacity;
|
|
1144
|
-
return $super === VOID ? this.
|
|
1145
|
+
return $super === VOID ? this.g1o(other, capacity) : $super.g1o.call(this, other, capacity);
|
|
1145
1146
|
};
|
|
1146
1147
|
var Companion_instance_1;
|
|
1147
1148
|
function Companion_getInstance_2() {
|
|
@@ -1166,38 +1167,38 @@
|
|
|
1166
1167
|
protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
|
|
1167
1168
|
protoOf(CachedUnificator).unify = unify;
|
|
1168
1169
|
protoOf(CachedUnificator).merge = merge;
|
|
1169
|
-
protoOf(Equation).
|
|
1170
|
+
protoOf(Equation).sr = castTo;
|
|
1170
1171
|
defineProp(protoOf(Equation), 'lhs', function () {
|
|
1171
|
-
return this.
|
|
1172
|
+
return this.k1l();
|
|
1172
1173
|
});
|
|
1173
1174
|
defineProp(protoOf(Equation), 'rhs', function () {
|
|
1174
|
-
return this.
|
|
1175
|
+
return this.l1l();
|
|
1175
1176
|
});
|
|
1176
1177
|
defineProp(protoOf(Equation), 'isIdentity', function () {
|
|
1177
|
-
return this.
|
|
1178
|
+
return this.n1l();
|
|
1178
1179
|
});
|
|
1179
1180
|
defineProp(protoOf(Equation), 'isAssignment', function () {
|
|
1180
|
-
return this.
|
|
1181
|
+
return this.w1l();
|
|
1181
1182
|
});
|
|
1182
1183
|
defineProp(protoOf(Equation), 'isLeftAssignment', function () {
|
|
1183
|
-
return this.
|
|
1184
|
+
return this.l1m();
|
|
1184
1185
|
});
|
|
1185
1186
|
defineProp(protoOf(Equation), 'isRightAssignment', function () {
|
|
1186
|
-
return this.
|
|
1187
|
+
return this.m1m();
|
|
1187
1188
|
});
|
|
1188
1189
|
defineProp(protoOf(Equation), 'isComparison', function () {
|
|
1189
|
-
return this.
|
|
1190
|
+
return this.o1l();
|
|
1190
1191
|
});
|
|
1191
1192
|
defineProp(protoOf(Equation), 'isContradiction', function () {
|
|
1192
|
-
return this.
|
|
1193
|
+
return this.m1l();
|
|
1193
1194
|
});
|
|
1194
1195
|
defineProp(protoOf(Assignment), 'variable', function () {
|
|
1195
|
-
return this.
|
|
1196
|
+
return this.u1l();
|
|
1196
1197
|
});
|
|
1197
1198
|
defineProp(protoOf(Assignment), 'term', function () {
|
|
1198
|
-
return this.
|
|
1199
|
+
return this.v1l();
|
|
1199
1200
|
});
|
|
1200
|
-
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).
|
|
1201
|
+
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).b1o);
|
|
1201
1202
|
//endregion
|
|
1202
1203
|
//region block: init
|
|
1203
1204
|
Companion_instance_0 = new Companion();
|
|
@@ -1205,6 +1206,8 @@
|
|
|
1205
1206
|
//region block: exports
|
|
1206
1207
|
_.$_$ = _.$_$ || {};
|
|
1207
1208
|
_.$_$.a = Companion_getInstance_2;
|
|
1209
|
+
_.$_$.b = mguWithOccurCheck;
|
|
1210
|
+
_.$_$.c = Unificator;
|
|
1208
1211
|
//endregion
|
|
1209
1212
|
return _;
|
|
1210
1213
|
}));
|