@tuprolog/2p-full 0.31.21 → 0.32.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 (43) hide show
  1. package/2p-bdd.js +198 -215
  2. package/2p-bdd.js.map +1 -1
  3. package/2p-core.js +3282 -5092
  4. package/2p-core.js.map +1 -1
  5. package/2p-full.js +6 -6
  6. package/2p-io-lib.js +874 -1121
  7. package/2p-io-lib.js.map +1 -1
  8. package/2p-oop-lib.js +1140 -1327
  9. package/2p-oop-lib.js.map +1 -1
  10. package/2p-parser-core.js +438 -609
  11. package/2p-parser-core.js.map +1 -1
  12. package/2p-parser-js.js +7 -8
  13. package/2p-parser-js.js.map +1 -1
  14. package/2p-parser-theory.js +35 -39
  15. package/2p-parser-theory.js.map +1 -1
  16. package/2p-repl.js +152 -179
  17. package/2p-repl.js.map +1 -1
  18. package/2p-solve-classic.js +1141 -1371
  19. package/2p-solve-classic.js.map +1 -1
  20. package/2p-solve-plp.js +9 -14
  21. package/2p-solve-plp.js.map +1 -1
  22. package/2p-solve-problog.js +1689 -1981
  23. package/2p-solve-problog.js.map +1 -1
  24. package/2p-solve-streams.js +1206 -1372
  25. package/2p-solve-streams.js.map +1 -1
  26. package/2p-solve.js +4880 -6148
  27. package/2p-solve.js.map +1 -1
  28. package/2p-theory.js +1820 -2246
  29. package/2p-theory.js.map +1 -1
  30. package/2p-unify.js +290 -330
  31. package/2p-unify.js.map +1 -1
  32. package/2p-utils.js +483 -557
  33. package/2p-utils.js.map +1 -1
  34. package/clikt-clikt-js-ir.js +2243 -3266
  35. package/clikt-clikt-js-ir.js.map +1 -1
  36. package/{kotlin-kotlin-stdlib-js-ir.js → kotlin-kotlin-stdlib.js} +9559 -10329
  37. package/kotlin-kotlin-stdlib.js.map +1 -0
  38. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  39. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  40. package/kt-math.js +2926 -4247
  41. package/kt-math.js.map +1 -1
  42. package/package.json +9 -3
  43. package/kotlin-kotlin-stdlib-js-ir.js.map +0 -1
package/2p-unify.js CHANGED
@@ -1,11 +1,11 @@
1
1
  (function (root, factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './2p-core.js', './2p-utils.js'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-utils.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./2p-core.js'), require('./2p-utils.js'));
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-js-ir'] === 'undefined') {
8
- throw new Error("Error loading module '2p-unify'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to '2p-unify'.");
7
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
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
10
  if (typeof this['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'.");
@@ -13,61 +13,61 @@
13
13
  if (typeof this['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-js-ir'], this['2p-core'], this['2p-utils']);
16
+ root['2p-unify'] = factory(typeof this['2p-unify'] === 'undefined' ? {} : this['2p-unify'], this['kotlin-kotlin-stdlib'], this['2p-core'], this['2p-utils']);
17
17
  }
18
18
  }(this, 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 Unit_getInstance = kotlin_kotlin.$_$.v1;
23
- var asSequence = kotlin_kotlin.$_$.j2;
24
- var plus = kotlin_kotlin.$_$.s8;
25
- var map = kotlin_kotlin.$_$.o8;
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
26
  var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.e1;
27
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
28
- var toCollection = kotlin_kotlin.$_$.z8;
29
- var Pair = kotlin_kotlin.$_$.rb;
30
- var VOID = kotlin_kotlin.$_$.gc;
31
- var lazy = kotlin_kotlin.$_$.yb;
32
- var protoOf = kotlin_kotlin.$_$.s6;
33
- var asSequence_0 = kotlin_kotlin.$_$.k2;
34
- var classMeta = kotlin_kotlin.$_$.t5;
35
- var setMetadataFor = kotlin_kotlin.$_$.t6;
36
- var KProperty1 = kotlin_kotlin.$_$.o7;
37
- var getPropertyCallableRef = kotlin_kotlin.$_$.z5;
38
- var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
- var Triple = kotlin_kotlin.$_$.vb;
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;
38
+ var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
+ var Triple = kotlin_kotlin.$_$.xb;
40
40
  var Some = kotlin_it_unibo_tuprolog_utils.$_$.k;
41
- var zip = kotlin_kotlin.$_$.g9;
42
- var flatMap = kotlin_kotlin.$_$.f8;
43
- var sequenceOf = kotlin_kotlin.$_$.u8;
44
- var THROW_CCE = kotlin_kotlin.$_$.tb;
45
- var castTo = kotlin_it_unibo_tuprolog_utils.$_$.f;
46
- var to = kotlin_kotlin.$_$.fc;
47
- var objectMeta = kotlin_kotlin.$_$.r6;
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;
48
47
  var getKClass = kotlin_kotlin.$_$.c;
49
- var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.r;
50
- var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.d1;
51
- var defineProp = kotlin_kotlin.$_$.v5;
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
52
  var Castable = kotlin_it_unibo_tuprolog_utils.$_$.g;
53
- var collectionSizeOrDefault = kotlin_kotlin.$_$.n2;
54
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.e;
55
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.t;
56
- var interfaceMeta = kotlin_kotlin.$_$.c6;
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;
57
57
  //endregion
58
58
  //region block: pre-declaration
59
59
  function mgu(term1, term2) {
60
- return this.d1j(term1, term2, true);
60
+ return this.c1k(term1, term2, true);
61
61
  }
62
62
  function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
63
- return !(this.d1j(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
63
+ return !(this.c1k(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
64
64
  }
65
65
  function match(term1, term2) {
66
66
  return this.matchWithOccurCheck(term1, term2, true);
67
67
  }
68
68
  function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
69
- var substitution = this.d1j(term1, term2, occurCheckEnabled);
70
- return substitution.h11() ? null : term1.getSubstituted(substitution, []);
69
+ var substitution = this.c1k(term1, term2, occurCheckEnabled);
70
+ return substitution.x12() ? null : term1.getSubstituted(substitution, []);
71
71
  }
72
72
  function unify(term1, term2) {
73
73
  return this.unifyWithOccurCheck(term1, term2, true);
@@ -89,28 +89,24 @@
89
89
  setMetadataFor(Companion_0, 'Companion', objectMeta);
90
90
  //endregion
91
91
  function _get_contextEquations__x0dd77($this) {
92
- var tmp$ret$0;
93
92
  // Inline function 'kotlin.getValue' call
94
- var tmp0_getValue = contextEquations$factory();
95
- tmp$ret$0 = $this.m1i_1.b1();
96
- return tmp$ret$0;
93
+ var this_0 = $this.l1j_1;
94
+ contextEquations$factory();
95
+ return this_0.r2();
97
96
  }
98
97
  function occurrenceCheck($this, variable, term) {
99
98
  var tmp;
100
- if (term.mw()) {
101
- tmp = $this.n1i(variable, term);
102
- } else if (term.aw()) {
99
+ if (term.mx()) {
100
+ tmp = $this.m1j(variable, term);
101
+ } else if (term.ww()) {
103
102
  var tmp$ret$1;
104
103
  $l$block: {
105
104
  // Inline function 'kotlin.sequences.any' call
106
- var tmp0_any = term.yv();
107
- var tmp0_iterator = tmp0_any.j();
108
- while (tmp0_iterator.m()) {
109
- var element = tmp0_iterator.n();
110
- var tmp$ret$0;
105
+ var tmp0_iterator = term.sw().r();
106
+ while (tmp0_iterator.s()) {
107
+ var element = tmp0_iterator.u();
111
108
  // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.occurrenceCheck.<anonymous>' call
112
- tmp$ret$0 = occurrenceCheck($this, variable, element);
113
- if (tmp$ret$0) {
109
+ if (occurrenceCheck($this, variable, element)) {
114
110
  tmp$ret$1 = true;
115
111
  break $l$block;
116
112
  }
@@ -124,11 +120,11 @@
124
120
  return tmp;
125
121
  }
126
122
  function equationsFor($this, term1, term2) {
127
- var tmp = Companion_getInstance_2();
128
- return tmp.o1i(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
123
+ var tmp = Companion_instance_0;
124
+ return tmp.n1j(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
129
125
  }
130
126
  function equationsFor_0($this, substitution1, substitution2) {
131
- var tmp = Companion_getInstance_2();
127
+ var tmp = Companion_instance_0;
132
128
  var tmp_0 = plus(asSequence(substitution1), asSequence(substitution2));
133
129
  return tmp.fromSequence(map(tmp_0, AbstractUnificator$equationsFor$lambda));
134
130
  }
@@ -143,7 +139,7 @@
143
139
  }
144
140
  while (inductionVariable < exceptIndex);
145
141
  var inductionVariable_0 = exceptIndex + 1 | 0;
146
- var last = equations.p();
142
+ var last = equations.l();
147
143
  if (inductionVariable_0 < last)
148
144
  do {
149
145
  var i_0 = inductionVariable_0;
@@ -157,122 +153,113 @@
157
153
  var changed = true;
158
154
  while (changed) {
159
155
  changed = false;
160
- var eqIterator = equations.gb();
161
- while (eqIterator.m()) {
162
- var eq = eqIterator.n();
163
- if (eq.t1i()) {
156
+ var eqIterator = equations.z1();
157
+ while (eqIterator.s()) {
158
+ var eq = eqIterator.u();
159
+ if (eq.s1j()) {
164
160
  return Companion_getInstance().failed();
165
- } else if (eq.u1i()) {
166
- eqIterator.y4();
161
+ } else if (eq.t1j()) {
162
+ eqIterator.t();
167
163
  changed = true;
168
- } else if (eq.b1j()) {
169
- var assignment = eq.w1i();
170
- if (occurCheckEnabled ? occurrenceCheck($this, assignment.z1i_1, eq.s1i()) : false) {
164
+ } else if (eq.a1k()) {
165
+ var assignment = eq.v1j();
166
+ if (occurCheckEnabled ? occurrenceCheck($this, assignment.y1j_1, eq.r1j()) : false) {
171
167
  return Companion_getInstance().failed();
172
168
  } else {
173
- changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.xa());
169
+ changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.n1());
174
170
  }
175
- } else if (eq.v1i()) {
176
- eqIterator.y4();
177
- var tmp0_iterator = equationsFor($this, eq.r1i(), eq.s1i()).j();
178
- insertion: while (tmp0_iterator.m()) {
179
- var it = tmp0_iterator.n();
180
- if (it.u1i())
171
+ } else if (eq.u1j()) {
172
+ eqIterator.t();
173
+ var tmp0_iterator = equationsFor($this, eq.q1j(), eq.r1j()).r();
174
+ insertion: while (tmp0_iterator.s()) {
175
+ var it = tmp0_iterator.u();
176
+ if (it.t1j())
181
177
  continue insertion;
182
- else if (it.t1i())
178
+ else if (it.s1j())
183
179
  return Companion_getInstance().failed();
184
180
  else {
185
- eqIterator.ab(it);
181
+ eqIterator.q1(it);
186
182
  }
187
183
  }
188
184
  changed = true;
189
185
  }
190
186
  }
191
187
  }
192
- var tmp$ret$2;
193
188
  // Inline function 'kotlin.collections.filter' call
194
- var tmp$ret$1;
195
189
  // Inline function 'kotlin.collections.filterTo' call
196
- var tmp0_filterTo = ArrayList_init_$Create$();
197
- var tmp0_iterator_0 = equations.j();
198
- while (tmp0_iterator_0.m()) {
199
- var element = tmp0_iterator_0.n();
200
- var tmp$ret$0;
190
+ 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();
201
194
  // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
202
- tmp$ret$0 = element.b1j();
203
- if (tmp$ret$0) {
204
- tmp0_filterTo.g(element);
195
+ if (element.a1k()) {
196
+ destination.o(element);
205
197
  }
206
198
  }
207
- tmp$ret$1 = tmp0_filterTo;
208
- tmp$ret$2 = tmp$ret$1;
209
- return toSubstitution(tmp$ret$2);
199
+ return toSubstitution(destination);
210
200
  }
211
201
  function newDeque($this, items) {
212
- var tmp$ret$0;
213
202
  // Inline function 'kotlin.collections.arrayListOf' call
214
- tmp$ret$0 = ArrayList_init_$Create$();
203
+ var tmp$ret$0 = ArrayList_init_$Create$();
215
204
  return toCollection(items, tmp$ret$0);
216
205
  }
217
206
  function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
218
- if ($equations.o(i).t1i() ? true : $equations.o(i).u1i())
219
- return Unit_getInstance();
220
- var currentEq = $equations.o(i);
207
+ if ($equations.c1(i).s1j() ? true : $equations.c1(i).t1j())
208
+ return Unit_instance;
209
+ var currentEq = $equations.c1(i);
221
210
  var tmp0_container = currentEq.apply($substitution).toPair();
222
- var newLhs = tmp0_container.r3();
223
- var newRhs = tmp0_container.s3();
224
- if (!currentEq.r1i().equals(newLhs) ? true : !currentEq.s1i().equals(newRhs)) {
225
- var tmp = Companion_getInstance_2();
226
- $equations.w4(i, tmp.c1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
211
+ var newLhs = tmp0_container.me();
212
+ var newRhs = tmp0_container.ne();
213
+ if (!currentEq.q1j().equals(newLhs) ? true : !currentEq.r1j().equals(newRhs)) {
214
+ var tmp = Companion_instance_0;
215
+ $equations.m(i, tmp.b1k(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
227
216
  changed._v = true;
228
217
  }
229
218
  }
230
219
  function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
231
220
  return function () {
232
- return toEquations(this$0.n5());
221
+ return toEquations(this$0.uc());
233
222
  };
234
223
  }
235
224
  function AbstractUnificator$checkTermsEquality$ref($boundThis) {
236
225
  var l = function (p0, p1) {
237
- return $boundThis.n1i(p0, p1);
226
+ return $boundThis.m1j(p0, p1);
238
227
  };
239
228
  l.callableName = 'checkTermsEquality';
240
229
  return l;
241
230
  }
242
231
  function AbstractUnificator$equationsFor$lambda(it) {
243
- var tmp$ret$0;
244
232
  // Inline function 'kotlin.collections.toPair' call
245
- tmp$ret$0 = new Pair(it.a1(), it.b1());
246
- return tmp$ret$0;
233
+ return new Pair(it.q2(), it.r2());
247
234
  }
248
235
  function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
249
236
  var l = function (p0, p1) {
250
- return $boundThis.n1i(p0, p1);
237
+ return $boundThis.m1j(p0, p1);
251
238
  };
252
239
  l.callableName = 'checkTermsEquality';
253
240
  return l;
254
241
  }
255
242
  function AbstractUnificator(context) {
256
243
  context = context === VOID ? Companion_getInstance().empty() : context;
257
- this.l1i_1 = context;
244
+ this.k1j_1 = context;
258
245
  var tmp = this;
259
- tmp.m1i_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
246
+ tmp.l1j_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
260
247
  }
261
- protoOf(AbstractUnificator).n5 = function () {
262
- return this.l1i_1;
248
+ protoOf(AbstractUnificator).uc = function () {
249
+ return this.k1j_1;
263
250
  };
264
- protoOf(AbstractUnificator).d1j = function (term1, term2, occurCheckEnabled) {
265
- if (this.n5().h11())
251
+ protoOf(AbstractUnificator).c1k = function (term1, term2, occurCheckEnabled) {
252
+ if (this.uc().x12())
266
253
  return Companion_getInstance().failed();
267
254
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
268
255
  return mgu_0(this, equations, occurCheckEnabled);
269
256
  };
270
- protoOf(AbstractUnificator).e1j = function (substitution1, substitution2, occurCheckEnabled) {
271
- if ((this.n5().h11() ? true : substitution1.h11()) ? true : substitution2.h11())
257
+ protoOf(AbstractUnificator).d1k = function (substitution1, substitution2, occurCheckEnabled) {
258
+ if ((this.uc().x12() ? true : substitution1.x12()) ? true : substitution2.x12())
272
259
  return Companion_getInstance().failed();
273
260
  if (!occurCheckEnabled) {
274
- var quickMerge = this.n5().plus(substitution1).plus(substitution2);
275
- if (quickMerge.g11()) {
261
+ var quickMerge = this.uc().plus(substitution1).plus(substitution2);
262
+ if (quickMerge.w12()) {
276
263
  return quickMerge;
277
264
  }
278
265
  }
@@ -280,7 +267,7 @@
280
267
  return mgu_0(this, equations, occurCheckEnabled);
281
268
  };
282
269
  protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
283
- return this.e1j(substitution1, substitution2, occurCheckEnabled);
270
+ return this.d1k(substitution1, substitution2, occurCheckEnabled);
284
271
  };
285
272
  function contextEquations$factory() {
286
273
  return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
@@ -288,37 +275,37 @@
288
275
  }, null);
289
276
  }
290
277
  function CachedUnificator(decorated, cacheCapacity) {
291
- this.f1j_1 = decorated;
292
- this.g1j_1 = Companion_getInstance_0().xp(cacheCapacity);
278
+ this.e1k_1 = decorated;
279
+ this.f1k_1 = Companion_instance.rq(cacheCapacity);
293
280
  }
294
- protoOf(CachedUnificator).d1j = function (term1, term2, occurCheckEnabled) {
281
+ protoOf(CachedUnificator).c1k = function (term1, term2, occurCheckEnabled) {
295
282
  var mguRequest = new Triple(term1, term2, occurCheckEnabled);
296
- var cached = this.g1j_1.f3(mguRequest);
283
+ var cached = this.f1k_1.x2(mguRequest);
297
284
  var tmp;
298
285
  if (cached instanceof Some) {
299
- tmp = cached.aq_1;
286
+ tmp = cached.uq_1;
300
287
  } else {
301
- var mguResult = this.f1j_1.d1j(term1, term2, occurCheckEnabled);
302
- this.g1j_1.yp(mguRequest, mguResult);
288
+ var mguResult = this.e1k_1.c1k(term1, term2, occurCheckEnabled);
289
+ this.f1k_1.sq(mguRequest, mguResult);
303
290
  tmp = mguResult;
304
291
  }
305
292
  return tmp;
306
293
  };
307
- protoOf(CachedUnificator).e1j = function (substitution1, substitution2, occurCheckEnabled) {
294
+ protoOf(CachedUnificator).d1k = function (substitution1, substitution2, occurCheckEnabled) {
308
295
  var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
309
- var cached = this.g1j_1.f3(mguRequest);
296
+ var cached = this.f1k_1.x2(mguRequest);
310
297
  var tmp;
311
298
  if (cached instanceof Some) {
312
- tmp = cached.aq_1;
299
+ tmp = cached.uq_1;
313
300
  } else {
314
- var mguResult = this.f1j_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
315
- this.g1j_1.yp(mguRequest, mguResult);
301
+ var mguResult = this.e1k_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
302
+ this.f1k_1.sq(mguRequest, mguResult);
316
303
  tmp = mguResult;
317
304
  }
318
305
  return tmp;
319
306
  };
320
307
  protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
321
- return this.e1j(substitution1, substitution2, occurCheckEnabled);
308
+ return this.d1k(substitution1, substitution2, occurCheckEnabled);
322
309
  };
323
310
  function allOfLists($this, lhs, rhs, equalityChecker) {
324
311
  var tmp = zip(lhs.unfold(), rhs.unfold());
@@ -351,7 +338,7 @@
351
338
  }
352
339
  function Equation$Companion$from$lambda($equalityChecker) {
353
340
  return function (it) {
354
- return Companion_getInstance_2().h1j(it, $equalityChecker);
341
+ return Companion_instance_0.g1k(it, $equalityChecker);
355
342
  };
356
343
  }
357
344
  function Term$equals$ref_2() {
@@ -377,16 +364,16 @@
377
364
  }
378
365
  function Equation$Companion$allOfLists$lambda($equalityChecker) {
379
366
  return function (_name_for_destructuring_parameter_0__wldtmu) {
380
- var l = _name_for_destructuring_parameter_0__wldtmu.r3();
381
- var r = _name_for_destructuring_parameter_0__wldtmu.s3();
382
- return (l.fw() ? r.fw() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToCons().sx(), r.castToCons().sx(), $equalityChecker)]) : (l.ew() ? r.ew() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_getInstance_2().o1i(l, r, $equalityChecker);
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.b1k(l.castToCons().wy(), r.castToCons().wy(), $equalityChecker)]) : (l.cx() ? r.cx() : false) ? sequenceOf([Companion_instance_0.b1k(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_instance_0.n1j(l, r, $equalityChecker);
383
370
  };
384
371
  }
385
372
  function Equation$Companion$allOfTuples$lambda($equalityChecker) {
386
373
  return function (_name_for_destructuring_parameter_0__wldtmu) {
387
- var l = _name_for_destructuring_parameter_0__wldtmu.r3();
388
- var r = _name_for_destructuring_parameter_0__wldtmu.s3();
389
- return (l.dw() ? r.dw() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToTuple().gx(), r.castToTuple().gx(), $equalityChecker)]) : Companion_getInstance_2().o1i(l, r, $equalityChecker);
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.b1k(l.castToTuple().ky(), r.castToTuple().ky(), $equalityChecker)]) : Companion_instance_0.n1j(l, r, $equalityChecker);
390
377
  };
391
378
  }
392
379
  function Term$equals$ref_5() {
@@ -398,29 +385,29 @@
398
385
  }
399
386
  function Equation$Companion$allOf$lambda($equalityChecker) {
400
387
  return function (it) {
401
- return Companion_getInstance_2().h1j(it, $equalityChecker);
388
+ return Companion_instance_0.g1k(it, $equalityChecker);
402
389
  };
403
390
  }
404
391
  function Identity(lhs, rhs) {
405
392
  Equation.call(this, lhs, rhs);
406
- this.k1j_1 = lhs;
407
- this.l1j_1 = rhs;
393
+ this.j1k_1 = lhs;
394
+ this.k1k_1 = rhs;
408
395
  }
409
- protoOf(Identity).r1i = function () {
410
- return this.k1j_1;
396
+ protoOf(Identity).q1j = function () {
397
+ return this.j1k_1;
411
398
  };
412
- protoOf(Identity).s1i = function () {
413
- return this.l1j_1;
399
+ protoOf(Identity).r1j = function () {
400
+ return this.k1k_1;
414
401
  };
415
- protoOf(Identity).u1i = function () {
402
+ protoOf(Identity).t1j = function () {
416
403
  return true;
417
404
  };
418
405
  protoOf(Identity).toString = function () {
419
- return 'Identity(lhs=' + this.k1j_1 + ', rhs=' + this.l1j_1 + ')';
406
+ return 'Identity(lhs=' + this.j1k_1 + ', rhs=' + this.k1k_1 + ')';
420
407
  };
421
408
  protoOf(Identity).hashCode = function () {
422
- var result = this.k1j_1.hashCode();
423
- result = imul(result, 31) + this.l1j_1.hashCode() | 0;
409
+ var result = this.j1k_1.hashCode();
410
+ result = imul(result, 31) + this.k1k_1.hashCode() | 0;
424
411
  return result;
425
412
  };
426
413
  protoOf(Identity).equals = function (other) {
@@ -429,44 +416,44 @@
429
416
  if (!(other instanceof Identity))
430
417
  return false;
431
418
  var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
432
- if (!this.k1j_1.equals(tmp0_other_with_cast.k1j_1))
419
+ if (!this.j1k_1.equals(tmp0_other_with_cast.j1k_1))
433
420
  return false;
434
- if (!this.l1j_1.equals(tmp0_other_with_cast.l1j_1))
421
+ if (!this.k1k_1.equals(tmp0_other_with_cast.k1k_1))
435
422
  return false;
436
423
  return true;
437
424
  };
438
425
  function Assignment(lhs, rhs) {
439
426
  Equation.call(this, lhs, rhs);
440
- this.z1i_1 = lhs;
441
- this.a1j_1 = rhs;
427
+ this.y1j_1 = lhs;
428
+ this.z1j_1 = rhs;
442
429
  }
443
- protoOf(Assignment).r1i = function () {
444
- return this.z1i_1;
430
+ protoOf(Assignment).q1j = function () {
431
+ return this.y1j_1;
445
432
  };
446
- protoOf(Assignment).s1i = function () {
447
- return this.a1j_1;
433
+ protoOf(Assignment).r1j = function () {
434
+ return this.z1j_1;
448
435
  };
449
436
  protoOf(Assignment).toSubstitution = function () {
450
- return Companion_getInstance().unifier(this.z1i_1, this.a1j_1);
437
+ return Companion_getInstance().unifier(this.y1j_1, this.z1j_1);
451
438
  };
452
- protoOf(Assignment).o1j = function () {
453
- return to(this.z1i_1, this.a1j_1);
439
+ protoOf(Assignment).n1k = function () {
440
+ return to(this.y1j_1, this.z1j_1);
454
441
  };
455
442
  protoOf(Assignment).toPair = function () {
456
- return this.o1j();
443
+ return this.n1k();
457
444
  };
458
- protoOf(Assignment).b1j = function () {
445
+ protoOf(Assignment).a1k = function () {
459
446
  return true;
460
447
  };
461
- protoOf(Assignment).m1j = function () {
448
+ protoOf(Assignment).l1k = function () {
462
449
  return this;
463
450
  };
464
451
  protoOf(Assignment).toString = function () {
465
- return 'Assignment(lhs=' + this.z1i_1 + ', rhs=' + this.a1j_1 + ')';
452
+ return 'Assignment(lhs=' + this.y1j_1 + ', rhs=' + this.z1j_1 + ')';
466
453
  };
467
454
  protoOf(Assignment).hashCode = function () {
468
- var result = this.z1i_1.hashCode();
469
- result = imul(result, 31) + this.a1j_1.hashCode() | 0;
455
+ var result = this.y1j_1.hashCode();
456
+ result = imul(result, 31) + this.z1j_1.hashCode() | 0;
470
457
  return result;
471
458
  };
472
459
  protoOf(Assignment).equals = function (other) {
@@ -475,32 +462,32 @@
475
462
  if (!(other instanceof Assignment))
476
463
  return false;
477
464
  var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
478
- if (!this.z1i_1.equals(tmp0_other_with_cast.z1i_1))
465
+ if (!this.y1j_1.equals(tmp0_other_with_cast.y1j_1))
479
466
  return false;
480
- if (!this.a1j_1.equals(tmp0_other_with_cast.a1j_1))
467
+ if (!this.z1j_1.equals(tmp0_other_with_cast.z1j_1))
481
468
  return false;
482
469
  return true;
483
470
  };
484
471
  function Comparison(lhs, rhs) {
485
472
  Equation.call(this, lhs, rhs);
486
- this.r1j_1 = lhs;
487
- this.s1j_1 = rhs;
473
+ this.q1k_1 = lhs;
474
+ this.r1k_1 = rhs;
488
475
  }
489
- protoOf(Comparison).r1i = function () {
490
- return this.r1j_1;
476
+ protoOf(Comparison).q1j = function () {
477
+ return this.q1k_1;
491
478
  };
492
- protoOf(Comparison).s1i = function () {
493
- return this.s1j_1;
479
+ protoOf(Comparison).r1j = function () {
480
+ return this.r1k_1;
494
481
  };
495
- protoOf(Comparison).v1i = function () {
482
+ protoOf(Comparison).u1j = function () {
496
483
  return true;
497
484
  };
498
485
  protoOf(Comparison).toString = function () {
499
- return 'Comparison(lhs=' + this.r1j_1 + ', rhs=' + this.s1j_1 + ')';
486
+ return 'Comparison(lhs=' + this.q1k_1 + ', rhs=' + this.r1k_1 + ')';
500
487
  };
501
488
  protoOf(Comparison).hashCode = function () {
502
- var result = this.r1j_1.hashCode();
503
- result = imul(result, 31) + this.s1j_1.hashCode() | 0;
489
+ var result = this.q1k_1.hashCode();
490
+ result = imul(result, 31) + this.r1k_1.hashCode() | 0;
504
491
  return result;
505
492
  };
506
493
  protoOf(Comparison).equals = function (other) {
@@ -509,32 +496,32 @@
509
496
  if (!(other instanceof Comparison))
510
497
  return false;
511
498
  var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
512
- if (!this.r1j_1.equals(tmp0_other_with_cast.r1j_1))
499
+ if (!this.q1k_1.equals(tmp0_other_with_cast.q1k_1))
513
500
  return false;
514
- if (!this.s1j_1.equals(tmp0_other_with_cast.s1j_1))
501
+ if (!this.r1k_1.equals(tmp0_other_with_cast.r1k_1))
515
502
  return false;
516
503
  return true;
517
504
  };
518
505
  function Contradiction(lhs, rhs) {
519
506
  Equation.call(this, lhs, rhs);
520
- this.v1j_1 = lhs;
521
- this.w1j_1 = rhs;
507
+ this.u1k_1 = lhs;
508
+ this.v1k_1 = rhs;
522
509
  }
523
- protoOf(Contradiction).r1i = function () {
524
- return this.v1j_1;
510
+ protoOf(Contradiction).q1j = function () {
511
+ return this.u1k_1;
525
512
  };
526
- protoOf(Contradiction).s1i = function () {
527
- return this.w1j_1;
513
+ protoOf(Contradiction).r1j = function () {
514
+ return this.v1k_1;
528
515
  };
529
- protoOf(Contradiction).t1i = function () {
516
+ protoOf(Contradiction).s1j = function () {
530
517
  return true;
531
518
  };
532
519
  protoOf(Contradiction).toString = function () {
533
- return 'Contradiction(lhs=' + this.v1j_1 + ', rhs=' + this.w1j_1 + ')';
520
+ return 'Contradiction(lhs=' + this.u1k_1 + ', rhs=' + this.v1k_1 + ')';
534
521
  };
535
522
  protoOf(Contradiction).hashCode = function () {
536
- var result = this.v1j_1.hashCode();
537
- result = imul(result, 31) + this.w1j_1.hashCode() | 0;
523
+ var result = this.u1k_1.hashCode();
524
+ result = imul(result, 31) + this.v1k_1.hashCode() | 0;
538
525
  return result;
539
526
  };
540
527
  protoOf(Contradiction).equals = function (other) {
@@ -543,18 +530,17 @@
543
530
  if (!(other instanceof Contradiction))
544
531
  return false;
545
532
  var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
546
- if (!this.v1j_1.equals(tmp0_other_with_cast.v1j_1))
533
+ if (!this.u1k_1.equals(tmp0_other_with_cast.u1k_1))
547
534
  return false;
548
- if (!this.w1j_1.equals(tmp0_other_with_cast.w1j_1))
535
+ if (!this.v1k_1.equals(tmp0_other_with_cast.v1k_1))
549
536
  return false;
550
537
  return true;
551
538
  };
552
539
  function Companion() {
553
- Companion_instance = this;
554
540
  }
555
- protoOf(Companion).c1j = function (lhs, rhs, equalityChecker) {
541
+ protoOf(Companion).b1k = function (lhs, rhs, equalityChecker) {
556
542
  var tmp;
557
- if (lhs.mw() ? rhs.mw() : false) {
543
+ if (lhs.mx() ? rhs.mx() : false) {
558
544
  var tmp_0;
559
545
  if (equalityChecker(lhs, rhs)) {
560
546
  tmp_0 = new Identity(lhs, rhs);
@@ -562,11 +548,11 @@
562
548
  tmp_0 = new Assignment(lhs.castToVar(), rhs);
563
549
  }
564
550
  tmp = tmp_0;
565
- } else if (lhs.mw()) {
551
+ } else if (lhs.mx()) {
566
552
  tmp = new Assignment(lhs.castToVar(), rhs);
567
- } else if (rhs.mw()) {
553
+ } else if (rhs.mx()) {
568
554
  tmp = new Assignment(rhs.castToVar(), lhs);
569
- } else if (lhs.ky() ? rhs.ky() : false) {
555
+ } else if (lhs.px() ? rhs.px() : false) {
570
556
  var tmp_1;
571
557
  if (equalityChecker(lhs, rhs)) {
572
558
  tmp_1 = new Identity(lhs, rhs);
@@ -574,13 +560,13 @@
574
560
  tmp_1 = new Contradiction(lhs, rhs);
575
561
  }
576
562
  tmp = tmp_1;
577
- } else if (lhs.ky() ? true : rhs.ky()) {
563
+ } else if (lhs.px() ? true : rhs.px()) {
578
564
  tmp = new Contradiction(lhs, rhs);
579
- } else if (lhs.aw() ? rhs.aw() : false) {
565
+ } else if (lhs.ww() ? rhs.ww() : false) {
580
566
  var lhsStruct = lhs.castToStruct();
581
567
  var rhsStruct = rhs.castToStruct();
582
568
  var tmp_2;
583
- if (!(lhsStruct.qv() === rhsStruct.qv()) ? true : !(lhsStruct.wv() === rhsStruct.wv())) {
569
+ if (!(lhsStruct.kw() === rhsStruct.kw()) ? true : !(lhsStruct.qw() === rhsStruct.qw())) {
584
570
  tmp_2 = new Contradiction(lhsStruct, rhsStruct);
585
571
  } else {
586
572
  tmp_2 = new Comparison(lhsStruct, rhsStruct);
@@ -599,10 +585,10 @@
599
585
  tmp = equalityChecker;
600
586
  }
601
587
  equalityChecker = tmp;
602
- return $super === VOID ? this.c1j(lhs, rhs, equalityChecker) : $super.c1j.call(this, lhs, rhs, equalityChecker);
588
+ return $super === VOID ? this.b1k(lhs, rhs, equalityChecker) : $super.b1k.call(this, lhs, rhs, equalityChecker);
603
589
  };
604
- protoOf(Companion).x1j = function (pair, equalityChecker) {
605
- return this.c1j(pair.k4_1, pair.l4_1, equalityChecker);
590
+ protoOf(Companion).w1k = function (pair, equalityChecker) {
591
+ return this.b1k(pair.ye_1, pair.ze_1, equalityChecker);
606
592
  };
607
593
  protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
608
594
  var tmp;
@@ -612,9 +598,9 @@
612
598
  tmp = equalityChecker;
613
599
  }
614
600
  equalityChecker = tmp;
615
- return $super === VOID ? this.x1j(pair, equalityChecker) : $super.x1j.call(this, pair, equalityChecker);
601
+ return $super === VOID ? this.w1k(pair, equalityChecker) : $super.w1k.call(this, pair, equalityChecker);
616
602
  };
617
- protoOf(Companion).y1j = function (pairs, equalityChecker) {
603
+ protoOf(Companion).x1k = function (pairs, equalityChecker) {
618
604
  return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
619
605
  };
620
606
  protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
@@ -625,10 +611,10 @@
625
611
  tmp = equalityChecker;
626
612
  }
627
613
  equalityChecker = tmp;
628
- return $super === VOID ? this.y1j(pairs, equalityChecker) : $super.y1j.call(this, pairs, equalityChecker);
614
+ return $super === VOID ? this.x1k(pairs, equalityChecker) : $super.x1k.call(this, pairs, equalityChecker);
629
615
  };
630
- protoOf(Companion).z1j = function (pairs, equalityChecker) {
631
- return this.y1j(asSequence_0(pairs), equalityChecker);
616
+ protoOf(Companion).y1k = function (pairs, equalityChecker) {
617
+ return this.x1k(asSequence_0(pairs), equalityChecker);
632
618
  };
633
619
  protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
634
620
  var tmp;
@@ -638,10 +624,10 @@
638
624
  tmp = equalityChecker;
639
625
  }
640
626
  equalityChecker = tmp;
641
- return $super === VOID ? this.z1j(pairs, equalityChecker) : $super.z1j.call(this, pairs, equalityChecker);
627
+ return $super === VOID ? this.y1k(pairs, equalityChecker) : $super.y1k.call(this, pairs, equalityChecker);
642
628
  };
643
- protoOf(Companion).a1k = function (pairs, equalityChecker) {
644
- return this.y1j(sequenceOf(pairs.slice()), equalityChecker);
629
+ protoOf(Companion).z1k = function (pairs, equalityChecker) {
630
+ return this.x1k(sequenceOf(pairs.slice()), equalityChecker);
645
631
  };
646
632
  protoOf(Companion).from = function (pairs, equalityChecker, $super) {
647
633
  var tmp;
@@ -651,10 +637,10 @@
651
637
  tmp = equalityChecker;
652
638
  }
653
639
  equalityChecker = tmp;
654
- return $super === VOID ? this.a1k(pairs, equalityChecker) : $super.a1k.call(this, pairs, equalityChecker);
640
+ return $super === VOID ? this.z1k(pairs, equalityChecker) : $super.z1k.call(this, pairs, equalityChecker);
655
641
  };
656
- protoOf(Companion).h1j = function (pair, equalityChecker) {
657
- return this.o1i(pair.k4_1, pair.l4_1, equalityChecker);
642
+ protoOf(Companion).g1k = function (pair, equalityChecker) {
643
+ return this.n1j(pair.ye_1, pair.ze_1, equalityChecker);
658
644
  };
659
645
  protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
660
646
  var tmp;
@@ -664,29 +650,29 @@
664
650
  tmp = equalityChecker;
665
651
  }
666
652
  equalityChecker = tmp;
667
- return $super === VOID ? this.h1j(pair, equalityChecker) : $super.h1j.call(this, pair, equalityChecker);
653
+ return $super === VOID ? this.g1k(pair, equalityChecker) : $super.g1k.call(this, pair, equalityChecker);
668
654
  };
669
- protoOf(Companion).o1i = function (lhs, rhs, equalityChecker) {
655
+ protoOf(Companion).n1j = function (lhs, rhs, equalityChecker) {
670
656
  var tmp;
671
- if (lhs.rv() ? rhs.rv() : false) {
672
- tmp = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
673
- } else if (lhs.ew() ? rhs.ew() : false) {
657
+ if (lhs.lw() ? rhs.lw() : false) {
658
+ tmp = sequenceOf([this.b1k(lhs, rhs, equalityChecker)]);
659
+ } else if (lhs.cx() ? rhs.cx() : false) {
674
660
  tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
675
- } else if (lhs.dw() ? rhs.dw() : false) {
661
+ } else if (lhs.bx() ? rhs.bx() : false) {
676
662
  tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
677
- } else if (lhs.aw() ? rhs.aw() : false) {
663
+ } else if (lhs.ww() ? rhs.ww() : false) {
678
664
  var lhsStruct = lhs.castToStruct();
679
665
  var rhsStruct = rhs.castToStruct();
680
666
  var tmp_0;
681
- if (lhsStruct.qv() === rhsStruct.qv() ? lhsStruct.wv() === rhsStruct.wv() : false) {
682
- var tmp_1 = zip(lhsStruct.jw(), rhsStruct.jw());
667
+ if (lhsStruct.kw() === rhsStruct.kw() ? lhsStruct.qw() === rhsStruct.qw() : false) {
668
+ var tmp_1 = zip(lhsStruct.jx(), rhsStruct.jx());
683
669
  tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
684
670
  } else {
685
- tmp_0 = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
671
+ tmp_0 = sequenceOf([this.b1k(lhs, rhs, equalityChecker)]);
686
672
  }
687
673
  tmp = tmp_0;
688
674
  } else {
689
- tmp = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
675
+ tmp = sequenceOf([this.b1k(lhs, rhs, equalityChecker)]);
690
676
  }
691
677
  return tmp;
692
678
  };
@@ -698,13 +684,11 @@
698
684
  tmp = equalityChecker;
699
685
  }
700
686
  equalityChecker = tmp;
701
- return $super === VOID ? this.o1i(lhs, rhs, equalityChecker) : $super.o1i.call(this, lhs, rhs, equalityChecker);
687
+ return $super === VOID ? this.n1j(lhs, rhs, equalityChecker) : $super.n1j.call(this, lhs, rhs, equalityChecker);
702
688
  };
703
- var Companion_instance;
704
- function Companion_getInstance_2() {
705
- if (Companion_instance == null)
706
- new Companion();
707
- return Companion_instance;
689
+ var Companion_instance_0;
690
+ function Companion_getInstance_1() {
691
+ return Companion_instance_0;
708
692
  }
709
693
  function Term$equals$ref_6() {
710
694
  var l = function (p0, p1) {
@@ -714,55 +698,54 @@
714
698
  return l;
715
699
  }
716
700
  function Equation(lhs, rhs) {
717
- Companion_getInstance_2();
718
- this.p1i_1 = lhs;
719
- this.q1i_1 = rhs;
701
+ this.o1j_1 = lhs;
702
+ this.p1j_1 = rhs;
720
703
  }
721
- protoOf(Equation).r1i = function () {
722
- return this.p1i_1;
704
+ protoOf(Equation).q1j = function () {
705
+ return this.o1j_1;
723
706
  };
724
- protoOf(Equation).s1i = function () {
725
- return this.q1i_1;
707
+ protoOf(Equation).r1j = function () {
708
+ return this.p1j_1;
726
709
  };
727
- protoOf(Equation).u1i = function () {
710
+ protoOf(Equation).t1j = function () {
728
711
  return false;
729
712
  };
730
- protoOf(Equation).b1j = function () {
713
+ protoOf(Equation).a1k = function () {
731
714
  return false;
732
715
  };
733
- protoOf(Equation).m1j = function () {
716
+ protoOf(Equation).l1k = function () {
734
717
  return null;
735
718
  };
736
- protoOf(Equation).w1i = function () {
737
- var tmp0_elvis_lhs = this.m1j();
719
+ protoOf(Equation).v1j = function () {
720
+ var tmp0_elvis_lhs = this.l1k();
738
721
  var tmp;
739
722
  if (tmp0_elvis_lhs == null) {
740
- throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).md());
723
+ throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).s6());
741
724
  } else {
742
725
  tmp = tmp0_elvis_lhs;
743
726
  }
744
727
  return tmp;
745
728
  };
746
- protoOf(Equation).v1i = function () {
729
+ protoOf(Equation).u1j = function () {
747
730
  return false;
748
731
  };
749
- protoOf(Equation).t1i = function () {
732
+ protoOf(Equation).s1j = function () {
750
733
  return false;
751
734
  };
752
- protoOf(Equation).u1h = function () {
753
- return Companion_getInstance_1().of('=', [this.r1i(), this.s1i()]);
735
+ protoOf(Equation).t1i = function () {
736
+ return Companion_getInstance_0().of('=', [this.q1j(), this.r1j()]);
754
737
  };
755
738
  protoOf(Equation).toTerm = function () {
756
- return this.u1h();
739
+ return this.t1i();
757
740
  };
758
741
  protoOf(Equation).toPair = function () {
759
- return new Pair(this.r1i(), this.s1i());
742
+ return new Pair(this.q1j(), this.r1j());
760
743
  };
761
744
  protoOf(Equation).swap = function () {
762
- return Companion_getInstance_2().of(this.s1i(), this.r1i());
745
+ return Companion_instance_0.of(this.r1j(), this.q1j());
763
746
  };
764
- protoOf(Equation).n1j = function (substitution, equalityChecker) {
765
- return Companion_getInstance_2().c1j(this.r1i().getSubstituted(substitution, []), this.s1i().getSubstituted(substitution, []), equalityChecker);
747
+ protoOf(Equation).m1k = function (substitution, equalityChecker) {
748
+ return Companion_instance_0.b1k(this.q1j().getSubstituted(substitution, []), this.r1j().getSubstituted(substitution, []), equalityChecker);
766
749
  };
767
750
  protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
768
751
  var tmp;
@@ -772,40 +755,25 @@
772
755
  tmp = equalityChecker;
773
756
  }
774
757
  equalityChecker = tmp;
775
- return $super === VOID ? this.n1j(substitution, equalityChecker) : $super.n1j.call(this, substitution, equalityChecker);
758
+ return $super === VOID ? this.m1k(substitution, equalityChecker) : $super.m1k.call(this, substitution, equalityChecker);
776
759
  };
777
- defineProp(protoOf(Equation), 'lhs', function () {
778
- return this.r1i();
779
- });
780
- defineProp(protoOf(Equation), 'rhs', function () {
781
- return this.s1i();
782
- });
783
760
  function toEquations(_this__u8e3s4) {
784
- var tmp$ret$4;
785
761
  // Inline function 'kotlin.collections.map' call
786
- var tmp1_map = _this__u8e3s4.z();
787
- var tmp$ret$3;
762
+ var this_0 = _this__u8e3s4.p2();
788
763
  // Inline function 'kotlin.collections.mapTo' call
789
- var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
790
- var tmp0_iterator = tmp1_map.j();
791
- while (tmp0_iterator.m()) {
792
- var item = tmp0_iterator.n();
793
- var tmp$ret$2;
764
+ 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();
794
768
  // Inline function 'it.unibo.tuprolog.unify.toEquations.<anonymous>' call
795
- var tmp$ret$0;
796
769
  // Inline function 'kotlin.collections.component1' call
797
- tmp$ret$0 = item.a1();
798
- var variable = tmp$ret$0;
799
- var tmp$ret$1;
770
+ var variable = item.q2();
800
771
  // Inline function 'kotlin.collections.component2' call
801
- tmp$ret$1 = item.b1();
802
- var term = tmp$ret$1;
803
- tmp$ret$2 = new Assignment(variable, term);
804
- tmp0_mapTo.g(tmp$ret$2);
772
+ var term = item.r2();
773
+ var tmp$ret$2 = new Assignment(variable, term);
774
+ destination.o(tmp$ret$2);
805
775
  }
806
- tmp$ret$3 = tmp0_mapTo;
807
- tmp$ret$4 = tmp$ret$3;
808
- return tmp$ret$4;
776
+ return destination;
809
777
  }
810
778
  function toSubstitution(_this__u8e3s4) {
811
779
  var tmp = Companion_getInstance();
@@ -814,12 +782,12 @@
814
782
  }
815
783
  function toAssignmentPair(_this__u8e3s4) {
816
784
  var tmp;
817
- if (_this__u8e3s4.b1j()) {
818
- tmp = _this__u8e3s4.w1i().o1j();
819
- } else if (_this__u8e3s4.r1i().mw()) {
820
- tmp = to(_this__u8e3s4.r1i().castToVar(), _this__u8e3s4.s1i());
821
- } else if (_this__u8e3s4.s1i().mw()) {
822
- tmp = to(_this__u8e3s4.s1i().castToVar(), _this__u8e3s4.r1i());
785
+ if (_this__u8e3s4.a1k()) {
786
+ tmp = _this__u8e3s4.v1j().n1k();
787
+ } else if (_this__u8e3s4.q1j().mx()) {
788
+ tmp = to(_this__u8e3s4.q1j().castToVar(), _this__u8e3s4.r1j());
789
+ } else if (_this__u8e3s4.r1j().mx()) {
790
+ tmp = to(_this__u8e3s4.r1j().castToVar(), _this__u8e3s4.q1j());
823
791
  } else {
824
792
  throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
825
793
  }
@@ -829,17 +797,17 @@
829
797
  return toAssignmentPair(it);
830
798
  }
831
799
  function Unificator$Companion$default$delegate$lambda() {
832
- return Companion_getInstance_3().strict();
800
+ return Companion_getInstance_2().strict();
833
801
  }
834
802
  function Unificator$Companion$naive$1($context) {
835
803
  AbstractUnificator.call(this, $context);
836
804
  }
837
- protoOf(Unificator$Companion$naive$1).n1i = function (first, second) {
805
+ protoOf(Unificator$Companion$naive$1).m1j = function (first, second) {
838
806
  var tmp;
839
- if (first.pw() ? second.pw() : false) {
840
- tmp = first.castToInteger().b1().ek(second.castToInteger().b1()) === 0;
841
- } else if (first.ow() ? second.ow() : false) {
842
- tmp = first.castToNumeric().iz().vj(second.castToNumeric().iz()) === 0;
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;
843
811
  } else {
844
812
  tmp = first.equals(second);
845
813
  }
@@ -848,33 +816,32 @@
848
816
  function Unificator$Companion$strict$1($context) {
849
817
  AbstractUnificator.call(this, $context);
850
818
  }
851
- protoOf(Unificator$Companion$strict$1).n1i = function (first, second) {
819
+ protoOf(Unificator$Companion$strict$1).m1j = function (first, second) {
852
820
  return first.equals(second);
853
821
  };
854
822
  function Companion_0() {
855
- Companion_instance_0 = this;
823
+ Companion_instance_1 = this;
856
824
  var tmp = this;
857
- tmp.f1k_1 = lazy(Unificator$Companion$default$delegate$lambda);
858
- this.g1k_1 = 32;
825
+ tmp.e1l_1 = lazy(Unificator$Companion$default$delegate$lambda);
826
+ this.f1l_1 = 32;
859
827
  }
860
- protoOf(Companion_0).h1k = function () {
861
- var tmp$ret$0;
828
+ protoOf(Companion_0).g1l = function () {
862
829
  // Inline function 'kotlin.getValue' call
863
- var tmp0_getValue = default$factory();
864
- tmp$ret$0 = this.f1k_1.b1();
865
- return tmp$ret$0;
830
+ var this_0 = this.e1l_1;
831
+ default$factory();
832
+ return this_0.r2();
866
833
  };
867
834
  protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
868
- return this.h1k().mgu(_this__u8e3s4, other);
835
+ return this.g1l().mgu(_this__u8e3s4, other);
869
836
  };
870
837
  protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
871
- return this.h1k().match(_this__u8e3s4, other);
838
+ return this.g1l().match(_this__u8e3s4, other);
872
839
  };
873
840
  protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
874
- return this.h1k().unify(_this__u8e3s4, other);
841
+ return this.g1l().unify(_this__u8e3s4, other);
875
842
  };
876
843
  protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
877
- return this.h1k().merge(_this__u8e3s4, other);
844
+ return this.g1l().merge(_this__u8e3s4, other);
878
845
  };
879
846
  protoOf(Companion_0).naiveWithContext = function (context) {
880
847
  return new Unificator$Companion$naive$1(context);
@@ -888,10 +855,10 @@
888
855
  protoOf(Companion_0).strict = function () {
889
856
  return this.strictWithContext(Companion_getInstance().empty());
890
857
  };
891
- protoOf(Companion_0).i1k = function (other, capacity) {
858
+ protoOf(Companion_0).h1l = function (other, capacity) {
892
859
  var tmp;
893
860
  if (other instanceof CachedUnificator) {
894
- tmp = new CachedUnificator(other.f1j_1, capacity);
861
+ tmp = new CachedUnificator(other.e1k_1, capacity);
895
862
  } else {
896
863
  tmp = new CachedUnificator(other, capacity);
897
864
  }
@@ -899,20 +866,19 @@
899
866
  };
900
867
  protoOf(Companion_0).cached = function (other, capacity, $super) {
901
868
  capacity = capacity === VOID ? 32 : capacity;
902
- return $super === VOID ? this.i1k(other, capacity) : $super.i1k.call(this, other, capacity);
869
+ return $super === VOID ? this.h1l(other, capacity) : $super.h1l.call(this, other, capacity);
903
870
  };
904
- defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).h1k);
905
- var Companion_instance_0;
906
- function Companion_getInstance_3() {
907
- if (Companion_instance_0 == null)
871
+ var Companion_instance_1;
872
+ function Companion_getInstance_2() {
873
+ if (Companion_instance_1 == null)
908
874
  new Companion_0();
909
- return Companion_instance_0;
875
+ return Companion_instance_1;
910
876
  }
911
877
  function Unificator() {
912
878
  }
913
879
  function default$factory() {
914
880
  return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
915
- return receiver.h1k();
881
+ return receiver.g1l();
916
882
  }, null);
917
883
  }
918
884
  //region block: post-declaration
@@ -928,27 +894,21 @@
928
894
  protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
929
895
  protoOf(CachedUnificator).unify = unify;
930
896
  protoOf(CachedUnificator).merge = merge;
931
- protoOf(Equation).hq = castTo;
932
- protoOf(Identity).hq = castTo;
933
- protoOf(Assignment).hq = castTo;
934
- protoOf(Comparison).hq = castTo;
935
- protoOf(Contradiction).hq = castTo;
936
- protoOf(Unificator$Companion$naive$1).mgu = mgu;
937
- protoOf(Unificator$Companion$naive$1).merge = merge;
938
- protoOf(Unificator$Companion$naive$1).matchWithOccurCheck = matchWithOccurCheck;
939
- protoOf(Unificator$Companion$naive$1).match = match;
940
- protoOf(Unificator$Companion$naive$1).unifyWithOccurCheck = unifyWithOccurCheck;
941
- protoOf(Unificator$Companion$naive$1).unify = unify;
942
- protoOf(Unificator$Companion$strict$1).mgu = mgu;
943
- protoOf(Unificator$Companion$strict$1).merge = merge;
944
- protoOf(Unificator$Companion$strict$1).matchWithOccurCheck = matchWithOccurCheck;
945
- protoOf(Unificator$Companion$strict$1).match = match;
946
- protoOf(Unificator$Companion$strict$1).unifyWithOccurCheck = unifyWithOccurCheck;
947
- protoOf(Unificator$Companion$strict$1).unify = unify;
897
+ protoOf(Equation).br = castTo;
898
+ defineProp(protoOf(Equation), 'lhs', function () {
899
+ return this.q1j();
900
+ });
901
+ defineProp(protoOf(Equation), 'rhs', function () {
902
+ return this.r1j();
903
+ });
904
+ defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).g1l);
905
+ //endregion
906
+ //region block: init
907
+ Companion_instance_0 = new Companion();
948
908
  //endregion
949
909
  //region block: exports
950
910
  _.$_$ = _.$_$ || {};
951
- _.$_$.a = Companion_getInstance_3;
911
+ _.$_$.a = Companion_getInstance_2;
952
912
  //endregion
953
913
  return _;
954
914
  }));