@tuprolog/arg2p 0.10.2 → 0.11.2

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,78 +1,79 @@
1
- (function (root, factory) {
1
+ (function (factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
3
  define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-utils.js'], factory);
4
4
  else if (typeof exports === 'object')
5
5
  factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-utils.js'));
6
6
  else {
7
- if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
7
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
8
8
  throw new Error("Error loading module '2p-unify'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-unify'.");
9
9
  }
10
- if (typeof this['2p-core'] === 'undefined') {
10
+ if (typeof globalThis['2p-core'] === 'undefined') {
11
11
  throw new Error("Error loading module '2p-unify'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-unify'.");
12
12
  }
13
- if (typeof this['2p-utils'] === 'undefined') {
13
+ if (typeof globalThis['2p-utils'] === 'undefined') {
14
14
  throw new Error("Error loading module '2p-unify'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-unify'.");
15
15
  }
16
- root['2p-unify'] = factory(typeof this['2p-unify'] === 'undefined' ? {} : this['2p-unify'], this['kotlin-kotlin-stdlib'], this['2p-core'], this['2p-utils']);
16
+ globalThis['2p-unify'] = factory(typeof globalThis['2p-unify'] === 'undefined' ? {} : globalThis['2p-unify'], globalThis['kotlin-kotlin-stdlib'], globalThis['2p-core'], globalThis['2p-utils']);
17
17
  }
18
- }(this, function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
18
+ }(function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
19
19
  'use strict';
20
20
  //region block: imports
21
21
  var imul = Math.imul;
22
- var asSequence = kotlin_kotlin.$_$.g2;
23
- var plus = kotlin_kotlin.$_$.z7;
24
- var map = kotlin_kotlin.$_$.v7;
25
- var Unit_instance = kotlin_kotlin.$_$.s1;
22
+ var KProperty1 = kotlin_kotlin.$_$.g7;
23
+ var getPropertyCallableRef = kotlin_kotlin.$_$.u5;
24
+ var asSequence = kotlin_kotlin.$_$.y1;
25
+ var plus = kotlin_kotlin.$_$.j8;
26
+ var map = kotlin_kotlin.$_$.f8;
27
+ var Unit_instance = kotlin_kotlin.$_$.k1;
26
28
  var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.v;
27
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
28
- var toCollection = kotlin_kotlin.$_$.h8;
29
- var Pair = kotlin_kotlin.$_$.w9;
30
- var VOID = kotlin_kotlin.$_$.d;
31
- var lazy = kotlin_kotlin.$_$.ea;
32
- var protoOf = kotlin_kotlin.$_$.b6;
33
- var asSequence_0 = kotlin_kotlin.$_$.h2;
34
- var classMeta = kotlin_kotlin.$_$.f5;
35
- var setMetadataFor = kotlin_kotlin.$_$.c6;
36
- var KProperty1 = kotlin_kotlin.$_$.w6;
37
- var getPropertyCallableRef = kotlin_kotlin.$_$.l5;
29
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
30
+ var toCollection = kotlin_kotlin.$_$.s8;
31
+ var Pair = kotlin_kotlin.$_$.ja;
32
+ var VOID = kotlin_kotlin.$_$.b;
33
+ var lazy = kotlin_kotlin.$_$.ra;
34
+ var protoOf = kotlin_kotlin.$_$.m6;
35
+ var asSequence_0 = kotlin_kotlin.$_$.z1;
36
+ var THROW_CCE = kotlin_kotlin.$_$.la;
37
+ var initMetadataForClass = kotlin_kotlin.$_$.x5;
38
38
  var Companion_instance = kotlin_it_unibo_tuprolog_utils.$_$.a;
39
- var Triple = kotlin_kotlin.$_$.aa;
40
- var Some = kotlin_it_unibo_tuprolog_utils.$_$.j;
41
- var zip = kotlin_kotlin.$_$.o8;
42
- var flatMap = kotlin_kotlin.$_$.m7;
43
- var sequenceOf = kotlin_kotlin.$_$.b8;
44
- var THROW_CCE = kotlin_kotlin.$_$.y9;
45
- var to = kotlin_kotlin.$_$.la;
46
- var objectMeta = kotlin_kotlin.$_$.a6;
47
- var getKClass = kotlin_kotlin.$_$.c;
48
- var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.q;
39
+ var Triple = kotlin_kotlin.$_$.na;
40
+ var Some = kotlin_it_unibo_tuprolog_utils.$_$.l;
41
+ var zip = kotlin_kotlin.$_$.z8;
42
+ var flatMap = kotlin_kotlin.$_$.w7;
43
+ var sequenceOf = kotlin_kotlin.$_$.m8;
44
+ var to = kotlin_kotlin.$_$.ya;
45
+ var sequenceOf_0 = kotlin_kotlin.$_$.l8;
46
+ var initMetadataForCompanion = kotlin_kotlin.$_$.y5;
47
+ var toString = kotlin_kotlin.$_$.p6;
48
+ var getKClass = kotlin_kotlin.$_$.e7;
49
+ var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o;
49
50
  var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.u;
50
51
  var castTo = kotlin_it_unibo_tuprolog_utils.$_$.e;
51
- var defineProp = kotlin_kotlin.$_$.h5;
52
+ var defineProp = kotlin_kotlin.$_$.q5;
52
53
  var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.u1;
53
54
  var Castable = kotlin_it_unibo_tuprolog_utils.$_$.f;
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.$_$.o5;
55
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.b2;
56
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.c;
57
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.q;
58
+ var initMetadataForInterface = kotlin_kotlin.$_$.z5;
58
59
  //endregion
59
60
  //region block: pre-declaration
60
61
  function mguWithOccurCheck(term1, term2, occurCheckEnabled, $super) {
61
62
  occurCheckEnabled = occurCheckEnabled === VOID ? true : occurCheckEnabled;
62
- return $super === VOID ? this.a1k(term1, term2, occurCheckEnabled) : $super.a1k.call(this, term1, term2, occurCheckEnabled);
63
+ return $super === VOID ? this.u1h(term1, term2, occurCheckEnabled) : $super.u1h.call(this, term1, term2, occurCheckEnabled);
63
64
  }
64
65
  function mgu(term1, term2) {
65
- return this.a1k(term1, term2, true);
66
+ return this.u1h(term1, term2, true);
66
67
  }
67
68
  function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
68
- return !(this.a1k(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
69
+ return !(this.u1h(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
69
70
  }
70
71
  function match(term1, term2) {
71
72
  return this.matchWithOccurCheck(term1, term2, true);
72
73
  }
73
74
  function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
74
- var substitution = this.a1k(term1, term2, occurCheckEnabled);
75
- return substitution.k11() ? null : term1.getSubstituted(substitution, []);
75
+ var substitution = this.u1h(term1, term2, occurCheckEnabled);
76
+ return substitution.m10() ? null : term1.getSubstituted(substitution, []);
76
77
  }
77
78
  function unify(term1, term2) {
78
79
  return this.unifyWithOccurCheck(term1, term2, true);
@@ -80,37 +81,38 @@
80
81
  function merge(substitution1, substitution2) {
81
82
  return this.mergeWithOccurCheck(substitution1, substitution2, true);
82
83
  }
83
- setMetadataFor(Unificator, 'Unificator', interfaceMeta);
84
- setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, VOID, [Unificator]);
85
- setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, VOID, [Unificator]);
86
- setMetadataFor(Equation, 'Equation', classMeta, VOID, [TermConvertible, Castable]);
87
- setMetadataFor(Identity, 'Identity', classMeta, Equation);
88
- setMetadataFor(Assignment, 'Assignment', classMeta, Equation);
89
- setMetadataFor(Comparison, 'Comparison', classMeta, Equation);
90
- setMetadataFor(Contradiction, 'Contradiction', classMeta, Equation);
91
- setMetadataFor(Companion, 'Companion', objectMeta);
92
- setMetadataFor(Unificator$Companion$naive$1, VOID, classMeta, AbstractUnificator);
93
- setMetadataFor(Unificator$Companion$strict$1, VOID, classMeta, AbstractUnificator);
94
- setMetadataFor(Companion_0, 'Companion', objectMeta);
84
+ initMetadataForInterface(Unificator, 'Unificator');
85
+ initMetadataForClass(AbstractUnificator, 'AbstractUnificator', VOID, VOID, [Unificator]);
86
+ initMetadataForClass(CachedUnificator, 'CachedUnificator', VOID, VOID, [Unificator]);
87
+ initMetadataForClass(Equation, 'Equation', VOID, VOID, [TermConvertible, Castable]);
88
+ initMetadataForClass(Identity, 'Identity', VOID, Equation);
89
+ initMetadataForClass(Assignment, 'Assignment', VOID, Equation);
90
+ initMetadataForClass(Comparison, 'Comparison', VOID, Equation);
91
+ initMetadataForClass(Contradiction, 'Contradiction', VOID, Equation);
92
+ initMetadataForCompanion(Companion);
93
+ initMetadataForClass(Unificator$Companion$naive$1, VOID, VOID, AbstractUnificator);
94
+ initMetadataForClass(Unificator$Companion$strict$1, VOID, VOID, AbstractUnificator);
95
+ initMetadataForCompanion(Companion_0);
95
96
  //endregion
96
97
  function _get_contextEquations__x0dd77($this) {
98
+ var tmp0 = $this.d1h_1;
99
+ var tmp = KProperty1;
97
100
  // Inline function 'kotlin.getValue' call
98
- var this_0 = $this.j1j_1;
99
- contextEquations$factory();
100
- return this_0.r2();
101
+ getPropertyCallableRef('contextEquations', 1, tmp, AbstractUnificator$_get_contextEquations_$ref_7ajcte(), null);
102
+ return tmp0.e2();
101
103
  }
102
104
  function occurrenceCheck($this, variable, term) {
103
105
  var tmp;
104
- if (term.bw()) {
105
- tmp = $this.k1j(variable, term);
106
- } else if (term.lv()) {
106
+ if (term.dv()) {
107
+ tmp = $this.e1h(variable, term);
108
+ } else if (term.nu()) {
109
+ var tmp0 = term.ju();
107
110
  var tmp$ret$1;
108
111
  $l$block: {
109
112
  // Inline function 'kotlin.sequences.any' call
110
- var tmp0_iterator = term.hv().r();
111
- while (tmp0_iterator.s()) {
112
- var element = tmp0_iterator.u();
113
- // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.occurrenceCheck.<anonymous>' call
113
+ var _iterator__ex2g4s = tmp0.p();
114
+ while (_iterator__ex2g4s.s()) {
115
+ var element = _iterator__ex2g4s.t();
114
116
  if (occurrenceCheck($this, variable, element)) {
115
117
  tmp$ret$1 = true;
116
118
  break $l$block;
@@ -126,7 +128,7 @@
126
128
  }
127
129
  function equationsFor($this, term1, term2) {
128
130
  var tmp = Companion_instance_0;
129
- return tmp.l1j(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
131
+ return tmp.f1h(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
130
132
  }
131
133
  function equationsFor_0($this, substitution1, substitution2) {
132
134
  var tmp = Companion_instance_0;
@@ -144,7 +146,7 @@
144
146
  }
145
147
  while (inductionVariable < exceptIndex);
146
148
  var inductionVariable_0 = exceptIndex + 1 | 0;
147
- var last = equations.l();
149
+ var last = equations.v();
148
150
  if (inductionVariable_0 < last)
149
151
  do {
150
152
  var i_0 = inductionVariable_0;
@@ -158,32 +160,32 @@
158
160
  var changed = true;
159
161
  while (changed) {
160
162
  changed = false;
161
- var eqIterator = equations.z1();
163
+ var eqIterator = equations.b4();
162
164
  while (eqIterator.s()) {
163
- var eq = eqIterator.u();
164
- if (eq.q1j()) {
165
+ var eq = eqIterator.t();
166
+ if (eq.k1h()) {
165
167
  return Companion_getInstance().failed();
166
- } else if (eq.r1j()) {
167
- eqIterator.t();
168
+ } else if (eq.l1h()) {
169
+ eqIterator.c3();
168
170
  changed = true;
169
- } else if (eq.y1j()) {
170
- var assignment = eq.t1j();
171
- if (occurCheckEnabled ? occurrenceCheck($this, assignment.w1j_1, eq.p1j()) : false) {
171
+ } else if (eq.s1h()) {
172
+ var assignment = eq.n1h();
173
+ if (occurCheckEnabled && occurrenceCheck($this, assignment.q1h_1, eq.j1h())) {
172
174
  return Companion_getInstance().failed();
173
175
  } else {
174
- changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.o1());
176
+ changed = changed || applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.r3());
175
177
  }
176
- } else if (eq.s1j()) {
177
- eqIterator.t();
178
- var tmp0_iterator = equationsFor($this, eq.o1j(), eq.p1j()).r();
179
- insertion: while (tmp0_iterator.s()) {
180
- var it = tmp0_iterator.u();
181
- if (it.r1j())
178
+ } else if (eq.m1h()) {
179
+ eqIterator.c3();
180
+ var _iterator__ex2g4s = equationsFor($this, eq.i1h(), eq.j1h()).p();
181
+ insertion: while (_iterator__ex2g4s.s()) {
182
+ var it = _iterator__ex2g4s.t();
183
+ if (it.l1h())
182
184
  continue insertion;
183
- else if (it.q1j())
185
+ else if (it.k1h())
184
186
  return Companion_getInstance().failed();
185
187
  else {
186
- eqIterator.r1(it);
188
+ eqIterator.u3(it);
187
189
  }
188
190
  }
189
191
  changed = true;
@@ -193,12 +195,11 @@
193
195
  // Inline function 'kotlin.collections.filter' call
194
196
  // Inline function 'kotlin.collections.filterTo' call
195
197
  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();
199
- // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
200
- if (element.y1j()) {
201
- destination.o(element);
198
+ var _iterator__ex2g4s_0 = equations.p();
199
+ while (_iterator__ex2g4s_0.s()) {
200
+ var element = _iterator__ex2g4s_0.t();
201
+ if (element.s1h()) {
202
+ destination.m(element);
202
203
  }
203
204
  }
204
205
  return toSubstitution(destination);
@@ -209,62 +210,70 @@
209
210
  return toCollection(items, tmp$ret$0);
210
211
  }
211
212
  function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
212
- if ($equations.d1(i).q1j() ? true : $equations.d1(i).r1j())
213
+ if ($equations.w(i).k1h() || $equations.w(i).l1h())
213
214
  return Unit_instance;
214
- var currentEq = $equations.d1(i);
215
- var tmp0_container = currentEq.apply($substitution).toPair();
216
- var newLhs = tmp0_container.gd();
217
- var newRhs = tmp0_container.hd();
218
- if (!currentEq.o1j().equals(newLhs) ? true : !currentEq.p1j().equals(newRhs)) {
215
+ var currentEq = $equations.w(i);
216
+ var _destruct__k2r9zo = currentEq.apply($substitution).toPair();
217
+ var newLhs = _destruct__k2r9zo.zb();
218
+ var newRhs = _destruct__k2r9zo.ac();
219
+ if (!currentEq.i1h().equals(newLhs) || !currentEq.j1h().equals(newRhs)) {
219
220
  var tmp = Companion_instance_0;
220
- $equations.m(i, tmp.z1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
221
+ $equations.z2(i, tmp.t1h(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
221
222
  changed._v = true;
222
223
  }
223
224
  }
224
225
  function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
225
226
  return function () {
226
- return toEquations(this$0.mb());
227
+ return toEquations(this$0.h8());
227
228
  };
228
229
  }
229
- function AbstractUnificator$checkTermsEquality$ref($boundThis) {
230
- var l = function (p0, p1) {
231
- return $boundThis.k1j(p0, p1);
230
+ function AbstractUnificator$_get_contextEquations_$ref_7ajcte() {
231
+ return function (p0) {
232
+ return _get_contextEquations__x0dd77(p0);
233
+ };
234
+ }
235
+ function AbstractUnificator$checkTermsEquality$ref(p0) {
236
+ var l = function (_this__u8e3s4, p0_0) {
237
+ return p0.e1h(_this__u8e3s4, p0_0);
232
238
  };
233
239
  l.callableName = 'checkTermsEquality';
234
240
  return l;
235
241
  }
236
242
  function AbstractUnificator$equationsFor$lambda(it) {
237
243
  // Inline function 'kotlin.collections.toPair' call
238
- return new Pair(it.q2(), it.r2());
244
+ return new Pair(it.d2(), it.e2());
239
245
  }
240
- function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
241
- var l = function (p0, p1) {
242
- return $boundThis.k1j(p0, p1);
246
+ function AbstractUnificator$checkTermsEquality$ref_0(p0) {
247
+ var l = function (_this__u8e3s4, p0_0) {
248
+ return p0.e1h(_this__u8e3s4, p0_0);
243
249
  };
244
250
  l.callableName = 'checkTermsEquality';
245
251
  return l;
246
252
  }
247
253
  function AbstractUnificator(context) {
248
254
  context = context === VOID ? Companion_getInstance().empty() : context;
249
- this.i1j_1 = context;
255
+ this.c1h_1 = context;
250
256
  var tmp = this;
251
- tmp.j1j_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
257
+ tmp.d1h_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
252
258
  }
253
- protoOf(AbstractUnificator).mb = function () {
254
- return this.i1j_1;
259
+ protoOf(AbstractUnificator).h8 = function () {
260
+ return this.c1h_1;
255
261
  };
256
- protoOf(AbstractUnificator).a1k = function (term1, term2, occurCheckEnabled) {
257
- if (this.mb().k11())
262
+ protoOf(AbstractUnificator).u1h = function (term1, term2, occurCheckEnabled) {
263
+ if (this.h8().m10())
258
264
  return Companion_getInstance().failed();
259
265
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
260
266
  return mgu_0(this, equations, occurCheckEnabled);
261
267
  };
262
- protoOf(AbstractUnificator).b1k = function (substitution1, substitution2, occurCheckEnabled) {
263
- if ((this.mb().k11() ? true : substitution1.k11()) ? true : substitution2.k11())
268
+ protoOf(AbstractUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
269
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof AbstractUnificator) ? $super : THROW_CCE());
270
+ };
271
+ protoOf(AbstractUnificator).v1h = function (substitution1, substitution2, occurCheckEnabled) {
272
+ if (this.h8().m10() || substitution1.m10() || substitution2.m10())
264
273
  return Companion_getInstance().failed();
265
274
  if (!occurCheckEnabled) {
266
- var quickMerge = this.mb().plus(substitution1).plus(substitution2);
267
- if (quickMerge.j11()) {
275
+ var quickMerge = this.h8().plus(substitution1).plus(substitution2);
276
+ if (quickMerge.l10()) {
268
277
  return quickMerge;
269
278
  }
270
279
  }
@@ -272,45 +281,43 @@
272
281
  return mgu_0(this, equations, occurCheckEnabled);
273
282
  };
274
283
  protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
275
- return this.b1k(substitution1, substitution2, occurCheckEnabled);
284
+ return this.v1h(substitution1, substitution2, occurCheckEnabled);
276
285
  };
277
- function contextEquations$factory() {
278
- return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
279
- return _get_contextEquations__x0dd77(receiver);
280
- }, null);
281
- }
282
286
  function CachedUnificator(decorated, cacheCapacity) {
283
- this.c1k_1 = decorated;
284
- this.d1k_1 = Companion_instance.pp(cacheCapacity);
287
+ this.w1h_1 = decorated;
288
+ this.x1h_1 = Companion_instance.wo(cacheCapacity);
285
289
  }
286
- protoOf(CachedUnificator).a1k = function (term1, term2, occurCheckEnabled) {
290
+ protoOf(CachedUnificator).u1h = function (term1, term2, occurCheckEnabled) {
287
291
  var mguRequest = new Triple(term1, term2, occurCheckEnabled);
288
- var cached = this.d1k_1.x2(mguRequest);
292
+ var cached = this.x1h_1.h2(mguRequest);
289
293
  var tmp;
290
294
  if (cached instanceof Some) {
291
- tmp = cached.sp_1;
295
+ tmp = cached.zo_1;
292
296
  } else {
293
- var mguResult = this.c1k_1.a1k(term1, term2, occurCheckEnabled);
294
- this.d1k_1.qp(mguRequest, mguResult);
297
+ var mguResult = this.w1h_1.u1h(term1, term2, occurCheckEnabled);
298
+ this.x1h_1.xo(mguRequest, mguResult);
295
299
  tmp = mguResult;
296
300
  }
297
301
  return tmp;
298
302
  };
299
- protoOf(CachedUnificator).b1k = function (substitution1, substitution2, occurCheckEnabled) {
303
+ protoOf(CachedUnificator).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
304
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof CachedUnificator) ? $super : THROW_CCE());
305
+ };
306
+ protoOf(CachedUnificator).v1h = function (substitution1, substitution2, occurCheckEnabled) {
300
307
  var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
301
- var cached = this.d1k_1.x2(mguRequest);
308
+ var cached = this.x1h_1.h2(mguRequest);
302
309
  var tmp;
303
310
  if (cached instanceof Some) {
304
- tmp = cached.sp_1;
311
+ tmp = cached.zo_1;
305
312
  } else {
306
- var mguResult = this.c1k_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
307
- this.d1k_1.qp(mguRequest, mguResult);
313
+ var mguResult = this.w1h_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
314
+ this.x1h_1.xo(mguRequest, mguResult);
308
315
  tmp = mguResult;
309
316
  }
310
317
  return tmp;
311
318
  };
312
319
  protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
313
- return this.b1k(substitution1, substitution2, occurCheckEnabled);
320
+ return this.v1h(substitution1, substitution2, occurCheckEnabled);
314
321
  };
315
322
  function allOfLists($this, lhs, rhs, equalityChecker) {
316
323
  var tmp = zip(lhs.unfold(), rhs.unfold());
@@ -343,7 +350,7 @@
343
350
  }
344
351
  function Equation$Companion$from$lambda($equalityChecker) {
345
352
  return function (it) {
346
- return Companion_instance_0.e1k(it, $equalityChecker);
353
+ return Companion_instance_0.y1h(it, $equalityChecker);
347
354
  };
348
355
  }
349
356
  function Term$equals$ref_2() {
@@ -368,17 +375,17 @@
368
375
  return l;
369
376
  }
370
377
  function Equation$Companion$allOfLists$lambda($equalityChecker) {
371
- return function (_name_for_destructuring_parameter_0__wldtmu) {
372
- var l = _name_for_destructuring_parameter_0__wldtmu.gd();
373
- var r = _name_for_destructuring_parameter_0__wldtmu.hd();
374
- return (l.sv() ? r.sv() : false) ? sequenceOf([Companion_instance_0.z1j(l.castToCons().lx(), r.castToCons().lx(), $equalityChecker)]) : (l.rv() ? r.rv() : false) ? sequenceOf([Companion_instance_0.z1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_instance_0.l1j(l, r, $equalityChecker);
378
+ return function (_destruct__k2r9zo) {
379
+ var l = _destruct__k2r9zo.zb();
380
+ var r = _destruct__k2r9zo.ac();
381
+ return l.uu() && r.uu() ? sequenceOf(Companion_instance_0.t1h(l.castToCons().nw(), r.castToCons().nw(), $equalityChecker)) : l.tu() && r.tu() ? sequenceOf(Companion_instance_0.t1h(l.castToList(), r.castToList(), $equalityChecker)) : Companion_instance_0.f1h(l, r, $equalityChecker);
375
382
  };
376
383
  }
377
384
  function Equation$Companion$allOfTuples$lambda($equalityChecker) {
378
- return function (_name_for_destructuring_parameter_0__wldtmu) {
379
- var l = _name_for_destructuring_parameter_0__wldtmu.gd();
380
- var r = _name_for_destructuring_parameter_0__wldtmu.hd();
381
- return (l.qv() ? r.qv() : false) ? sequenceOf([Companion_instance_0.z1j(l.castToTuple().zw(), r.castToTuple().zw(), $equalityChecker)]) : Companion_instance_0.l1j(l, r, $equalityChecker);
385
+ return function (_destruct__k2r9zo) {
386
+ var l = _destruct__k2r9zo.zb();
387
+ var r = _destruct__k2r9zo.ac();
388
+ return l.su() && r.su() ? sequenceOf(Companion_instance_0.t1h(l.castToTuple().bw(), r.castToTuple().bw(), $equalityChecker)) : Companion_instance_0.f1h(l, r, $equalityChecker);
382
389
  };
383
390
  }
384
391
  function Term$equals$ref_5() {
@@ -390,29 +397,29 @@
390
397
  }
391
398
  function Equation$Companion$allOf$lambda($equalityChecker) {
392
399
  return function (it) {
393
- return Companion_instance_0.e1k(it, $equalityChecker);
400
+ return Companion_instance_0.y1h(it, $equalityChecker);
394
401
  };
395
402
  }
396
403
  function Identity(lhs, rhs) {
397
404
  Equation.call(this, lhs, rhs);
398
- this.h1k_1 = lhs;
399
- this.i1k_1 = rhs;
405
+ this.b1i_1 = lhs;
406
+ this.c1i_1 = rhs;
400
407
  }
401
- protoOf(Identity).o1j = function () {
402
- return this.h1k_1;
408
+ protoOf(Identity).i1h = function () {
409
+ return this.b1i_1;
403
410
  };
404
- protoOf(Identity).p1j = function () {
405
- return this.i1k_1;
411
+ protoOf(Identity).j1h = function () {
412
+ return this.c1i_1;
406
413
  };
407
- protoOf(Identity).r1j = function () {
414
+ protoOf(Identity).l1h = function () {
408
415
  return true;
409
416
  };
410
417
  protoOf(Identity).toString = function () {
411
- return 'Identity(lhs=' + this.h1k_1 + ', rhs=' + this.i1k_1 + ')';
418
+ return 'Identity(lhs=' + this.b1i_1.toString() + ', rhs=' + this.c1i_1.toString() + ')';
412
419
  };
413
420
  protoOf(Identity).hashCode = function () {
414
- var result = this.h1k_1.hashCode();
415
- result = imul(result, 31) + this.i1k_1.hashCode() | 0;
421
+ var result = this.b1i_1.hashCode();
422
+ result = imul(result, 31) + this.c1i_1.hashCode() | 0;
416
423
  return result;
417
424
  };
418
425
  protoOf(Identity).equals = function (other) {
@@ -420,45 +427,44 @@
420
427
  return true;
421
428
  if (!(other instanceof Identity))
422
429
  return false;
423
- var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
424
- if (!this.h1k_1.equals(tmp0_other_with_cast.h1k_1))
430
+ if (!this.b1i_1.equals(other.b1i_1))
425
431
  return false;
426
- if (!this.i1k_1.equals(tmp0_other_with_cast.i1k_1))
432
+ if (!this.c1i_1.equals(other.c1i_1))
427
433
  return false;
428
434
  return true;
429
435
  };
430
436
  function Assignment(lhs, rhs) {
431
437
  Equation.call(this, lhs, rhs);
432
- this.w1j_1 = lhs;
433
- this.x1j_1 = rhs;
438
+ this.q1h_1 = lhs;
439
+ this.r1h_1 = rhs;
434
440
  }
435
- protoOf(Assignment).o1j = function () {
436
- return this.w1j_1;
441
+ protoOf(Assignment).i1h = function () {
442
+ return this.q1h_1;
437
443
  };
438
- protoOf(Assignment).p1j = function () {
439
- return this.x1j_1;
444
+ protoOf(Assignment).j1h = function () {
445
+ return this.r1h_1;
440
446
  };
441
447
  protoOf(Assignment).toSubstitution = function () {
442
- return Companion_getInstance().unifier(this.w1j_1, this.x1j_1);
448
+ return Companion_getInstance().unifier(this.q1h_1, this.r1h_1);
443
449
  };
444
- protoOf(Assignment).l1k = function () {
445
- return to(this.w1j_1, this.x1j_1);
450
+ protoOf(Assignment).f1i = function () {
451
+ return to(this.q1h_1, this.r1h_1);
446
452
  };
447
453
  protoOf(Assignment).toPair = function () {
448
- return this.l1k();
454
+ return this.f1i();
449
455
  };
450
- protoOf(Assignment).y1j = function () {
456
+ protoOf(Assignment).s1h = function () {
451
457
  return true;
452
458
  };
453
- protoOf(Assignment).j1k = function () {
459
+ protoOf(Assignment).d1i = function () {
454
460
  return this;
455
461
  };
456
462
  protoOf(Assignment).toString = function () {
457
- return 'Assignment(lhs=' + this.w1j_1 + ', rhs=' + this.x1j_1 + ')';
463
+ return 'Assignment(lhs=' + this.q1h_1.toString() + ', rhs=' + this.r1h_1.toString() + ')';
458
464
  };
459
465
  protoOf(Assignment).hashCode = function () {
460
- var result = this.w1j_1.hashCode();
461
- result = imul(result, 31) + this.x1j_1.hashCode() | 0;
466
+ var result = this.q1h_1.hashCode();
467
+ result = imul(result, 31) + this.r1h_1.hashCode() | 0;
462
468
  return result;
463
469
  };
464
470
  protoOf(Assignment).equals = function (other) {
@@ -466,33 +472,32 @@
466
472
  return true;
467
473
  if (!(other instanceof Assignment))
468
474
  return false;
469
- var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
470
- if (!this.w1j_1.equals(tmp0_other_with_cast.w1j_1))
475
+ if (!this.q1h_1.equals(other.q1h_1))
471
476
  return false;
472
- if (!this.x1j_1.equals(tmp0_other_with_cast.x1j_1))
477
+ if (!this.r1h_1.equals(other.r1h_1))
473
478
  return false;
474
479
  return true;
475
480
  };
476
481
  function Comparison(lhs, rhs) {
477
482
  Equation.call(this, lhs, rhs);
478
- this.o1k_1 = lhs;
479
- this.p1k_1 = rhs;
483
+ this.i1i_1 = lhs;
484
+ this.j1i_1 = rhs;
480
485
  }
481
- protoOf(Comparison).o1j = function () {
482
- return this.o1k_1;
486
+ protoOf(Comparison).i1h = function () {
487
+ return this.i1i_1;
483
488
  };
484
- protoOf(Comparison).p1j = function () {
485
- return this.p1k_1;
489
+ protoOf(Comparison).j1h = function () {
490
+ return this.j1i_1;
486
491
  };
487
- protoOf(Comparison).s1j = function () {
492
+ protoOf(Comparison).m1h = function () {
488
493
  return true;
489
494
  };
490
495
  protoOf(Comparison).toString = function () {
491
- return 'Comparison(lhs=' + this.o1k_1 + ', rhs=' + this.p1k_1 + ')';
496
+ return 'Comparison(lhs=' + this.i1i_1.toString() + ', rhs=' + this.j1i_1.toString() + ')';
492
497
  };
493
498
  protoOf(Comparison).hashCode = function () {
494
- var result = this.o1k_1.hashCode();
495
- result = imul(result, 31) + this.p1k_1.hashCode() | 0;
499
+ var result = this.i1i_1.hashCode();
500
+ result = imul(result, 31) + this.j1i_1.hashCode() | 0;
496
501
  return result;
497
502
  };
498
503
  protoOf(Comparison).equals = function (other) {
@@ -500,33 +505,32 @@
500
505
  return true;
501
506
  if (!(other instanceof Comparison))
502
507
  return false;
503
- var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
504
- if (!this.o1k_1.equals(tmp0_other_with_cast.o1k_1))
508
+ if (!this.i1i_1.equals(other.i1i_1))
505
509
  return false;
506
- if (!this.p1k_1.equals(tmp0_other_with_cast.p1k_1))
510
+ if (!this.j1i_1.equals(other.j1i_1))
507
511
  return false;
508
512
  return true;
509
513
  };
510
514
  function Contradiction(lhs, rhs) {
511
515
  Equation.call(this, lhs, rhs);
512
- this.s1k_1 = lhs;
513
- this.t1k_1 = rhs;
516
+ this.m1i_1 = lhs;
517
+ this.n1i_1 = rhs;
514
518
  }
515
- protoOf(Contradiction).o1j = function () {
516
- return this.s1k_1;
519
+ protoOf(Contradiction).i1h = function () {
520
+ return this.m1i_1;
517
521
  };
518
- protoOf(Contradiction).p1j = function () {
519
- return this.t1k_1;
522
+ protoOf(Contradiction).j1h = function () {
523
+ return this.n1i_1;
520
524
  };
521
- protoOf(Contradiction).q1j = function () {
525
+ protoOf(Contradiction).k1h = function () {
522
526
  return true;
523
527
  };
524
528
  protoOf(Contradiction).toString = function () {
525
- return 'Contradiction(lhs=' + this.s1k_1 + ', rhs=' + this.t1k_1 + ')';
529
+ return 'Contradiction(lhs=' + this.m1i_1.toString() + ', rhs=' + this.n1i_1.toString() + ')';
526
530
  };
527
531
  protoOf(Contradiction).hashCode = function () {
528
- var result = this.s1k_1.hashCode();
529
- result = imul(result, 31) + this.t1k_1.hashCode() | 0;
532
+ var result = this.m1i_1.hashCode();
533
+ result = imul(result, 31) + this.n1i_1.hashCode() | 0;
530
534
  return result;
531
535
  };
532
536
  protoOf(Contradiction).equals = function (other) {
@@ -534,18 +538,17 @@
534
538
  return true;
535
539
  if (!(other instanceof Contradiction))
536
540
  return false;
537
- var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
538
- if (!this.s1k_1.equals(tmp0_other_with_cast.s1k_1))
541
+ if (!this.m1i_1.equals(other.m1i_1))
539
542
  return false;
540
- if (!this.t1k_1.equals(tmp0_other_with_cast.t1k_1))
543
+ if (!this.n1i_1.equals(other.n1i_1))
541
544
  return false;
542
545
  return true;
543
546
  };
544
547
  function Companion() {
545
548
  }
546
- protoOf(Companion).z1j = function (lhs, rhs, equalityChecker) {
549
+ protoOf(Companion).t1h = function (lhs, rhs, equalityChecker) {
547
550
  var tmp;
548
- if (lhs.bw() ? rhs.bw() : false) {
551
+ if (lhs.dv() && rhs.dv()) {
549
552
  var tmp_0;
550
553
  if (equalityChecker(lhs, rhs)) {
551
554
  tmp_0 = new Identity(lhs, rhs);
@@ -553,11 +556,11 @@
553
556
  tmp_0 = new Assignment(lhs.castToVar(), rhs);
554
557
  }
555
558
  tmp = tmp_0;
556
- } else if (lhs.bw()) {
559
+ } else if (lhs.dv()) {
557
560
  tmp = new Assignment(lhs.castToVar(), rhs);
558
- } else if (rhs.bw()) {
561
+ } else if (rhs.dv()) {
559
562
  tmp = new Assignment(rhs.castToVar(), lhs);
560
- } else if (lhs.ew() ? rhs.ew() : false) {
563
+ } else if (lhs.gv() && rhs.gv()) {
561
564
  var tmp_1;
562
565
  if (equalityChecker(lhs, rhs)) {
563
566
  tmp_1 = new Identity(lhs, rhs);
@@ -565,13 +568,13 @@
565
568
  tmp_1 = new Contradiction(lhs, rhs);
566
569
  }
567
570
  tmp = tmp_1;
568
- } else if (lhs.ew() ? true : rhs.ew()) {
571
+ } else if (lhs.gv() || rhs.gv()) {
569
572
  tmp = new Contradiction(lhs, rhs);
570
- } else if (lhs.lv() ? rhs.lv() : false) {
573
+ } else if (lhs.nu() && rhs.nu()) {
571
574
  var lhsStruct = lhs.castToStruct();
572
575
  var rhsStruct = rhs.castToStruct();
573
576
  var tmp_2;
574
- if (!(lhsStruct.zu() === rhsStruct.zu()) ? true : !(lhsStruct.fv() === rhsStruct.fv())) {
577
+ if (!(lhsStruct.bu() === rhsStruct.bu()) || !(lhsStruct.hu() === rhsStruct.hu())) {
575
578
  tmp_2 = new Contradiction(lhsStruct, rhsStruct);
576
579
  } else {
577
580
  tmp_2 = new Comparison(lhsStruct, rhsStruct);
@@ -590,10 +593,10 @@
590
593
  tmp = equalityChecker;
591
594
  }
592
595
  equalityChecker = tmp;
593
- return $super === VOID ? this.z1j(lhs, rhs, equalityChecker) : $super.z1j.call(this, lhs, rhs, equalityChecker);
596
+ return $super === VOID ? this.t1h(lhs, rhs, equalityChecker) : $super.t1h.call(this, lhs, rhs, equalityChecker);
594
597
  };
595
- protoOf(Companion).u1k = function (pair, equalityChecker) {
596
- return this.z1j(pair.qd_1, pair.rd_1, equalityChecker);
598
+ protoOf(Companion).o1i = function (pair, equalityChecker) {
599
+ return this.t1h(pair.fc_1, pair.gc_1, equalityChecker);
597
600
  };
598
601
  protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
599
602
  var tmp;
@@ -603,9 +606,9 @@
603
606
  tmp = equalityChecker;
604
607
  }
605
608
  equalityChecker = tmp;
606
- return $super === VOID ? this.u1k(pair, equalityChecker) : $super.u1k.call(this, pair, equalityChecker);
609
+ return $super === VOID ? this.o1i(pair, equalityChecker) : $super.o1i.call(this, pair, equalityChecker);
607
610
  };
608
- protoOf(Companion).v1k = function (pairs, equalityChecker) {
611
+ protoOf(Companion).p1i = function (pairs, equalityChecker) {
609
612
  return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
610
613
  };
611
614
  protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
@@ -616,10 +619,10 @@
616
619
  tmp = equalityChecker;
617
620
  }
618
621
  equalityChecker = tmp;
619
- return $super === VOID ? this.v1k(pairs, equalityChecker) : $super.v1k.call(this, pairs, equalityChecker);
622
+ return $super === VOID ? this.p1i(pairs, equalityChecker) : $super.p1i.call(this, pairs, equalityChecker);
620
623
  };
621
- protoOf(Companion).w1k = function (pairs, equalityChecker) {
622
- return this.v1k(asSequence_0(pairs), equalityChecker);
624
+ protoOf(Companion).q1i = function (pairs, equalityChecker) {
625
+ return this.p1i(asSequence_0(pairs), equalityChecker);
623
626
  };
624
627
  protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
625
628
  var tmp;
@@ -629,10 +632,10 @@
629
632
  tmp = equalityChecker;
630
633
  }
631
634
  equalityChecker = tmp;
632
- return $super === VOID ? this.w1k(pairs, equalityChecker) : $super.w1k.call(this, pairs, equalityChecker);
635
+ return $super === VOID ? this.q1i(pairs, equalityChecker) : $super.q1i.call(this, pairs, equalityChecker);
633
636
  };
634
- protoOf(Companion).x1k = function (pairs, equalityChecker) {
635
- return this.v1k(sequenceOf(pairs.slice()), equalityChecker);
637
+ protoOf(Companion).r1i = function (pairs, equalityChecker) {
638
+ return this.p1i(sequenceOf_0(pairs.slice()), equalityChecker);
636
639
  };
637
640
  protoOf(Companion).from = function (pairs, equalityChecker, $super) {
638
641
  var tmp;
@@ -642,10 +645,10 @@
642
645
  tmp = equalityChecker;
643
646
  }
644
647
  equalityChecker = tmp;
645
- return $super === VOID ? this.x1k(pairs, equalityChecker) : $super.x1k.call(this, pairs, equalityChecker);
648
+ return $super === VOID ? this.r1i(pairs, equalityChecker) : $super.r1i.call(this, pairs, equalityChecker);
646
649
  };
647
- protoOf(Companion).e1k = function (pair, equalityChecker) {
648
- return this.l1j(pair.qd_1, pair.rd_1, equalityChecker);
650
+ protoOf(Companion).y1h = function (pair, equalityChecker) {
651
+ return this.f1h(pair.fc_1, pair.gc_1, equalityChecker);
649
652
  };
650
653
  protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
651
654
  var tmp;
@@ -655,29 +658,29 @@
655
658
  tmp = equalityChecker;
656
659
  }
657
660
  equalityChecker = tmp;
658
- return $super === VOID ? this.e1k(pair, equalityChecker) : $super.e1k.call(this, pair, equalityChecker);
661
+ return $super === VOID ? this.y1h(pair, equalityChecker) : $super.y1h.call(this, pair, equalityChecker);
659
662
  };
660
- protoOf(Companion).l1j = function (lhs, rhs, equalityChecker) {
663
+ protoOf(Companion).f1h = function (lhs, rhs, equalityChecker) {
661
664
  var tmp;
662
- if (lhs.av() ? rhs.av() : false) {
663
- tmp = sequenceOf([this.z1j(lhs, rhs, equalityChecker)]);
664
- } else if (lhs.rv() ? rhs.rv() : false) {
665
+ if (lhs.cu() && rhs.cu()) {
666
+ tmp = sequenceOf(this.t1h(lhs, rhs, equalityChecker));
667
+ } else if (lhs.tu() && rhs.tu()) {
665
668
  tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
666
- } else if (lhs.qv() ? rhs.qv() : false) {
669
+ } else if (lhs.su() && rhs.su()) {
667
670
  tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
668
- } else if (lhs.lv() ? rhs.lv() : false) {
671
+ } else if (lhs.nu() && rhs.nu()) {
669
672
  var lhsStruct = lhs.castToStruct();
670
673
  var rhsStruct = rhs.castToStruct();
671
674
  var tmp_0;
672
- if (lhsStruct.zu() === rhsStruct.zu() ? lhsStruct.fv() === rhsStruct.fv() : false) {
673
- var tmp_1 = zip(lhsStruct.yv(), rhsStruct.yv());
675
+ if (lhsStruct.bu() === rhsStruct.bu() && lhsStruct.hu() === rhsStruct.hu()) {
676
+ var tmp_1 = zip(lhsStruct.av(), rhsStruct.av());
674
677
  tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
675
678
  } else {
676
- tmp_0 = sequenceOf([this.z1j(lhs, rhs, equalityChecker)]);
679
+ tmp_0 = sequenceOf(this.t1h(lhs, rhs, equalityChecker));
677
680
  }
678
681
  tmp = tmp_0;
679
682
  } else {
680
- tmp = sequenceOf([this.z1j(lhs, rhs, equalityChecker)]);
683
+ tmp = sequenceOf(this.t1h(lhs, rhs, equalityChecker));
681
684
  }
682
685
  return tmp;
683
686
  };
@@ -689,7 +692,7 @@
689
692
  tmp = equalityChecker;
690
693
  }
691
694
  equalityChecker = tmp;
692
- return $super === VOID ? this.l1j(lhs, rhs, equalityChecker) : $super.l1j.call(this, lhs, rhs, equalityChecker);
695
+ return $super === VOID ? this.f1h(lhs, rhs, equalityChecker) : $super.f1h.call(this, lhs, rhs, equalityChecker);
693
696
  };
694
697
  var Companion_instance_0;
695
698
  function Companion_getInstance_1() {
@@ -703,54 +706,54 @@
703
706
  return l;
704
707
  }
705
708
  function Equation(lhs, rhs) {
706
- this.m1j_1 = lhs;
707
- this.n1j_1 = rhs;
709
+ this.g1h_1 = lhs;
710
+ this.h1h_1 = rhs;
708
711
  }
709
- protoOf(Equation).o1j = function () {
710
- return this.m1j_1;
712
+ protoOf(Equation).i1h = function () {
713
+ return this.g1h_1;
711
714
  };
712
- protoOf(Equation).p1j = function () {
713
- return this.n1j_1;
715
+ protoOf(Equation).j1h = function () {
716
+ return this.h1h_1;
714
717
  };
715
- protoOf(Equation).r1j = function () {
718
+ protoOf(Equation).l1h = function () {
716
719
  return false;
717
720
  };
718
- protoOf(Equation).y1j = function () {
721
+ protoOf(Equation).s1h = function () {
719
722
  return false;
720
723
  };
721
- protoOf(Equation).j1k = function () {
724
+ protoOf(Equation).d1i = function () {
722
725
  return null;
723
726
  };
724
- protoOf(Equation).t1j = function () {
725
- var tmp0_elvis_lhs = this.j1k();
727
+ protoOf(Equation).n1h = function () {
728
+ var tmp0_elvis_lhs = this.d1i();
726
729
  var tmp;
727
730
  if (tmp0_elvis_lhs == null) {
728
- throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).o6());
731
+ throw ClassCastException_init_$Create$('Cannot cast ' + toString(this) + ' to ' + getKClass(Assignment).b9());
729
732
  } else {
730
733
  tmp = tmp0_elvis_lhs;
731
734
  }
732
735
  return tmp;
733
736
  };
734
- protoOf(Equation).s1j = function () {
737
+ protoOf(Equation).m1h = function () {
735
738
  return false;
736
739
  };
737
- protoOf(Equation).q1j = function () {
740
+ protoOf(Equation).k1h = function () {
738
741
  return false;
739
742
  };
740
- protoOf(Equation).k1h = function () {
741
- return Companion_getInstance_0().of('=', [this.o1j(), this.p1j()]);
743
+ protoOf(Equation).l1g = function () {
744
+ return Companion_getInstance_0().of('=', [this.i1h(), this.j1h()]);
742
745
  };
743
746
  protoOf(Equation).toTerm = function () {
744
- return this.k1h();
747
+ return this.l1g();
745
748
  };
746
749
  protoOf(Equation).toPair = function () {
747
- return new Pair(this.o1j(), this.p1j());
750
+ return new Pair(this.i1h(), this.j1h());
748
751
  };
749
752
  protoOf(Equation).swap = function () {
750
- return Companion_instance_0.of(this.p1j(), this.o1j());
753
+ return Companion_instance_0.of(this.j1h(), this.i1h());
751
754
  };
752
- protoOf(Equation).k1k = function (substitution, equalityChecker) {
753
- return Companion_instance_0.z1j(this.o1j().getSubstituted(substitution, []), this.p1j().getSubstituted(substitution, []), equalityChecker);
755
+ protoOf(Equation).e1i = function (substitution, equalityChecker) {
756
+ return Companion_instance_0.t1h(this.i1h().getSubstituted(substitution, []), this.j1h().getSubstituted(substitution, []), equalityChecker);
754
757
  };
755
758
  protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
756
759
  var tmp;
@@ -760,23 +763,22 @@
760
763
  tmp = equalityChecker;
761
764
  }
762
765
  equalityChecker = tmp;
763
- return $super === VOID ? this.k1k(substitution, equalityChecker) : $super.k1k.call(this, substitution, equalityChecker);
766
+ return $super === VOID ? this.e1i(substitution, equalityChecker) : $super.e1i.call(this, substitution, equalityChecker);
764
767
  };
765
768
  function toEquations(_this__u8e3s4) {
766
769
  // Inline function 'kotlin.collections.map' call
767
- var this_0 = _this__u8e3s4.n2();
770
+ var this_0 = _this__u8e3s4.e1();
768
771
  // Inline function 'kotlin.collections.mapTo' call
769
772
  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();
773
- // Inline function 'it.unibo.tuprolog.unify.toEquations.<anonymous>' call
773
+ var _iterator__ex2g4s = this_0.p();
774
+ while (_iterator__ex2g4s.s()) {
775
+ var item = _iterator__ex2g4s.t();
774
776
  // Inline function 'kotlin.collections.component1' call
775
- var variable = item.q2();
777
+ var variable = item.d2();
776
778
  // Inline function 'kotlin.collections.component2' call
777
- var term = item.r2();
779
+ var term = item.e2();
778
780
  var tmp$ret$2 = new Assignment(variable, term);
779
- destination.o(tmp$ret$2);
781
+ destination.m(tmp$ret$2);
780
782
  }
781
783
  return destination;
782
784
  }
@@ -787,14 +789,14 @@
787
789
  }
788
790
  function toAssignmentPair(_this__u8e3s4) {
789
791
  var tmp;
790
- if (_this__u8e3s4.y1j()) {
791
- tmp = _this__u8e3s4.t1j().l1k();
792
- } else if (_this__u8e3s4.o1j().bw()) {
793
- tmp = to(_this__u8e3s4.o1j().castToVar(), _this__u8e3s4.p1j());
794
- } else if (_this__u8e3s4.p1j().bw()) {
795
- tmp = to(_this__u8e3s4.p1j().castToVar(), _this__u8e3s4.o1j());
792
+ if (_this__u8e3s4.s1h()) {
793
+ tmp = _this__u8e3s4.n1h().f1i();
794
+ } else if (_this__u8e3s4.i1h().dv()) {
795
+ tmp = to(_this__u8e3s4.i1h().castToVar(), _this__u8e3s4.j1h());
796
+ } else if (_this__u8e3s4.j1h().dv()) {
797
+ tmp = to(_this__u8e3s4.j1h().castToVar(), _this__u8e3s4.i1h());
796
798
  } else {
797
- throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
799
+ throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + toString(_this__u8e3s4));
798
800
  }
799
801
  return tmp;
800
802
  }
@@ -804,49 +806,61 @@
804
806
  function Unificator$Companion$default$delegate$lambda() {
805
807
  return Companion_getInstance_2().strict();
806
808
  }
809
+ function Unificator$Companion$_get_default_$ref_8i2tx3() {
810
+ return function (p0) {
811
+ return p0.u1i();
812
+ };
813
+ }
807
814
  function Unificator$Companion$naive$1($context) {
808
815
  AbstractUnificator.call(this, $context);
809
816
  }
810
- protoOf(Unificator$Companion$naive$1).k1j = function (first, second) {
817
+ protoOf(Unificator$Companion$naive$1).e1h = function (first, second) {
811
818
  var tmp;
812
- if (first.gw() ? second.gw() : false) {
813
- tmp = first.castToInteger().r2().wj(second.castToInteger().r2()) === 0;
814
- } else if (first.fw() ? second.fw() : false) {
815
- tmp = first.castToNumeric().vz().nj(second.castToNumeric().vz()) === 0;
819
+ if (first.iv() && second.iv()) {
820
+ tmp = first.castToInteger().e2().dj(second.castToInteger().e2()) === 0;
821
+ } else if (first.hv() && second.hv()) {
822
+ tmp = first.castToNumeric().xy().ui(second.castToNumeric().xy()) === 0;
816
823
  } else {
817
824
  tmp = first.equals(second);
818
825
  }
819
826
  return tmp;
820
827
  };
828
+ protoOf(Unificator$Companion$naive$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
829
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof Unificator$Companion$naive$1) ? $super : THROW_CCE());
830
+ };
821
831
  function Unificator$Companion$strict$1($context) {
822
832
  AbstractUnificator.call(this, $context);
823
833
  }
824
- protoOf(Unificator$Companion$strict$1).k1j = function (first, second) {
834
+ protoOf(Unificator$Companion$strict$1).e1h = function (first, second) {
825
835
  return first.equals(second);
826
836
  };
837
+ protoOf(Unificator$Companion$strict$1).mguWithOccurCheck = function (term1, term2, occurCheckEnabled, $super) {
838
+ return this.mguWithOccurCheck(term1, term2, occurCheckEnabled, ($super == null ? true : $super instanceof Unificator$Companion$strict$1) ? $super : THROW_CCE());
839
+ };
827
840
  function Companion_0() {
828
841
  Companion_instance_1 = this;
829
842
  var tmp = this;
830
- tmp.c1l_1 = lazy(Unificator$Companion$default$delegate$lambda);
831
- this.d1l_1 = 32;
843
+ tmp.s1i_1 = lazy(Unificator$Companion$default$delegate$lambda);
844
+ this.t1i_1 = 32;
832
845
  }
833
- protoOf(Companion_0).e1l = function () {
846
+ protoOf(Companion_0).u1i = function () {
847
+ var tmp0 = this.s1i_1;
848
+ var tmp = KProperty1;
834
849
  // Inline function 'kotlin.getValue' call
835
- var this_0 = this.c1l_1;
836
- default$factory();
837
- return this_0.r2();
850
+ getPropertyCallableRef('default', 1, tmp, Unificator$Companion$_get_default_$ref_8i2tx3(), null);
851
+ return tmp0.e2();
838
852
  };
839
853
  protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
840
- return this.e1l().mgu(_this__u8e3s4, other);
854
+ return this.u1i().mgu(_this__u8e3s4, other);
841
855
  };
842
856
  protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
843
- return this.e1l().match(_this__u8e3s4, other);
857
+ return this.u1i().match(_this__u8e3s4, other);
844
858
  };
845
859
  protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
846
- return this.e1l().unify(_this__u8e3s4, other);
860
+ return this.u1i().unify(_this__u8e3s4, other);
847
861
  };
848
862
  protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
849
- return this.e1l().merge(_this__u8e3s4, other);
863
+ return this.u1i().merge(_this__u8e3s4, other);
850
864
  };
851
865
  protoOf(Companion_0).naiveWithContext = function (context) {
852
866
  return new Unificator$Companion$naive$1(context);
@@ -860,10 +874,10 @@
860
874
  protoOf(Companion_0).strict = function () {
861
875
  return this.strictWithContext(Companion_getInstance().empty());
862
876
  };
863
- protoOf(Companion_0).f1l = function (other, capacity) {
877
+ protoOf(Companion_0).z1i = function (other, capacity) {
864
878
  var tmp;
865
879
  if (other instanceof CachedUnificator) {
866
- tmp = new CachedUnificator(other.c1k_1, capacity);
880
+ tmp = new CachedUnificator(other.w1h_1, capacity);
867
881
  } else {
868
882
  tmp = new CachedUnificator(other, capacity);
869
883
  }
@@ -871,7 +885,7 @@
871
885
  };
872
886
  protoOf(Companion_0).cached = function (other, capacity, $super) {
873
887
  capacity = capacity === VOID ? 32 : capacity;
874
- return $super === VOID ? this.f1l(other, capacity) : $super.f1l.call(this, other, capacity);
888
+ return $super === VOID ? this.z1i(other, capacity) : $super.z1i.call(this, other, capacity);
875
889
  };
876
890
  var Companion_instance_1;
877
891
  function Companion_getInstance_2() {
@@ -881,32 +895,29 @@
881
895
  }
882
896
  function Unificator() {
883
897
  }
884
- function default$factory() {
885
- return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
886
- return receiver.e1l();
887
- }, null);
888
- }
889
898
  //region block: post-declaration
899
+ protoOf(AbstractUnificator).mguWithOccurCheck = mguWithOccurCheck;
890
900
  protoOf(AbstractUnificator).mgu = mgu;
891
901
  protoOf(AbstractUnificator).matchWithOccurCheck = matchWithOccurCheck;
892
902
  protoOf(AbstractUnificator).match = match;
893
903
  protoOf(AbstractUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
894
904
  protoOf(AbstractUnificator).unify = unify;
895
905
  protoOf(AbstractUnificator).merge = merge;
906
+ protoOf(CachedUnificator).mguWithOccurCheck = mguWithOccurCheck;
896
907
  protoOf(CachedUnificator).mgu = mgu;
897
908
  protoOf(CachedUnificator).matchWithOccurCheck = matchWithOccurCheck;
898
909
  protoOf(CachedUnificator).match = match;
899
910
  protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
900
911
  protoOf(CachedUnificator).unify = unify;
901
912
  protoOf(CachedUnificator).merge = merge;
902
- protoOf(Equation).zp = castTo;
913
+ protoOf(Equation).gp = castTo;
903
914
  defineProp(protoOf(Equation), 'lhs', function () {
904
- return this.o1j();
915
+ return this.i1h();
905
916
  });
906
917
  defineProp(protoOf(Equation), 'rhs', function () {
907
- return this.p1j();
918
+ return this.j1h();
908
919
  });
909
- defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).e1l);
920
+ defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).u1i);
910
921
  //endregion
911
922
  //region block: init
912
923
  Companion_instance_0 = new Companion();