@tuprolog/arg2p-core 0.7.2 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/2p-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,66 @@
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.$_$.o1;
23
- var asSequence = kotlin_kotlin.$_$.a2;
24
- var plus = kotlin_kotlin.$_$.l7;
25
- var map = kotlin_kotlin.$_$.h7;
26
- var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.s;
27
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.e;
28
- var toCollection = kotlin_kotlin.$_$.r7;
29
- var Pair = kotlin_kotlin.$_$.d9;
30
- var VOID = kotlin_kotlin.$_$.s9;
31
- var lazy = kotlin_kotlin.$_$.k9;
32
- var protoOf = kotlin_kotlin.$_$.q5;
33
- var asSequence_0 = kotlin_kotlin.$_$.b2;
34
- var classMeta = kotlin_kotlin.$_$.u4;
35
- var setMetadataFor = kotlin_kotlin.$_$.r5;
36
- var KProperty1 = kotlin_kotlin.$_$.j6;
37
- var getPropertyCallableRef = kotlin_kotlin.$_$.z4;
38
- var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
- var Triple = kotlin_kotlin.$_$.h9;
40
- var Some = kotlin_it_unibo_tuprolog_utils.$_$.i;
41
- var zip = kotlin_kotlin.$_$.y7;
42
- var flatMap = kotlin_kotlin.$_$.z6;
43
- var sequenceOf = kotlin_kotlin.$_$.m7;
44
- var THROW_CCE = kotlin_kotlin.$_$.f9;
45
- var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
46
- var to = kotlin_kotlin.$_$.r9;
47
- var objectMeta = kotlin_kotlin.$_$.p5;
22
+ var asSequence = kotlin_kotlin.$_$.g2;
23
+ var plus = kotlin_kotlin.$_$.w7;
24
+ var map = kotlin_kotlin.$_$.s7;
25
+ var Unit_instance = kotlin_kotlin.$_$.s1;
26
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
27
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
28
+ var toCollection = kotlin_kotlin.$_$.e8;
29
+ var Pair = kotlin_kotlin.$_$.t9;
30
+ var VOID = kotlin_kotlin.$_$.d;
31
+ var lazy = kotlin_kotlin.$_$.aa;
32
+ var protoOf = kotlin_kotlin.$_$.a6;
33
+ var asSequence_0 = kotlin_kotlin.$_$.h2;
34
+ var classMeta = kotlin_kotlin.$_$.e5;
35
+ var setMetadataFor = kotlin_kotlin.$_$.b6;
36
+ var KProperty1 = kotlin_kotlin.$_$.u6;
37
+ var getPropertyCallableRef = kotlin_kotlin.$_$.k5;
38
+ var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
+ var Triple = kotlin_kotlin.$_$.x9;
40
+ var Some = kotlin_it_unibo_tuprolog_utils.$_$.j;
41
+ var zip = kotlin_kotlin.$_$.l8;
42
+ var flatMap = kotlin_kotlin.$_$.k7;
43
+ var sequenceOf = kotlin_kotlin.$_$.y7;
44
+ var THROW_CCE = kotlin_kotlin.$_$.v9;
45
+ var to = kotlin_kotlin.$_$.ha;
46
+ var objectMeta = kotlin_kotlin.$_$.z5;
48
47
  var getKClass = kotlin_kotlin.$_$.c;
49
- var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o;
50
- var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.r;
51
- var defineProp = kotlin_kotlin.$_$.w4;
48
+ var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.q;
49
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
50
+ var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
51
+ var defineProp = kotlin_kotlin.$_$.g5;
52
+ var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.t1;
52
53
  var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
53
- var collectionSizeOrDefault = kotlin_kotlin.$_$.d2;
54
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.d;
55
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.q;
56
- var interfaceMeta = kotlin_kotlin.$_$.c5;
54
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
55
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.e;
56
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s;
57
+ var interfaceMeta = kotlin_kotlin.$_$.n5;
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.u1j(term1, term2, occurCheckEnabled) : $super.u1j.call(this, term1, term2, occurCheckEnabled);
63
+ }
59
64
  function mgu(term1, term2) {
60
- return this.y1g(term1, term2, true);
65
+ return this.u1j(term1, term2, true);
61
66
  }
62
67
  function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
63
- return !(this.y1g(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
68
+ return !(this.u1j(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.y1g(term1, term2, occurCheckEnabled);
70
- return substitution.bz() ? null : term1.getSubstituted(substitution, []);
74
+ var substitution = this.u1j(term1, term2, occurCheckEnabled);
75
+ return substitution.e11() ? null : term1.getSubstituted(substitution, []);
71
76
  }
72
77
  function unify(term1, term2) {
73
78
  return this.unifyWithOccurCheck(term1, term2, true);
@@ -78,7 +83,7 @@
78
83
  setMetadataFor(Unificator, 'Unificator', interfaceMeta);
79
84
  setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, VOID, [Unificator]);
80
85
  setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, VOID, [Unificator]);
81
- setMetadataFor(Equation, 'Equation', classMeta, VOID, [Castable]);
86
+ setMetadataFor(Equation, 'Equation', classMeta, VOID, [TermConvertible, Castable]);
82
87
  setMetadataFor(Identity, 'Identity', classMeta, Equation);
83
88
  setMetadataFor(Assignment, 'Assignment', classMeta, Equation);
84
89
  setMetadataFor(Comparison, 'Comparison', classMeta, Equation);
@@ -89,28 +94,24 @@
89
94
  setMetadataFor(Companion_0, 'Companion', objectMeta);
90
95
  //endregion
91
96
  function _get_contextEquations__x0dd77($this) {
92
- var tmp$ret$0;
93
97
  // Inline function 'kotlin.getValue' call
94
- var tmp0_getValue = contextEquations$factory();
95
- tmp$ret$0 = $this.h1g_1.p2();
96
- return tmp$ret$0;
98
+ var this_0 = $this.d1j_1;
99
+ contextEquations$factory();
100
+ return this_0.r2();
97
101
  }
98
102
  function occurrenceCheck($this, variable, term) {
99
103
  var tmp;
100
- if (term.fu()) {
101
- tmp = $this.i1g(variable, term);
102
- } else if (term.oy()) {
104
+ if (term.vv()) {
105
+ tmp = $this.e1j(variable, term);
106
+ } else if (term.fv()) {
103
107
  var tmp$ret$1;
104
108
  $l$block: {
105
109
  // Inline function 'kotlin.sequences.any' call
106
- var tmp0_any = term.tt();
107
- var tmp0_iterator = tmp0_any.j();
108
- while (tmp0_iterator.m()) {
109
- var element = tmp0_iterator.n();
110
- var tmp$ret$0;
110
+ var tmp0_iterator = term.bv().r();
111
+ while (tmp0_iterator.s()) {
112
+ var element = tmp0_iterator.u();
111
113
  // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.occurrenceCheck.<anonymous>' call
112
- tmp$ret$0 = occurrenceCheck($this, variable, element);
113
- if (tmp$ret$0) {
114
+ if (occurrenceCheck($this, variable, element)) {
114
115
  tmp$ret$1 = true;
115
116
  break $l$block;
116
117
  }
@@ -124,11 +125,11 @@
124
125
  return tmp;
125
126
  }
126
127
  function equationsFor($this, term1, term2) {
127
- var tmp = Companion_getInstance_2();
128
- return tmp.j1g(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
128
+ var tmp = Companion_instance_0;
129
+ return tmp.f1j(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
129
130
  }
130
131
  function equationsFor_0($this, substitution1, substitution2) {
131
- var tmp = Companion_getInstance_2();
132
+ var tmp = Companion_instance_0;
132
133
  var tmp_0 = plus(asSequence(substitution1), asSequence(substitution2));
133
134
  return tmp.fromSequence(map(tmp_0, AbstractUnificator$equationsFor$lambda));
134
135
  }
@@ -143,7 +144,7 @@
143
144
  }
144
145
  while (inductionVariable < exceptIndex);
145
146
  var inductionVariable_0 = exceptIndex + 1 | 0;
146
- var last = equations.p();
147
+ var last = equations.l();
147
148
  if (inductionVariable_0 < last)
148
149
  do {
149
150
  var i_0 = inductionVariable_0;
@@ -157,122 +158,113 @@
157
158
  var changed = true;
158
159
  while (changed) {
159
160
  changed = false;
160
- var eqIterator = equations.ua();
161
- while (eqIterator.m()) {
162
- var eq = eqIterator.n();
163
- if (eq.o1g()) {
161
+ var eqIterator = equations.z1();
162
+ while (eqIterator.s()) {
163
+ var eq = eqIterator.u();
164
+ if (eq.k1j()) {
164
165
  return Companion_getInstance().failed();
165
- } else if (eq.p1g()) {
166
- eqIterator.v4();
166
+ } else if (eq.l1j()) {
167
+ eqIterator.t();
167
168
  changed = true;
168
- } else if (eq.w1g()) {
169
- var assignment = eq.r1g();
170
- if (occurCheckEnabled ? occurrenceCheck($this, assignment.u1g_1, eq.n1g()) : false) {
169
+ } else if (eq.s1j()) {
170
+ var assignment = eq.n1j();
171
+ if (occurCheckEnabled ? occurrenceCheck($this, assignment.q1j_1, eq.j1j()) : false) {
171
172
  return Companion_getInstance().failed();
172
173
  } else {
173
- changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.la());
174
+ changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.o1());
174
175
  }
175
- } else if (eq.q1g()) {
176
- eqIterator.v4();
177
- var tmp0_iterator = equationsFor($this, eq.m1g(), eq.n1g()).j();
178
- insertion: while (tmp0_iterator.m()) {
179
- var it = tmp0_iterator.n();
180
- if (it.p1g())
176
+ } else if (eq.m1j()) {
177
+ eqIterator.t();
178
+ var tmp0_iterator = equationsFor($this, eq.i1j(), eq.j1j()).r();
179
+ insertion: while (tmp0_iterator.s()) {
180
+ var it = tmp0_iterator.u();
181
+ if (it.l1j())
181
182
  continue insertion;
182
- else if (it.o1g())
183
+ else if (it.k1j())
183
184
  return Companion_getInstance().failed();
184
185
  else {
185
- eqIterator.oa(it);
186
+ eqIterator.r1(it);
186
187
  }
187
188
  }
188
189
  changed = true;
189
190
  }
190
191
  }
191
192
  }
192
- var tmp$ret$2;
193
193
  // Inline function 'kotlin.collections.filter' call
194
- var tmp$ret$1;
195
194
  // 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;
195
+ var destination = ArrayList_init_$Create$();
196
+ var tmp0_iterator_0 = equations.r();
197
+ while (tmp0_iterator_0.s()) {
198
+ var element = tmp0_iterator_0.u();
201
199
  // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
202
- tmp$ret$0 = element.w1g();
203
- if (tmp$ret$0) {
204
- tmp0_filterTo.g(element);
200
+ if (element.s1j()) {
201
+ destination.o(element);
205
202
  }
206
203
  }
207
- tmp$ret$1 = tmp0_filterTo;
208
- tmp$ret$2 = tmp$ret$1;
209
- return toSubstitution(tmp$ret$2);
204
+ return toSubstitution(destination);
210
205
  }
211
206
  function newDeque($this, items) {
212
- var tmp$ret$0;
213
207
  // Inline function 'kotlin.collections.arrayListOf' call
214
- tmp$ret$0 = ArrayList_init_$Create$();
208
+ var tmp$ret$0 = ArrayList_init_$Create$();
215
209
  return toCollection(items, tmp$ret$0);
216
210
  }
217
211
  function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
218
- if ($equations.o(i).o1g() ? true : $equations.o(i).p1g())
219
- return Unit_getInstance();
220
- var currentEq = $equations.o(i);
212
+ if ($equations.d1(i).k1j() ? true : $equations.d1(i).l1j())
213
+ return Unit_instance;
214
+ var currentEq = $equations.d1(i);
221
215
  var tmp0_container = currentEq.apply($substitution).toPair();
222
- var newLhs = tmp0_container.r3();
223
- var newRhs = tmp0_container.s3();
224
- if (!currentEq.m1g().equals(newLhs) ? true : !currentEq.n1g().equals(newRhs)) {
225
- var tmp = Companion_getInstance_2();
226
- $equations.t4(i, tmp.x1g(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
216
+ var newLhs = tmp0_container.gd();
217
+ var newRhs = tmp0_container.hd();
218
+ if (!currentEq.i1j().equals(newLhs) ? true : !currentEq.j1j().equals(newRhs)) {
219
+ var tmp = Companion_instance_0;
220
+ $equations.m(i, tmp.t1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
227
221
  changed._v = true;
228
222
  }
229
223
  }
230
224
  function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
231
225
  return function () {
232
- return toEquations(this$0.j5());
226
+ return toEquations(this$0.mb());
233
227
  };
234
228
  }
235
229
  function AbstractUnificator$checkTermsEquality$ref($boundThis) {
236
230
  var l = function (p0, p1) {
237
- return $boundThis.i1g(p0, p1);
231
+ return $boundThis.e1j(p0, p1);
238
232
  };
239
233
  l.callableName = 'checkTermsEquality';
240
234
  return l;
241
235
  }
242
236
  function AbstractUnificator$equationsFor$lambda(it) {
243
- var tmp$ret$0;
244
237
  // Inline function 'kotlin.collections.toPair' call
245
- tmp$ret$0 = new Pair(it.n2(), it.p2());
246
- return tmp$ret$0;
238
+ return new Pair(it.q2(), it.r2());
247
239
  }
248
240
  function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
249
241
  var l = function (p0, p1) {
250
- return $boundThis.i1g(p0, p1);
242
+ return $boundThis.e1j(p0, p1);
251
243
  };
252
244
  l.callableName = 'checkTermsEquality';
253
245
  return l;
254
246
  }
255
247
  function AbstractUnificator(context) {
256
248
  context = context === VOID ? Companion_getInstance().empty() : context;
257
- this.g1g_1 = context;
249
+ this.c1j_1 = context;
258
250
  var tmp = this;
259
- tmp.h1g_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
251
+ tmp.d1j_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
260
252
  }
261
- protoOf(AbstractUnificator).j5 = function () {
262
- return this.g1g_1;
253
+ protoOf(AbstractUnificator).mb = function () {
254
+ return this.c1j_1;
263
255
  };
264
- protoOf(AbstractUnificator).y1g = function (term1, term2, occurCheckEnabled) {
265
- if (this.j5().bz())
256
+ protoOf(AbstractUnificator).u1j = function (term1, term2, occurCheckEnabled) {
257
+ if (this.mb().e11())
266
258
  return Companion_getInstance().failed();
267
259
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
268
260
  return mgu_0(this, equations, occurCheckEnabled);
269
261
  };
270
- protoOf(AbstractUnificator).z1g = function (substitution1, substitution2, occurCheckEnabled) {
271
- if ((this.j5().bz() ? true : substitution1.bz()) ? true : substitution2.bz())
262
+ protoOf(AbstractUnificator).v1j = function (substitution1, substitution2, occurCheckEnabled) {
263
+ if ((this.mb().e11() ? true : substitution1.e11()) ? true : substitution2.e11())
272
264
  return Companion_getInstance().failed();
273
265
  if (!occurCheckEnabled) {
274
- var quickMerge = this.j5().plus(substitution1).plus(substitution2);
275
- if (quickMerge.az()) {
266
+ var quickMerge = this.mb().plus(substitution1).plus(substitution2);
267
+ if (quickMerge.d11()) {
276
268
  return quickMerge;
277
269
  }
278
270
  }
@@ -280,7 +272,7 @@
280
272
  return mgu_0(this, equations, occurCheckEnabled);
281
273
  };
282
274
  protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
283
- return this.z1g(substitution1, substitution2, occurCheckEnabled);
275
+ return this.v1j(substitution1, substitution2, occurCheckEnabled);
284
276
  };
285
277
  function contextEquations$factory() {
286
278
  return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
@@ -288,37 +280,37 @@
288
280
  }, null);
289
281
  }
290
282
  function CachedUnificator(decorated, cacheCapacity) {
291
- this.a1h_1 = decorated;
292
- this.b1h_1 = Companion_getInstance_0().jo(cacheCapacity);
283
+ this.w1j_1 = decorated;
284
+ this.x1j_1 = Companion_instance.jp(cacheCapacity);
293
285
  }
294
- protoOf(CachedUnificator).y1g = function (term1, term2, occurCheckEnabled) {
286
+ protoOf(CachedUnificator).u1j = function (term1, term2, occurCheckEnabled) {
295
287
  var mguRequest = new Triple(term1, term2, occurCheckEnabled);
296
- var cached = this.b1h_1.d3(mguRequest);
288
+ var cached = this.x1j_1.x2(mguRequest);
297
289
  var tmp;
298
290
  if (cached instanceof Some) {
299
- tmp = cached.mo_1;
291
+ tmp = cached.mp_1;
300
292
  } else {
301
- var mguResult = this.a1h_1.y1g(term1, term2, occurCheckEnabled);
302
- this.b1h_1.ko(mguRequest, mguResult);
293
+ var mguResult = this.w1j_1.u1j(term1, term2, occurCheckEnabled);
294
+ this.x1j_1.kp(mguRequest, mguResult);
303
295
  tmp = mguResult;
304
296
  }
305
297
  return tmp;
306
298
  };
307
- protoOf(CachedUnificator).z1g = function (substitution1, substitution2, occurCheckEnabled) {
299
+ protoOf(CachedUnificator).v1j = function (substitution1, substitution2, occurCheckEnabled) {
308
300
  var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
309
- var cached = this.b1h_1.d3(mguRequest);
301
+ var cached = this.x1j_1.x2(mguRequest);
310
302
  var tmp;
311
303
  if (cached instanceof Some) {
312
- tmp = cached.mo_1;
304
+ tmp = cached.mp_1;
313
305
  } else {
314
- var mguResult = this.a1h_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
315
- this.b1h_1.ko(mguRequest, mguResult);
306
+ var mguResult = this.w1j_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
307
+ this.x1j_1.kp(mguRequest, mguResult);
316
308
  tmp = mguResult;
317
309
  }
318
310
  return tmp;
319
311
  };
320
312
  protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
321
- return this.z1g(substitution1, substitution2, occurCheckEnabled);
313
+ return this.v1j(substitution1, substitution2, occurCheckEnabled);
322
314
  };
323
315
  function allOfLists($this, lhs, rhs, equalityChecker) {
324
316
  var tmp = zip(lhs.unfold(), rhs.unfold());
@@ -351,7 +343,7 @@
351
343
  }
352
344
  function Equation$Companion$from$lambda($equalityChecker) {
353
345
  return function (it) {
354
- return Companion_getInstance_2().c1h(it, $equalityChecker);
346
+ return Companion_instance_0.y1j(it, $equalityChecker);
355
347
  };
356
348
  }
357
349
  function Term$equals$ref_2() {
@@ -377,16 +369,16 @@
377
369
  }
378
370
  function Equation$Companion$allOfLists$lambda($equalityChecker) {
379
371
  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.zt() ? r.zt() : false) ? sequenceOf([Companion_getInstance_2().x1g(l.castToCons().lv(), r.castToCons().lv(), $equalityChecker)]) : (l.yt() ? r.yt() : false) ? sequenceOf([Companion_getInstance_2().x1g(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_getInstance_2().j1g(l, r, $equalityChecker);
372
+ var l = _name_for_destructuring_parameter_0__wldtmu.gd();
373
+ var r = _name_for_destructuring_parameter_0__wldtmu.hd();
374
+ return (l.mv() ? r.mv() : false) ? sequenceOf([Companion_instance_0.t1j(l.castToCons().fx(), r.castToCons().fx(), $equalityChecker)]) : (l.lv() ? r.lv() : false) ? sequenceOf([Companion_instance_0.t1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_instance_0.f1j(l, r, $equalityChecker);
383
375
  };
384
376
  }
385
377
  function Equation$Companion$allOfTuples$lambda($equalityChecker) {
386
378
  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.xt() ? r.xt() : false) ? sequenceOf([Companion_getInstance_2().x1g(l.castToTuple().zu(), r.castToTuple().zu(), $equalityChecker)]) : Companion_getInstance_2().j1g(l, r, $equalityChecker);
379
+ var l = _name_for_destructuring_parameter_0__wldtmu.gd();
380
+ var r = _name_for_destructuring_parameter_0__wldtmu.hd();
381
+ return (l.kv() ? r.kv() : false) ? sequenceOf([Companion_instance_0.t1j(l.castToTuple().tw(), r.castToTuple().tw(), $equalityChecker)]) : Companion_instance_0.f1j(l, r, $equalityChecker);
390
382
  };
391
383
  }
392
384
  function Term$equals$ref_5() {
@@ -398,29 +390,29 @@
398
390
  }
399
391
  function Equation$Companion$allOf$lambda($equalityChecker) {
400
392
  return function (it) {
401
- return Companion_getInstance_2().c1h(it, $equalityChecker);
393
+ return Companion_instance_0.y1j(it, $equalityChecker);
402
394
  };
403
395
  }
404
396
  function Identity(lhs, rhs) {
405
397
  Equation.call(this, lhs, rhs);
406
- this.f1h_1 = lhs;
407
- this.g1h_1 = rhs;
398
+ this.b1k_1 = lhs;
399
+ this.c1k_1 = rhs;
408
400
  }
409
- protoOf(Identity).m1g = function () {
410
- return this.f1h_1;
401
+ protoOf(Identity).i1j = function () {
402
+ return this.b1k_1;
411
403
  };
412
- protoOf(Identity).n1g = function () {
413
- return this.g1h_1;
404
+ protoOf(Identity).j1j = function () {
405
+ return this.c1k_1;
414
406
  };
415
- protoOf(Identity).p1g = function () {
407
+ protoOf(Identity).l1j = function () {
416
408
  return true;
417
409
  };
418
410
  protoOf(Identity).toString = function () {
419
- return 'Identity(lhs=' + this.f1h_1 + ', rhs=' + this.g1h_1 + ')';
411
+ return 'Identity(lhs=' + this.b1k_1 + ', rhs=' + this.c1k_1 + ')';
420
412
  };
421
413
  protoOf(Identity).hashCode = function () {
422
- var result = this.f1h_1.hashCode();
423
- result = imul(result, 31) + this.g1h_1.hashCode() | 0;
414
+ var result = this.b1k_1.hashCode();
415
+ result = imul(result, 31) + this.c1k_1.hashCode() | 0;
424
416
  return result;
425
417
  };
426
418
  protoOf(Identity).equals = function (other) {
@@ -429,44 +421,44 @@
429
421
  if (!(other instanceof Identity))
430
422
  return false;
431
423
  var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
432
- if (!this.f1h_1.equals(tmp0_other_with_cast.f1h_1))
424
+ if (!this.b1k_1.equals(tmp0_other_with_cast.b1k_1))
433
425
  return false;
434
- if (!this.g1h_1.equals(tmp0_other_with_cast.g1h_1))
426
+ if (!this.c1k_1.equals(tmp0_other_with_cast.c1k_1))
435
427
  return false;
436
428
  return true;
437
429
  };
438
430
  function Assignment(lhs, rhs) {
439
431
  Equation.call(this, lhs, rhs);
440
- this.u1g_1 = lhs;
441
- this.v1g_1 = rhs;
432
+ this.q1j_1 = lhs;
433
+ this.r1j_1 = rhs;
442
434
  }
443
- protoOf(Assignment).m1g = function () {
444
- return this.u1g_1;
435
+ protoOf(Assignment).i1j = function () {
436
+ return this.q1j_1;
445
437
  };
446
- protoOf(Assignment).n1g = function () {
447
- return this.v1g_1;
438
+ protoOf(Assignment).j1j = function () {
439
+ return this.r1j_1;
448
440
  };
449
441
  protoOf(Assignment).toSubstitution = function () {
450
- return Companion_getInstance().unifier(this.u1g_1, this.v1g_1);
442
+ return Companion_getInstance().unifier(this.q1j_1, this.r1j_1);
451
443
  };
452
- protoOf(Assignment).j1h = function () {
453
- return to(this.u1g_1, this.v1g_1);
444
+ protoOf(Assignment).f1k = function () {
445
+ return to(this.q1j_1, this.r1j_1);
454
446
  };
455
447
  protoOf(Assignment).toPair = function () {
456
- return this.j1h();
448
+ return this.f1k();
457
449
  };
458
- protoOf(Assignment).w1g = function () {
450
+ protoOf(Assignment).s1j = function () {
459
451
  return true;
460
452
  };
461
- protoOf(Assignment).h1h = function () {
453
+ protoOf(Assignment).d1k = function () {
462
454
  return this;
463
455
  };
464
456
  protoOf(Assignment).toString = function () {
465
- return 'Assignment(lhs=' + this.u1g_1 + ', rhs=' + this.v1g_1 + ')';
457
+ return 'Assignment(lhs=' + this.q1j_1 + ', rhs=' + this.r1j_1 + ')';
466
458
  };
467
459
  protoOf(Assignment).hashCode = function () {
468
- var result = this.u1g_1.hashCode();
469
- result = imul(result, 31) + this.v1g_1.hashCode() | 0;
460
+ var result = this.q1j_1.hashCode();
461
+ result = imul(result, 31) + this.r1j_1.hashCode() | 0;
470
462
  return result;
471
463
  };
472
464
  protoOf(Assignment).equals = function (other) {
@@ -475,32 +467,32 @@
475
467
  if (!(other instanceof Assignment))
476
468
  return false;
477
469
  var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
478
- if (!this.u1g_1.equals(tmp0_other_with_cast.u1g_1))
470
+ if (!this.q1j_1.equals(tmp0_other_with_cast.q1j_1))
479
471
  return false;
480
- if (!this.v1g_1.equals(tmp0_other_with_cast.v1g_1))
472
+ if (!this.r1j_1.equals(tmp0_other_with_cast.r1j_1))
481
473
  return false;
482
474
  return true;
483
475
  };
484
476
  function Comparison(lhs, rhs) {
485
477
  Equation.call(this, lhs, rhs);
486
- this.m1h_1 = lhs;
487
- this.n1h_1 = rhs;
478
+ this.i1k_1 = lhs;
479
+ this.j1k_1 = rhs;
488
480
  }
489
- protoOf(Comparison).m1g = function () {
490
- return this.m1h_1;
481
+ protoOf(Comparison).i1j = function () {
482
+ return this.i1k_1;
491
483
  };
492
- protoOf(Comparison).n1g = function () {
493
- return this.n1h_1;
484
+ protoOf(Comparison).j1j = function () {
485
+ return this.j1k_1;
494
486
  };
495
- protoOf(Comparison).q1g = function () {
487
+ protoOf(Comparison).m1j = function () {
496
488
  return true;
497
489
  };
498
490
  protoOf(Comparison).toString = function () {
499
- return 'Comparison(lhs=' + this.m1h_1 + ', rhs=' + this.n1h_1 + ')';
491
+ return 'Comparison(lhs=' + this.i1k_1 + ', rhs=' + this.j1k_1 + ')';
500
492
  };
501
493
  protoOf(Comparison).hashCode = function () {
502
- var result = this.m1h_1.hashCode();
503
- result = imul(result, 31) + this.n1h_1.hashCode() | 0;
494
+ var result = this.i1k_1.hashCode();
495
+ result = imul(result, 31) + this.j1k_1.hashCode() | 0;
504
496
  return result;
505
497
  };
506
498
  protoOf(Comparison).equals = function (other) {
@@ -509,32 +501,32 @@
509
501
  if (!(other instanceof Comparison))
510
502
  return false;
511
503
  var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
512
- if (!this.m1h_1.equals(tmp0_other_with_cast.m1h_1))
504
+ if (!this.i1k_1.equals(tmp0_other_with_cast.i1k_1))
513
505
  return false;
514
- if (!this.n1h_1.equals(tmp0_other_with_cast.n1h_1))
506
+ if (!this.j1k_1.equals(tmp0_other_with_cast.j1k_1))
515
507
  return false;
516
508
  return true;
517
509
  };
518
510
  function Contradiction(lhs, rhs) {
519
511
  Equation.call(this, lhs, rhs);
520
- this.q1h_1 = lhs;
521
- this.r1h_1 = rhs;
512
+ this.m1k_1 = lhs;
513
+ this.n1k_1 = rhs;
522
514
  }
523
- protoOf(Contradiction).m1g = function () {
524
- return this.q1h_1;
515
+ protoOf(Contradiction).i1j = function () {
516
+ return this.m1k_1;
525
517
  };
526
- protoOf(Contradiction).n1g = function () {
527
- return this.r1h_1;
518
+ protoOf(Contradiction).j1j = function () {
519
+ return this.n1k_1;
528
520
  };
529
- protoOf(Contradiction).o1g = function () {
521
+ protoOf(Contradiction).k1j = function () {
530
522
  return true;
531
523
  };
532
524
  protoOf(Contradiction).toString = function () {
533
- return 'Contradiction(lhs=' + this.q1h_1 + ', rhs=' + this.r1h_1 + ')';
525
+ return 'Contradiction(lhs=' + this.m1k_1 + ', rhs=' + this.n1k_1 + ')';
534
526
  };
535
527
  protoOf(Contradiction).hashCode = function () {
536
- var result = this.q1h_1.hashCode();
537
- result = imul(result, 31) + this.r1h_1.hashCode() | 0;
528
+ var result = this.m1k_1.hashCode();
529
+ result = imul(result, 31) + this.n1k_1.hashCode() | 0;
538
530
  return result;
539
531
  };
540
532
  protoOf(Contradiction).equals = function (other) {
@@ -543,18 +535,17 @@
543
535
  if (!(other instanceof Contradiction))
544
536
  return false;
545
537
  var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
546
- if (!this.q1h_1.equals(tmp0_other_with_cast.q1h_1))
538
+ if (!this.m1k_1.equals(tmp0_other_with_cast.m1k_1))
547
539
  return false;
548
- if (!this.r1h_1.equals(tmp0_other_with_cast.r1h_1))
540
+ if (!this.n1k_1.equals(tmp0_other_with_cast.n1k_1))
549
541
  return false;
550
542
  return true;
551
543
  };
552
544
  function Companion() {
553
- Companion_instance = this;
554
545
  }
555
- protoOf(Companion).x1g = function (lhs, rhs, equalityChecker) {
546
+ protoOf(Companion).t1j = function (lhs, rhs, equalityChecker) {
556
547
  var tmp;
557
- if (lhs.fu() ? rhs.fu() : false) {
548
+ if (lhs.vv() ? rhs.vv() : false) {
558
549
  var tmp_0;
559
550
  if (equalityChecker(lhs, rhs)) {
560
551
  tmp_0 = new Identity(lhs, rhs);
@@ -562,11 +553,11 @@
562
553
  tmp_0 = new Assignment(lhs.castToVar(), rhs);
563
554
  }
564
555
  tmp = tmp_0;
565
- } else if (lhs.fu()) {
556
+ } else if (lhs.vv()) {
566
557
  tmp = new Assignment(lhs.castToVar(), rhs);
567
- } else if (rhs.fu()) {
558
+ } else if (rhs.vv()) {
568
559
  tmp = new Assignment(rhs.castToVar(), lhs);
569
- } else if (lhs.cw() ? rhs.cw() : false) {
560
+ } else if (lhs.yv() ? rhs.yv() : false) {
570
561
  var tmp_1;
571
562
  if (equalityChecker(lhs, rhs)) {
572
563
  tmp_1 = new Identity(lhs, rhs);
@@ -574,13 +565,13 @@
574
565
  tmp_1 = new Contradiction(lhs, rhs);
575
566
  }
576
567
  tmp = tmp_1;
577
- } else if (lhs.cw() ? true : rhs.cw()) {
568
+ } else if (lhs.yv() ? true : rhs.yv()) {
578
569
  tmp = new Contradiction(lhs, rhs);
579
- } else if (lhs.oy() ? rhs.oy() : false) {
570
+ } else if (lhs.fv() ? rhs.fv() : false) {
580
571
  var lhsStruct = lhs.castToStruct();
581
572
  var rhsStruct = rhs.castToStruct();
582
573
  var tmp_2;
583
- if (!(lhsStruct.lt() === rhsStruct.lt()) ? true : !(lhsStruct.rt() === rhsStruct.rt())) {
574
+ if (!(lhsStruct.tu() === rhsStruct.tu()) ? true : !(lhsStruct.zu() === rhsStruct.zu())) {
584
575
  tmp_2 = new Contradiction(lhsStruct, rhsStruct);
585
576
  } else {
586
577
  tmp_2 = new Comparison(lhsStruct, rhsStruct);
@@ -599,10 +590,10 @@
599
590
  tmp = equalityChecker;
600
591
  }
601
592
  equalityChecker = tmp;
602
- return $super === VOID ? this.x1g(lhs, rhs, equalityChecker) : $super.x1g.call(this, lhs, rhs, equalityChecker);
593
+ return $super === VOID ? this.t1j(lhs, rhs, equalityChecker) : $super.t1j.call(this, lhs, rhs, equalityChecker);
603
594
  };
604
- protoOf(Companion).s1h = function (pair, equalityChecker) {
605
- return this.x1g(pair.f4_1, pair.g4_1, equalityChecker);
595
+ protoOf(Companion).o1k = function (pair, equalityChecker) {
596
+ return this.t1j(pair.qd_1, pair.rd_1, equalityChecker);
606
597
  };
607
598
  protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
608
599
  var tmp;
@@ -612,9 +603,9 @@
612
603
  tmp = equalityChecker;
613
604
  }
614
605
  equalityChecker = tmp;
615
- return $super === VOID ? this.s1h(pair, equalityChecker) : $super.s1h.call(this, pair, equalityChecker);
606
+ return $super === VOID ? this.o1k(pair, equalityChecker) : $super.o1k.call(this, pair, equalityChecker);
616
607
  };
617
- protoOf(Companion).t1h = function (pairs, equalityChecker) {
608
+ protoOf(Companion).p1k = function (pairs, equalityChecker) {
618
609
  return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
619
610
  };
620
611
  protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
@@ -625,10 +616,10 @@
625
616
  tmp = equalityChecker;
626
617
  }
627
618
  equalityChecker = tmp;
628
- return $super === VOID ? this.t1h(pairs, equalityChecker) : $super.t1h.call(this, pairs, equalityChecker);
619
+ return $super === VOID ? this.p1k(pairs, equalityChecker) : $super.p1k.call(this, pairs, equalityChecker);
629
620
  };
630
- protoOf(Companion).u1h = function (pairs, equalityChecker) {
631
- return this.t1h(asSequence_0(pairs), equalityChecker);
621
+ protoOf(Companion).q1k = function (pairs, equalityChecker) {
622
+ return this.p1k(asSequence_0(pairs), equalityChecker);
632
623
  };
633
624
  protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
634
625
  var tmp;
@@ -638,10 +629,10 @@
638
629
  tmp = equalityChecker;
639
630
  }
640
631
  equalityChecker = tmp;
641
- return $super === VOID ? this.u1h(pairs, equalityChecker) : $super.u1h.call(this, pairs, equalityChecker);
632
+ return $super === VOID ? this.q1k(pairs, equalityChecker) : $super.q1k.call(this, pairs, equalityChecker);
642
633
  };
643
- protoOf(Companion).v1h = function (pairs, equalityChecker) {
644
- return this.t1h(sequenceOf(pairs.slice()), equalityChecker);
634
+ protoOf(Companion).r1k = function (pairs, equalityChecker) {
635
+ return this.p1k(sequenceOf(pairs.slice()), equalityChecker);
645
636
  };
646
637
  protoOf(Companion).from = function (pairs, equalityChecker, $super) {
647
638
  var tmp;
@@ -651,10 +642,10 @@
651
642
  tmp = equalityChecker;
652
643
  }
653
644
  equalityChecker = tmp;
654
- return $super === VOID ? this.v1h(pairs, equalityChecker) : $super.v1h.call(this, pairs, equalityChecker);
645
+ return $super === VOID ? this.r1k(pairs, equalityChecker) : $super.r1k.call(this, pairs, equalityChecker);
655
646
  };
656
- protoOf(Companion).c1h = function (pair, equalityChecker) {
657
- return this.j1g(pair.f4_1, pair.g4_1, equalityChecker);
647
+ protoOf(Companion).y1j = function (pair, equalityChecker) {
648
+ return this.f1j(pair.qd_1, pair.rd_1, equalityChecker);
658
649
  };
659
650
  protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
660
651
  var tmp;
@@ -664,29 +655,29 @@
664
655
  tmp = equalityChecker;
665
656
  }
666
657
  equalityChecker = tmp;
667
- return $super === VOID ? this.c1h(pair, equalityChecker) : $super.c1h.call(this, pair, equalityChecker);
658
+ return $super === VOID ? this.y1j(pair, equalityChecker) : $super.y1j.call(this, pair, equalityChecker);
668
659
  };
669
- protoOf(Companion).j1g = function (lhs, rhs, equalityChecker) {
660
+ protoOf(Companion).f1j = function (lhs, rhs, equalityChecker) {
670
661
  var tmp;
671
- if (lhs.mt() ? rhs.mt() : false) {
672
- tmp = sequenceOf([this.x1g(lhs, rhs, equalityChecker)]);
673
- } else if (lhs.yt() ? rhs.yt() : false) {
662
+ if (lhs.uu() ? rhs.uu() : false) {
663
+ tmp = sequenceOf([this.t1j(lhs, rhs, equalityChecker)]);
664
+ } else if (lhs.lv() ? rhs.lv() : false) {
674
665
  tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
675
- } else if (lhs.xt() ? rhs.xt() : false) {
666
+ } else if (lhs.kv() ? rhs.kv() : false) {
676
667
  tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
677
- } else if (lhs.oy() ? rhs.oy() : false) {
668
+ } else if (lhs.fv() ? rhs.fv() : false) {
678
669
  var lhsStruct = lhs.castToStruct();
679
670
  var rhsStruct = rhs.castToStruct();
680
671
  var tmp_0;
681
- if (lhsStruct.lt() === rhsStruct.lt() ? lhsStruct.rt() === rhsStruct.rt() : false) {
682
- var tmp_1 = zip(lhsStruct.cu(), rhsStruct.cu());
672
+ if (lhsStruct.tu() === rhsStruct.tu() ? lhsStruct.zu() === rhsStruct.zu() : false) {
673
+ var tmp_1 = zip(lhsStruct.sv(), rhsStruct.sv());
683
674
  tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
684
675
  } else {
685
- tmp_0 = sequenceOf([this.x1g(lhs, rhs, equalityChecker)]);
676
+ tmp_0 = sequenceOf([this.t1j(lhs, rhs, equalityChecker)]);
686
677
  }
687
678
  tmp = tmp_0;
688
679
  } else {
689
- tmp = sequenceOf([this.x1g(lhs, rhs, equalityChecker)]);
680
+ tmp = sequenceOf([this.t1j(lhs, rhs, equalityChecker)]);
690
681
  }
691
682
  return tmp;
692
683
  };
@@ -698,13 +689,11 @@
698
689
  tmp = equalityChecker;
699
690
  }
700
691
  equalityChecker = tmp;
701
- return $super === VOID ? this.j1g(lhs, rhs, equalityChecker) : $super.j1g.call(this, lhs, rhs, equalityChecker);
692
+ return $super === VOID ? this.f1j(lhs, rhs, equalityChecker) : $super.f1j.call(this, lhs, rhs, equalityChecker);
702
693
  };
703
- var Companion_instance;
704
- function Companion_getInstance_2() {
705
- if (Companion_instance == null)
706
- new Companion();
707
- return Companion_instance;
694
+ var Companion_instance_0;
695
+ function Companion_getInstance_1() {
696
+ return Companion_instance_0;
708
697
  }
709
698
  function Term$equals$ref_6() {
710
699
  var l = function (p0, p1) {
@@ -714,55 +703,54 @@
714
703
  return l;
715
704
  }
716
705
  function Equation(lhs, rhs) {
717
- Companion_getInstance_2();
718
- this.k1g_1 = lhs;
719
- this.l1g_1 = rhs;
706
+ this.g1j_1 = lhs;
707
+ this.h1j_1 = rhs;
720
708
  }
721
- protoOf(Equation).m1g = function () {
722
- return this.k1g_1;
709
+ protoOf(Equation).i1j = function () {
710
+ return this.g1j_1;
723
711
  };
724
- protoOf(Equation).n1g = function () {
725
- return this.l1g_1;
712
+ protoOf(Equation).j1j = function () {
713
+ return this.h1j_1;
726
714
  };
727
- protoOf(Equation).p1g = function () {
715
+ protoOf(Equation).l1j = function () {
728
716
  return false;
729
717
  };
730
- protoOf(Equation).w1g = function () {
718
+ protoOf(Equation).s1j = function () {
731
719
  return false;
732
720
  };
733
- protoOf(Equation).h1h = function () {
721
+ protoOf(Equation).d1k = function () {
734
722
  return null;
735
723
  };
736
- protoOf(Equation).r1g = function () {
737
- var tmp0_elvis_lhs = this.h1h();
724
+ protoOf(Equation).n1j = function () {
725
+ var tmp0_elvis_lhs = this.d1k();
738
726
  var tmp;
739
727
  if (tmp0_elvis_lhs == null) {
740
- throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).xc());
728
+ throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).o6());
741
729
  } else {
742
730
  tmp = tmp0_elvis_lhs;
743
731
  }
744
732
  return tmp;
745
733
  };
746
- protoOf(Equation).q1g = function () {
734
+ protoOf(Equation).m1j = function () {
747
735
  return false;
748
736
  };
749
- protoOf(Equation).o1g = function () {
737
+ protoOf(Equation).k1j = function () {
750
738
  return false;
751
739
  };
752
- protoOf(Equation).p1f = function () {
753
- return Companion_getInstance_1().of('=', [this.m1g(), this.n1g()]);
740
+ protoOf(Equation).e1h = function () {
741
+ return Companion_getInstance_0().of('=', [this.i1j(), this.j1j()]);
754
742
  };
755
743
  protoOf(Equation).toTerm = function () {
756
- return this.p1f();
744
+ return this.e1h();
757
745
  };
758
746
  protoOf(Equation).toPair = function () {
759
- return new Pair(this.m1g(), this.n1g());
747
+ return new Pair(this.i1j(), this.j1j());
760
748
  };
761
749
  protoOf(Equation).swap = function () {
762
- return Companion_getInstance_2().of(this.n1g(), this.m1g());
750
+ return Companion_instance_0.of(this.j1j(), this.i1j());
763
751
  };
764
- protoOf(Equation).i1h = function (substitution, equalityChecker) {
765
- return Companion_getInstance_2().x1g(this.m1g().getSubstituted(substitution, []), this.n1g().getSubstituted(substitution, []), equalityChecker);
752
+ protoOf(Equation).e1k = function (substitution, equalityChecker) {
753
+ return Companion_instance_0.t1j(this.i1j().getSubstituted(substitution, []), this.j1j().getSubstituted(substitution, []), equalityChecker);
766
754
  };
767
755
  protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
768
756
  var tmp;
@@ -772,40 +760,25 @@
772
760
  tmp = equalityChecker;
773
761
  }
774
762
  equalityChecker = tmp;
775
- return $super === VOID ? this.i1h(substitution, equalityChecker) : $super.i1h.call(this, substitution, equalityChecker);
763
+ return $super === VOID ? this.e1k(substitution, equalityChecker) : $super.e1k.call(this, substitution, equalityChecker);
776
764
  };
777
- defineProp(protoOf(Equation), 'lhs', function () {
778
- return this.m1g();
779
- });
780
- defineProp(protoOf(Equation), 'rhs', function () {
781
- return this.n1g();
782
- });
783
765
  function toEquations(_this__u8e3s4) {
784
- var tmp$ret$4;
785
766
  // Inline function 'kotlin.collections.map' call
786
- var tmp1_map = _this__u8e3s4.y();
787
- var tmp$ret$3;
767
+ var this_0 = _this__u8e3s4.n2();
788
768
  // 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;
769
+ var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
770
+ var tmp0_iterator = this_0.r();
771
+ while (tmp0_iterator.s()) {
772
+ var item = tmp0_iterator.u();
794
773
  // Inline function 'it.unibo.tuprolog.unify.toEquations.<anonymous>' call
795
- var tmp$ret$0;
796
774
  // Inline function 'kotlin.collections.component1' call
797
- tmp$ret$0 = item.n2();
798
- var variable = tmp$ret$0;
799
- var tmp$ret$1;
775
+ var variable = item.q2();
800
776
  // Inline function 'kotlin.collections.component2' call
801
- tmp$ret$1 = item.p2();
802
- var term = tmp$ret$1;
803
- tmp$ret$2 = new Assignment(variable, term);
804
- tmp0_mapTo.g(tmp$ret$2);
777
+ var term = item.r2();
778
+ var tmp$ret$2 = new Assignment(variable, term);
779
+ destination.o(tmp$ret$2);
805
780
  }
806
- tmp$ret$3 = tmp0_mapTo;
807
- tmp$ret$4 = tmp$ret$3;
808
- return tmp$ret$4;
781
+ return destination;
809
782
  }
810
783
  function toSubstitution(_this__u8e3s4) {
811
784
  var tmp = Companion_getInstance();
@@ -814,12 +787,12 @@
814
787
  }
815
788
  function toAssignmentPair(_this__u8e3s4) {
816
789
  var tmp;
817
- if (_this__u8e3s4.w1g()) {
818
- tmp = _this__u8e3s4.r1g().j1h();
819
- } else if (_this__u8e3s4.m1g().fu()) {
820
- tmp = to(_this__u8e3s4.m1g().castToVar(), _this__u8e3s4.n1g());
821
- } else if (_this__u8e3s4.n1g().fu()) {
822
- tmp = to(_this__u8e3s4.n1g().castToVar(), _this__u8e3s4.m1g());
790
+ if (_this__u8e3s4.s1j()) {
791
+ tmp = _this__u8e3s4.n1j().f1k();
792
+ } else if (_this__u8e3s4.i1j().vv()) {
793
+ tmp = to(_this__u8e3s4.i1j().castToVar(), _this__u8e3s4.j1j());
794
+ } else if (_this__u8e3s4.j1j().vv()) {
795
+ tmp = to(_this__u8e3s4.j1j().castToVar(), _this__u8e3s4.i1j());
823
796
  } else {
824
797
  throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
825
798
  }
@@ -829,17 +802,17 @@
829
802
  return toAssignmentPair(it);
830
803
  }
831
804
  function Unificator$Companion$default$delegate$lambda() {
832
- return Companion_getInstance_3().strict();
805
+ return Companion_getInstance_2().strict();
833
806
  }
834
807
  function Unificator$Companion$naive$1($context) {
835
808
  AbstractUnificator.call(this, $context);
836
809
  }
837
- protoOf(Unificator$Companion$naive$1).i1g = function (first, second) {
810
+ protoOf(Unificator$Companion$naive$1).e1j = function (first, second) {
838
811
  var tmp;
839
- if (first.iu() ? second.iu() : false) {
840
- tmp = first.castToInteger().p2().qi(second.castToInteger().p2()) === 0;
841
- } else if (first.hu() ? second.hu() : false) {
842
- tmp = first.castToNumeric().ax().hi(second.castToNumeric().ax()) === 0;
812
+ if (first.aw() ? second.aw() : false) {
813
+ tmp = first.castToInteger().r2().qj(second.castToInteger().r2()) === 0;
814
+ } else if (first.zv() ? second.zv() : false) {
815
+ tmp = first.castToNumeric().pz().hj(second.castToNumeric().pz()) === 0;
843
816
  } else {
844
817
  tmp = first.equals(second);
845
818
  }
@@ -848,33 +821,32 @@
848
821
  function Unificator$Companion$strict$1($context) {
849
822
  AbstractUnificator.call(this, $context);
850
823
  }
851
- protoOf(Unificator$Companion$strict$1).i1g = function (first, second) {
824
+ protoOf(Unificator$Companion$strict$1).e1j = function (first, second) {
852
825
  return first.equals(second);
853
826
  };
854
827
  function Companion_0() {
855
- Companion_instance_0 = this;
828
+ Companion_instance_1 = this;
856
829
  var tmp = this;
857
- tmp.a1i_1 = lazy(Unificator$Companion$default$delegate$lambda);
858
- this.b1i_1 = 32;
830
+ tmp.w1k_1 = lazy(Unificator$Companion$default$delegate$lambda);
831
+ this.x1k_1 = 32;
859
832
  }
860
- protoOf(Companion_0).c1i = function () {
861
- var tmp$ret$0;
833
+ protoOf(Companion_0).y1k = function () {
862
834
  // Inline function 'kotlin.getValue' call
863
- var tmp0_getValue = default$factory();
864
- tmp$ret$0 = this.a1i_1.p2();
865
- return tmp$ret$0;
835
+ var this_0 = this.w1k_1;
836
+ default$factory();
837
+ return this_0.r2();
866
838
  };
867
839
  protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
868
- return this.c1i().mgu(_this__u8e3s4, other);
840
+ return this.y1k().mgu(_this__u8e3s4, other);
869
841
  };
870
842
  protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
871
- return this.c1i().match(_this__u8e3s4, other);
843
+ return this.y1k().match(_this__u8e3s4, other);
872
844
  };
873
845
  protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
874
- return this.c1i().unify(_this__u8e3s4, other);
846
+ return this.y1k().unify(_this__u8e3s4, other);
875
847
  };
876
848
  protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
877
- return this.c1i().merge(_this__u8e3s4, other);
849
+ return this.y1k().merge(_this__u8e3s4, other);
878
850
  };
879
851
  protoOf(Companion_0).naiveWithContext = function (context) {
880
852
  return new Unificator$Companion$naive$1(context);
@@ -888,10 +860,10 @@
888
860
  protoOf(Companion_0).strict = function () {
889
861
  return this.strictWithContext(Companion_getInstance().empty());
890
862
  };
891
- protoOf(Companion_0).d1i = function (other, capacity) {
863
+ protoOf(Companion_0).z1k = function (other, capacity) {
892
864
  var tmp;
893
865
  if (other instanceof CachedUnificator) {
894
- tmp = new CachedUnificator(other.a1h_1, capacity);
866
+ tmp = new CachedUnificator(other.w1j_1, capacity);
895
867
  } else {
896
868
  tmp = new CachedUnificator(other, capacity);
897
869
  }
@@ -899,20 +871,19 @@
899
871
  };
900
872
  protoOf(Companion_0).cached = function (other, capacity, $super) {
901
873
  capacity = capacity === VOID ? 32 : capacity;
902
- return $super === VOID ? this.d1i(other, capacity) : $super.d1i.call(this, other, capacity);
874
+ return $super === VOID ? this.z1k(other, capacity) : $super.z1k.call(this, other, capacity);
903
875
  };
904
- defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).c1i);
905
- var Companion_instance_0;
906
- function Companion_getInstance_3() {
907
- if (Companion_instance_0 == null)
876
+ var Companion_instance_1;
877
+ function Companion_getInstance_2() {
878
+ if (Companion_instance_1 == null)
908
879
  new Companion_0();
909
- return Companion_instance_0;
880
+ return Companion_instance_1;
910
881
  }
911
882
  function Unificator() {
912
883
  }
913
884
  function default$factory() {
914
885
  return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
915
- return receiver.c1i();
886
+ return receiver.y1k();
916
887
  }, null);
917
888
  }
918
889
  //region block: post-declaration
@@ -928,27 +899,23 @@
928
899
  protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
929
900
  protoOf(CachedUnificator).unify = unify;
930
901
  protoOf(CachedUnificator).merge = merge;
931
- protoOf(Equation).to = castTo;
932
- protoOf(Identity).to = castTo;
933
- protoOf(Assignment).to = castTo;
934
- protoOf(Comparison).to = castTo;
935
- protoOf(Contradiction).to = 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;
902
+ protoOf(Equation).tp = castTo;
903
+ defineProp(protoOf(Equation), 'lhs', function () {
904
+ return this.i1j();
905
+ });
906
+ defineProp(protoOf(Equation), 'rhs', function () {
907
+ return this.j1j();
908
+ });
909
+ defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).y1k);
910
+ //endregion
911
+ //region block: init
912
+ Companion_instance_0 = new Companion();
948
913
  //endregion
949
914
  //region block: exports
950
915
  _.$_$ = _.$_$ || {};
951
- _.$_$.a = Companion_getInstance_3;
916
+ _.$_$.a = mguWithOccurCheck;
917
+ _.$_$.b = Companion_getInstance_2;
918
+ _.$_$.c = Unificator;
952
919
  //endregion
953
920
  return _;
954
921
  }));