@tuprolog/2p-full 2.0.5 → 2.0.9
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-bdd.js +172 -172
- package/2p-bdd.js.map +1 -1
- package/2p-core.js +3593 -3366
- package/2p-core.js.map +1 -1
- package/2p-datalog.js.map +1 -1
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js.map +1 -1
- package/2p-full.js +17 -4
- package/2p-full.js.map +1 -1
- package/2p-gui-plp.js.map +1 -1
- package/2p-gui.js.map +1 -1
- package/2p-ide-web.js.map +1 -1
- package/2p-io-lib.js +3489 -5
- package/2p-io-lib.js.map +1 -1
- package/2p-oop-lib.js +3382 -5
- package/2p-oop-lib.js.map +1 -1
- package/2p-parser-core.js +616 -5
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-impl.js +5636 -5
- package/2p-parser-impl.js.map +1 -1
- package/2p-parser-theory.js +278 -5
- package/2p-parser-theory.js.map +1 -1
- package/2p-repl.js +533 -5
- package/2p-repl.js.map +1 -1
- package/2p-serialize-core.js.map +1 -1
- package/2p-serialize-theory.js.map +1 -1
- package/2p-solve-classic.js +1050 -1050
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve-concurrent.js.map +1 -1
- package/2p-solve-plp.js +3 -3
- package/2p-solve-plp.js.map +1 -1
- package/2p-solve-problog.js +1450 -1444
- package/2p-solve-problog.js.map +1 -1
- package/2p-solve-streams.js +1033 -1033
- package/2p-solve-streams.js.map +1 -1
- package/2p-solve.js +5580 -4490
- package/2p-solve.js.map +1 -1
- package/2p-test-dsl.js.map +1 -1
- package/2p-theory.js +1725 -1725
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +375 -375
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +546 -493
- package/2p-utils.js.map +1 -1
- package/clikt-clikt-mordant.js +311 -5
- package/clikt-clikt-mordant.js.map +1 -1
- package/clikt-clikt.js +6672 -5
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +1654 -5
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +5400 -2597
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlin-test.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/kt-math.js +1622 -1614
- package/kt-math.js.map +1 -1
- package/mordant-mordant-omnibus.js.map +1 -1
- package/mordant-mordant.js +10375 -5
- package/mordant-mordant.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 +4 -4
package/2p-unify.js
CHANGED
|
@@ -19,66 +19,66 @@
|
|
|
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.$_$.r8;
|
|
23
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.v7;
|
|
24
|
+
var initMetadataForClass = kotlin_kotlin.$_$.a8;
|
|
25
|
+
var toString = kotlin_kotlin.$_$.u8;
|
|
26
|
+
var hashCode = kotlin_kotlin.$_$.z7;
|
|
27
|
+
var equals = kotlin_kotlin.$_$.s7;
|
|
28
|
+
var KProperty1 = kotlin_kotlin.$_$.s9;
|
|
29
|
+
var getPropertyCallableRef = kotlin_kotlin.$_$.x7;
|
|
30
|
+
var asSequence = kotlin_kotlin.$_$.q2;
|
|
31
|
+
var plus = kotlin_kotlin.$_$.za;
|
|
32
|
+
var map = kotlin_kotlin.$_$.ua;
|
|
33
|
+
var Unit_instance = kotlin_kotlin.$_$.r;
|
|
34
|
+
var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.y;
|
|
35
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.u;
|
|
36
|
+
var toCollection = kotlin_kotlin.$_$.hb;
|
|
37
|
+
var constructCallableReference = kotlin_kotlin.$_$.q7;
|
|
38
|
+
var Pair = kotlin_kotlin.$_$.ee;
|
|
39
|
+
var lazy = kotlin_kotlin.$_$.pe;
|
|
40
|
+
var asSequence_0 = kotlin_kotlin.$_$.r2;
|
|
41
|
+
var THROW_CCE = kotlin_kotlin.$_$.ge;
|
|
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.$_$.
|
|
57
|
-
var castTo = kotlin_it_unibo_tuprolog_utils.$_$.
|
|
58
|
-
var Castable = kotlin_it_unibo_tuprolog_utils.$_$.
|
|
59
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
60
|
-
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.
|
|
61
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
44
|
+
var Triple = kotlin_kotlin.$_$.ie;
|
|
45
|
+
var Some = kotlin_it_unibo_tuprolog_utils.$_$.m;
|
|
46
|
+
var zip = kotlin_kotlin.$_$.ob;
|
|
47
|
+
var flatMap = kotlin_kotlin.$_$.ja;
|
|
48
|
+
var sequenceOf = kotlin_kotlin.$_$.cb;
|
|
49
|
+
var defineProp = kotlin_kotlin.$_$.r7;
|
|
50
|
+
var sequenceOf_0 = kotlin_kotlin.$_$.bb;
|
|
51
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.b8;
|
|
52
|
+
var getKClass = kotlin_kotlin.$_$.p9;
|
|
53
|
+
var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.f1;
|
|
54
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.j1;
|
|
55
|
+
var to = kotlin_kotlin.$_$.we;
|
|
56
|
+
var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.x;
|
|
57
|
+
var castTo = kotlin_it_unibo_tuprolog_utils.$_$.f;
|
|
58
|
+
var Castable = kotlin_it_unibo_tuprolog_utils.$_$.g;
|
|
59
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.w2;
|
|
60
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.t;
|
|
61
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.d8;
|
|
62
62
|
//endregion
|
|
63
63
|
//region block: pre-declaration
|
|
64
64
|
initMetadataForClass(Mgu, 'Mgu');
|
|
65
65
|
initMetadataForClass(Merge, 'Merge');
|
|
66
66
|
function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
|
|
67
67
|
occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
|
|
68
|
-
return $super === VOID ? this.
|
|
68
|
+
return $super === VOID ? this.mgu_mo2ly8_k$(term1, term2, occurCheckEnabled) : $super.mgu_mo2ly8_k$.call(this, term1, term2, occurCheckEnabled);
|
|
69
69
|
}
|
|
70
70
|
function mgu(term1, term2) {
|
|
71
|
-
return this.
|
|
71
|
+
return this.mgu_mo2ly8_k$(term1, term2, true);
|
|
72
72
|
}
|
|
73
73
|
function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
74
|
-
return !(this.
|
|
74
|
+
return !(this.mgu_mo2ly8_k$(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
|
|
75
75
|
}
|
|
76
76
|
function match(term1, term2) {
|
|
77
77
|
return this.matchWithOccurCheck(term1, term2, true);
|
|
78
78
|
}
|
|
79
79
|
function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
|
|
80
|
-
var substitution = this.
|
|
81
|
-
return substitution.
|
|
80
|
+
var substitution = this.mgu_mo2ly8_k$(term1, term2, occurCheckEnabled);
|
|
81
|
+
return substitution.get_isFailed_t67zdc_k$() ? null : term1.getSubstituted(substitution, []);
|
|
82
82
|
}
|
|
83
83
|
function unify(term1, term2) {
|
|
84
84
|
return this.unifyWithOccurCheck(term1, term2, true);
|
|
@@ -102,17 +102,17 @@
|
|
|
102
102
|
initMetadataForCompanion(Companion_0);
|
|
103
103
|
//endregion
|
|
104
104
|
function Mgu(term1, term2, occurCheckEnabled) {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
105
|
+
this.term1__1 = term1;
|
|
106
|
+
this.term2__1 = term2;
|
|
107
|
+
this.occurCheckEnabled_1 = occurCheckEnabled;
|
|
108
108
|
}
|
|
109
109
|
protoOf(Mgu).toString = function () {
|
|
110
|
-
return 'Mgu(term1=' + this.
|
|
110
|
+
return 'Mgu(term1=' + this.term1__1.toString() + ', term2=' + this.term2__1.toString() + ', occurCheckEnabled=' + this.occurCheckEnabled_1 + ')';
|
|
111
111
|
};
|
|
112
112
|
protoOf(Mgu).hashCode = function () {
|
|
113
|
-
var result = this.
|
|
114
|
-
result = imul(result, 31) + this.
|
|
115
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
113
|
+
var result = this.term1__1.hashCode();
|
|
114
|
+
result = imul(result, 31) + this.term2__1.hashCode() | 0;
|
|
115
|
+
result = imul(result, 31) + getBooleanHashCode(this.occurCheckEnabled_1) | 0;
|
|
116
116
|
return result;
|
|
117
117
|
};
|
|
118
118
|
protoOf(Mgu).equals = function (other) {
|
|
@@ -120,26 +120,26 @@
|
|
|
120
120
|
return true;
|
|
121
121
|
if (!(other instanceof Mgu))
|
|
122
122
|
return false;
|
|
123
|
-
if (!this.
|
|
123
|
+
if (!this.term1__1.equals(other.term1__1))
|
|
124
124
|
return false;
|
|
125
|
-
if (!this.
|
|
125
|
+
if (!this.term2__1.equals(other.term2__1))
|
|
126
126
|
return false;
|
|
127
|
-
if (!(this.
|
|
127
|
+
if (!(this.occurCheckEnabled_1 === other.occurCheckEnabled_1))
|
|
128
128
|
return false;
|
|
129
129
|
return true;
|
|
130
130
|
};
|
|
131
131
|
function Merge(substitution1, substitution2, occurCheckEnabled) {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
132
|
+
this.substitution1__1 = substitution1;
|
|
133
|
+
this.substitution2__1 = substitution2;
|
|
134
|
+
this.occurCheckEnabled_1 = occurCheckEnabled;
|
|
135
135
|
}
|
|
136
136
|
protoOf(Merge).toString = function () {
|
|
137
|
-
return 'Merge(substitution1=' + toString(this.
|
|
137
|
+
return 'Merge(substitution1=' + toString(this.substitution1__1) + ', substitution2=' + toString(this.substitution2__1) + ', occurCheckEnabled=' + this.occurCheckEnabled_1 + ')';
|
|
138
138
|
};
|
|
139
139
|
protoOf(Merge).hashCode = function () {
|
|
140
|
-
var result = hashCode(this.
|
|
141
|
-
result = imul(result, 31) + hashCode(this.
|
|
142
|
-
result = imul(result, 31) + getBooleanHashCode(this.
|
|
140
|
+
var result = hashCode(this.substitution1__1);
|
|
141
|
+
result = imul(result, 31) + hashCode(this.substitution2__1) | 0;
|
|
142
|
+
result = imul(result, 31) + getBooleanHashCode(this.occurCheckEnabled_1) | 0;
|
|
143
143
|
return result;
|
|
144
144
|
};
|
|
145
145
|
protoOf(Merge).equals = function (other) {
|
|
@@ -147,33 +147,33 @@
|
|
|
147
147
|
return true;
|
|
148
148
|
if (!(other instanceof Merge))
|
|
149
149
|
return false;
|
|
150
|
-
if (!equals(this.
|
|
150
|
+
if (!equals(this.substitution1__1, other.substitution1__1))
|
|
151
151
|
return false;
|
|
152
|
-
if (!equals(this.
|
|
152
|
+
if (!equals(this.substitution2__1, other.substitution2__1))
|
|
153
153
|
return false;
|
|
154
|
-
if (!(this.
|
|
154
|
+
if (!(this.occurCheckEnabled_1 === other.occurCheckEnabled_1))
|
|
155
155
|
return false;
|
|
156
156
|
return true;
|
|
157
157
|
};
|
|
158
158
|
function _get_contextEquations__x0dd77($this) {
|
|
159
|
-
var tmp0 = $this.
|
|
159
|
+
var tmp0 = $this.contextEquations$delegate_1;
|
|
160
160
|
var tmp = KProperty1;
|
|
161
161
|
// Inline function 'kotlin.getValue' call
|
|
162
162
|
getPropertyCallableRef('contextEquations', 1, tmp, AbstractUnificator$_get_contextEquations_$ref_7ajcte(), null);
|
|
163
|
-
return tmp0.
|
|
163
|
+
return tmp0.get_value_j01efc_k$();
|
|
164
164
|
}
|
|
165
165
|
function occurrenceCheck($this, variable, term) {
|
|
166
166
|
var tmp;
|
|
167
|
-
if (term.
|
|
168
|
-
tmp = $this.
|
|
169
|
-
} else if (term.
|
|
170
|
-
var tmp0 = term.
|
|
167
|
+
if (term.get_isVar_it73p0_k$()) {
|
|
168
|
+
tmp = $this.checkTermsEquality_u6kzr7_k$(variable, term);
|
|
169
|
+
} else if (term.get_isStruct_zeoyoo_k$()) {
|
|
170
|
+
var tmp0 = term.get_variables_75f0zy_k$();
|
|
171
171
|
var tmp$ret$0;
|
|
172
172
|
$l$block: {
|
|
173
173
|
// Inline function 'kotlin.sequences.any' call
|
|
174
|
-
var _iterator__ex2g4s = tmp0.
|
|
175
|
-
while (_iterator__ex2g4s.
|
|
176
|
-
var element = _iterator__ex2g4s.
|
|
174
|
+
var _iterator__ex2g4s = tmp0.iterator_jk1svi_k$();
|
|
175
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
176
|
+
var element = _iterator__ex2g4s.next_20eer_k$();
|
|
177
177
|
if (occurrenceCheck($this, variable, element)) {
|
|
178
178
|
tmp$ret$0 = true;
|
|
179
179
|
break $l$block;
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
}
|
|
190
190
|
function equationsFor($this, term1, term2) {
|
|
191
191
|
var tmp = Companion_instance_0;
|
|
192
|
-
return tmp.
|
|
192
|
+
return tmp.allOf_wylrdl_k$(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
|
|
193
193
|
}
|
|
194
194
|
function equationsFor_0($this, substitution1, substitution2) {
|
|
195
195
|
var tmp = Companion_instance_0;
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
}
|
|
208
208
|
while (inductionVariable < exceptIndex);
|
|
209
209
|
var inductionVariable_0 = exceptIndex + 1 | 0;
|
|
210
|
-
var last = equations.
|
|
210
|
+
var last = equations.get_size_woubt6_k$();
|
|
211
211
|
if (inductionVariable_0 < last)
|
|
212
212
|
do {
|
|
213
213
|
var i_0 = inductionVariable_0;
|
|
@@ -221,33 +221,33 @@
|
|
|
221
221
|
var changed = true;
|
|
222
222
|
while (changed) {
|
|
223
223
|
changed = false;
|
|
224
|
-
var eqIterator = equations.
|
|
225
|
-
while (eqIterator.
|
|
226
|
-
var eq = $this.
|
|
227
|
-
if (eq.
|
|
224
|
+
var eqIterator = equations.listIterator_xjshxw_k$();
|
|
225
|
+
while (eqIterator.hasNext_bitz1p_k$()) {
|
|
226
|
+
var eq = $this.handleEquation_d8yrk_k$(request, eqIterator.next_20eer_k$());
|
|
227
|
+
if (eq.get_isContradiction_5mfb8e_k$()) {
|
|
228
228
|
return Companion_getInstance().failed();
|
|
229
|
-
} else if (eq.
|
|
230
|
-
eqIterator.
|
|
229
|
+
} else if (eq.get_isIdentity_zhqljl_k$()) {
|
|
230
|
+
eqIterator.remove_ldkf9o_k$();
|
|
231
231
|
changed = true;
|
|
232
|
-
} else if (eq.
|
|
232
|
+
} else if (eq.get_isAssignment_dlthcw_k$()) {
|
|
233
233
|
var assignment = eq.castToAssignment();
|
|
234
|
-
if (occurCheckEnabled && occurrenceCheck($this, assignment.
|
|
234
|
+
if (occurCheckEnabled && occurrenceCheck($this, assignment.get_variable_ik7c5h_k$(), assignment.get_term_wouvn9_k$())) {
|
|
235
235
|
return Companion_getInstance().failed();
|
|
236
236
|
} else {
|
|
237
|
-
changed = changed || applySubstitutionToEquations($this, assignment.
|
|
237
|
+
changed = changed || applySubstitutionToEquations($this, assignment.toSubstitution_giui0_k$(), equations, eqIterator.previousIndex_4qtyw5_k$());
|
|
238
238
|
}
|
|
239
|
-
} else if (eq.
|
|
240
|
-
eqIterator.
|
|
241
|
-
var _iterator__ex2g4s = equationsFor($this, eq.
|
|
242
|
-
$l$loop: while (_iterator__ex2g4s.
|
|
243
|
-
var it = _iterator__ex2g4s.
|
|
244
|
-
var subEq = it.
|
|
245
|
-
if (subEq.
|
|
239
|
+
} else if (eq.get_isComparison_qhizvg_k$()) {
|
|
240
|
+
eqIterator.remove_ldkf9o_k$();
|
|
241
|
+
var _iterator__ex2g4s = equationsFor($this, eq.get_lhs_18j1f6_k$(), eq.get_rhs_18iwz0_k$()).iterator_jk1svi_k$();
|
|
242
|
+
$l$loop: while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
243
|
+
var it = _iterator__ex2g4s.next_20eer_k$();
|
|
244
|
+
var subEq = it.get_isContradiction_5mfb8e_k$() || it.get_isIdentity_zhqljl_k$() ? $this.handleEquation_d8yrk_k$(request, it) : it;
|
|
245
|
+
if (subEq.get_isIdentity_zhqljl_k$())
|
|
246
246
|
continue $l$loop;
|
|
247
|
-
else if (subEq.
|
|
247
|
+
else if (subEq.get_isContradiction_5mfb8e_k$())
|
|
248
248
|
return Companion_getInstance().failed();
|
|
249
249
|
else {
|
|
250
|
-
eqIterator.
|
|
250
|
+
eqIterator.add_jcyd1a_k$(subEq);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
changed = true;
|
|
@@ -257,14 +257,14 @@
|
|
|
257
257
|
// Inline function 'kotlin.collections.filter' call
|
|
258
258
|
// Inline function 'kotlin.collections.filterTo' call
|
|
259
259
|
var destination = ArrayList_init_$Create$();
|
|
260
|
-
var _iterator__ex2g4s_0 = equations.
|
|
261
|
-
while (_iterator__ex2g4s_0.
|
|
262
|
-
var element = _iterator__ex2g4s_0.
|
|
263
|
-
if (element.
|
|
264
|
-
destination.
|
|
260
|
+
var _iterator__ex2g4s_0 = equations.iterator_jk1svi_k$();
|
|
261
|
+
while (_iterator__ex2g4s_0.hasNext_bitz1p_k$()) {
|
|
262
|
+
var element = _iterator__ex2g4s_0.next_20eer_k$();
|
|
263
|
+
if (element.get_isAssignment_dlthcw_k$()) {
|
|
264
|
+
destination.add_utx5q5_k$(element);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
return $this.
|
|
267
|
+
return $this.handleResult_t1ddk3_k$(request, toSubstitution(destination));
|
|
268
268
|
}
|
|
269
269
|
function newDeque($this, items) {
|
|
270
270
|
// Inline function 'kotlin.collections.arrayListOf' call
|
|
@@ -273,52 +273,52 @@
|
|
|
273
273
|
}
|
|
274
274
|
function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
|
|
275
275
|
return function () {
|
|
276
|
-
return toEquations(this$0.
|
|
276
|
+
return toEquations(this$0.get_context_h02k06_k$());
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
function AbstractUnificator$_get_contextEquations_$ref_7ajcte() {
|
|
280
280
|
return constructCallableReference(function (p0) {
|
|
281
281
|
return _get_contextEquations__x0dd77(p0);
|
|
282
|
-
}, 1, 0,
|
|
282
|
+
}, 1, 0, 27);
|
|
283
283
|
}
|
|
284
284
|
function AbstractUnificator$checkTermsEquality$ref(p0) {
|
|
285
285
|
return constructCallableReference(function (p0_0, p1) {
|
|
286
|
-
return p0.
|
|
287
|
-
}, 2, 0,
|
|
286
|
+
return p0.checkTermsEquality_u6kzr7_k$(p0_0, p1);
|
|
287
|
+
}, 2, 0, 28, 'checkTermsEquality', [p0]);
|
|
288
288
|
}
|
|
289
289
|
function AbstractUnificator$equationsFor$lambda(it) {
|
|
290
290
|
// Inline function 'kotlin.collections.toPair' call
|
|
291
|
-
return new Pair(it.
|
|
291
|
+
return new Pair(it.get_key_18j28a_k$(), it.get_value_j01efc_k$());
|
|
292
292
|
}
|
|
293
293
|
function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
|
|
294
|
-
if ($equations.
|
|
294
|
+
if ($equations.get_c1px32_k$(i).get_isContradiction_5mfb8e_k$() || $equations.get_c1px32_k$(i).get_isIdentity_zhqljl_k$())
|
|
295
295
|
return Unit_instance;
|
|
296
|
-
var currentEq = $equations.
|
|
296
|
+
var currentEq = $equations.get_c1px32_k$(i);
|
|
297
297
|
var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
|
|
298
|
-
var newLhs = _destruct__k2r9zo.
|
|
299
|
-
var newRhs = _destruct__k2r9zo.
|
|
300
|
-
if (!currentEq.
|
|
298
|
+
var newLhs = _destruct__k2r9zo.component1_7eebsc_k$();
|
|
299
|
+
var newRhs = _destruct__k2r9zo.component2_7eebsb_k$();
|
|
300
|
+
if (!currentEq.get_lhs_18j1f6_k$().equals(newLhs) || !currentEq.get_rhs_18iwz0_k$().equals(newRhs)) {
|
|
301
301
|
var tmp = Companion_instance_0;
|
|
302
|
-
$equations.
|
|
302
|
+
$equations.set_82063s_k$(i, tmp.of_o4qqfs_k$(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref(this$0)));
|
|
303
303
|
changed._v = true;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
306
|
function AbstractUnificator(context) {
|
|
307
|
-
this.
|
|
307
|
+
this.context_1 = context;
|
|
308
308
|
var tmp = this;
|
|
309
|
-
tmp.
|
|
309
|
+
tmp.contextEquations$delegate_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
|
|
310
310
|
}
|
|
311
|
-
protoOf(AbstractUnificator).
|
|
312
|
-
return this.
|
|
311
|
+
protoOf(AbstractUnificator).get_context_h02k06_k$ = function () {
|
|
312
|
+
return this.context_1;
|
|
313
313
|
};
|
|
314
|
-
protoOf(AbstractUnificator).
|
|
314
|
+
protoOf(AbstractUnificator).handleResult_t1ddk3_k$ = function (request, result) {
|
|
315
315
|
return result;
|
|
316
316
|
};
|
|
317
|
-
protoOf(AbstractUnificator).
|
|
317
|
+
protoOf(AbstractUnificator).handleEquation_d8yrk_k$ = function (request, equation) {
|
|
318
318
|
return equation;
|
|
319
319
|
};
|
|
320
|
-
protoOf(AbstractUnificator).
|
|
321
|
-
if (this.
|
|
320
|
+
protoOf(AbstractUnificator).mgu_mo2ly8_k$ = function (term1, term2, occurCheckEnabled) {
|
|
321
|
+
if (this.get_context_h02k06_k$().get_isFailed_t67zdc_k$())
|
|
322
322
|
return Companion_getInstance().failed();
|
|
323
323
|
var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
|
|
324
324
|
return mgu_0(this, new Mgu(term1, term2, occurCheckEnabled), equations, occurCheckEnabled);
|
|
@@ -326,12 +326,12 @@
|
|
|
326
326
|
protoOf(AbstractUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
327
327
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof AbstractUnificator) ? $super : THROW_CCE());
|
|
328
328
|
};
|
|
329
|
-
protoOf(AbstractUnificator).
|
|
330
|
-
if (this.
|
|
329
|
+
protoOf(AbstractUnificator).mergeWithOccurCheck_3c9cff_k$ = function (substitution1, substitution2, occurCheckEnabled) {
|
|
330
|
+
if (this.get_context_h02k06_k$().get_isFailed_t67zdc_k$() || substitution1.get_isFailed_t67zdc_k$() || substitution2.get_isFailed_t67zdc_k$())
|
|
331
331
|
return Companion_getInstance().failed();
|
|
332
332
|
if (!occurCheckEnabled) {
|
|
333
|
-
var quickMerge = this.
|
|
334
|
-
if (quickMerge.
|
|
333
|
+
var quickMerge = this.get_context_h02k06_k$().plus(substitution1).plus(substitution2);
|
|
334
|
+
if (quickMerge.get_isSuccess_vybsc0_k$()) {
|
|
335
335
|
return quickMerge;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -339,21 +339,21 @@
|
|
|
339
339
|
return mgu_0(this, new Merge(substitution1, substitution2, occurCheckEnabled), equations, occurCheckEnabled);
|
|
340
340
|
};
|
|
341
341
|
protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
342
|
-
return this.
|
|
342
|
+
return this.mergeWithOccurCheck_3c9cff_k$(substitution1, substitution2, occurCheckEnabled);
|
|
343
343
|
};
|
|
344
344
|
function CachedUnificator(decorated, cacheCapacity) {
|
|
345
|
-
this.
|
|
346
|
-
this.
|
|
345
|
+
this.decorated_1 = decorated;
|
|
346
|
+
this.mguCache_1 = Companion_instance.simpleLru_axkvh1_k$(cacheCapacity);
|
|
347
347
|
}
|
|
348
|
-
protoOf(CachedUnificator).
|
|
348
|
+
protoOf(CachedUnificator).mgu_mo2ly8_k$ = function (term1, term2, occurCheckEnabled) {
|
|
349
349
|
var mguRequest = new Triple(term1, term2, occurCheckEnabled);
|
|
350
|
-
var cached = this.
|
|
350
|
+
var cached = this.mguCache_1.get_wei43m_k$(mguRequest);
|
|
351
351
|
var tmp;
|
|
352
352
|
if (cached instanceof Some) {
|
|
353
|
-
tmp = cached.
|
|
353
|
+
tmp = cached.value_1;
|
|
354
354
|
} else {
|
|
355
|
-
var mguResult = this.
|
|
356
|
-
this.
|
|
355
|
+
var mguResult = this.decorated_1.mgu_mo2ly8_k$(term1, term2, occurCheckEnabled);
|
|
356
|
+
this.mguCache_1.set_iuhvb1_k$(mguRequest, mguResult);
|
|
357
357
|
tmp = mguResult;
|
|
358
358
|
}
|
|
359
359
|
return tmp;
|
|
@@ -361,21 +361,21 @@
|
|
|
361
361
|
protoOf(CachedUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
362
362
|
return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof CachedUnificator) ? $super : THROW_CCE());
|
|
363
363
|
};
|
|
364
|
-
protoOf(CachedUnificator).
|
|
364
|
+
protoOf(CachedUnificator).mergeWithOccurCheck_3c9cff_k$ = function (substitution1, substitution2, occurCheckEnabled) {
|
|
365
365
|
var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
|
|
366
|
-
var cached = this.
|
|
366
|
+
var cached = this.mguCache_1.get_wei43m_k$(mguRequest);
|
|
367
367
|
var tmp;
|
|
368
368
|
if (cached instanceof Some) {
|
|
369
|
-
tmp = cached.
|
|
369
|
+
tmp = cached.value_1;
|
|
370
370
|
} else {
|
|
371
|
-
var mguResult = this.
|
|
372
|
-
this.
|
|
371
|
+
var mguResult = this.decorated_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
|
|
372
|
+
this.mguCache_1.set_iuhvb1_k$(mguRequest, mguResult);
|
|
373
373
|
tmp = mguResult;
|
|
374
374
|
}
|
|
375
375
|
return tmp;
|
|
376
376
|
};
|
|
377
377
|
protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
|
|
378
|
-
return this.
|
|
378
|
+
return this.mergeWithOccurCheck_3c9cff_k$(substitution1, substitution2, occurCheckEnabled);
|
|
379
379
|
};
|
|
380
380
|
function allOfLists($this, lhs, rhs, equalityChecker) {
|
|
381
381
|
var tmp;
|
|
@@ -402,64 +402,64 @@
|
|
|
402
402
|
function Term$equals$ref() {
|
|
403
403
|
return constructCallableReference(function (p0, p1) {
|
|
404
404
|
return p0.equals(p1);
|
|
405
|
-
}, 2, 0,
|
|
405
|
+
}, 2, 0, 29, 'equals');
|
|
406
406
|
}
|
|
407
407
|
function Equation$Companion$from$lambda($equalityChecker) {
|
|
408
408
|
return function (it) {
|
|
409
|
-
return Companion_instance_0.
|
|
409
|
+
return Companion_instance_0.allOf_ey9biy_k$(it, $equalityChecker);
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
function Equation$Companion$allOfLists$lambda($equalityChecker) {
|
|
413
413
|
return function (_destruct__k2r9zo) {
|
|
414
|
-
var l = _destruct__k2r9zo.
|
|
415
|
-
var r = _destruct__k2r9zo.
|
|
416
|
-
return l.
|
|
414
|
+
var l = _destruct__k2r9zo.component1_7eebsc_k$();
|
|
415
|
+
var r = _destruct__k2r9zo.component2_7eebsb_k$();
|
|
416
|
+
return l.get_isCons_evvwck_k$() && r.get_isCons_evvwck_k$() ? sequenceOf(Companion_instance_0.of_o4qqfs_k$(l.castToCons().get_head_won7e1_k$(), r.castToCons().get_head_won7e1_k$(), $equalityChecker)) : l.get_isList_ew1iwh_k$() && r.get_isList_ew1iwh_k$() ? sequenceOf(Companion_instance_0.of_o4qqfs_k$(l.castToList(), r.castToList(), $equalityChecker)) : Companion_instance_0.allOf_wylrdl_k$(l, r, $equalityChecker);
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
419
|
function Equation$Companion$allOfTuples$lambda($equalityChecker) {
|
|
420
420
|
return function (_destruct__k2r9zo) {
|
|
421
|
-
var l = _destruct__k2r9zo.
|
|
422
|
-
var r = _destruct__k2r9zo.
|
|
423
|
-
return l.
|
|
421
|
+
var l = _destruct__k2r9zo.component1_7eebsc_k$();
|
|
422
|
+
var r = _destruct__k2r9zo.component2_7eebsb_k$();
|
|
423
|
+
return l.get_isTuple_zhv5m3_k$() && r.get_isTuple_zhv5m3_k$() ? sequenceOf(Companion_instance_0.of_o4qqfs_k$(l.castToTuple().get_left_woprgw_k$(), r.castToTuple().get_left_woprgw_k$(), $equalityChecker)) : Companion_instance_0.allOf_wylrdl_k$(l, r, $equalityChecker);
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
426
|
function Equation$Companion$allOf$lambda($equalityChecker) {
|
|
427
427
|
return function (it) {
|
|
428
|
-
return Companion_instance_0.
|
|
428
|
+
return Companion_instance_0.allOf_ey9biy_k$(it, $equalityChecker);
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
431
|
function Identity(lhs, rhs) {
|
|
432
432
|
Equation.call(this, lhs, rhs);
|
|
433
|
-
this.
|
|
434
|
-
this.
|
|
433
|
+
this.lhs_2 = lhs;
|
|
434
|
+
this.rhs_2 = rhs;
|
|
435
435
|
}
|
|
436
|
-
protoOf(Identity).
|
|
437
|
-
return this.
|
|
436
|
+
protoOf(Identity).get_lhs_18j1f6_k$ = function () {
|
|
437
|
+
return this.lhs_2;
|
|
438
438
|
};
|
|
439
|
-
protoOf(Identity).
|
|
440
|
-
return this.
|
|
439
|
+
protoOf(Identity).get_rhs_18iwz0_k$ = function () {
|
|
440
|
+
return this.rhs_2;
|
|
441
441
|
};
|
|
442
|
-
protoOf(Identity).
|
|
442
|
+
protoOf(Identity).get_isIdentity_zhqljl_k$ = function () {
|
|
443
443
|
return true;
|
|
444
444
|
};
|
|
445
|
-
protoOf(Identity).
|
|
445
|
+
protoOf(Identity).asIdentity_amvci8_k$ = function () {
|
|
446
446
|
return this;
|
|
447
447
|
};
|
|
448
448
|
protoOf(Identity).asIdentity = function () {
|
|
449
|
-
return this.
|
|
449
|
+
return this.asIdentity_amvci8_k$();
|
|
450
450
|
};
|
|
451
|
-
protoOf(Identity).
|
|
452
|
-
return this.
|
|
451
|
+
protoOf(Identity).clone_hhlixl_k$ = function (lhs, rhs) {
|
|
452
|
+
return this.copy_buatj3_k$(lhs, rhs);
|
|
453
453
|
};
|
|
454
|
-
protoOf(Identity).
|
|
454
|
+
protoOf(Identity).copy_buatj3_k$ = function (lhs, rhs) {
|
|
455
455
|
return new Identity(lhs, rhs);
|
|
456
456
|
};
|
|
457
457
|
protoOf(Identity).toString = function () {
|
|
458
|
-
return 'Identity(lhs=' + this.
|
|
458
|
+
return 'Identity(lhs=' + this.lhs_2.toString() + ', rhs=' + this.rhs_2.toString() + ')';
|
|
459
459
|
};
|
|
460
460
|
protoOf(Identity).hashCode = function () {
|
|
461
|
-
var result = this.
|
|
462
|
-
result = imul(result, 31) + this.
|
|
461
|
+
var result = this.lhs_2.hashCode();
|
|
462
|
+
result = imul(result, 31) + this.rhs_2.hashCode() | 0;
|
|
463
463
|
return result;
|
|
464
464
|
};
|
|
465
465
|
protoOf(Identity).equals = function (other) {
|
|
@@ -467,90 +467,90 @@
|
|
|
467
467
|
return true;
|
|
468
468
|
if (!(other instanceof Identity))
|
|
469
469
|
return false;
|
|
470
|
-
if (!this.
|
|
470
|
+
if (!this.lhs_2.equals(other.lhs_2))
|
|
471
471
|
return false;
|
|
472
|
-
if (!this.
|
|
472
|
+
if (!this.rhs_2.equals(other.rhs_2))
|
|
473
473
|
return false;
|
|
474
474
|
return true;
|
|
475
475
|
};
|
|
476
476
|
function Assignment(lhs, rhs) {
|
|
477
477
|
Equation.call(this, lhs, rhs);
|
|
478
|
-
this.
|
|
479
|
-
this.
|
|
478
|
+
this.lhs_2 = lhs;
|
|
479
|
+
this.rhs_2 = rhs;
|
|
480
480
|
}
|
|
481
|
-
protoOf(Assignment).
|
|
482
|
-
return this.
|
|
481
|
+
protoOf(Assignment).get_lhs_18j1f6_k$ = function () {
|
|
482
|
+
return this.lhs_2;
|
|
483
483
|
};
|
|
484
|
-
protoOf(Assignment).
|
|
485
|
-
return this.
|
|
484
|
+
protoOf(Assignment).get_rhs_18iwz0_k$ = function () {
|
|
485
|
+
return this.rhs_2;
|
|
486
486
|
};
|
|
487
|
-
protoOf(Assignment).
|
|
487
|
+
protoOf(Assignment).get_isAssignment_dlthcw_k$ = function () {
|
|
488
488
|
return true;
|
|
489
489
|
};
|
|
490
|
-
protoOf(Assignment).
|
|
490
|
+
protoOf(Assignment).asAssignment_z87azl_k$ = function () {
|
|
491
491
|
return this;
|
|
492
492
|
};
|
|
493
493
|
protoOf(Assignment).asAssignment = function () {
|
|
494
|
-
return this.
|
|
494
|
+
return this.asAssignment_z87azl_k$();
|
|
495
495
|
};
|
|
496
|
-
protoOf(Assignment).
|
|
497
|
-
return new Pair(this.
|
|
496
|
+
protoOf(Assignment).toAssignmentPair_3aznaa_k$ = function () {
|
|
497
|
+
return new Pair(this.get_variable_ik7c5h_k$(), this.get_term_wouvn9_k$());
|
|
498
498
|
};
|
|
499
499
|
protoOf(Assignment).toAssignmentPair = function () {
|
|
500
|
-
return this.
|
|
500
|
+
return this.toAssignmentPair_3aznaa_k$();
|
|
501
501
|
};
|
|
502
|
-
protoOf(Assignment).
|
|
503
|
-
return Companion_getInstance().unifier(this.
|
|
502
|
+
protoOf(Assignment).toSubstitution_giui0_k$ = function () {
|
|
503
|
+
return Companion_getInstance().unifier(this.get_variable_ik7c5h_k$(), this.get_term_wouvn9_k$());
|
|
504
504
|
};
|
|
505
505
|
protoOf(Assignment).toSubstitution = function () {
|
|
506
|
-
return this.
|
|
506
|
+
return this.toSubstitution_giui0_k$();
|
|
507
507
|
};
|
|
508
508
|
function LeftAssignment(lhs, rhs) {
|
|
509
509
|
Assignment.call(this, lhs, rhs);
|
|
510
|
-
this.
|
|
511
|
-
this.
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
510
|
+
this.lhs_3 = lhs;
|
|
511
|
+
this.rhs_3 = rhs;
|
|
512
|
+
this.variable_1 = this.lhs_3;
|
|
513
|
+
this.term_1 = this.rhs_3;
|
|
514
514
|
}
|
|
515
|
-
protoOf(LeftAssignment).
|
|
516
|
-
return this.
|
|
515
|
+
protoOf(LeftAssignment).get_lhs_18j1f6_k$ = function () {
|
|
516
|
+
return this.lhs_3;
|
|
517
517
|
};
|
|
518
|
-
protoOf(LeftAssignment).
|
|
519
|
-
return this.
|
|
518
|
+
protoOf(LeftAssignment).get_rhs_18iwz0_k$ = function () {
|
|
519
|
+
return this.rhs_3;
|
|
520
520
|
};
|
|
521
|
-
protoOf(LeftAssignment).
|
|
522
|
-
return this.
|
|
521
|
+
protoOf(LeftAssignment).get_variable_ik7c5h_k$ = function () {
|
|
522
|
+
return this.variable_1;
|
|
523
523
|
};
|
|
524
|
-
protoOf(LeftAssignment).
|
|
525
|
-
return this.
|
|
524
|
+
protoOf(LeftAssignment).get_term_wouvn9_k$ = function () {
|
|
525
|
+
return this.term_1;
|
|
526
526
|
};
|
|
527
|
-
protoOf(LeftAssignment).
|
|
527
|
+
protoOf(LeftAssignment).get_isLeftAssignment_r8ub7d_k$ = function () {
|
|
528
528
|
return true;
|
|
529
529
|
};
|
|
530
|
-
protoOf(LeftAssignment).
|
|
530
|
+
protoOf(LeftAssignment).asLeftAssignment_g129s6_k$ = function () {
|
|
531
531
|
return this;
|
|
532
532
|
};
|
|
533
533
|
protoOf(LeftAssignment).asLeftAssignment = function () {
|
|
534
|
-
return this.
|
|
534
|
+
return this.asLeftAssignment_g129s6_k$();
|
|
535
535
|
};
|
|
536
|
-
protoOf(LeftAssignment).
|
|
537
|
-
return this.
|
|
536
|
+
protoOf(LeftAssignment).clone_hhlixl_k$ = function (lhs, rhs) {
|
|
537
|
+
return this.copy_31tzwe_k$(lhs.castToVar(), rhs);
|
|
538
538
|
};
|
|
539
|
-
protoOf(LeftAssignment).
|
|
540
|
-
return new Pair(this.
|
|
539
|
+
protoOf(LeftAssignment).toPair_eddkwb_k$ = function () {
|
|
540
|
+
return new Pair(this.lhs_3, this.rhs_3);
|
|
541
541
|
};
|
|
542
542
|
protoOf(LeftAssignment).toPair = function () {
|
|
543
|
-
return this.
|
|
543
|
+
return this.toPair_eddkwb_k$();
|
|
544
544
|
};
|
|
545
|
-
protoOf(LeftAssignment).
|
|
545
|
+
protoOf(LeftAssignment).copy_31tzwe_k$ = function (lhs, rhs) {
|
|
546
546
|
return new LeftAssignment(lhs, rhs);
|
|
547
547
|
};
|
|
548
548
|
protoOf(LeftAssignment).toString = function () {
|
|
549
|
-
return 'LeftAssignment(lhs=' + this.
|
|
549
|
+
return 'LeftAssignment(lhs=' + this.lhs_3.toString() + ', rhs=' + this.rhs_3.toString() + ')';
|
|
550
550
|
};
|
|
551
551
|
protoOf(LeftAssignment).hashCode = function () {
|
|
552
|
-
var result = this.
|
|
553
|
-
result = imul(result, 31) + this.
|
|
552
|
+
var result = this.lhs_3.hashCode();
|
|
553
|
+
result = imul(result, 31) + this.rhs_3.hashCode() | 0;
|
|
554
554
|
return result;
|
|
555
555
|
};
|
|
556
556
|
protoOf(LeftAssignment).equals = function (other) {
|
|
@@ -558,58 +558,58 @@
|
|
|
558
558
|
return true;
|
|
559
559
|
if (!(other instanceof LeftAssignment))
|
|
560
560
|
return false;
|
|
561
|
-
if (!this.
|
|
561
|
+
if (!this.lhs_3.equals(other.lhs_3))
|
|
562
562
|
return false;
|
|
563
|
-
if (!this.
|
|
563
|
+
if (!this.rhs_3.equals(other.rhs_3))
|
|
564
564
|
return false;
|
|
565
565
|
return true;
|
|
566
566
|
};
|
|
567
567
|
function RightAssignment(lhs, rhs) {
|
|
568
568
|
Assignment.call(this, lhs, rhs);
|
|
569
|
-
this.
|
|
570
|
-
this.
|
|
571
|
-
this.
|
|
572
|
-
this.
|
|
569
|
+
this.lhs_3 = lhs;
|
|
570
|
+
this.rhs_3 = rhs;
|
|
571
|
+
this.variable_1 = this.rhs_3;
|
|
572
|
+
this.term_1 = this.lhs_3;
|
|
573
573
|
}
|
|
574
|
-
protoOf(RightAssignment).
|
|
575
|
-
return this.
|
|
574
|
+
protoOf(RightAssignment).get_lhs_18j1f6_k$ = function () {
|
|
575
|
+
return this.lhs_3;
|
|
576
576
|
};
|
|
577
|
-
protoOf(RightAssignment).
|
|
578
|
-
return this.
|
|
577
|
+
protoOf(RightAssignment).get_rhs_18iwz0_k$ = function () {
|
|
578
|
+
return this.rhs_3;
|
|
579
579
|
};
|
|
580
|
-
protoOf(RightAssignment).
|
|
581
|
-
return this.
|
|
580
|
+
protoOf(RightAssignment).get_variable_ik7c5h_k$ = function () {
|
|
581
|
+
return this.variable_1;
|
|
582
582
|
};
|
|
583
|
-
protoOf(RightAssignment).
|
|
584
|
-
return this.
|
|
583
|
+
protoOf(RightAssignment).get_term_wouvn9_k$ = function () {
|
|
584
|
+
return this.term_1;
|
|
585
585
|
};
|
|
586
|
-
protoOf(RightAssignment).
|
|
586
|
+
protoOf(RightAssignment).get_isRightAssignment_m09f6y_k$ = function () {
|
|
587
587
|
return true;
|
|
588
588
|
};
|
|
589
|
-
protoOf(RightAssignment).
|
|
589
|
+
protoOf(RightAssignment).asRightAssignment_u2ce4p_k$ = function () {
|
|
590
590
|
return this;
|
|
591
591
|
};
|
|
592
592
|
protoOf(RightAssignment).asRightAssignment = function () {
|
|
593
|
-
return this.
|
|
593
|
+
return this.asRightAssignment_u2ce4p_k$();
|
|
594
594
|
};
|
|
595
|
-
protoOf(RightAssignment).
|
|
596
|
-
return this.
|
|
595
|
+
protoOf(RightAssignment).clone_hhlixl_k$ = function (lhs, rhs) {
|
|
596
|
+
return this.copy_86ukbw_k$(lhs, rhs.castToVar());
|
|
597
597
|
};
|
|
598
|
-
protoOf(RightAssignment).
|
|
599
|
-
return new Pair(this.
|
|
598
|
+
protoOf(RightAssignment).toPair_eddkwb_k$ = function () {
|
|
599
|
+
return new Pair(this.lhs_3, this.rhs_3);
|
|
600
600
|
};
|
|
601
601
|
protoOf(RightAssignment).toPair = function () {
|
|
602
|
-
return this.
|
|
602
|
+
return this.toPair_eddkwb_k$();
|
|
603
603
|
};
|
|
604
|
-
protoOf(RightAssignment).
|
|
604
|
+
protoOf(RightAssignment).copy_86ukbw_k$ = function (lhs, rhs) {
|
|
605
605
|
return new RightAssignment(lhs, rhs);
|
|
606
606
|
};
|
|
607
607
|
protoOf(RightAssignment).toString = function () {
|
|
608
|
-
return 'RightAssignment(lhs=' + this.
|
|
608
|
+
return 'RightAssignment(lhs=' + this.lhs_3.toString() + ', rhs=' + this.rhs_3.toString() + ')';
|
|
609
609
|
};
|
|
610
610
|
protoOf(RightAssignment).hashCode = function () {
|
|
611
|
-
var result = this.
|
|
612
|
-
result = imul(result, 31) + this.
|
|
611
|
+
var result = this.lhs_3.hashCode();
|
|
612
|
+
result = imul(result, 31) + this.rhs_3.hashCode() | 0;
|
|
613
613
|
return result;
|
|
614
614
|
};
|
|
615
615
|
protoOf(RightAssignment).equals = function (other) {
|
|
@@ -617,44 +617,44 @@
|
|
|
617
617
|
return true;
|
|
618
618
|
if (!(other instanceof RightAssignment))
|
|
619
619
|
return false;
|
|
620
|
-
if (!this.
|
|
620
|
+
if (!this.lhs_3.equals(other.lhs_3))
|
|
621
621
|
return false;
|
|
622
|
-
if (!this.
|
|
622
|
+
if (!this.rhs_3.equals(other.rhs_3))
|
|
623
623
|
return false;
|
|
624
624
|
return true;
|
|
625
625
|
};
|
|
626
626
|
function Comparison(lhs, rhs) {
|
|
627
627
|
Equation.call(this, lhs, rhs);
|
|
628
|
-
this.
|
|
629
|
-
this.
|
|
628
|
+
this.lhs_2 = lhs;
|
|
629
|
+
this.rhs_2 = rhs;
|
|
630
630
|
}
|
|
631
|
-
protoOf(Comparison).
|
|
632
|
-
return this.
|
|
631
|
+
protoOf(Comparison).get_lhs_18j1f6_k$ = function () {
|
|
632
|
+
return this.lhs_2;
|
|
633
633
|
};
|
|
634
|
-
protoOf(Comparison).
|
|
635
|
-
return this.
|
|
634
|
+
protoOf(Comparison).get_rhs_18iwz0_k$ = function () {
|
|
635
|
+
return this.rhs_2;
|
|
636
636
|
};
|
|
637
|
-
protoOf(Comparison).
|
|
637
|
+
protoOf(Comparison).get_isComparison_qhizvg_k$ = function () {
|
|
638
638
|
return true;
|
|
639
639
|
};
|
|
640
|
-
protoOf(Comparison).
|
|
640
|
+
protoOf(Comparison).asComparison_4v568r_k$ = function () {
|
|
641
641
|
return this;
|
|
642
642
|
};
|
|
643
643
|
protoOf(Comparison).asComparison = function () {
|
|
644
|
-
return this.
|
|
644
|
+
return this.asComparison_4v568r_k$();
|
|
645
645
|
};
|
|
646
|
-
protoOf(Comparison).
|
|
647
|
-
return this.
|
|
646
|
+
protoOf(Comparison).clone_hhlixl_k$ = function (lhs, rhs) {
|
|
647
|
+
return this.copy_buatj3_k$(lhs, rhs);
|
|
648
648
|
};
|
|
649
|
-
protoOf(Comparison).
|
|
649
|
+
protoOf(Comparison).copy_buatj3_k$ = function (lhs, rhs) {
|
|
650
650
|
return new Comparison(lhs, rhs);
|
|
651
651
|
};
|
|
652
652
|
protoOf(Comparison).toString = function () {
|
|
653
|
-
return 'Comparison(lhs=' + this.
|
|
653
|
+
return 'Comparison(lhs=' + this.lhs_2.toString() + ', rhs=' + this.rhs_2.toString() + ')';
|
|
654
654
|
};
|
|
655
655
|
protoOf(Comparison).hashCode = function () {
|
|
656
|
-
var result = this.
|
|
657
|
-
result = imul(result, 31) + this.
|
|
656
|
+
var result = this.lhs_2.hashCode();
|
|
657
|
+
result = imul(result, 31) + this.rhs_2.hashCode() | 0;
|
|
658
658
|
return result;
|
|
659
659
|
};
|
|
660
660
|
protoOf(Comparison).equals = function (other) {
|
|
@@ -662,50 +662,50 @@
|
|
|
662
662
|
return true;
|
|
663
663
|
if (!(other instanceof Comparison))
|
|
664
664
|
return false;
|
|
665
|
-
if (!this.
|
|
665
|
+
if (!this.lhs_2.equals(other.lhs_2))
|
|
666
666
|
return false;
|
|
667
|
-
if (!this.
|
|
667
|
+
if (!this.rhs_2.equals(other.rhs_2))
|
|
668
668
|
return false;
|
|
669
669
|
return true;
|
|
670
670
|
};
|
|
671
671
|
function Contradiction(lhs, rhs) {
|
|
672
672
|
Equation.call(this, lhs, rhs);
|
|
673
|
-
this.
|
|
674
|
-
this.
|
|
673
|
+
this.lhs_2 = lhs;
|
|
674
|
+
this.rhs_2 = rhs;
|
|
675
675
|
}
|
|
676
|
-
protoOf(Contradiction).
|
|
677
|
-
return this.
|
|
676
|
+
protoOf(Contradiction).get_lhs_18j1f6_k$ = function () {
|
|
677
|
+
return this.lhs_2;
|
|
678
678
|
};
|
|
679
|
-
protoOf(Contradiction).
|
|
680
|
-
return this.
|
|
679
|
+
protoOf(Contradiction).get_rhs_18iwz0_k$ = function () {
|
|
680
|
+
return this.rhs_2;
|
|
681
681
|
};
|
|
682
|
-
protoOf(Contradiction).
|
|
682
|
+
protoOf(Contradiction).get_isContradiction_5mfb8e_k$ = function () {
|
|
683
683
|
return true;
|
|
684
684
|
};
|
|
685
|
-
protoOf(Contradiction).
|
|
685
|
+
protoOf(Contradiction).asContradiction_kh63y9_k$ = function () {
|
|
686
686
|
return this;
|
|
687
687
|
};
|
|
688
688
|
protoOf(Contradiction).asContradiction = function () {
|
|
689
|
-
return this.
|
|
689
|
+
return this.asContradiction_kh63y9_k$();
|
|
690
690
|
};
|
|
691
|
-
protoOf(Contradiction).
|
|
692
|
-
return this.
|
|
691
|
+
protoOf(Contradiction).clone_hhlixl_k$ = function (lhs, rhs) {
|
|
692
|
+
return this.copy_buatj3_k$(lhs, rhs);
|
|
693
693
|
};
|
|
694
|
-
protoOf(Contradiction).
|
|
694
|
+
protoOf(Contradiction).toSubstitution_giui0_k$ = function () {
|
|
695
695
|
return Companion_getInstance().failed();
|
|
696
696
|
};
|
|
697
697
|
protoOf(Contradiction).toSubstitution = function () {
|
|
698
|
-
return this.
|
|
698
|
+
return this.toSubstitution_giui0_k$();
|
|
699
699
|
};
|
|
700
|
-
protoOf(Contradiction).
|
|
700
|
+
protoOf(Contradiction).copy_buatj3_k$ = function (lhs, rhs) {
|
|
701
701
|
return new Contradiction(lhs, rhs);
|
|
702
702
|
};
|
|
703
703
|
protoOf(Contradiction).toString = function () {
|
|
704
|
-
return 'Contradiction(lhs=' + this.
|
|
704
|
+
return 'Contradiction(lhs=' + this.lhs_2.toString() + ', rhs=' + this.rhs_2.toString() + ')';
|
|
705
705
|
};
|
|
706
706
|
protoOf(Contradiction).hashCode = function () {
|
|
707
|
-
var result = this.
|
|
708
|
-
result = imul(result, 31) + this.
|
|
707
|
+
var result = this.lhs_2.hashCode();
|
|
708
|
+
result = imul(result, 31) + this.rhs_2.hashCode() | 0;
|
|
709
709
|
return result;
|
|
710
710
|
};
|
|
711
711
|
protoOf(Contradiction).equals = function (other) {
|
|
@@ -713,17 +713,17 @@
|
|
|
713
713
|
return true;
|
|
714
714
|
if (!(other instanceof Contradiction))
|
|
715
715
|
return false;
|
|
716
|
-
if (!this.
|
|
716
|
+
if (!this.lhs_2.equals(other.lhs_2))
|
|
717
717
|
return false;
|
|
718
|
-
if (!this.
|
|
718
|
+
if (!this.rhs_2.equals(other.rhs_2))
|
|
719
719
|
return false;
|
|
720
720
|
return true;
|
|
721
721
|
};
|
|
722
722
|
function Companion() {
|
|
723
723
|
}
|
|
724
|
-
protoOf(Companion).
|
|
724
|
+
protoOf(Companion).of_o4qqfs_k$ = function (lhs, rhs, equalityChecker) {
|
|
725
725
|
var tmp;
|
|
726
|
-
if (lhs.
|
|
726
|
+
if (lhs.get_isVar_it73p0_k$() && rhs.get_isVar_it73p0_k$()) {
|
|
727
727
|
var tmp_0;
|
|
728
728
|
if (equalityChecker(lhs, rhs)) {
|
|
729
729
|
tmp_0 = new Identity(lhs, rhs);
|
|
@@ -731,11 +731,11 @@
|
|
|
731
731
|
tmp_0 = new LeftAssignment(lhs.castToVar(), rhs);
|
|
732
732
|
}
|
|
733
733
|
tmp = tmp_0;
|
|
734
|
-
} else if (lhs.
|
|
734
|
+
} else if (lhs.get_isVar_it73p0_k$()) {
|
|
735
735
|
tmp = new LeftAssignment(lhs.castToVar(), rhs);
|
|
736
|
-
} else if (rhs.
|
|
736
|
+
} else if (rhs.get_isVar_it73p0_k$()) {
|
|
737
737
|
tmp = new RightAssignment(lhs, rhs.castToVar());
|
|
738
|
-
} else if (lhs.
|
|
738
|
+
} else if (lhs.get_isConstant_scia2f_k$() && rhs.get_isConstant_scia2f_k$()) {
|
|
739
739
|
var tmp_1;
|
|
740
740
|
if (equalityChecker(lhs, rhs)) {
|
|
741
741
|
tmp_1 = new Identity(lhs, rhs);
|
|
@@ -743,13 +743,13 @@
|
|
|
743
743
|
tmp_1 = new Contradiction(lhs, rhs);
|
|
744
744
|
}
|
|
745
745
|
tmp = tmp_1;
|
|
746
|
-
} else if (lhs.
|
|
746
|
+
} else if (lhs.get_isConstant_scia2f_k$() || rhs.get_isConstant_scia2f_k$()) {
|
|
747
747
|
tmp = new Contradiction(lhs, rhs);
|
|
748
|
-
} else if (lhs.
|
|
748
|
+
} else if (lhs.get_isStruct_zeoyoo_k$() && rhs.get_isStruct_zeoyoo_k$()) {
|
|
749
749
|
var lhsStruct = lhs.castToStruct();
|
|
750
750
|
var rhsStruct = rhs.castToStruct();
|
|
751
751
|
var tmp_2;
|
|
752
|
-
if (!(lhsStruct.
|
|
752
|
+
if (!(lhsStruct.get_arity_iosiic_k$() === rhsStruct.get_arity_iosiic_k$()) || !(lhsStruct.get_functor_75vgt2_k$() === rhsStruct.get_functor_75vgt2_k$())) {
|
|
753
753
|
tmp_2 = new Contradiction(lhsStruct, rhsStruct);
|
|
754
754
|
} else {
|
|
755
755
|
tmp_2 = new Comparison(lhsStruct, rhsStruct);
|
|
@@ -768,10 +768,10 @@
|
|
|
768
768
|
tmp = equalityChecker;
|
|
769
769
|
}
|
|
770
770
|
equalityChecker = tmp;
|
|
771
|
-
return $super === VOID ? this.
|
|
771
|
+
return $super === VOID ? this.of_o4qqfs_k$(lhs, rhs, equalityChecker) : $super.of_o4qqfs_k$.call(this, lhs, rhs, equalityChecker);
|
|
772
772
|
};
|
|
773
|
-
protoOf(Companion).
|
|
774
|
-
return this.
|
|
773
|
+
protoOf(Companion).of_4jrtix_k$ = function (pair, equalityChecker) {
|
|
774
|
+
return this.of_o4qqfs_k$(pair.first, pair.second, equalityChecker);
|
|
775
775
|
};
|
|
776
776
|
protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
|
|
777
777
|
var tmp;
|
|
@@ -781,9 +781,9 @@
|
|
|
781
781
|
tmp = equalityChecker;
|
|
782
782
|
}
|
|
783
783
|
equalityChecker = tmp;
|
|
784
|
-
return $super === VOID ? this.
|
|
784
|
+
return $super === VOID ? this.of_4jrtix_k$(pair, equalityChecker) : $super.of_4jrtix_k$.call(this, pair, equalityChecker);
|
|
785
785
|
};
|
|
786
|
-
protoOf(Companion).
|
|
786
|
+
protoOf(Companion).from_4yqrd5_k$ = function (pairs, equalityChecker) {
|
|
787
787
|
return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
|
|
788
788
|
};
|
|
789
789
|
protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
|
|
@@ -794,10 +794,10 @@
|
|
|
794
794
|
tmp = equalityChecker;
|
|
795
795
|
}
|
|
796
796
|
equalityChecker = tmp;
|
|
797
|
-
return $super === VOID ? this.
|
|
797
|
+
return $super === VOID ? this.from_4yqrd5_k$(pairs, equalityChecker) : $super.from_4yqrd5_k$.call(this, pairs, equalityChecker);
|
|
798
798
|
};
|
|
799
|
-
protoOf(Companion).
|
|
800
|
-
return this.
|
|
799
|
+
protoOf(Companion).from_21bpvf_k$ = function (pairs, equalityChecker) {
|
|
800
|
+
return this.from_4yqrd5_k$(asSequence_0(pairs), equalityChecker);
|
|
801
801
|
};
|
|
802
802
|
protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
|
|
803
803
|
var tmp;
|
|
@@ -807,10 +807,10 @@
|
|
|
807
807
|
tmp = equalityChecker;
|
|
808
808
|
}
|
|
809
809
|
equalityChecker = tmp;
|
|
810
|
-
return $super === VOID ? this.
|
|
810
|
+
return $super === VOID ? this.from_21bpvf_k$(pairs, equalityChecker) : $super.from_21bpvf_k$.call(this, pairs, equalityChecker);
|
|
811
811
|
};
|
|
812
|
-
protoOf(Companion).
|
|
813
|
-
return this.
|
|
812
|
+
protoOf(Companion).from_sp73rl_k$ = function (pairs, equalityChecker) {
|
|
813
|
+
return this.from_4yqrd5_k$(sequenceOf_0(pairs.slice()), equalityChecker);
|
|
814
814
|
};
|
|
815
815
|
protoOf(Companion).from = function (pairs, equalityChecker, $super) {
|
|
816
816
|
var tmp;
|
|
@@ -820,10 +820,10 @@
|
|
|
820
820
|
tmp = equalityChecker;
|
|
821
821
|
}
|
|
822
822
|
equalityChecker = tmp;
|
|
823
|
-
return $super === VOID ? this.
|
|
823
|
+
return $super === VOID ? this.from_sp73rl_k$(pairs, equalityChecker) : $super.from_sp73rl_k$.call(this, pairs, equalityChecker);
|
|
824
824
|
};
|
|
825
|
-
protoOf(Companion).
|
|
826
|
-
return this.
|
|
825
|
+
protoOf(Companion).allOf_ey9biy_k$ = function (pair, equalityChecker) {
|
|
826
|
+
return this.allOf_wylrdl_k$(pair.first, pair.second, equalityChecker);
|
|
827
827
|
};
|
|
828
828
|
protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
|
|
829
829
|
var tmp;
|
|
@@ -833,29 +833,29 @@
|
|
|
833
833
|
tmp = equalityChecker;
|
|
834
834
|
}
|
|
835
835
|
equalityChecker = tmp;
|
|
836
|
-
return $super === VOID ? this.
|
|
836
|
+
return $super === VOID ? this.allOf_ey9biy_k$(pair, equalityChecker) : $super.allOf_ey9biy_k$.call(this, pair, equalityChecker);
|
|
837
837
|
};
|
|
838
|
-
protoOf(Companion).
|
|
838
|
+
protoOf(Companion).allOf_wylrdl_k$ = function (lhs, rhs, equalityChecker) {
|
|
839
839
|
var tmp;
|
|
840
|
-
if (lhs.
|
|
841
|
-
tmp = sequenceOf(this.
|
|
842
|
-
} else if (lhs.
|
|
840
|
+
if (lhs.get_isAtom_evuq3o_k$() && rhs.get_isAtom_evuq3o_k$()) {
|
|
841
|
+
tmp = sequenceOf(this.of_o4qqfs_k$(lhs, rhs, equalityChecker));
|
|
842
|
+
} else if (lhs.get_isList_ew1iwh_k$() && rhs.get_isList_ew1iwh_k$()) {
|
|
843
843
|
tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
|
|
844
|
-
} else if (lhs.
|
|
844
|
+
} else if (lhs.get_isTuple_zhv5m3_k$() && rhs.get_isTuple_zhv5m3_k$()) {
|
|
845
845
|
tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
|
|
846
|
-
} else if (lhs.
|
|
846
|
+
} else if (lhs.get_isStruct_zeoyoo_k$() && rhs.get_isStruct_zeoyoo_k$()) {
|
|
847
847
|
var lhsStruct = lhs.castToStruct();
|
|
848
848
|
var rhsStruct = rhs.castToStruct();
|
|
849
849
|
var tmp_0;
|
|
850
|
-
if (lhsStruct.
|
|
851
|
-
var tmp_1 = zip(lhsStruct.
|
|
850
|
+
if (lhsStruct.get_arity_iosiic_k$() === rhsStruct.get_arity_iosiic_k$() && lhsStruct.get_functor_75vgt2_k$() === rhsStruct.get_functor_75vgt2_k$()) {
|
|
851
|
+
var tmp_1 = zip(lhsStruct.get_argsSequence_z7gge1_k$(), rhsStruct.get_argsSequence_z7gge1_k$());
|
|
852
852
|
tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
|
|
853
853
|
} else {
|
|
854
|
-
tmp_0 = sequenceOf(this.
|
|
854
|
+
tmp_0 = sequenceOf(this.of_o4qqfs_k$(lhs, rhs, equalityChecker));
|
|
855
855
|
}
|
|
856
856
|
tmp = tmp_0;
|
|
857
857
|
} else {
|
|
858
|
-
tmp = sequenceOf(this.
|
|
858
|
+
tmp = sequenceOf(this.of_o4qqfs_k$(lhs, rhs, equalityChecker));
|
|
859
859
|
}
|
|
860
860
|
return tmp;
|
|
861
861
|
};
|
|
@@ -867,23 +867,23 @@
|
|
|
867
867
|
tmp = equalityChecker;
|
|
868
868
|
}
|
|
869
869
|
equalityChecker = tmp;
|
|
870
|
-
return $super === VOID ? this.
|
|
870
|
+
return $super === VOID ? this.allOf_wylrdl_k$(lhs, rhs, equalityChecker) : $super.allOf_wylrdl_k$.call(this, lhs, rhs, equalityChecker);
|
|
871
871
|
};
|
|
872
872
|
var Companion_instance_0;
|
|
873
873
|
function Companion_getInstance_1() {
|
|
874
874
|
return Companion_instance_0;
|
|
875
875
|
}
|
|
876
876
|
function Equation(lhs, rhs) {
|
|
877
|
-
this.
|
|
878
|
-
this.
|
|
877
|
+
this.lhs_1 = lhs;
|
|
878
|
+
this.rhs_1 = rhs;
|
|
879
879
|
}
|
|
880
|
-
protoOf(Equation).
|
|
881
|
-
return this.
|
|
880
|
+
protoOf(Equation).get_lhs_18j1f6_k$ = function () {
|
|
881
|
+
return this.lhs_1;
|
|
882
882
|
};
|
|
883
|
-
protoOf(Equation).
|
|
884
|
-
return this.
|
|
883
|
+
protoOf(Equation).get_rhs_18iwz0_k$ = function () {
|
|
884
|
+
return this.rhs_1;
|
|
885
885
|
};
|
|
886
|
-
protoOf(Equation).
|
|
886
|
+
protoOf(Equation).get_isIdentity_zhqljl_k$ = function () {
|
|
887
887
|
return false;
|
|
888
888
|
};
|
|
889
889
|
protoOf(Equation).asIdentity = function () {
|
|
@@ -893,13 +893,13 @@
|
|
|
893
893
|
var tmp0_elvis_lhs = this.asIdentity();
|
|
894
894
|
var tmp;
|
|
895
895
|
if (tmp0_elvis_lhs == null) {
|
|
896
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Identity).
|
|
896
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Identity).get_simpleName_r6f8py_k$());
|
|
897
897
|
} else {
|
|
898
898
|
tmp = tmp0_elvis_lhs;
|
|
899
899
|
}
|
|
900
900
|
return tmp;
|
|
901
901
|
};
|
|
902
|
-
protoOf(Equation).
|
|
902
|
+
protoOf(Equation).get_isAssignment_dlthcw_k$ = function () {
|
|
903
903
|
return false;
|
|
904
904
|
};
|
|
905
905
|
protoOf(Equation).asAssignment = function () {
|
|
@@ -909,13 +909,13 @@
|
|
|
909
909
|
var tmp0_elvis_lhs = this.asAssignment();
|
|
910
910
|
var tmp;
|
|
911
911
|
if (tmp0_elvis_lhs == null) {
|
|
912
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).
|
|
912
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).get_simpleName_r6f8py_k$());
|
|
913
913
|
} else {
|
|
914
914
|
tmp = tmp0_elvis_lhs;
|
|
915
915
|
}
|
|
916
916
|
return tmp;
|
|
917
917
|
};
|
|
918
|
-
protoOf(Equation).
|
|
918
|
+
protoOf(Equation).get_isLeftAssignment_r8ub7d_k$ = function () {
|
|
919
919
|
return false;
|
|
920
920
|
};
|
|
921
921
|
protoOf(Equation).asLeftAssignment = function () {
|
|
@@ -925,13 +925,13 @@
|
|
|
925
925
|
var tmp0_elvis_lhs = this.asLeftAssignment();
|
|
926
926
|
var tmp;
|
|
927
927
|
if (tmp0_elvis_lhs == null) {
|
|
928
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(LeftAssignment).
|
|
928
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(LeftAssignment).get_simpleName_r6f8py_k$());
|
|
929
929
|
} else {
|
|
930
930
|
tmp = tmp0_elvis_lhs;
|
|
931
931
|
}
|
|
932
932
|
return tmp;
|
|
933
933
|
};
|
|
934
|
-
protoOf(Equation).
|
|
934
|
+
protoOf(Equation).get_isRightAssignment_m09f6y_k$ = function () {
|
|
935
935
|
return false;
|
|
936
936
|
};
|
|
937
937
|
protoOf(Equation).asRightAssignment = function () {
|
|
@@ -941,13 +941,13 @@
|
|
|
941
941
|
var tmp0_elvis_lhs = this.asRightAssignment();
|
|
942
942
|
var tmp;
|
|
943
943
|
if (tmp0_elvis_lhs == null) {
|
|
944
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(RightAssignment).
|
|
944
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(RightAssignment).get_simpleName_r6f8py_k$());
|
|
945
945
|
} else {
|
|
946
946
|
tmp = tmp0_elvis_lhs;
|
|
947
947
|
}
|
|
948
948
|
return tmp;
|
|
949
949
|
};
|
|
950
|
-
protoOf(Equation).
|
|
950
|
+
protoOf(Equation).get_isComparison_qhizvg_k$ = function () {
|
|
951
951
|
return false;
|
|
952
952
|
};
|
|
953
953
|
protoOf(Equation).asComparison = function () {
|
|
@@ -957,13 +957,13 @@
|
|
|
957
957
|
var tmp0_elvis_lhs = this.asComparison();
|
|
958
958
|
var tmp;
|
|
959
959
|
if (tmp0_elvis_lhs == null) {
|
|
960
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Comparison).
|
|
960
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Comparison).get_simpleName_r6f8py_k$());
|
|
961
961
|
} else {
|
|
962
962
|
tmp = tmp0_elvis_lhs;
|
|
963
963
|
}
|
|
964
964
|
return tmp;
|
|
965
965
|
};
|
|
966
|
-
protoOf(Equation).
|
|
966
|
+
protoOf(Equation).get_isContradiction_5mfb8e_k$ = function () {
|
|
967
967
|
return false;
|
|
968
968
|
};
|
|
969
969
|
protoOf(Equation).asContradiction = function () {
|
|
@@ -973,26 +973,26 @@
|
|
|
973
973
|
var tmp0_elvis_lhs = this.asContradiction();
|
|
974
974
|
var tmp;
|
|
975
975
|
if (tmp0_elvis_lhs == null) {
|
|
976
|
-
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Contradiction).
|
|
976
|
+
throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Contradiction).get_simpleName_r6f8py_k$());
|
|
977
977
|
} else {
|
|
978
978
|
tmp = tmp0_elvis_lhs;
|
|
979
979
|
}
|
|
980
980
|
return tmp;
|
|
981
981
|
};
|
|
982
982
|
protoOf(Equation).clone = function (lhs, rhs, $super) {
|
|
983
|
-
lhs = lhs === VOID ? this.
|
|
984
|
-
rhs = rhs === VOID ? this.
|
|
985
|
-
return $super === VOID ? this.
|
|
983
|
+
lhs = lhs === VOID ? this.get_lhs_18j1f6_k$() : lhs;
|
|
984
|
+
rhs = rhs === VOID ? this.get_rhs_18iwz0_k$() : rhs;
|
|
985
|
+
return $super === VOID ? this.clone_hhlixl_k$(lhs, rhs) : $super.clone_hhlixl_k$.call(this, lhs, rhs);
|
|
986
986
|
};
|
|
987
987
|
protoOf(Equation).toContradiction = function () {
|
|
988
|
-
return new Contradiction(this.
|
|
988
|
+
return new Contradiction(this.get_lhs_18j1f6_k$(), this.get_rhs_18iwz0_k$());
|
|
989
989
|
};
|
|
990
990
|
protoOf(Equation).toAssignmentPair = function () {
|
|
991
991
|
var tmp;
|
|
992
|
-
if (this.
|
|
993
|
-
tmp = to(this.
|
|
994
|
-
} else if (this.
|
|
995
|
-
tmp = to(this.
|
|
992
|
+
if (this.get_lhs_18j1f6_k$().get_isVar_it73p0_k$()) {
|
|
993
|
+
tmp = to(this.get_lhs_18j1f6_k$().castToVar(), this.get_rhs_18iwz0_k$());
|
|
994
|
+
} else if (this.get_rhs_18iwz0_k$().get_isVar_it73p0_k$()) {
|
|
995
|
+
tmp = to(this.get_rhs_18iwz0_k$().castToVar(), this.get_lhs_18j1f6_k$());
|
|
996
996
|
} else {
|
|
997
997
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(this));
|
|
998
998
|
}
|
|
@@ -1000,29 +1000,29 @@
|
|
|
1000
1000
|
};
|
|
1001
1001
|
protoOf(Equation).toSubstitution = function () {
|
|
1002
1002
|
var tmp;
|
|
1003
|
-
if (this.
|
|
1004
|
-
tmp = Companion_getInstance().unifier(this.
|
|
1005
|
-
} else if (this.
|
|
1006
|
-
tmp = Companion_getInstance().unifier(this.
|
|
1003
|
+
if (this.get_lhs_18j1f6_k$().get_isVar_it73p0_k$()) {
|
|
1004
|
+
tmp = Companion_getInstance().unifier(this.get_lhs_18j1f6_k$().castToVar(), this.get_rhs_18iwz0_k$());
|
|
1005
|
+
} else if (this.get_rhs_18iwz0_k$().get_isVar_it73p0_k$()) {
|
|
1006
|
+
tmp = Companion_getInstance().unifier(this.get_rhs_18iwz0_k$().castToVar(), this.get_lhs_18j1f6_k$());
|
|
1007
1007
|
} else {
|
|
1008
1008
|
throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(this));
|
|
1009
1009
|
}
|
|
1010
1010
|
return tmp;
|
|
1011
1011
|
};
|
|
1012
|
-
protoOf(Equation).
|
|
1013
|
-
return Companion_getInstance_0().of('=', [this.
|
|
1012
|
+
protoOf(Equation).toTerm_edaxrt_k$ = function () {
|
|
1013
|
+
return Companion_getInstance_0().of('=', [this.get_lhs_18j1f6_k$(), this.get_rhs_18iwz0_k$()]);
|
|
1014
1014
|
};
|
|
1015
1015
|
protoOf(Equation).toTerm = function () {
|
|
1016
|
-
return this.
|
|
1016
|
+
return this.toTerm_edaxrt_k$();
|
|
1017
1017
|
};
|
|
1018
1018
|
protoOf(Equation).toPair = function () {
|
|
1019
|
-
return new Pair(this.
|
|
1019
|
+
return new Pair(this.get_lhs_18j1f6_k$(), this.get_rhs_18iwz0_k$());
|
|
1020
1020
|
};
|
|
1021
1021
|
protoOf(Equation).swap = function () {
|
|
1022
|
-
return Companion_instance_0.of(this.
|
|
1022
|
+
return Companion_instance_0.of(this.get_rhs_18iwz0_k$(), this.get_lhs_18j1f6_k$());
|
|
1023
1023
|
};
|
|
1024
|
-
protoOf(Equation).
|
|
1025
|
-
return Companion_instance_0.
|
|
1024
|
+
protoOf(Equation).apply_e612l5_k$ = function (substitution, equalityChecker) {
|
|
1025
|
+
return Companion_instance_0.of_o4qqfs_k$(this.get_lhs_18j1f6_k$().getSubstituted(substitution, []), this.get_rhs_18iwz0_k$().getSubstituted(substitution, []), equalityChecker);
|
|
1026
1026
|
};
|
|
1027
1027
|
protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
|
|
1028
1028
|
var tmp;
|
|
@@ -1032,22 +1032,22 @@
|
|
|
1032
1032
|
tmp = equalityChecker;
|
|
1033
1033
|
}
|
|
1034
1034
|
equalityChecker = tmp;
|
|
1035
|
-
return $super === VOID ? this.
|
|
1035
|
+
return $super === VOID ? this.apply_e612l5_k$(substitution, equalityChecker) : $super.apply_e612l5_k$.call(this, substitution, equalityChecker);
|
|
1036
1036
|
};
|
|
1037
1037
|
function toEquations(_this__u8e3s4) {
|
|
1038
1038
|
// Inline function 'kotlin.collections.map' call
|
|
1039
|
-
var this_0 = _this__u8e3s4.
|
|
1039
|
+
var this_0 = _this__u8e3s4.get_entries_p20ztl_k$();
|
|
1040
1040
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1041
1041
|
var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
|
|
1042
|
-
var _iterator__ex2g4s = this_0.
|
|
1043
|
-
while (_iterator__ex2g4s.
|
|
1044
|
-
var item = _iterator__ex2g4s.
|
|
1042
|
+
var _iterator__ex2g4s = this_0.iterator_jk1svi_k$();
|
|
1043
|
+
while (_iterator__ex2g4s.hasNext_bitz1p_k$()) {
|
|
1044
|
+
var item = _iterator__ex2g4s.next_20eer_k$();
|
|
1045
1045
|
// Inline function 'kotlin.collections.component1' call
|
|
1046
|
-
var variable = item.
|
|
1046
|
+
var variable = item.get_key_18j28a_k$();
|
|
1047
1047
|
// Inline function 'kotlin.collections.component2' call
|
|
1048
|
-
var term = item.
|
|
1048
|
+
var term = item.get_value_j01efc_k$();
|
|
1049
1049
|
var tmp$ret$2 = new LeftAssignment(variable, term);
|
|
1050
|
-
destination.
|
|
1050
|
+
destination.add_utx5q5_k$(tmp$ret$2);
|
|
1051
1051
|
}
|
|
1052
1052
|
return destination;
|
|
1053
1053
|
}
|
|
@@ -1064,18 +1064,18 @@
|
|
|
1064
1064
|
}
|
|
1065
1065
|
function Unificator$Companion$_get_default_$ref_8i2tx3() {
|
|
1066
1066
|
return constructCallableReference(function (p0) {
|
|
1067
|
-
return p0.
|
|
1068
|
-
}, 1, 0,
|
|
1067
|
+
return p0.get_default_qtagd4_k$();
|
|
1068
|
+
}, 1, 0, 30);
|
|
1069
1069
|
}
|
|
1070
1070
|
function Unificator$Companion$naive$1($context) {
|
|
1071
1071
|
AbstractUnificator.call(this, $context);
|
|
1072
1072
|
}
|
|
1073
|
-
protoOf(Unificator$Companion$naive$1).
|
|
1073
|
+
protoOf(Unificator$Companion$naive$1).checkTermsEquality_u6kzr7_k$ = function (first, second) {
|
|
1074
1074
|
var tmp;
|
|
1075
|
-
if (first.
|
|
1076
|
-
tmp = first.castToInteger().
|
|
1077
|
-
} else if (first.
|
|
1078
|
-
tmp = first.castToNumeric().
|
|
1075
|
+
if (first.get_isInteger_vb3zt7_k$() && second.get_isInteger_vb3zt7_k$()) {
|
|
1076
|
+
tmp = first.castToInteger().get_value_j01efc_k$().compareTo_u56mz_k$(second.castToInteger().get_value_j01efc_k$()) === 0;
|
|
1077
|
+
} else if (first.get_isNumber_x9n6xo_k$() && second.get_isNumber_x9n6xo_k$()) {
|
|
1078
|
+
tmp = first.castToNumeric().get_decimalValue_7pja3t_k$().compareTo_dqfxu6_k$(second.castToNumeric().get_decimalValue_7pja3t_k$()) === 0;
|
|
1079
1079
|
} else {
|
|
1080
1080
|
tmp = first.equals(second);
|
|
1081
1081
|
}
|
|
@@ -1087,7 +1087,7 @@
|
|
|
1087
1087
|
function Unificator$Companion$strict$1($context) {
|
|
1088
1088
|
AbstractUnificator.call(this, $context);
|
|
1089
1089
|
}
|
|
1090
|
-
protoOf(Unificator$Companion$strict$1).
|
|
1090
|
+
protoOf(Unificator$Companion$strict$1).checkTermsEquality_u6kzr7_k$ = function (first, second) {
|
|
1091
1091
|
return first.equals(second);
|
|
1092
1092
|
};
|
|
1093
1093
|
protoOf(Unificator$Companion$strict$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
|
|
@@ -1096,27 +1096,27 @@
|
|
|
1096
1096
|
function Companion_0() {
|
|
1097
1097
|
Companion_instance_1 = this;
|
|
1098
1098
|
var tmp = this;
|
|
1099
|
-
tmp.
|
|
1100
|
-
this.
|
|
1099
|
+
tmp.default$delegate_1 = lazy(Unificator$Companion$default$delegate$lambda);
|
|
1100
|
+
this.DEFAULT_CACHE_CAPACITY_1 = 32;
|
|
1101
1101
|
}
|
|
1102
|
-
protoOf(Companion_0).
|
|
1103
|
-
var tmp0 = this.
|
|
1102
|
+
protoOf(Companion_0).get_default_qtagd4_k$ = function () {
|
|
1103
|
+
var tmp0 = this.default$delegate_1;
|
|
1104
1104
|
var tmp = KProperty1;
|
|
1105
1105
|
// Inline function 'kotlin.getValue' call
|
|
1106
1106
|
getPropertyCallableRef('default', 1, tmp, Unificator$Companion$_get_default_$ref_8i2tx3(), null);
|
|
1107
|
-
return tmp0.
|
|
1107
|
+
return tmp0.get_value_j01efc_k$();
|
|
1108
1108
|
};
|
|
1109
1109
|
protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
|
|
1110
|
-
return this.
|
|
1110
|
+
return this.get_default_qtagd4_k$().mgu(_this__u8e3s4, other);
|
|
1111
1111
|
};
|
|
1112
1112
|
protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
|
|
1113
|
-
return this.
|
|
1113
|
+
return this.get_default_qtagd4_k$().match(_this__u8e3s4, other);
|
|
1114
1114
|
};
|
|
1115
1115
|
protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
|
|
1116
|
-
return this.
|
|
1116
|
+
return this.get_default_qtagd4_k$().unify(_this__u8e3s4, other);
|
|
1117
1117
|
};
|
|
1118
1118
|
protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
|
|
1119
|
-
return this.
|
|
1119
|
+
return this.get_default_qtagd4_k$().merge(_this__u8e3s4, other);
|
|
1120
1120
|
};
|
|
1121
1121
|
protoOf(Companion_0).naiveWithContext = function (context) {
|
|
1122
1122
|
return new Unificator$Companion$naive$1(context);
|
|
@@ -1130,10 +1130,10 @@
|
|
|
1130
1130
|
protoOf(Companion_0).strict = function () {
|
|
1131
1131
|
return this.strictWithContext(Companion_getInstance().empty());
|
|
1132
1132
|
};
|
|
1133
|
-
protoOf(Companion_0).
|
|
1133
|
+
protoOf(Companion_0).cached_wexs5h_k$ = function (other, capacity) {
|
|
1134
1134
|
var tmp;
|
|
1135
1135
|
if (other instanceof CachedUnificator) {
|
|
1136
|
-
tmp = new CachedUnificator(other.
|
|
1136
|
+
tmp = new CachedUnificator(other.decorated_1, capacity);
|
|
1137
1137
|
} else {
|
|
1138
1138
|
tmp = new CachedUnificator(other, capacity);
|
|
1139
1139
|
}
|
|
@@ -1141,7 +1141,7 @@
|
|
|
1141
1141
|
};
|
|
1142
1142
|
protoOf(Companion_0).cached = function (other, capacity, $super) {
|
|
1143
1143
|
capacity = capacity === VOID ? 32 : capacity;
|
|
1144
|
-
return $super === VOID ? this.
|
|
1144
|
+
return $super === VOID ? this.cached_wexs5h_k$(other, capacity) : $super.cached_wexs5h_k$.call(this, other, capacity);
|
|
1145
1145
|
};
|
|
1146
1146
|
var Companion_instance_1;
|
|
1147
1147
|
function Companion_getInstance_2() {
|
|
@@ -1166,38 +1166,38 @@
|
|
|
1166
1166
|
protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
|
|
1167
1167
|
protoOf(CachedUnificator).unify = unify;
|
|
1168
1168
|
protoOf(CachedUnificator).merge = merge;
|
|
1169
|
-
protoOf(Equation).
|
|
1169
|
+
protoOf(Equation).castTo_mm7cm3_k$ = castTo;
|
|
1170
1170
|
defineProp(protoOf(Equation), 'lhs', function () {
|
|
1171
|
-
return this.
|
|
1171
|
+
return this.get_lhs_18j1f6_k$();
|
|
1172
1172
|
});
|
|
1173
1173
|
defineProp(protoOf(Equation), 'rhs', function () {
|
|
1174
|
-
return this.
|
|
1174
|
+
return this.get_rhs_18iwz0_k$();
|
|
1175
1175
|
});
|
|
1176
1176
|
defineProp(protoOf(Equation), 'isIdentity', function () {
|
|
1177
|
-
return this.
|
|
1177
|
+
return this.get_isIdentity_zhqljl_k$();
|
|
1178
1178
|
});
|
|
1179
1179
|
defineProp(protoOf(Equation), 'isAssignment', function () {
|
|
1180
|
-
return this.
|
|
1180
|
+
return this.get_isAssignment_dlthcw_k$();
|
|
1181
1181
|
});
|
|
1182
1182
|
defineProp(protoOf(Equation), 'isLeftAssignment', function () {
|
|
1183
|
-
return this.
|
|
1183
|
+
return this.get_isLeftAssignment_r8ub7d_k$();
|
|
1184
1184
|
});
|
|
1185
1185
|
defineProp(protoOf(Equation), 'isRightAssignment', function () {
|
|
1186
|
-
return this.
|
|
1186
|
+
return this.get_isRightAssignment_m09f6y_k$();
|
|
1187
1187
|
});
|
|
1188
1188
|
defineProp(protoOf(Equation), 'isComparison', function () {
|
|
1189
|
-
return this.
|
|
1189
|
+
return this.get_isComparison_qhizvg_k$();
|
|
1190
1190
|
});
|
|
1191
1191
|
defineProp(protoOf(Equation), 'isContradiction', function () {
|
|
1192
|
-
return this.
|
|
1192
|
+
return this.get_isContradiction_5mfb8e_k$();
|
|
1193
1193
|
});
|
|
1194
1194
|
defineProp(protoOf(Assignment), 'variable', function () {
|
|
1195
|
-
return this.
|
|
1195
|
+
return this.get_variable_ik7c5h_k$();
|
|
1196
1196
|
});
|
|
1197
1197
|
defineProp(protoOf(Assignment), 'term', function () {
|
|
1198
|
-
return this.
|
|
1198
|
+
return this.get_term_wouvn9_k$();
|
|
1199
1199
|
});
|
|
1200
|
-
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).
|
|
1200
|
+
defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).get_default_qtagd4_k$);
|
|
1201
1201
|
//endregion
|
|
1202
1202
|
//region block: init
|
|
1203
1203
|
Companion_instance_0 = new Companion();
|