@tuprolog/2p-full 1.0.3 → 1.1.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.
Files changed (85) hide show
  1. package/2p-bdd.js +204 -201
  2. package/2p-bdd.js.map +1 -1
  3. package/2p-core.js +3668 -4128
  4. package/2p-core.js.map +1 -1
  5. package/2p-datalog.js +3 -3
  6. package/2p-datalog.js.map +1 -1
  7. package/2p-dsl-core.js +3 -3
  8. package/2p-dsl-core.js.map +1 -1
  9. package/2p-dsl-solve.js +3 -3
  10. package/2p-dsl-solve.js.map +1 -1
  11. package/2p-dsl-theory.js +3 -3
  12. package/2p-dsl-theory.js.map +1 -1
  13. package/2p-dsl-unify.js +3 -3
  14. package/2p-dsl-unify.js.map +1 -1
  15. package/2p-full.js +9 -19
  16. package/2p-full.js.map +1 -1
  17. package/2p-io-lib.js +6 -3321
  18. package/2p-io-lib.js.map +1 -1
  19. package/2p-oop-lib.js +6 -3435
  20. package/2p-oop-lib.js.map +1 -1
  21. package/2p-parser-core.js +6 -1266
  22. package/2p-parser-core.js.map +1 -1
  23. package/2p-parser-js.js +6 -30
  24. package/2p-parser-js.js.map +1 -1
  25. package/2p-parser-theory.js +6 -126
  26. package/2p-parser-theory.js.map +1 -1
  27. package/2p-repl.js +6 -499
  28. package/2p-repl.js.map +1 -1
  29. package/2p-serialize-core.js +3 -3
  30. package/2p-serialize-core.js.map +1 -1
  31. package/2p-serialize-theory.js +3 -3
  32. package/2p-serialize-theory.js.map +1 -1
  33. package/2p-solve-classic.js +1216 -1203
  34. package/2p-solve-classic.js.map +1 -1
  35. package/2p-solve-concurrent.js +3 -3
  36. package/2p-solve-concurrent.js.map +1 -1
  37. package/2p-solve-plp.js +8 -8
  38. package/2p-solve-plp.js.map +1 -1
  39. package/2p-solve-problog.js +2095 -2140
  40. package/2p-solve-problog.js.map +1 -1
  41. package/2p-solve-streams.js +1244 -1333
  42. package/2p-solve-streams.js.map +1 -1
  43. package/2p-solve.js +5185 -6393
  44. package/2p-solve.js.map +1 -1
  45. package/2p-test-dsl.js +3 -3
  46. package/2p-test-dsl.js.map +1 -1
  47. package/2p-theory.js +2091 -1992
  48. package/2p-theory.js.map +1 -1
  49. package/2p-unify.js +315 -300
  50. package/2p-unify.js.map +1 -1
  51. package/2p-utils.js +625 -635
  52. package/2p-utils.js.map +1 -1
  53. package/clikt-clikt-mordant.js +15 -0
  54. package/clikt-clikt-mordant.js.map +1 -0
  55. package/clikt-clikt.js +15 -0
  56. package/clikt-clikt.js.map +1 -0
  57. package/colormath-root-colormath.js +15 -0
  58. package/colormath-root-colormath.js.map +1 -0
  59. package/kotlin-kotlin-stdlib.js +6829 -8585
  60. package/kotlin-kotlin-stdlib.js.map +1 -1
  61. package/kotlin-kotlin-test.js +15 -0
  62. package/kotlin-kotlin-test.js.map +1 -0
  63. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
  64. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -1
  65. package/kotlinx-atomicfu.js +15 -0
  66. package/kotlinx-atomicfu.js.map +1 -0
  67. package/kotlinx-coroutines-core.js +15 -0
  68. package/kotlinx-coroutines-core.js.map +1 -0
  69. package/kt-math.js +3143 -3508
  70. package/kt-math.js.map +1 -1
  71. package/mordant-mordant-omnibus.js +15 -0
  72. package/mordant-mordant-omnibus.js.map +1 -0
  73. package/mordant-mordant.js +19 -0
  74. package/mordant-mordant.js.map +1 -0
  75. package/package.json +2 -3
  76. package/88b0986a7186d029-atomicfu-js-ir.js +0 -15
  77. package/88b0986a7186d029-atomicfu-js-ir.js.map +0 -1
  78. package/clikt-clikt-js-ir.js +0 -6006
  79. package/clikt-clikt-js-ir.js.map +0 -1
  80. package/kotlin-kotlin-test-kotlin-test-js-ir.js +0 -15
  81. package/kotlin-kotlin-test-kotlin-test-js-ir.js.map +0 -1
  82. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js +0 -15
  83. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map +0 -1
  84. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +0 -15
  85. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +0 -1
package/2p-unify.js CHANGED
@@ -1,73 +1,78 @@
1
- (function (root, factory) {
1
+ (function (factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
3
  define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-utils.js'], factory);
4
4
  else if (typeof exports === 'object')
5
5
  factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-utils.js'));
6
6
  else {
7
- if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
8
  throw new Error("Error loading module '2p-unify'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-unify'.");
9
9
  }
10
- if (typeof this['2p-core'] === 'undefined') {
10
+ if (typeof globalThis['2p-core'] === 'undefined') {
11
11
  throw new Error("Error loading module '2p-unify'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-unify'.");
12
12
  }
13
- if (typeof this['2p-utils'] === 'undefined') {
13
+ if (typeof globalThis['2p-utils'] === 'undefined') {
14
14
  throw new Error("Error loading module '2p-unify'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-unify'.");
15
15
  }
16
- root['2p-unify'] = factory(typeof this['2p-unify'] === 'undefined' ? {} : this['2p-unify'], this['kotlin-kotlin-stdlib'], this['2p-core'], this['2p-utils']);
16
+ globalThis['2p-unify'] = factory(typeof globalThis['2p-unify'] === 'undefined' ? {} : globalThis['2p-unify'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-core'], globalThis['2p-utils']);
17
17
  }
18
- }(this, function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
18
+ }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
19
19
  'use strict';
20
20
  //region block: imports
21
21
  var imul = Math.imul;
22
- var asSequence = kotlin_kotlin.$_$.m2;
23
- var plus = kotlin_kotlin.$_$.u8;
24
- var map = kotlin_kotlin.$_$.q8;
25
- var Unit_instance = kotlin_kotlin.$_$.y1;
26
- var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.e1;
27
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
28
- var toCollection = kotlin_kotlin.$_$.b9;
29
- var Pair = kotlin_kotlin.$_$.tb;
30
- var VOID = kotlin_kotlin.$_$.d;
31
- var lazy = kotlin_kotlin.$_$.ac;
32
- var protoOf = kotlin_kotlin.$_$.u6;
33
- var asSequence_0 = kotlin_kotlin.$_$.n2;
34
- var classMeta = kotlin_kotlin.$_$.v5;
35
- var setMetadataFor = kotlin_kotlin.$_$.v6;
36
- var KProperty1 = kotlin_kotlin.$_$.q7;
37
- var getPropertyCallableRef = kotlin_kotlin.$_$.c6;
22
+ var KProperty1 = kotlin_kotlin.$_$.c7;
23
+ var getPropertyCallableRef = kotlin_kotlin.$_$.q5;
24
+ var asSequence = kotlin_kotlin.$_$.v1;
25
+ var plus = kotlin_kotlin.$_$.g8;
26
+ var map = kotlin_kotlin.$_$.c8;
27
+ var Unit_instance = kotlin_kotlin.$_$.k1;
28
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
29
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
30
+ var toCollection = kotlin_kotlin.$_$.o8;
31
+ var Pair = kotlin_kotlin.$_$.ca;
32
+ var VOID = kotlin_kotlin.$_$.b;
33
+ var lazy = kotlin_kotlin.$_$.ja;
34
+ var protoOf = kotlin_kotlin.$_$.k6;
35
+ var asSequence_0 = kotlin_kotlin.$_$.w1;
36
+ var THROW_CCE = kotlin_kotlin.$_$.ea;
37
+ var initMetadataForClass = kotlin_kotlin.$_$.t5;
38
38
  var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
- var Triple = kotlin_kotlin.$_$.xb;
39
+ var Triple = kotlin_kotlin.$_$.ga;
40
40
  var Some = kotlin_it_unibo_tuprolog_utils.$_$.k;
41
- var zip = kotlin_kotlin.$_$.i9;
42
- var flatMap = kotlin_kotlin.$_$.h8;
43
- var sequenceOf = kotlin_kotlin.$_$.w8;
44
- var THROW_CCE = kotlin_kotlin.$_$.vb;
45
- var to = kotlin_kotlin.$_$.hc;
46
- var objectMeta = kotlin_kotlin.$_$.t6;
47
- var getKClass = kotlin_kotlin.$_$.c;
48
- var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.t;
49
- var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.d1;
50
- var castTo = kotlin_it_unibo_tuprolog_utils.$_$.f;
51
- var defineProp = kotlin_kotlin.$_$.x5;
52
- var Castable = kotlin_it_unibo_tuprolog_utils.$_$.g;
53
- var collectionSizeOrDefault = kotlin_kotlin.$_$.q2;
54
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.f;
55
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v;
56
- var interfaceMeta = kotlin_kotlin.$_$.f6;
41
+ var zip = kotlin_kotlin.$_$.v8;
42
+ var flatMap = kotlin_kotlin.$_$.t7;
43
+ var sequenceOf = kotlin_kotlin.$_$.j8;
44
+ var to = kotlin_kotlin.$_$.pa;
45
+ var sequenceOf_0 = kotlin_kotlin.$_$.i8;
46
+ var initMetadataForCompanion = kotlin_kotlin.$_$.u5;
47
+ var toString = kotlin_kotlin.$_$.n6;
48
+ var getKClass = kotlin_kotlin.$_$.b7;
49
+ var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o;
50
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
51
+ var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
52
+ var defineProp = kotlin_kotlin.$_$.l5;
53
+ var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
54
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.z1;
55
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.c;
56
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.q;
57
+ var initMetadataForInterface = kotlin_kotlin.$_$.w5;
57
58
  //endregion
58
59
  //region block: pre-declaration
60
+ function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
61
+ occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
62
+ return $super === VOID ? this.g1h(term1, term2, occurCheckEnabled) : $super.g1h.call(this, term1, term2, occurCheckEnabled);
63
+ }
59
64
  function mgu(term1, term2) {
60
- return this.y1j(term1, term2, true);
65
+ return this.g1h(term1, term2, true);
61
66
  }
62
67
  function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
63
- return !(this.y1j(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
68
+ return !(this.g1h(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
64
69
  }
65
70
  function match(term1, term2) {
66
71
  return this.matchWithOccurCheck(term1, term2, true);
67
72
  }
68
73
  function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
69
- var substitution = this.y1j(term1, term2, occurCheckEnabled);
70
- return substitution.x12() ? null : term1.getSubstituted(substitution, []);
74
+ var substitution = this.g1h(term1, term2, occurCheckEnabled);
75
+ return substitution.g10() ? null : term1.getSubstituted(substitution, []);
71
76
  }
72
77
  function unify(term1, term2) {
73
78
  return this.unifyWithOccurCheck(term1, term2, true);
@@ -75,37 +80,38 @@
75
80
  function merge(substitution1, substitution2) {
76
81
  return this.mergeWithOccurCheck(substitution1, substitution2, true);
77
82
  }
78
- setMetadataFor(Unificator, 'Unificator', interfaceMeta);
79
- setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, VOID, [Unificator]);
80
- setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, VOID, [Unificator]);
81
- setMetadataFor(Equation, 'Equation', classMeta, VOID, [Castable]);
82
- setMetadataFor(Identity, 'Identity', classMeta, Equation);
83
- setMetadataFor(Assignment, 'Assignment', classMeta, Equation);
84
- setMetadataFor(Comparison, 'Comparison', classMeta, Equation);
85
- setMetadataFor(Contradiction, 'Contradiction', classMeta, Equation);
86
- setMetadataFor(Companion, 'Companion', objectMeta);
87
- setMetadataFor(Unificator$Companion$naive$1, VOID, classMeta, AbstractUnificator);
88
- setMetadataFor(Unificator$Companion$strict$1, VOID, classMeta, AbstractUnificator);
89
- setMetadataFor(Companion_0, 'Companion', objectMeta);
83
+ initMetadataForInterface(Unificator, 'Unificator');
84
+ initMetadataForClass(AbstractUnificator, 'AbstractUnificator', VOID, VOID, [Unificator]);
85
+ initMetadataForClass(CachedUnificator, 'CachedUnificator', VOID, VOID, [Unificator]);
86
+ initMetadataForClass(Equation, 'Equation', VOID, VOID, [Castable]);
87
+ initMetadataForClass(Identity, 'Identity', VOID, Equation);
88
+ initMetadataForClass(Assignment, 'Assignment', VOID, Equation);
89
+ initMetadataForClass(Comparison, 'Comparison', VOID, Equation);
90
+ initMetadataForClass(Contradiction, 'Contradiction', VOID, Equation);
91
+ initMetadataForCompanion(Companion);
92
+ initMetadataForClass(Unificator$Companion$naive$1, VOID, VOID, AbstractUnificator);
93
+ initMetadataForClass(Unificator$Companion$strict$1, VOID, VOID, AbstractUnificator);
94
+ initMetadataForCompanion(Companion_0);
90
95
  //endregion
91
96
  function _get_contextEquations__x0dd77($this) {
97
+ var tmp0 = $this.p1g_1;
98
+ var tmp = KProperty1;
92
99
  // Inline function 'kotlin.getValue' call
93
- var this_0 = $this.h1j_1;
94
- contextEquations$factory();
95
- return this_0.r2();
100
+ getPropertyCallableRef('contextEquations', 1, tmp, AbstractUnificator$_get_contextEquations_$ref_7ajcte(), null);
101
+ return tmp0.e2();
96
102
  }
97
103
  function occurrenceCheck($this, variable, term) {
98
104
  var tmp;
99
- if (term.mx()) {
100
- tmp = $this.i1j(variable, term);
101
- } else if (term.ww()) {
105
+ if (term.vu()) {
106
+ tmp = $this.q1g(variable, term);
107
+ } else if (term.fu()) {
108
+ var tmp0 = term.bu();
102
109
  var tmp$ret$1;
103
110
  $l$block: {
104
111
  // Inline function 'kotlin.sequences.any' call
105
- var tmp0_iterator = term.sw().r();
106
- while (tmp0_iterator.s()) {
107
- var element = tmp0_iterator.u();
108
- // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.occurrenceCheck.<anonymous>' call
112
+ var _iterator__ex2g4s = tmp0.p();
113
+ while (_iterator__ex2g4s.s()) {
114
+ var element = _iterator__ex2g4s.t();
109
115
  if (occurrenceCheck($this, variable, element)) {
110
116
  tmp$ret$1 = true;
111
117
  break $l$block;
@@ -121,7 +127,7 @@
121
127
  }
122
128
  function equationsFor($this, term1, term2) {
123
129
  var tmp = Companion_instance_0;
124
- return tmp.j1j(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
130
+ return tmp.r1g(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
125
131
  }
126
132
  function equationsFor_0($this, substitution1, substitution2) {
127
133
  var tmp = Companion_instance_0;
@@ -139,7 +145,7 @@
139
145
  }
140
146
  while (inductionVariable < exceptIndex);
141
147
  var inductionVariable_0 = exceptIndex + 1 | 0;
142
- var last = equations.l();
148
+ var last = equations.u();
143
149
  if (inductionVariable_0 < last)
144
150
  do {
145
151
  var i_0 = inductionVariable_0;
@@ -153,32 +159,32 @@
153
159
  var changed = true;
154
160
  while (changed) {
155
161
  changed = false;
156
- var eqIterator = equations.z1();
162
+ var eqIterator = equations.b4();
157
163
  while (eqIterator.s()) {
158
- var eq = eqIterator.u();
159
- if (eq.o1j()) {
164
+ var eq = eqIterator.t();
165
+ if (eq.w1g()) {
160
166
  return Companion_getInstance().failed();
161
- } else if (eq.p1j()) {
162
- eqIterator.t();
167
+ } else if (eq.x1g()) {
168
+ eqIterator.b3();
163
169
  changed = true;
164
- } else if (eq.w1j()) {
165
- var assignment = eq.r1j();
166
- if (occurCheckEnabled ? occurrenceCheck($this, assignment.u1j_1, eq.n1j()) : false) {
170
+ } else if (eq.e1h()) {
171
+ var assignment = eq.z1g();
172
+ if (occurCheckEnabled && occurrenceCheck($this, assignment.c1h_1, eq.v1g())) {
167
173
  return Companion_getInstance().failed();
168
174
  } else {
169
- changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.n1());
175
+ changed = changed || applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.p3());
170
176
  }
171
- } else if (eq.q1j()) {
172
- eqIterator.t();
173
- var tmp0_iterator = equationsFor($this, eq.m1j(), eq.n1j()).r();
174
- insertion: while (tmp0_iterator.s()) {
175
- var it = tmp0_iterator.u();
176
- if (it.p1j())
177
+ } else if (eq.y1g()) {
178
+ eqIterator.b3();
179
+ var _iterator__ex2g4s = equationsFor($this, eq.u1g(), eq.v1g()).p();
180
+ insertion: while (_iterator__ex2g4s.s()) {
181
+ var it = _iterator__ex2g4s.t();
182
+ if (it.x1g())
177
183
  continue insertion;
178
- else if (it.o1j())
184
+ else if (it.w1g())
179
185
  return Companion_getInstance().failed();
180
186
  else {
181
- eqIterator.q1(it);
187
+ eqIterator.s3(it);
182
188
  }
183
189
  }
184
190
  changed = true;
@@ -188,12 +194,11 @@
188
194
  // Inline function 'kotlin.collections.filter' call
189
195
  // Inline function 'kotlin.collections.filterTo' call
190
196
  var destination = ArrayList_init_$Create$();
191
- var tmp0_iterator_0 = equations.r();
192
- while (tmp0_iterator_0.s()) {
193
- var element = tmp0_iterator_0.u();
194
- // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
195
- if (element.w1j()) {
196
- destination.o(element);
197
+ var _iterator__ex2g4s_0 = equations.p();
198
+ while (_iterator__ex2g4s_0.s()) {
199
+ var element = _iterator__ex2g4s_0.t();
200
+ if (element.e1h()) {
201
+ destination.n(element);
197
202
  }
198
203
  }
199
204
  return toSubstitution(destination);
@@ -204,62 +209,70 @@
204
209
  return toCollection(items, tmp$ret$0);
205
210
  }
206
211
  function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
207
- if ($equations.c1(i).o1j() ? true : $equations.c1(i).p1j())
212
+ if ($equations.z(i).w1g() || $equations.z(i).x1g())
208
213
  return Unit_instance;
209
- var currentEq = $equations.c1(i);
210
- var tmp0_container = currentEq.apply($substitution).toPair();
211
- var newLhs = tmp0_container.me();
212
- var newRhs = tmp0_container.ne();
213
- if (!currentEq.m1j().equals(newLhs) ? true : !currentEq.n1j().equals(newRhs)) {
214
+ var currentEq = $equations.z(i);
215
+ var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
216
+ var newLhs = _destruct__k2r9zo.rc();
217
+ var newRhs = _destruct__k2r9zo.sc();
218
+ if (!currentEq.u1g().equals(newLhs) || !currentEq.v1g().equals(newRhs)) {
214
219
  var tmp = Companion_instance_0;
215
- $equations.m(i, tmp.x1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
220
+ $equations.y3(i, tmp.f1h(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
216
221
  changed._v = true;
217
222
  }
218
223
  }
219
224
  function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
220
225
  return function () {
221
- return toEquations(this$0.uc());
226
+ return toEquations(this$0.h8());
222
227
  };
223
228
  }
224
- function AbstractUnificator$checkTermsEquality$ref($boundThis) {
225
- var l = function (p0, p1) {
226
- return $boundThis.i1j(p0, p1);
229
+ function AbstractUnificator$_get_contextEquations_$ref_7ajcte() {
230
+ return function (p0) {
231
+ return _get_contextEquations__x0dd77(p0);
232
+ };
233
+ }
234
+ function AbstractUnificator$checkTermsEquality$ref(p0) {
235
+ var l = function (_this__u8e3s4, p0_0) {
236
+ return p0.q1g(_this__u8e3s4, p0_0);
227
237
  };
228
238
  l.callableName = 'checkTermsEquality';
229
239
  return l;
230
240
  }
231
241
  function AbstractUnificator$equationsFor$lambda(it) {
232
242
  // Inline function 'kotlin.collections.toPair' call
233
- return new Pair(it.q2(), it.r2());
243
+ return new Pair(it.d2(), it.e2());
234
244
  }
235
- function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
236
- var l = function (p0, p1) {
237
- return $boundThis.i1j(p0, p1);
245
+ function AbstractUnificator$checkTermsEquality$ref_0(p0) {
246
+ var l = function (_this__u8e3s4, p0_0) {
247
+ return p0.q1g(_this__u8e3s4, p0_0);
238
248
  };
239
249
  l.callableName = 'checkTermsEquality';
240
250
  return l;
241
251
  }
242
252
  function AbstractUnificator(context) {
243
253
  context = context === VOID ? Companion_getInstance().empty() : context;
244
- this.g1j_1 = context;
254
+ this.o1g_1 = context;
245
255
  var tmp = this;
246
- tmp.h1j_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
256
+ tmp.p1g_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
247
257
  }
248
- protoOf(AbstractUnificator).uc = function () {
249
- return this.g1j_1;
258
+ protoOf(AbstractUnificator).h8 = function () {
259
+ return this.o1g_1;
250
260
  };
251
- protoOf(AbstractUnificator).y1j = function (term1, term2, occurCheckEnabled) {
252
- if (this.uc().x12())
261
+ protoOf(AbstractUnificator).g1h = function (term1, term2, occurCheckEnabled) {
262
+ if (this.h8().g10())
253
263
  return Companion_getInstance().failed();
254
264
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
255
265
  return mgu_0(this, equations, occurCheckEnabled);
256
266
  };
257
- protoOf(AbstractUnificator).z1j = function (substitution1, substitution2, occurCheckEnabled) {
258
- if ((this.uc().x12() ? true : substitution1.x12()) ? true : substitution2.x12())
267
+ protoOf(AbstractUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
268
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof AbstractUnificator) ? $super : THROW_CCE());
269
+ };
270
+ protoOf(AbstractUnificator).h1h = function (substitution1, substitution2, occurCheckEnabled) {
271
+ if (this.h8().g10() || substitution1.g10() || substitution2.g10())
259
272
  return Companion_getInstance().failed();
260
273
  if (!occurCheckEnabled) {
261
- var quickMerge = this.uc().plus(substitution1).plus(substitution2);
262
- if (quickMerge.w12()) {
274
+ var quickMerge = this.h8().plus(substitution1).plus(substitution2);
275
+ if (quickMerge.f10()) {
263
276
  return quickMerge;
264
277
  }
265
278
  }
@@ -267,45 +280,43 @@
267
280
  return mgu_0(this, equations, occurCheckEnabled);
268
281
  };
269
282
  protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
270
- return this.z1j(substitution1, substitution2, occurCheckEnabled);
283
+ return this.h1h(substitution1, substitution2, occurCheckEnabled);
271
284
  };
272
- function contextEquations$factory() {
273
- return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
274
- return _get_contextEquations__x0dd77(receiver);
275
- }, null);
276
- }
277
285
  function CachedUnificator(decorated, cacheCapacity) {
278
- this.a1k_1 = decorated;
279
- this.b1k_1 = Companion_instance.rq(cacheCapacity);
286
+ this.i1h_1 = decorated;
287
+ this.j1h_1 = Companion_instance.wo(cacheCapacity);
280
288
  }
281
- protoOf(CachedUnificator).y1j = function (term1, term2, occurCheckEnabled) {
289
+ protoOf(CachedUnificator).g1h = function (term1, term2, occurCheckEnabled) {
282
290
  var mguRequest = new Triple(term1, term2, occurCheckEnabled);
283
- var cached = this.b1k_1.x2(mguRequest);
291
+ var cached = this.j1h_1.h2(mguRequest);
284
292
  var tmp;
285
293
  if (cached instanceof Some) {
286
- tmp = cached.uq_1;
294
+ tmp = cached.zo_1;
287
295
  } else {
288
- var mguResult = this.a1k_1.y1j(term1, term2, occurCheckEnabled);
289
- this.b1k_1.sq(mguRequest, mguResult);
296
+ var mguResult = this.i1h_1.g1h(term1, term2, occurCheckEnabled);
297
+ this.j1h_1.xo(mguRequest, mguResult);
290
298
  tmp = mguResult;
291
299
  }
292
300
  return tmp;
293
301
  };
294
- protoOf(CachedUnificator).z1j = function (substitution1, substitution2, occurCheckEnabled) {
302
+ protoOf(CachedUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
303
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof CachedUnificator) ? $super : THROW_CCE());
304
+ };
305
+ protoOf(CachedUnificator).h1h = function (substitution1, substitution2, occurCheckEnabled) {
295
306
  var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
296
- var cached = this.b1k_1.x2(mguRequest);
307
+ var cached = this.j1h_1.h2(mguRequest);
297
308
  var tmp;
298
309
  if (cached instanceof Some) {
299
- tmp = cached.uq_1;
310
+ tmp = cached.zo_1;
300
311
  } else {
301
- var mguResult = this.a1k_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
302
- this.b1k_1.sq(mguRequest, mguResult);
312
+ var mguResult = this.i1h_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
313
+ this.j1h_1.xo(mguRequest, mguResult);
303
314
  tmp = mguResult;
304
315
  }
305
316
  return tmp;
306
317
  };
307
318
  protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
308
- return this.z1j(substitution1, substitution2, occurCheckEnabled);
319
+ return this.h1h(substitution1, substitution2, occurCheckEnabled);
309
320
  };
310
321
  function allOfLists($this, lhs, rhs, equalityChecker) {
311
322
  var tmp = zip(lhs.unfold(), rhs.unfold());
@@ -338,7 +349,7 @@
338
349
  }
339
350
  function Equation$Companion$from$lambda($equalityChecker) {
340
351
  return function (it) {
341
- return Companion_instance_0.c1k(it, $equalityChecker);
352
+ return Companion_instance_0.k1h(it, $equalityChecker);
342
353
  };
343
354
  }
344
355
  function Term$equals$ref_2() {
@@ -363,17 +374,17 @@
363
374
  return l;
364
375
  }
365
376
  function Equation$Companion$allOfLists$lambda($equalityChecker) {
366
- return function (_name_for_destructuring_parameter_0__wldtmu) {
367
- var l = _name_for_destructuring_parameter_0__wldtmu.me();
368
- var r = _name_for_destructuring_parameter_0__wldtmu.ne();
369
- return (l.dx() ? r.dx() : false) ? sequenceOf([Companion_instance_0.x1j(l.castToCons().wy(), r.castToCons().wy(), $equalityChecker)]) : (l.cx() ? r.cx() : false) ? sequenceOf([Companion_instance_0.x1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_instance_0.j1j(l, r, $equalityChecker);
377
+ return function (_destruct__k2r9zo) {
378
+ var l = _destruct__k2r9zo.rc();
379
+ var r = _destruct__k2r9zo.sc();
380
+ return l.mu() && r.mu() ? sequenceOf(Companion_instance_0.f1h(l.castToCons().fw(), r.castToCons().fw(), $equalityChecker)) : l.lu() && r.lu() ? sequenceOf(Companion_instance_0.f1h(l.castToList(), r.castToList(), $equalityChecker)) : Companion_instance_0.r1g(l, r, $equalityChecker);
370
381
  };
371
382
  }
372
383
  function Equation$Companion$allOfTuples$lambda($equalityChecker) {
373
- return function (_name_for_destructuring_parameter_0__wldtmu) {
374
- var l = _name_for_destructuring_parameter_0__wldtmu.me();
375
- var r = _name_for_destructuring_parameter_0__wldtmu.ne();
376
- return (l.bx() ? r.bx() : false) ? sequenceOf([Companion_instance_0.x1j(l.castToTuple().ky(), r.castToTuple().ky(), $equalityChecker)]) : Companion_instance_0.j1j(l, r, $equalityChecker);
384
+ return function (_destruct__k2r9zo) {
385
+ var l = _destruct__k2r9zo.rc();
386
+ var r = _destruct__k2r9zo.sc();
387
+ return l.ku() && r.ku() ? sequenceOf(Companion_instance_0.f1h(l.castToTuple().tv(), r.castToTuple().tv(), $equalityChecker)) : Companion_instance_0.r1g(l, r, $equalityChecker);
377
388
  };
378
389
  }
379
390
  function Term$equals$ref_5() {
@@ -385,29 +396,29 @@
385
396
  }
386
397
  function Equation$Companion$allOf$lambda($equalityChecker) {
387
398
  return function (it) {
388
- return Companion_instance_0.c1k(it, $equalityChecker);
399
+ return Companion_instance_0.k1h(it, $equalityChecker);
389
400
  };
390
401
  }
391
402
  function Identity(lhs, rhs) {
392
403
  Equation.call(this, lhs, rhs);
393
- this.f1k_1 = lhs;
394
- this.g1k_1 = rhs;
404
+ this.n1h_1 = lhs;
405
+ this.o1h_1 = rhs;
395
406
  }
396
- protoOf(Identity).m1j = function () {
397
- return this.f1k_1;
407
+ protoOf(Identity).u1g = function () {
408
+ return this.n1h_1;
398
409
  };
399
- protoOf(Identity).n1j = function () {
400
- return this.g1k_1;
410
+ protoOf(Identity).v1g = function () {
411
+ return this.o1h_1;
401
412
  };
402
- protoOf(Identity).p1j = function () {
413
+ protoOf(Identity).x1g = function () {
403
414
  return true;
404
415
  };
405
416
  protoOf(Identity).toString = function () {
406
- return 'Identity(lhs=' + this.f1k_1 + ', rhs=' + this.g1k_1 + ')';
417
+ return 'Identity(lhs=' + this.n1h_1.toString() + ', rhs=' + this.o1h_1.toString() + ')';
407
418
  };
408
419
  protoOf(Identity).hashCode = function () {
409
- var result = this.f1k_1.hashCode();
410
- result = imul(result, 31) + this.g1k_1.hashCode() | 0;
420
+ var result = this.n1h_1.hashCode();
421
+ result = imul(result, 31) + this.o1h_1.hashCode() | 0;
411
422
  return result;
412
423
  };
413
424
  protoOf(Identity).equals = function (other) {
@@ -415,45 +426,44 @@
415
426
  return true;
416
427
  if (!(other instanceof Identity))
417
428
  return false;
418
- var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
419
- if (!this.f1k_1.equals(tmp0_other_with_cast.f1k_1))
429
+ if (!this.n1h_1.equals(other.n1h_1))
420
430
  return false;
421
- if (!this.g1k_1.equals(tmp0_other_with_cast.g1k_1))
431
+ if (!this.o1h_1.equals(other.o1h_1))
422
432
  return false;
423
433
  return true;
424
434
  };
425
435
  function Assignment(lhs, rhs) {
426
436
  Equation.call(this, lhs, rhs);
427
- this.u1j_1 = lhs;
428
- this.v1j_1 = rhs;
437
+ this.c1h_1 = lhs;
438
+ this.d1h_1 = rhs;
429
439
  }
430
- protoOf(Assignment).m1j = function () {
431
- return this.u1j_1;
440
+ protoOf(Assignment).u1g = function () {
441
+ return this.c1h_1;
432
442
  };
433
- protoOf(Assignment).n1j = function () {
434
- return this.v1j_1;
443
+ protoOf(Assignment).v1g = function () {
444
+ return this.d1h_1;
435
445
  };
436
446
  protoOf(Assignment).toSubstitution = function () {
437
- return Companion_getInstance().unifier(this.u1j_1, this.v1j_1);
447
+ return Companion_getInstance().unifier(this.c1h_1, this.d1h_1);
438
448
  };
439
- protoOf(Assignment).j1k = function () {
440
- return to(this.u1j_1, this.v1j_1);
449
+ protoOf(Assignment).r1h = function () {
450
+ return to(this.c1h_1, this.d1h_1);
441
451
  };
442
452
  protoOf(Assignment).toPair = function () {
443
- return this.j1k();
453
+ return this.r1h();
444
454
  };
445
- protoOf(Assignment).w1j = function () {
455
+ protoOf(Assignment).e1h = function () {
446
456
  return true;
447
457
  };
448
- protoOf(Assignment).h1k = function () {
458
+ protoOf(Assignment).p1h = function () {
449
459
  return this;
450
460
  };
451
461
  protoOf(Assignment).toString = function () {
452
- return 'Assignment(lhs=' + this.u1j_1 + ', rhs=' + this.v1j_1 + ')';
462
+ return 'Assignment(lhs=' + this.c1h_1.toString() + ', rhs=' + this.d1h_1.toString() + ')';
453
463
  };
454
464
  protoOf(Assignment).hashCode = function () {
455
- var result = this.u1j_1.hashCode();
456
- result = imul(result, 31) + this.v1j_1.hashCode() | 0;
465
+ var result = this.c1h_1.hashCode();
466
+ result = imul(result, 31) + this.d1h_1.hashCode() | 0;
457
467
  return result;
458
468
  };
459
469
  protoOf(Assignment).equals = function (other) {
@@ -461,33 +471,32 @@
461
471
  return true;
462
472
  if (!(other instanceof Assignment))
463
473
  return false;
464
- var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
465
- if (!this.u1j_1.equals(tmp0_other_with_cast.u1j_1))
474
+ if (!this.c1h_1.equals(other.c1h_1))
466
475
  return false;
467
- if (!this.v1j_1.equals(tmp0_other_with_cast.v1j_1))
476
+ if (!this.d1h_1.equals(other.d1h_1))
468
477
  return false;
469
478
  return true;
470
479
  };
471
480
  function Comparison(lhs, rhs) {
472
481
  Equation.call(this, lhs, rhs);
473
- this.m1k_1 = lhs;
474
- this.n1k_1 = rhs;
482
+ this.u1h_1 = lhs;
483
+ this.v1h_1 = rhs;
475
484
  }
476
- protoOf(Comparison).m1j = function () {
477
- return this.m1k_1;
485
+ protoOf(Comparison).u1g = function () {
486
+ return this.u1h_1;
478
487
  };
479
- protoOf(Comparison).n1j = function () {
480
- return this.n1k_1;
488
+ protoOf(Comparison).v1g = function () {
489
+ return this.v1h_1;
481
490
  };
482
- protoOf(Comparison).q1j = function () {
491
+ protoOf(Comparison).y1g = function () {
483
492
  return true;
484
493
  };
485
494
  protoOf(Comparison).toString = function () {
486
- return 'Comparison(lhs=' + this.m1k_1 + ', rhs=' + this.n1k_1 + ')';
495
+ return 'Comparison(lhs=' + this.u1h_1.toString() + ', rhs=' + this.v1h_1.toString() + ')';
487
496
  };
488
497
  protoOf(Comparison).hashCode = function () {
489
- var result = this.m1k_1.hashCode();
490
- result = imul(result, 31) + this.n1k_1.hashCode() | 0;
498
+ var result = this.u1h_1.hashCode();
499
+ result = imul(result, 31) + this.v1h_1.hashCode() | 0;
491
500
  return result;
492
501
  };
493
502
  protoOf(Comparison).equals = function (other) {
@@ -495,33 +504,32 @@
495
504
  return true;
496
505
  if (!(other instanceof Comparison))
497
506
  return false;
498
- var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
499
- if (!this.m1k_1.equals(tmp0_other_with_cast.m1k_1))
507
+ if (!this.u1h_1.equals(other.u1h_1))
500
508
  return false;
501
- if (!this.n1k_1.equals(tmp0_other_with_cast.n1k_1))
509
+ if (!this.v1h_1.equals(other.v1h_1))
502
510
  return false;
503
511
  return true;
504
512
  };
505
513
  function Contradiction(lhs, rhs) {
506
514
  Equation.call(this, lhs, rhs);
507
- this.q1k_1 = lhs;
508
- this.r1k_1 = rhs;
515
+ this.y1h_1 = lhs;
516
+ this.z1h_1 = rhs;
509
517
  }
510
- protoOf(Contradiction).m1j = function () {
511
- return this.q1k_1;
518
+ protoOf(Contradiction).u1g = function () {
519
+ return this.y1h_1;
512
520
  };
513
- protoOf(Contradiction).n1j = function () {
514
- return this.r1k_1;
521
+ protoOf(Contradiction).v1g = function () {
522
+ return this.z1h_1;
515
523
  };
516
- protoOf(Contradiction).o1j = function () {
524
+ protoOf(Contradiction).w1g = function () {
517
525
  return true;
518
526
  };
519
527
  protoOf(Contradiction).toString = function () {
520
- return 'Contradiction(lhs=' + this.q1k_1 + ', rhs=' + this.r1k_1 + ')';
528
+ return 'Contradiction(lhs=' + this.y1h_1.toString() + ', rhs=' + this.z1h_1.toString() + ')';
521
529
  };
522
530
  protoOf(Contradiction).hashCode = function () {
523
- var result = this.q1k_1.hashCode();
524
- result = imul(result, 31) + this.r1k_1.hashCode() | 0;
531
+ var result = this.y1h_1.hashCode();
532
+ result = imul(result, 31) + this.z1h_1.hashCode() | 0;
525
533
  return result;
526
534
  };
527
535
  protoOf(Contradiction).equals = function (other) {
@@ -529,18 +537,17 @@
529
537
  return true;
530
538
  if (!(other instanceof Contradiction))
531
539
  return false;
532
- var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
533
- if (!this.q1k_1.equals(tmp0_other_with_cast.q1k_1))
540
+ if (!this.y1h_1.equals(other.y1h_1))
534
541
  return false;
535
- if (!this.r1k_1.equals(tmp0_other_with_cast.r1k_1))
542
+ if (!this.z1h_1.equals(other.z1h_1))
536
543
  return false;
537
544
  return true;
538
545
  };
539
546
  function Companion() {
540
547
  }
541
- protoOf(Companion).x1j = function (lhs, rhs, equalityChecker) {
548
+ protoOf(Companion).f1h = function (lhs, rhs, equalityChecker) {
542
549
  var tmp;
543
- if (lhs.mx() ? rhs.mx() : false) {
550
+ if (lhs.vu() && rhs.vu()) {
544
551
  var tmp_0;
545
552
  if (equalityChecker(lhs, rhs)) {
546
553
  tmp_0 = new Identity(lhs, rhs);
@@ -548,11 +555,11 @@
548
555
  tmp_0 = new Assignment(lhs.castToVar(), rhs);
549
556
  }
550
557
  tmp = tmp_0;
551
- } else if (lhs.mx()) {
558
+ } else if (lhs.vu()) {
552
559
  tmp = new Assignment(lhs.castToVar(), rhs);
553
- } else if (rhs.mx()) {
560
+ } else if (rhs.vu()) {
554
561
  tmp = new Assignment(rhs.castToVar(), lhs);
555
- } else if (lhs.px() ? rhs.px() : false) {
562
+ } else if (lhs.yu() && rhs.yu()) {
556
563
  var tmp_1;
557
564
  if (equalityChecker(lhs, rhs)) {
558
565
  tmp_1 = new Identity(lhs, rhs);
@@ -560,13 +567,13 @@
560
567
  tmp_1 = new Contradiction(lhs, rhs);
561
568
  }
562
569
  tmp = tmp_1;
563
- } else if (lhs.px() ? true : rhs.px()) {
570
+ } else if (lhs.yu() || rhs.yu()) {
564
571
  tmp = new Contradiction(lhs, rhs);
565
- } else if (lhs.ww() ? rhs.ww() : false) {
572
+ } else if (lhs.fu() && rhs.fu()) {
566
573
  var lhsStruct = lhs.castToStruct();
567
574
  var rhsStruct = rhs.castToStruct();
568
575
  var tmp_2;
569
- if (!(lhsStruct.kw() === rhsStruct.kw()) ? true : !(lhsStruct.qw() === rhsStruct.qw())) {
576
+ if (!(lhsStruct.tt() === rhsStruct.tt()) || !(lhsStruct.zt() === rhsStruct.zt())) {
570
577
  tmp_2 = new Contradiction(lhsStruct, rhsStruct);
571
578
  } else {
572
579
  tmp_2 = new Comparison(lhsStruct, rhsStruct);
@@ -585,10 +592,10 @@
585
592
  tmp = equalityChecker;
586
593
  }
587
594
  equalityChecker = tmp;
588
- return $super === VOID ? this.x1j(lhs, rhs, equalityChecker) : $super.x1j.call(this, lhs, rhs, equalityChecker);
595
+ return $super === VOID ? this.f1h(lhs, rhs, equalityChecker) : $super.f1h.call(this, lhs, rhs, equalityChecker);
589
596
  };
590
- protoOf(Companion).s1k = function (pair, equalityChecker) {
591
- return this.x1j(pair.ye_1, pair.ze_1, equalityChecker);
597
+ protoOf(Companion).a1i = function (pair, equalityChecker) {
598
+ return this.f1h(pair.xc_1, pair.yc_1, equalityChecker);
592
599
  };
593
600
  protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
594
601
  var tmp;
@@ -598,9 +605,9 @@
598
605
  tmp = equalityChecker;
599
606
  }
600
607
  equalityChecker = tmp;
601
- return $super === VOID ? this.s1k(pair, equalityChecker) : $super.s1k.call(this, pair, equalityChecker);
608
+ return $super === VOID ? this.a1i(pair, equalityChecker) : $super.a1i.call(this, pair, equalityChecker);
602
609
  };
603
- protoOf(Companion).t1k = function (pairs, equalityChecker) {
610
+ protoOf(Companion).b1i = function (pairs, equalityChecker) {
604
611
  return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
605
612
  };
606
613
  protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
@@ -611,10 +618,10 @@
611
618
  tmp = equalityChecker;
612
619
  }
613
620
  equalityChecker = tmp;
614
- return $super === VOID ? this.t1k(pairs, equalityChecker) : $super.t1k.call(this, pairs, equalityChecker);
621
+ return $super === VOID ? this.b1i(pairs, equalityChecker) : $super.b1i.call(this, pairs, equalityChecker);
615
622
  };
616
- protoOf(Companion).u1k = function (pairs, equalityChecker) {
617
- return this.t1k(asSequence_0(pairs), equalityChecker);
623
+ protoOf(Companion).c1i = function (pairs, equalityChecker) {
624
+ return this.b1i(asSequence_0(pairs), equalityChecker);
618
625
  };
619
626
  protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
620
627
  var tmp;
@@ -624,10 +631,10 @@
624
631
  tmp = equalityChecker;
625
632
  }
626
633
  equalityChecker = tmp;
627
- return $super === VOID ? this.u1k(pairs, equalityChecker) : $super.u1k.call(this, pairs, equalityChecker);
634
+ return $super === VOID ? this.c1i(pairs, equalityChecker) : $super.c1i.call(this, pairs, equalityChecker);
628
635
  };
629
- protoOf(Companion).v1k = function (pairs, equalityChecker) {
630
- return this.t1k(sequenceOf(pairs.slice()), equalityChecker);
636
+ protoOf(Companion).d1i = function (pairs, equalityChecker) {
637
+ return this.b1i(sequenceOf_0(pairs.slice()), equalityChecker);
631
638
  };
632
639
  protoOf(Companion).from = function (pairs, equalityChecker, $super) {
633
640
  var tmp;
@@ -637,10 +644,10 @@
637
644
  tmp = equalityChecker;
638
645
  }
639
646
  equalityChecker = tmp;
640
- return $super === VOID ? this.v1k(pairs, equalityChecker) : $super.v1k.call(this, pairs, equalityChecker);
647
+ return $super === VOID ? this.d1i(pairs, equalityChecker) : $super.d1i.call(this, pairs, equalityChecker);
641
648
  };
642
- protoOf(Companion).c1k = function (pair, equalityChecker) {
643
- return this.j1j(pair.ye_1, pair.ze_1, equalityChecker);
649
+ protoOf(Companion).k1h = function (pair, equalityChecker) {
650
+ return this.r1g(pair.xc_1, pair.yc_1, equalityChecker);
644
651
  };
645
652
  protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
646
653
  var tmp;
@@ -650,29 +657,29 @@
650
657
  tmp = equalityChecker;
651
658
  }
652
659
  equalityChecker = tmp;
653
- return $super === VOID ? this.c1k(pair, equalityChecker) : $super.c1k.call(this, pair, equalityChecker);
660
+ return $super === VOID ? this.k1h(pair, equalityChecker) : $super.k1h.call(this, pair, equalityChecker);
654
661
  };
655
- protoOf(Companion).j1j = function (lhs, rhs, equalityChecker) {
662
+ protoOf(Companion).r1g = function (lhs, rhs, equalityChecker) {
656
663
  var tmp;
657
- if (lhs.lw() ? rhs.lw() : false) {
658
- tmp = sequenceOf([this.x1j(lhs, rhs, equalityChecker)]);
659
- } else if (lhs.cx() ? rhs.cx() : false) {
664
+ if (lhs.ut() && rhs.ut()) {
665
+ tmp = sequenceOf(this.f1h(lhs, rhs, equalityChecker));
666
+ } else if (lhs.lu() && rhs.lu()) {
660
667
  tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
661
- } else if (lhs.bx() ? rhs.bx() : false) {
668
+ } else if (lhs.ku() && rhs.ku()) {
662
669
  tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
663
- } else if (lhs.ww() ? rhs.ww() : false) {
670
+ } else if (lhs.fu() && rhs.fu()) {
664
671
  var lhsStruct = lhs.castToStruct();
665
672
  var rhsStruct = rhs.castToStruct();
666
673
  var tmp_0;
667
- if (lhsStruct.kw() === rhsStruct.kw() ? lhsStruct.qw() === rhsStruct.qw() : false) {
668
- var tmp_1 = zip(lhsStruct.jx(), rhsStruct.jx());
674
+ if (lhsStruct.tt() === rhsStruct.tt() && lhsStruct.zt() === rhsStruct.zt()) {
675
+ var tmp_1 = zip(lhsStruct.su(), rhsStruct.su());
669
676
  tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
670
677
  } else {
671
- tmp_0 = sequenceOf([this.x1j(lhs, rhs, equalityChecker)]);
678
+ tmp_0 = sequenceOf(this.f1h(lhs, rhs, equalityChecker));
672
679
  }
673
680
  tmp = tmp_0;
674
681
  } else {
675
- tmp = sequenceOf([this.x1j(lhs, rhs, equalityChecker)]);
682
+ tmp = sequenceOf(this.f1h(lhs, rhs, equalityChecker));
676
683
  }
677
684
  return tmp;
678
685
  };
@@ -684,7 +691,7 @@
684
691
  tmp = equalityChecker;
685
692
  }
686
693
  equalityChecker = tmp;
687
- return $super === VOID ? this.j1j(lhs, rhs, equalityChecker) : $super.j1j.call(this, lhs, rhs, equalityChecker);
694
+ return $super === VOID ? this.r1g(lhs, rhs, equalityChecker) : $super.r1g.call(this, lhs, rhs, equalityChecker);
688
695
  };
689
696
  var Companion_instance_0;
690
697
  function Companion_getInstance_1() {
@@ -698,54 +705,54 @@
698
705
  return l;
699
706
  }
700
707
  function Equation(lhs, rhs) {
701
- this.k1j_1 = lhs;
702
- this.l1j_1 = rhs;
708
+ this.s1g_1 = lhs;
709
+ this.t1g_1 = rhs;
703
710
  }
704
- protoOf(Equation).m1j = function () {
705
- return this.k1j_1;
711
+ protoOf(Equation).u1g = function () {
712
+ return this.s1g_1;
706
713
  };
707
- protoOf(Equation).n1j = function () {
708
- return this.l1j_1;
714
+ protoOf(Equation).v1g = function () {
715
+ return this.t1g_1;
709
716
  };
710
- protoOf(Equation).p1j = function () {
717
+ protoOf(Equation).x1g = function () {
711
718
  return false;
712
719
  };
713
- protoOf(Equation).w1j = function () {
720
+ protoOf(Equation).e1h = function () {
714
721
  return false;
715
722
  };
716
- protoOf(Equation).h1k = function () {
723
+ protoOf(Equation).p1h = function () {
717
724
  return null;
718
725
  };
719
- protoOf(Equation).r1j = function () {
720
- var tmp0_elvis_lhs = this.h1k();
726
+ protoOf(Equation).z1g = function () {
727
+ var tmp0_elvis_lhs = this.p1h();
721
728
  var tmp;
722
729
  if (tmp0_elvis_lhs == null) {
723
- throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).s6());
730
+ throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).b9());
724
731
  } else {
725
732
  tmp = tmp0_elvis_lhs;
726
733
  }
727
734
  return tmp;
728
735
  };
729
- protoOf(Equation).q1j = function () {
736
+ protoOf(Equation).y1g = function () {
730
737
  return false;
731
738
  };
732
- protoOf(Equation).o1j = function () {
739
+ protoOf(Equation).w1g = function () {
733
740
  return false;
734
741
  };
735
- protoOf(Equation).p1i = function () {
736
- return Companion_getInstance_0().of('=', [this.m1j(), this.n1j()]);
742
+ protoOf(Equation).x1f = function () {
743
+ return Companion_getInstance_0().of('=', [this.u1g(), this.v1g()]);
737
744
  };
738
745
  protoOf(Equation).toTerm = function () {
739
- return this.p1i();
746
+ return this.x1f();
740
747
  };
741
748
  protoOf(Equation).toPair = function () {
742
- return new Pair(this.m1j(), this.n1j());
749
+ return new Pair(this.u1g(), this.v1g());
743
750
  };
744
751
  protoOf(Equation).swap = function () {
745
- return Companion_instance_0.of(this.n1j(), this.m1j());
752
+ return Companion_instance_0.of(this.v1g(), this.u1g());
746
753
  };
747
- protoOf(Equation).i1k = function (substitution, equalityChecker) {
748
- return Companion_instance_0.x1j(this.m1j().getSubstituted(substitution, []), this.n1j().getSubstituted(substitution, []), equalityChecker);
754
+ protoOf(Equation).q1h = function (substitution, equalityChecker) {
755
+ return Companion_instance_0.f1h(this.u1g().getSubstituted(substitution, []), this.v1g().getSubstituted(substitution, []), equalityChecker);
749
756
  };
750
757
  protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
751
758
  var tmp;
@@ -755,23 +762,22 @@
755
762
  tmp = equalityChecker;
756
763
  }
757
764
  equalityChecker = tmp;
758
- return $super === VOID ? this.i1k(substitution, equalityChecker) : $super.i1k.call(this, substitution, equalityChecker);
765
+ return $super === VOID ? this.q1h(substitution, equalityChecker) : $super.q1h.call(this, substitution, equalityChecker);
759
766
  };
760
767
  function toEquations(_this__u8e3s4) {
761
768
  // Inline function 'kotlin.collections.map' call
762
- var this_0 = _this__u8e3s4.p2();
769
+ var this_0 = _this__u8e3s4.f1();
763
770
  // Inline function 'kotlin.collections.mapTo' call
764
771
  var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
765
- var tmp0_iterator = this_0.r();
766
- while (tmp0_iterator.s()) {
767
- var item = tmp0_iterator.u();
768
- // Inline function 'it.unibo.tuprolog.unify.toEquations.<anonymous>' call
772
+ var _iterator__ex2g4s = this_0.p();
773
+ while (_iterator__ex2g4s.s()) {
774
+ var item = _iterator__ex2g4s.t();
769
775
  // Inline function 'kotlin.collections.component1' call
770
- var variable = item.q2();
776
+ var variable = item.d2();
771
777
  // Inline function 'kotlin.collections.component2' call
772
- var term = item.r2();
778
+ var term = item.e2();
773
779
  var tmp$ret$2 = new Assignment(variable, term);
774
- destination.o(tmp$ret$2);
780
+ destination.n(tmp$ret$2);
775
781
  }
776
782
  return destination;
777
783
  }
@@ -782,14 +788,14 @@
782
788
  }
783
789
  function toAssignmentPair(_this__u8e3s4) {
784
790
  var tmp;
785
- if (_this__u8e3s4.w1j()) {
786
- tmp = _this__u8e3s4.r1j().j1k();
787
- } else if (_this__u8e3s4.m1j().mx()) {
788
- tmp = to(_this__u8e3s4.m1j().castToVar(), _this__u8e3s4.n1j());
789
- } else if (_this__u8e3s4.n1j().mx()) {
790
- tmp = to(_this__u8e3s4.n1j().castToVar(), _this__u8e3s4.m1j());
791
+ if (_this__u8e3s4.e1h()) {
792
+ tmp = _this__u8e3s4.z1g().r1h();
793
+ } else if (_this__u8e3s4.u1g().vu()) {
794
+ tmp = to(_this__u8e3s4.u1g().castToVar(), _this__u8e3s4.v1g());
795
+ } else if (_this__u8e3s4.v1g().vu()) {
796
+ tmp = to(_this__u8e3s4.v1g().castToVar(), _this__u8e3s4.u1g());
791
797
  } else {
792
- throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
798
+ throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(_this__u8e3s4));
793
799
  }
794
800
  return tmp;
795
801
  }
@@ -799,49 +805,61 @@
799
805
  function Unificator$Companion$default$delegate$lambda() {
800
806
  return Companion_getInstance_2().strict();
801
807
  }
808
+ function Unificator$Companion$_get_default_$ref_8i2tx3() {
809
+ return function (p0) {
810
+ return p0.g1i();
811
+ };
812
+ }
802
813
  function Unificator$Companion$naive$1($context) {
803
814
  AbstractUnificator.call(this, $context);
804
815
  }
805
- protoOf(Unificator$Companion$naive$1).i1j = function (first, second) {
816
+ protoOf(Unificator$Companion$naive$1).q1g = function (first, second) {
806
817
  var tmp;
807
- if (first.rx() ? second.rx() : false) {
808
- tmp = first.castToInteger().r2().yk(second.castToInteger().r2()) === 0;
809
- } else if (first.qx() ? second.qx() : false) {
810
- tmp = first.castToNumeric().g11().pk(second.castToNumeric().g11()) === 0;
818
+ if (first.av() && second.av()) {
819
+ tmp = first.castToInteger().e2().dj(second.castToInteger().e2()) === 0;
820
+ } else if (first.zu() && second.zu()) {
821
+ tmp = first.castToNumeric().py().ui(second.castToNumeric().py()) === 0;
811
822
  } else {
812
823
  tmp = first.equals(second);
813
824
  }
814
825
  return tmp;
815
826
  };
827
+ protoOf(Unificator$Companion$naive$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
828
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof Unificator$Companion$naive$1) ? $super : THROW_CCE());
829
+ };
816
830
  function Unificator$Companion$strict$1($context) {
817
831
  AbstractUnificator.call(this, $context);
818
832
  }
819
- protoOf(Unificator$Companion$strict$1).i1j = function (first, second) {
833
+ protoOf(Unificator$Companion$strict$1).q1g = function (first, second) {
820
834
  return first.equals(second);
821
835
  };
836
+ protoOf(Unificator$Companion$strict$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
837
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof Unificator$Companion$strict$1) ? $super : THROW_CCE());
838
+ };
822
839
  function Companion_0() {
823
840
  Companion_instance_1 = this;
824
841
  var tmp = this;
825
- tmp.a1l_1 = lazy(Unificator$Companion$default$delegate$lambda);
826
- this.b1l_1 = 32;
842
+ tmp.e1i_1 = lazy(Unificator$Companion$default$delegate$lambda);
843
+ this.f1i_1 = 32;
827
844
  }
828
- protoOf(Companion_0).c1l = function () {
845
+ protoOf(Companion_0).g1i = function () {
846
+ var tmp0 = this.e1i_1;
847
+ var tmp = KProperty1;
829
848
  // Inline function 'kotlin.getValue' call
830
- var this_0 = this.a1l_1;
831
- default$factory();
832
- return this_0.r2();
849
+ getPropertyCallableRef('default', 1, tmp, Unificator$Companion$_get_default_$ref_8i2tx3(), null);
850
+ return tmp0.e2();
833
851
  };
834
852
  protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
835
- return this.c1l().mgu(_this__u8e3s4, other);
853
+ return this.g1i().mgu(_this__u8e3s4, other);
836
854
  };
837
855
  protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
838
- return this.c1l().match(_this__u8e3s4, other);
856
+ return this.g1i().match(_this__u8e3s4, other);
839
857
  };
840
858
  protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
841
- return this.c1l().unify(_this__u8e3s4, other);
859
+ return this.g1i().unify(_this__u8e3s4, other);
842
860
  };
843
861
  protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
844
- return this.c1l().merge(_this__u8e3s4, other);
862
+ return this.g1i().merge(_this__u8e3s4, other);
845
863
  };
846
864
  protoOf(Companion_0).naiveWithContext = function (context) {
847
865
  return new Unificator$Companion$naive$1(context);
@@ -855,10 +873,10 @@
855
873
  protoOf(Companion_0).strict = function () {
856
874
  return this.strictWithContext(Companion_getInstance().empty());
857
875
  };
858
- protoOf(Companion_0).d1l = function (other, capacity) {
876
+ protoOf(Companion_0).l1i = function (other, capacity) {
859
877
  var tmp;
860
878
  if (other instanceof CachedUnificator) {
861
- tmp = new CachedUnificator(other.a1k_1, capacity);
879
+ tmp = new CachedUnificator(other.i1h_1, capacity);
862
880
  } else {
863
881
  tmp = new CachedUnificator(other, capacity);
864
882
  }
@@ -866,7 +884,7 @@
866
884
  };
867
885
  protoOf(Companion_0).cached = function (other, capacity, $super) {
868
886
  capacity = capacity === VOID ? 32 : capacity;
869
- return $super === VOID ? this.d1l(other, capacity) : $super.d1l.call(this, other, capacity);
887
+ return $super === VOID ? this.l1i(other, capacity) : $super.l1i.call(this, other, capacity);
870
888
  };
871
889
  var Companion_instance_1;
872
890
  function Companion_getInstance_2() {
@@ -876,32 +894,29 @@
876
894
  }
877
895
  function Unificator() {
878
896
  }
879
- function default$factory() {
880
- return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
881
- return receiver.c1l();
882
- }, null);
883
- }
884
897
  //region block: post-declaration
898
+ protoOf(AbstractUnificator).mguWithOccurCheck = mguWithOccurCheck;
885
899
  protoOf(AbstractUnificator).mgu = mgu;
886
900
  protoOf(AbstractUnificator).matchWithOccurCheck = matchWithOccurCheck;
887
901
  protoOf(AbstractUnificator).match = match;
888
902
  protoOf(AbstractUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
889
903
  protoOf(AbstractUnificator).unify = unify;
890
904
  protoOf(AbstractUnificator).merge = merge;
905
+ protoOf(CachedUnificator).mguWithOccurCheck = mguWithOccurCheck;
891
906
  protoOf(CachedUnificator).mgu = mgu;
892
907
  protoOf(CachedUnificator).matchWithOccurCheck = matchWithOccurCheck;
893
908
  protoOf(CachedUnificator).match = match;
894
909
  protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
895
910
  protoOf(CachedUnificator).unify = unify;
896
911
  protoOf(CachedUnificator).merge = merge;
897
- protoOf(Equation).br = castTo;
912
+ protoOf(Equation).gp = castTo;
898
913
  defineProp(protoOf(Equation), 'lhs', function () {
899
- return this.m1j();
914
+ return this.u1g();
900
915
  });
901
916
  defineProp(protoOf(Equation), 'rhs', function () {
902
- return this.n1j();
917
+ return this.v1g();
903
918
  });
904
- defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).c1l);
919
+ defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).g1i);
905
920
  //endregion
906
921
  //region block: init
907
922
  Companion_instance_0 = new Companion();