@tuprolog/2p-full 0.31.5-dev0f → 0.31.5-dev0n

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/2p-bdd.js +234 -229
  2. package/2p-bdd.js.map +1 -1
  3. package/2p-core.js +5576 -6196
  4. package/2p-core.js.map +1 -1
  5. package/2p-datalog.js +9 -2
  6. package/2p-datalog.js.map +1 -1
  7. package/2p-dsl-core.js +9 -2
  8. package/2p-dsl-core.js.map +1 -1
  9. package/2p-dsl-solve.js +9 -2
  10. package/2p-dsl-solve.js.map +1 -1
  11. package/2p-dsl-theory.js +9 -2
  12. package/2p-dsl-theory.js.map +1 -1
  13. package/2p-dsl-unify.js +9 -2
  14. package/2p-dsl-unify.js.map +1 -1
  15. package/2p-full.js +26 -3
  16. package/2p-full.js.map +1 -1
  17. package/2p-io-lib.js +903 -926
  18. package/2p-io-lib.js.map +1 -1
  19. package/2p-oop-lib.js +1298 -1327
  20. package/2p-oop-lib.js.map +1 -1
  21. package/2p-parser-core.js +352 -356
  22. package/2p-parser-core.js.map +1 -1
  23. package/2p-parser-js.js +14 -3
  24. package/2p-parser-js.js.map +1 -1
  25. package/2p-parser-theory.js +66 -41
  26. package/2p-parser-theory.js.map +1 -1
  27. package/2p-repl.js +175 -173
  28. package/2p-repl.js.map +1 -1
  29. package/2p-serialize-core.js +9 -2
  30. package/2p-serialize-core.js.map +1 -1
  31. package/2p-serialize-theory.js +9 -2
  32. package/2p-serialize-theory.js.map +1 -1
  33. package/2p-solve-classic.js +1405 -1677
  34. package/2p-solve-classic.js.map +1 -1
  35. package/2p-solve-concurrent.js +9 -2
  36. package/2p-solve-concurrent.js.map +1 -1
  37. package/2p-solve-plp.js +19 -5
  38. package/2p-solve-plp.js.map +1 -1
  39. package/2p-solve-problog.js +1845 -1880
  40. package/2p-solve-problog.js.map +1 -1
  41. package/2p-solve-streams.js +1239 -1331
  42. package/2p-solve-streams.js.map +1 -1
  43. package/2p-solve.js +5342 -5796
  44. package/2p-solve.js.map +1 -1
  45. package/2p-theory.js +1734 -1730
  46. package/2p-theory.js.map +1 -1
  47. package/2p-unify.js +364 -365
  48. package/2p-unify.js.map +1 -1
  49. package/2p-utils.js +548 -510
  50. package/2p-utils.js.map +1 -1
  51. package/88b0986a7186d029-atomicfu-js-ir.js +9 -2
  52. package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -1
  53. package/clikt-clikt-js-ir.js +2078 -2260
  54. package/clikt-clikt-js-ir.js.map +1 -1
  55. package/kotlin-kotlin-stdlib-js-ir.js +2566 -2676
  56. package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
  57. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js +9 -2
  58. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map +1 -1
  59. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +9 -2
  60. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
  61. package/kt-math.js +3666 -3302
  62. package/kt-math.js.map +1 -1
  63. package/package.json +56 -2
  64. package/2p-full.d.ts +0 -270
package/2p-unify.js CHANGED
@@ -1,53 +1,73 @@
1
- (function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
1
+ (function (root, factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './2p-core.js', './2p-utils.js'], factory);
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'));
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'.");
9
+ }
10
+ if (typeof this['2p-core'] === 'undefined') {
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
+ }
13
+ if (typeof this['2p-utils'] === 'undefined') {
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
+ }
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']);
17
+ }
18
+ }(this, function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils) {
2
19
  'use strict';
3
20
  //region block: imports
4
21
  var imul = Math.imul;
5
- var Unit_getInstance = kotlin_kotlin.$_$.r2;
6
- var asSequence = kotlin_kotlin.$_$.f3;
7
- var plus = kotlin_kotlin.$_$.g9;
8
- var map = kotlin_kotlin.$_$.c9;
22
+ var Unit_getInstance = kotlin_kotlin.$_$.v1;
23
+ var asSequence = kotlin_kotlin.$_$.j2;
24
+ var plus = kotlin_kotlin.$_$.s8;
25
+ var map = kotlin_kotlin.$_$.o8;
9
26
  var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.e1;
10
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c1;
11
- var toCollection = kotlin_kotlin.$_$.n9;
12
- var Pair = kotlin_kotlin.$_$.qb;
13
- var lazy = kotlin_kotlin.$_$.xb;
14
- var asSequence_0 = kotlin_kotlin.$_$.g3;
15
- var classMeta = kotlin_kotlin.$_$.m6;
16
- var setMetadataFor = kotlin_kotlin.$_$.j7;
17
- var KProperty1 = kotlin_kotlin.$_$.d8;
18
- var getPropertyCallableRef = kotlin_kotlin.$_$.r6;
27
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
28
+ var toCollection = kotlin_kotlin.$_$.z8;
29
+ var Pair = kotlin_kotlin.$_$.rb;
30
+ var VOID = kotlin_kotlin.$_$.gc;
31
+ var lazy = kotlin_kotlin.$_$.yb;
32
+ var protoOf = kotlin_kotlin.$_$.s6;
33
+ var asSequence_0 = kotlin_kotlin.$_$.k2;
34
+ var classMeta = kotlin_kotlin.$_$.t5;
35
+ var setMetadataFor = kotlin_kotlin.$_$.t6;
36
+ var KProperty1 = kotlin_kotlin.$_$.o7;
37
+ var getPropertyCallableRef = kotlin_kotlin.$_$.z5;
19
38
  var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_utils.$_$.a;
20
- var Triple = kotlin_kotlin.$_$.ub;
39
+ var Triple = kotlin_kotlin.$_$.vb;
21
40
  var Some = kotlin_it_unibo_tuprolog_utils.$_$.k;
22
- var zip = kotlin_kotlin.$_$.u9;
23
- var flatMap = kotlin_kotlin.$_$.u8;
24
- var sequenceOf = kotlin_kotlin.$_$.i9;
25
- var THROW_CCE = kotlin_kotlin.$_$.sb;
41
+ var zip = kotlin_kotlin.$_$.g9;
42
+ var flatMap = kotlin_kotlin.$_$.f8;
43
+ var sequenceOf = kotlin_kotlin.$_$.u8;
44
+ var THROW_CCE = kotlin_kotlin.$_$.tb;
26
45
  var castTo = kotlin_it_unibo_tuprolog_utils.$_$.f;
27
- var to = kotlin_kotlin.$_$.ec;
28
- var objectMeta = kotlin_kotlin.$_$.i7;
46
+ var to = kotlin_kotlin.$_$.fc;
47
+ var objectMeta = kotlin_kotlin.$_$.r6;
29
48
  var getKClass = kotlin_kotlin.$_$.c;
30
- var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.o1;
49
+ var ClassCastException_init_$Create$ = kotlin_kotlin.$_$.r;
31
50
  var Companion_getInstance_1 = kotlin_it_unibo_tuprolog_core.$_$.d1;
51
+ var defineProp = kotlin_kotlin.$_$.v5;
32
52
  var Castable = kotlin_it_unibo_tuprolog_utils.$_$.g;
33
- var collectionSizeOrDefault = kotlin_kotlin.$_$.j3;
34
- var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.b1;
35
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.p1;
36
- var interfaceMeta = kotlin_kotlin.$_$.u6;
53
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.n2;
54
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.e;
55
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.t;
56
+ var interfaceMeta = kotlin_kotlin.$_$.c6;
37
57
  //endregion
38
58
  //region block: pre-declaration
39
59
  function mgu(term1, term2) {
40
- return this.z1j(term1, term2, true);
60
+ return this.d1j(term1, term2, true);
41
61
  }
42
62
  function matchWithOccurCheck(term1, term2, occurCheckEnabled) {
43
- return !(this.z1j(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
63
+ return !(this.d1j(term1, term2, occurCheckEnabled) === Companion_getInstance().failed());
44
64
  }
45
65
  function match(term1, term2) {
46
66
  return this.matchWithOccurCheck(term1, term2, true);
47
67
  }
48
68
  function unifyWithOccurCheck(term1, term2, occurCheckEnabled) {
49
- var substitution = this.z1j(term1, term2, occurCheckEnabled);
50
- return substitution.o12() ? null : term1.getSubstituted(substitution, []);
69
+ var substitution = this.d1j(term1, term2, occurCheckEnabled);
70
+ return substitution.h11() ? null : term1.getSubstituted(substitution, []);
51
71
  }
52
72
  function unify(term1, term2) {
53
73
  return this.unifyWithOccurCheck(term1, term2, true);
@@ -55,35 +75,35 @@
55
75
  function merge(substitution1, substitution2) {
56
76
  return this.mergeWithOccurCheck(substitution1, substitution2, true);
57
77
  }
58
- setMetadataFor(Unificator, 'Unificator', interfaceMeta, undefined, undefined, undefined, undefined, []);
59
- setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, undefined, [Unificator], undefined, undefined, []);
60
- setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, undefined, [Unificator], undefined, undefined, []);
61
- setMetadataFor(Equation, 'Equation', classMeta, undefined, [Castable], undefined, undefined, []);
62
- setMetadataFor(Identity, 'Identity', classMeta, Equation, undefined, undefined, undefined, []);
63
- setMetadataFor(Assignment, 'Assignment', classMeta, Equation, undefined, undefined, undefined, []);
64
- setMetadataFor(Comparison, 'Comparison', classMeta, Equation, undefined, undefined, undefined, []);
65
- setMetadataFor(Contradiction, 'Contradiction', classMeta, Equation, undefined, undefined, undefined, []);
66
- setMetadataFor(Companion, 'Companion', objectMeta, undefined, undefined, undefined, undefined, []);
67
- setMetadataFor(Unificator$Companion$naive$1, undefined, classMeta, AbstractUnificator, undefined, undefined, undefined, []);
68
- setMetadataFor(Unificator$Companion$strict$1, undefined, classMeta, AbstractUnificator, undefined, undefined, undefined, []);
69
- setMetadataFor(Companion_0, 'Companion', objectMeta, undefined, undefined, undefined, undefined, []);
78
+ setMetadataFor(Unificator, 'Unificator', interfaceMeta);
79
+ setMetadataFor(AbstractUnificator, 'AbstractUnificator', classMeta, VOID, [Unificator]);
80
+ setMetadataFor(CachedUnificator, 'CachedUnificator', classMeta, VOID, [Unificator]);
81
+ setMetadataFor(Equation, 'Equation', classMeta, VOID, [Castable]);
82
+ setMetadataFor(Identity, 'Identity', classMeta, Equation);
83
+ setMetadataFor(Assignment, 'Assignment', classMeta, Equation);
84
+ setMetadataFor(Comparison, 'Comparison', classMeta, Equation);
85
+ setMetadataFor(Contradiction, 'Contradiction', classMeta, Equation);
86
+ setMetadataFor(Companion, 'Companion', objectMeta);
87
+ setMetadataFor(Unificator$Companion$naive$1, VOID, classMeta, AbstractUnificator);
88
+ setMetadataFor(Unificator$Companion$strict$1, VOID, classMeta, AbstractUnificator);
89
+ setMetadataFor(Companion_0, 'Companion', objectMeta);
70
90
  //endregion
71
91
  function _get_contextEquations__x0dd77($this) {
72
92
  var tmp$ret$0;
73
93
  // Inline function 'kotlin.getValue' call
74
94
  var tmp0_getValue = contextEquations$factory();
75
- tmp$ret$0 = $this.g1j_1.b1();
95
+ tmp$ret$0 = $this.m1i_1.b1();
76
96
  return tmp$ret$0;
77
97
  }
78
98
  function occurrenceCheck($this, variable, term) {
79
99
  var tmp;
80
- if (term.yw()) {
81
- tmp = $this.h1j(variable, term);
82
- } else if (term.iw()) {
100
+ if (term.mw()) {
101
+ tmp = $this.n1i(variable, term);
102
+ } else if (term.aw()) {
83
103
  var tmp$ret$1;
84
104
  $l$block: {
85
105
  // Inline function 'kotlin.sequences.any' call
86
- var tmp0_any = term.ew();
106
+ var tmp0_any = term.yv();
87
107
  var tmp0_iterator = tmp0_any.j();
88
108
  while (tmp0_iterator.m()) {
89
109
  var element = tmp0_iterator.n();
@@ -105,13 +125,12 @@
105
125
  }
106
126
  function equationsFor($this, term1, term2) {
107
127
  var tmp = Companion_getInstance_2();
108
- return tmp.i1j(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
128
+ return tmp.o1i(term1, term2, AbstractUnificator$checkTermsEquality$ref($this));
109
129
  }
110
130
  function equationsFor_0($this, substitution1, substitution2) {
111
131
  var tmp = Companion_getInstance_2();
112
132
  var tmp_0 = plus(asSequence(substitution1), asSequence(substitution2));
113
- var tmp_1 = map(tmp_0, AbstractUnificator$equationsFor$lambda);
114
- return tmp.j1j(tmp_1, null, 2, null);
133
+ return tmp.fromSequence(map(tmp_0, AbstractUnificator$equationsFor$lambda));
115
134
  }
116
135
  function applySubstitutionToEquations($this, substitution, equations, exceptIndex) {
117
136
  var changed = {_v: false};
@@ -138,32 +157,32 @@
138
157
  var changed = true;
139
158
  while (changed) {
140
159
  changed = false;
141
- var eqIterator = equations.bb();
160
+ var eqIterator = equations.gb();
142
161
  while (eqIterator.m()) {
143
162
  var eq = eqIterator.n();
144
- if (eq.o1j()) {
163
+ if (eq.t1i()) {
145
164
  return Companion_getInstance().failed();
146
- } else if (eq.p1j()) {
147
- eqIterator.u4();
165
+ } else if (eq.u1i()) {
166
+ eqIterator.y4();
148
167
  changed = true;
149
- } else if (eq.w1j()) {
150
- var assignment = eq.r1j();
151
- if (occurCheckEnabled ? occurrenceCheck($this, assignment.u1j_1, eq.n1j()) : false) {
168
+ } else if (eq.b1j()) {
169
+ var assignment = eq.w1i();
170
+ if (occurCheckEnabled ? occurrenceCheck($this, assignment.z1i_1, eq.s1i()) : false) {
152
171
  return Companion_getInstance().failed();
153
172
  } else {
154
- changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.sa());
173
+ changed = changed ? true : applySubstitutionToEquations($this, assignment.toSubstitution(), equations, eqIterator.xa());
155
174
  }
156
- } else if (eq.q1j()) {
157
- eqIterator.u4();
158
- var tmp0_iterator = equationsFor($this, eq.m1j(), eq.n1j()).j();
175
+ } else if (eq.v1i()) {
176
+ eqIterator.y4();
177
+ var tmp0_iterator = equationsFor($this, eq.r1i(), eq.s1i()).j();
159
178
  insertion: while (tmp0_iterator.m()) {
160
179
  var it = tmp0_iterator.n();
161
- if (it.p1j())
180
+ if (it.u1i())
162
181
  continue insertion;
163
- else if (it.o1j())
182
+ else if (it.t1i())
164
183
  return Companion_getInstance().failed();
165
184
  else {
166
- eqIterator.va(it);
185
+ eqIterator.ab(it);
167
186
  }
168
187
  }
169
188
  changed = true;
@@ -180,7 +199,7 @@
180
199
  var element = tmp0_iterator_0.n();
181
200
  var tmp$ret$0;
182
201
  // Inline function 'it.unibo.tuprolog.unify.AbstractUnificator.mgu.<anonymous>' call
183
- tmp$ret$0 = element.w1j();
202
+ tmp$ret$0 = element.b1j();
184
203
  if (tmp$ret$0) {
185
204
  tmp0_filterTo.g(element);
186
205
  }
@@ -196,26 +215,26 @@
196
215
  return toCollection(items, tmp$ret$0);
197
216
  }
198
217
  function applySubstitutionToEquations$handleIndex($equations, $substitution, this$0, changed, i) {
199
- if ($equations.o(i).o1j() ? true : $equations.o(i).p1j())
218
+ if ($equations.o(i).t1i() ? true : $equations.o(i).u1i())
200
219
  return Unit_getInstance();
201
220
  var currentEq = $equations.o(i);
202
- var tmp0_container = currentEq.x1j($substitution, null, 2, null).toPair();
203
- var newLhs = tmp0_container.n3();
204
- var newRhs = tmp0_container.o3();
205
- if (!currentEq.m1j().equals(newLhs) ? true : !currentEq.n1j().equals(newRhs)) {
221
+ var tmp0_container = currentEq.apply($substitution).toPair();
222
+ var newLhs = tmp0_container.r3();
223
+ var newRhs = tmp0_container.s3();
224
+ if (!currentEq.r1i().equals(newLhs) ? true : !currentEq.s1i().equals(newRhs)) {
206
225
  var tmp = Companion_getInstance_2();
207
- $equations.s4(i, tmp.y1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
226
+ $equations.w4(i, tmp.c1j(newLhs, newRhs, AbstractUnificator$checkTermsEquality$ref_0(this$0)));
208
227
  changed._v = true;
209
228
  }
210
229
  }
211
230
  function AbstractUnificator$contextEquations$delegate$lambda(this$0) {
212
231
  return function () {
213
- return toEquations(this$0.j5());
232
+ return toEquations(this$0.n5());
214
233
  };
215
234
  }
216
235
  function AbstractUnificator$checkTermsEquality$ref($boundThis) {
217
236
  var l = function (p0, p1) {
218
- return $boundThis.h1j(p0, p1);
237
+ return $boundThis.n1i(p0, p1);
219
238
  };
220
239
  l.callableName = 'checkTermsEquality';
221
240
  return l;
@@ -228,39 +247,40 @@
228
247
  }
229
248
  function AbstractUnificator$checkTermsEquality$ref_0($boundThis) {
230
249
  var l = function (p0, p1) {
231
- return $boundThis.h1j(p0, p1);
250
+ return $boundThis.n1i(p0, p1);
232
251
  };
233
252
  l.callableName = 'checkTermsEquality';
234
253
  return l;
235
254
  }
236
255
  function AbstractUnificator(context) {
237
- this.f1j_1 = context;
256
+ context = context === VOID ? Companion_getInstance().empty() : context;
257
+ this.l1i_1 = context;
238
258
  var tmp = this;
239
- tmp.g1j_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
259
+ tmp.m1i_1 = lazy(AbstractUnificator$contextEquations$delegate$lambda(this));
240
260
  }
241
- AbstractUnificator.prototype.j5 = function () {
242
- return this.f1j_1;
261
+ protoOf(AbstractUnificator).n5 = function () {
262
+ return this.l1i_1;
243
263
  };
244
- AbstractUnificator.prototype.z1j = function (term1, term2, occurCheckEnabled) {
245
- if (this.j5().o12())
264
+ protoOf(AbstractUnificator).d1j = function (term1, term2, occurCheckEnabled) {
265
+ if (this.n5().h11())
246
266
  return Companion_getInstance().failed();
247
267
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor(this, term1, term2)));
248
268
  return mgu_0(this, equations, occurCheckEnabled);
249
269
  };
250
- AbstractUnificator.prototype.a1k = function (substitution1, substitution2, occurCheckEnabled) {
251
- if ((this.j5().o12() ? true : substitution1.o12()) ? true : substitution2.o12())
270
+ protoOf(AbstractUnificator).e1j = function (substitution1, substitution2, occurCheckEnabled) {
271
+ if ((this.n5().h11() ? true : substitution1.h11()) ? true : substitution2.h11())
252
272
  return Companion_getInstance().failed();
253
273
  if (!occurCheckEnabled) {
254
- var quickMerge = this.j5().plus(substitution1).plus(substitution2);
255
- if (quickMerge.n12()) {
274
+ var quickMerge = this.n5().plus(substitution1).plus(substitution2);
275
+ if (quickMerge.g11()) {
256
276
  return quickMerge;
257
277
  }
258
278
  }
259
279
  var equations = newDeque(this, plus(asSequence_0(_get_contextEquations__x0dd77(this)), equationsFor_0(this, substitution1, substitution2)));
260
280
  return mgu_0(this, equations, occurCheckEnabled);
261
281
  };
262
- AbstractUnificator.prototype.mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
263
- return this.a1k(substitution1, substitution2, occurCheckEnabled);
282
+ protoOf(AbstractUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
283
+ return this.e1j(substitution1, substitution2, occurCheckEnabled);
264
284
  };
265
285
  function contextEquations$factory() {
266
286
  return getPropertyCallableRef('contextEquations', 1, KProperty1, function (receiver) {
@@ -268,37 +288,37 @@
268
288
  }, null);
269
289
  }
270
290
  function CachedUnificator(decorated, cacheCapacity) {
271
- this.b1k_1 = decorated;
272
- this.c1k_1 = Companion_getInstance_0().dq(cacheCapacity);
291
+ this.f1j_1 = decorated;
292
+ this.g1j_1 = Companion_getInstance_0().xp(cacheCapacity);
273
293
  }
274
- CachedUnificator.prototype.z1j = function (term1, term2, occurCheckEnabled) {
294
+ protoOf(CachedUnificator).d1j = function (term1, term2, occurCheckEnabled) {
275
295
  var mguRequest = new Triple(term1, term2, occurCheckEnabled);
276
- var cached = this.c1k_1.a3(mguRequest);
296
+ var cached = this.g1j_1.f3(mguRequest);
277
297
  var tmp;
278
298
  if (cached instanceof Some) {
279
- tmp = cached.gq_1;
299
+ tmp = cached.aq_1;
280
300
  } else {
281
- var mguResult = this.b1k_1.z1j(term1, term2, occurCheckEnabled);
282
- this.c1k_1.eq(mguRequest, mguResult);
301
+ var mguResult = this.f1j_1.d1j(term1, term2, occurCheckEnabled);
302
+ this.g1j_1.yp(mguRequest, mguResult);
283
303
  tmp = mguResult;
284
304
  }
285
305
  return tmp;
286
306
  };
287
- CachedUnificator.prototype.a1k = function (substitution1, substitution2, occurCheckEnabled) {
307
+ protoOf(CachedUnificator).e1j = function (substitution1, substitution2, occurCheckEnabled) {
288
308
  var mguRequest = new Triple(substitution1, substitution2, occurCheckEnabled);
289
- var cached = this.c1k_1.a3(mguRequest);
309
+ var cached = this.g1j_1.f3(mguRequest);
290
310
  var tmp;
291
311
  if (cached instanceof Some) {
292
- tmp = cached.gq_1;
312
+ tmp = cached.aq_1;
293
313
  } else {
294
- var mguResult = this.b1k_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
295
- this.c1k_1.eq(mguRequest, mguResult);
314
+ var mguResult = this.f1j_1.mergeWithOccurCheck(substitution1, substitution2, occurCheckEnabled);
315
+ this.g1j_1.yp(mguRequest, mguResult);
296
316
  tmp = mguResult;
297
317
  }
298
318
  return tmp;
299
319
  };
300
- CachedUnificator.prototype.mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
301
- return this.a1k(substitution1, substitution2, occurCheckEnabled);
320
+ protoOf(CachedUnificator).mergeWithOccurCheck = function (substitution1, substitution2, occurCheckEnabled) {
321
+ return this.e1j(substitution1, substitution2, occurCheckEnabled);
302
322
  };
303
323
  function allOfLists($this, lhs, rhs, equalityChecker) {
304
324
  var tmp = zip(lhs.unfold(), rhs.unfold());
@@ -331,7 +351,7 @@
331
351
  }
332
352
  function Equation$Companion$from$lambda($equalityChecker) {
333
353
  return function (it) {
334
- return Companion_getInstance_2().d1k(it, $equalityChecker);
354
+ return Companion_getInstance_2().h1j(it, $equalityChecker);
335
355
  };
336
356
  }
337
357
  function Term$equals$ref_2() {
@@ -357,16 +377,16 @@
357
377
  }
358
378
  function Equation$Companion$allOfLists$lambda($equalityChecker) {
359
379
  return function (_name_for_destructuring_parameter_0__wldtmu) {
360
- var l = _name_for_destructuring_parameter_0__wldtmu.n3();
361
- var r = _name_for_destructuring_parameter_0__wldtmu.o3();
362
- return (l.pw() ? r.pw() : false) ? sequenceOf([Companion_getInstance_2().y1j(l.castToCons().iy(), r.castToCons().iy(), $equalityChecker)]) : (l.ow() ? r.ow() : false) ? sequenceOf([Companion_getInstance_2().y1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_getInstance_2().i1j(l, r, $equalityChecker);
380
+ var l = _name_for_destructuring_parameter_0__wldtmu.r3();
381
+ var r = _name_for_destructuring_parameter_0__wldtmu.s3();
382
+ return (l.fw() ? r.fw() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToCons().sx(), r.castToCons().sx(), $equalityChecker)]) : (l.ew() ? r.ew() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToList(), r.castToList(), $equalityChecker)]) : Companion_getInstance_2().o1i(l, r, $equalityChecker);
363
383
  };
364
384
  }
365
385
  function Equation$Companion$allOfTuples$lambda($equalityChecker) {
366
386
  return function (_name_for_destructuring_parameter_0__wldtmu) {
367
- var l = _name_for_destructuring_parameter_0__wldtmu.n3();
368
- var r = _name_for_destructuring_parameter_0__wldtmu.o3();
369
- return (l.nw() ? r.nw() : false) ? sequenceOf([Companion_getInstance_2().y1j(l.castToTuple().wx(), r.castToTuple().wx(), $equalityChecker)]) : Companion_getInstance_2().i1j(l, r, $equalityChecker);
387
+ var l = _name_for_destructuring_parameter_0__wldtmu.r3();
388
+ var r = _name_for_destructuring_parameter_0__wldtmu.s3();
389
+ return (l.dw() ? r.dw() : false) ? sequenceOf([Companion_getInstance_2().c1j(l.castToTuple().gx(), r.castToTuple().gx(), $equalityChecker)]) : Companion_getInstance_2().o1i(l, r, $equalityChecker);
370
390
  };
371
391
  }
372
392
  function Term$equals$ref_5() {
@@ -378,172 +398,163 @@
378
398
  }
379
399
  function Equation$Companion$allOf$lambda($equalityChecker) {
380
400
  return function (it) {
381
- return Companion_getInstance_2().d1k(it, $equalityChecker);
401
+ return Companion_getInstance_2().h1j(it, $equalityChecker);
382
402
  };
383
403
  }
384
404
  function Identity(lhs, rhs) {
385
405
  Equation.call(this, lhs, rhs);
386
- this.g1k_1 = lhs;
387
- this.h1k_1 = rhs;
406
+ this.k1j_1 = lhs;
407
+ this.l1j_1 = rhs;
388
408
  }
389
- Identity.prototype.m1j = function () {
390
- return this.g1k_1;
409
+ protoOf(Identity).r1i = function () {
410
+ return this.k1j_1;
391
411
  };
392
- Identity.prototype.n1j = function () {
393
- return this.h1k_1;
412
+ protoOf(Identity).s1i = function () {
413
+ return this.l1j_1;
394
414
  };
395
- Identity.prototype.p1j = function () {
415
+ protoOf(Identity).u1i = function () {
396
416
  return true;
397
417
  };
398
- Identity.prototype.toString = function () {
399
- return 'Identity(lhs=' + this.g1k_1 + ', rhs=' + this.h1k_1 + ')';
418
+ protoOf(Identity).toString = function () {
419
+ return 'Identity(lhs=' + this.k1j_1 + ', rhs=' + this.l1j_1 + ')';
400
420
  };
401
- Identity.prototype.hashCode = function () {
402
- var result = this.g1k_1.hashCode();
403
- result = imul(result, 31) + this.h1k_1.hashCode() | 0;
421
+ protoOf(Identity).hashCode = function () {
422
+ var result = this.k1j_1.hashCode();
423
+ result = imul(result, 31) + this.l1j_1.hashCode() | 0;
404
424
  return result;
405
425
  };
406
- Identity.prototype.equals = function (other) {
426
+ protoOf(Identity).equals = function (other) {
407
427
  if (this === other)
408
428
  return true;
409
429
  if (!(other instanceof Identity))
410
430
  return false;
411
431
  var tmp0_other_with_cast = other instanceof Identity ? other : THROW_CCE();
412
- if (!this.g1k_1.equals(tmp0_other_with_cast.g1k_1))
432
+ if (!this.k1j_1.equals(tmp0_other_with_cast.k1j_1))
413
433
  return false;
414
- if (!this.h1k_1.equals(tmp0_other_with_cast.h1k_1))
434
+ if (!this.l1j_1.equals(tmp0_other_with_cast.l1j_1))
415
435
  return false;
416
436
  return true;
417
437
  };
418
438
  function Assignment(lhs, rhs) {
419
439
  Equation.call(this, lhs, rhs);
420
- this.u1j_1 = lhs;
421
- this.v1j_1 = rhs;
440
+ this.z1i_1 = lhs;
441
+ this.a1j_1 = rhs;
422
442
  }
423
- Assignment.prototype.m1j = function () {
424
- return this.u1j_1;
443
+ protoOf(Assignment).r1i = function () {
444
+ return this.z1i_1;
425
445
  };
426
- Assignment.prototype.n1j = function () {
427
- return this.v1j_1;
446
+ protoOf(Assignment).s1i = function () {
447
+ return this.a1j_1;
428
448
  };
429
- Assignment.prototype.toSubstitution = function () {
430
- return Companion_getInstance().unifier(this.u1j_1, this.v1j_1);
449
+ protoOf(Assignment).toSubstitution = function () {
450
+ return Companion_getInstance().unifier(this.z1i_1, this.a1j_1);
431
451
  };
432
- Assignment.prototype.k1k = function () {
433
- return to(this.u1j_1, this.v1j_1);
452
+ protoOf(Assignment).o1j = function () {
453
+ return to(this.z1i_1, this.a1j_1);
434
454
  };
435
- Assignment.prototype.toPair = function () {
436
- return this.k1k();
455
+ protoOf(Assignment).toPair = function () {
456
+ return this.o1j();
437
457
  };
438
- Assignment.prototype.w1j = function () {
458
+ protoOf(Assignment).b1j = function () {
439
459
  return true;
440
460
  };
441
- Assignment.prototype.i1k = function () {
461
+ protoOf(Assignment).m1j = function () {
442
462
  return this;
443
463
  };
444
- Assignment.prototype.toString = function () {
445
- return 'Assignment(lhs=' + this.u1j_1 + ', rhs=' + this.v1j_1 + ')';
464
+ protoOf(Assignment).toString = function () {
465
+ return 'Assignment(lhs=' + this.z1i_1 + ', rhs=' + this.a1j_1 + ')';
446
466
  };
447
- Assignment.prototype.hashCode = function () {
448
- var result = this.u1j_1.hashCode();
449
- result = imul(result, 31) + this.v1j_1.hashCode() | 0;
467
+ protoOf(Assignment).hashCode = function () {
468
+ var result = this.z1i_1.hashCode();
469
+ result = imul(result, 31) + this.a1j_1.hashCode() | 0;
450
470
  return result;
451
471
  };
452
- Assignment.prototype.equals = function (other) {
472
+ protoOf(Assignment).equals = function (other) {
453
473
  if (this === other)
454
474
  return true;
455
475
  if (!(other instanceof Assignment))
456
476
  return false;
457
477
  var tmp0_other_with_cast = other instanceof Assignment ? other : THROW_CCE();
458
- if (!this.u1j_1.equals(tmp0_other_with_cast.u1j_1))
478
+ if (!this.z1i_1.equals(tmp0_other_with_cast.z1i_1))
459
479
  return false;
460
- if (!this.v1j_1.equals(tmp0_other_with_cast.v1j_1))
480
+ if (!this.a1j_1.equals(tmp0_other_with_cast.a1j_1))
461
481
  return false;
462
482
  return true;
463
483
  };
464
484
  function Comparison(lhs, rhs) {
465
485
  Equation.call(this, lhs, rhs);
466
- this.n1k_1 = lhs;
467
- this.o1k_1 = rhs;
486
+ this.r1j_1 = lhs;
487
+ this.s1j_1 = rhs;
468
488
  }
469
- Comparison.prototype.m1j = function () {
470
- return this.n1k_1;
489
+ protoOf(Comparison).r1i = function () {
490
+ return this.r1j_1;
471
491
  };
472
- Comparison.prototype.n1j = function () {
473
- return this.o1k_1;
492
+ protoOf(Comparison).s1i = function () {
493
+ return this.s1j_1;
474
494
  };
475
- Comparison.prototype.q1j = function () {
495
+ protoOf(Comparison).v1i = function () {
476
496
  return true;
477
497
  };
478
- Comparison.prototype.toString = function () {
479
- return 'Comparison(lhs=' + this.n1k_1 + ', rhs=' + this.o1k_1 + ')';
498
+ protoOf(Comparison).toString = function () {
499
+ return 'Comparison(lhs=' + this.r1j_1 + ', rhs=' + this.s1j_1 + ')';
480
500
  };
481
- Comparison.prototype.hashCode = function () {
482
- var result = this.n1k_1.hashCode();
483
- result = imul(result, 31) + this.o1k_1.hashCode() | 0;
501
+ protoOf(Comparison).hashCode = function () {
502
+ var result = this.r1j_1.hashCode();
503
+ result = imul(result, 31) + this.s1j_1.hashCode() | 0;
484
504
  return result;
485
505
  };
486
- Comparison.prototype.equals = function (other) {
506
+ protoOf(Comparison).equals = function (other) {
487
507
  if (this === other)
488
508
  return true;
489
509
  if (!(other instanceof Comparison))
490
510
  return false;
491
511
  var tmp0_other_with_cast = other instanceof Comparison ? other : THROW_CCE();
492
- if (!this.n1k_1.equals(tmp0_other_with_cast.n1k_1))
512
+ if (!this.r1j_1.equals(tmp0_other_with_cast.r1j_1))
493
513
  return false;
494
- if (!this.o1k_1.equals(tmp0_other_with_cast.o1k_1))
514
+ if (!this.s1j_1.equals(tmp0_other_with_cast.s1j_1))
495
515
  return false;
496
516
  return true;
497
517
  };
498
518
  function Contradiction(lhs, rhs) {
499
519
  Equation.call(this, lhs, rhs);
500
- this.r1k_1 = lhs;
501
- this.s1k_1 = rhs;
520
+ this.v1j_1 = lhs;
521
+ this.w1j_1 = rhs;
502
522
  }
503
- Contradiction.prototype.m1j = function () {
504
- return this.r1k_1;
523
+ protoOf(Contradiction).r1i = function () {
524
+ return this.v1j_1;
505
525
  };
506
- Contradiction.prototype.n1j = function () {
507
- return this.s1k_1;
526
+ protoOf(Contradiction).s1i = function () {
527
+ return this.w1j_1;
508
528
  };
509
- Contradiction.prototype.o1j = function () {
529
+ protoOf(Contradiction).t1i = function () {
510
530
  return true;
511
531
  };
512
- Contradiction.prototype.toString = function () {
513
- return 'Contradiction(lhs=' + this.r1k_1 + ', rhs=' + this.s1k_1 + ')';
532
+ protoOf(Contradiction).toString = function () {
533
+ return 'Contradiction(lhs=' + this.v1j_1 + ', rhs=' + this.w1j_1 + ')';
514
534
  };
515
- Contradiction.prototype.hashCode = function () {
516
- var result = this.r1k_1.hashCode();
517
- result = imul(result, 31) + this.s1k_1.hashCode() | 0;
535
+ protoOf(Contradiction).hashCode = function () {
536
+ var result = this.v1j_1.hashCode();
537
+ result = imul(result, 31) + this.w1j_1.hashCode() | 0;
518
538
  return result;
519
539
  };
520
- Contradiction.prototype.equals = function (other) {
540
+ protoOf(Contradiction).equals = function (other) {
521
541
  if (this === other)
522
542
  return true;
523
543
  if (!(other instanceof Contradiction))
524
544
  return false;
525
545
  var tmp0_other_with_cast = other instanceof Contradiction ? other : THROW_CCE();
526
- if (!this.r1k_1.equals(tmp0_other_with_cast.r1k_1))
546
+ if (!this.v1j_1.equals(tmp0_other_with_cast.v1j_1))
527
547
  return false;
528
- if (!this.s1k_1.equals(tmp0_other_with_cast.s1k_1))
548
+ if (!this.w1j_1.equals(tmp0_other_with_cast.w1j_1))
529
549
  return false;
530
550
  return true;
531
551
  };
532
552
  function Companion() {
533
553
  Companion_instance = this;
534
554
  }
535
- Companion.prototype.of = function (lhs, rhs, equalityChecker) {
555
+ protoOf(Companion).c1j = function (lhs, rhs, equalityChecker) {
536
556
  var tmp;
537
- if (equalityChecker === void 1) {
538
- tmp = Term$equals$ref();
539
- } else {
540
- tmp = equalityChecker;
541
- }
542
- return this.y1j(lhs, rhs, tmp);
543
- };
544
- Companion.prototype.y1j = function (lhs, rhs, equalityChecker) {
545
- var tmp;
546
- if (lhs.yw() ? rhs.yw() : false) {
557
+ if (lhs.mw() ? rhs.mw() : false) {
547
558
  var tmp_0;
548
559
  if (equalityChecker(lhs, rhs)) {
549
560
  tmp_0 = new Identity(lhs, rhs);
@@ -551,11 +562,11 @@
551
562
  tmp_0 = new Assignment(lhs.castToVar(), rhs);
552
563
  }
553
564
  tmp = tmp_0;
554
- } else if (lhs.yw()) {
565
+ } else if (lhs.mw()) {
555
566
  tmp = new Assignment(lhs.castToVar(), rhs);
556
- } else if (rhs.yw()) {
567
+ } else if (rhs.mw()) {
557
568
  tmp = new Assignment(rhs.castToVar(), lhs);
558
- } else if (lhs.bx() ? rhs.bx() : false) {
569
+ } else if (lhs.ky() ? rhs.ky() : false) {
559
570
  var tmp_1;
560
571
  if (equalityChecker(lhs, rhs)) {
561
572
  tmp_1 = new Identity(lhs, rhs);
@@ -563,13 +574,13 @@
563
574
  tmp_1 = new Contradiction(lhs, rhs);
564
575
  }
565
576
  tmp = tmp_1;
566
- } else if (lhs.bx() ? true : rhs.bx()) {
577
+ } else if (lhs.ky() ? true : rhs.ky()) {
567
578
  tmp = new Contradiction(lhs, rhs);
568
- } else if (lhs.iw() ? rhs.iw() : false) {
579
+ } else if (lhs.aw() ? rhs.aw() : false) {
569
580
  var lhsStruct = lhs.castToStruct();
570
581
  var rhsStruct = rhs.castToStruct();
571
582
  var tmp_2;
572
- if (!(lhsStruct.wv() === rhsStruct.wv()) ? true : !(lhsStruct.cw() === rhsStruct.cw())) {
583
+ if (!(lhsStruct.qv() === rhsStruct.qv()) ? true : !(lhsStruct.wv() === rhsStruct.wv())) {
573
584
  tmp_2 = new Contradiction(lhsStruct, rhsStruct);
574
585
  } else {
575
586
  tmp_2 = new Comparison(lhsStruct, rhsStruct);
@@ -580,111 +591,115 @@
580
591
  }
581
592
  return tmp;
582
593
  };
583
- Companion.prototype.t1k = function (lhs, rhs, equalityChecker, $mask0, $handler) {
584
- if (!(($mask0 & 4) === 0)) {
585
- equalityChecker = Term$equals$ref();
586
- }
587
- return this.y1j(lhs, rhs, equalityChecker);
588
- };
589
- Companion.prototype.ofPair = function (pair, equalityChecker) {
594
+ protoOf(Companion).of = function (lhs, rhs, equalityChecker, $super) {
590
595
  var tmp;
591
- if (equalityChecker === void 1) {
592
- tmp = Term$equals$ref_0();
596
+ if (equalityChecker === VOID) {
597
+ tmp = Term$equals$ref();
593
598
  } else {
594
599
  tmp = equalityChecker;
595
600
  }
596
- return this.u1k(pair, tmp);
601
+ equalityChecker = tmp;
602
+ return $super === VOID ? this.c1j(lhs, rhs, equalityChecker) : $super.c1j.call(this, lhs, rhs, equalityChecker);
597
603
  };
598
- Companion.prototype.u1k = function (pair, equalityChecker) {
599
- return this.y1j(pair.g4_1, pair.h4_1, equalityChecker);
604
+ protoOf(Companion).x1j = function (pair, equalityChecker) {
605
+ return this.c1j(pair.k4_1, pair.l4_1, equalityChecker);
600
606
  };
601
- Companion.prototype.fromSequence = function (pairs, equalityChecker) {
607
+ protoOf(Companion).ofPair = function (pair, equalityChecker, $super) {
602
608
  var tmp;
603
- if (equalityChecker === void 1) {
604
- tmp = Term$equals$ref_1();
609
+ if (equalityChecker === VOID) {
610
+ tmp = Term$equals$ref_0();
605
611
  } else {
606
612
  tmp = equalityChecker;
607
613
  }
608
- return this.v1k(pairs, tmp);
614
+ equalityChecker = tmp;
615
+ return $super === VOID ? this.x1j(pair, equalityChecker) : $super.x1j.call(this, pair, equalityChecker);
609
616
  };
610
- Companion.prototype.v1k = function (pairs, equalityChecker) {
617
+ protoOf(Companion).y1j = function (pairs, equalityChecker) {
611
618
  return flatMap(pairs, Equation$Companion$from$lambda(equalityChecker));
612
619
  };
613
- Companion.prototype.j1j = function (pairs, equalityChecker, $mask0, $handler) {
614
- if (!(($mask0 & 2) === 0)) {
615
- equalityChecker = Term$equals$ref_1();
616
- }
617
- return this.v1k(pairs, equalityChecker);
618
- };
619
- Companion.prototype.fromIterable = function (pairs, equalityChecker) {
620
+ protoOf(Companion).fromSequence = function (pairs, equalityChecker, $super) {
620
621
  var tmp;
621
- if (equalityChecker === void 1) {
622
- tmp = Term$equals$ref_2();
622
+ if (equalityChecker === VOID) {
623
+ tmp = Term$equals$ref_1();
623
624
  } else {
624
625
  tmp = equalityChecker;
625
626
  }
626
- return this.w1k(pairs, tmp);
627
+ equalityChecker = tmp;
628
+ return $super === VOID ? this.y1j(pairs, equalityChecker) : $super.y1j.call(this, pairs, equalityChecker);
627
629
  };
628
- Companion.prototype.w1k = function (pairs, equalityChecker) {
629
- return this.v1k(asSequence_0(pairs), equalityChecker);
630
+ protoOf(Companion).z1j = function (pairs, equalityChecker) {
631
+ return this.y1j(asSequence_0(pairs), equalityChecker);
630
632
  };
631
- Companion.prototype.from = function (pairs, equalityChecker) {
633
+ protoOf(Companion).fromIterable = function (pairs, equalityChecker, $super) {
632
634
  var tmp;
633
- if (equalityChecker === void 1) {
634
- tmp = Term$equals$ref_3();
635
+ if (equalityChecker === VOID) {
636
+ tmp = Term$equals$ref_2();
635
637
  } else {
636
638
  tmp = equalityChecker;
637
639
  }
638
- return this.x1k(pairs, tmp);
640
+ equalityChecker = tmp;
641
+ return $super === VOID ? this.z1j(pairs, equalityChecker) : $super.z1j.call(this, pairs, equalityChecker);
639
642
  };
640
- Companion.prototype.x1k = function (pairs, equalityChecker) {
641
- return this.v1k(sequenceOf(pairs.slice()), equalityChecker);
643
+ protoOf(Companion).a1k = function (pairs, equalityChecker) {
644
+ return this.y1j(sequenceOf(pairs.slice()), equalityChecker);
642
645
  };
643
- Companion.prototype.allOfPair = function (pair, equalityChecker) {
646
+ protoOf(Companion).from = function (pairs, equalityChecker, $super) {
644
647
  var tmp;
645
- if (equalityChecker === void 1) {
646
- tmp = Term$equals$ref_4();
648
+ if (equalityChecker === VOID) {
649
+ tmp = Term$equals$ref_3();
647
650
  } else {
648
651
  tmp = equalityChecker;
649
652
  }
650
- return this.d1k(pair, tmp);
653
+ equalityChecker = tmp;
654
+ return $super === VOID ? this.a1k(pairs, equalityChecker) : $super.a1k.call(this, pairs, equalityChecker);
651
655
  };
652
- Companion.prototype.d1k = function (pair, equalityChecker) {
653
- return this.i1j(pair.g4_1, pair.h4_1, equalityChecker);
656
+ protoOf(Companion).h1j = function (pair, equalityChecker) {
657
+ return this.o1i(pair.k4_1, pair.l4_1, equalityChecker);
654
658
  };
655
- Companion.prototype.allOf = function (lhs, rhs, equalityChecker) {
659
+ protoOf(Companion).allOfPair = function (pair, equalityChecker, $super) {
656
660
  var tmp;
657
- if (equalityChecker === void 1) {
658
- tmp = Term$equals$ref_5();
661
+ if (equalityChecker === VOID) {
662
+ tmp = Term$equals$ref_4();
659
663
  } else {
660
664
  tmp = equalityChecker;
661
665
  }
662
- return this.i1j(lhs, rhs, tmp);
666
+ equalityChecker = tmp;
667
+ return $super === VOID ? this.h1j(pair, equalityChecker) : $super.h1j.call(this, pair, equalityChecker);
663
668
  };
664
- Companion.prototype.i1j = function (lhs, rhs, equalityChecker) {
669
+ protoOf(Companion).o1i = function (lhs, rhs, equalityChecker) {
665
670
  var tmp;
666
- if (lhs.xv() ? rhs.xv() : false) {
667
- tmp = sequenceOf([this.y1j(lhs, rhs, equalityChecker)]);
668
- } else if (lhs.ow() ? rhs.ow() : false) {
671
+ if (lhs.rv() ? rhs.rv() : false) {
672
+ tmp = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
673
+ } else if (lhs.ew() ? rhs.ew() : false) {
669
674
  tmp = allOfLists(this, lhs.castToList(), rhs.castToList(), equalityChecker);
670
- } else if (lhs.nw() ? rhs.nw() : false) {
675
+ } else if (lhs.dw() ? rhs.dw() : false) {
671
676
  tmp = allOfTuples(this, lhs.castToTuple(), rhs.castToTuple(), equalityChecker);
672
- } else if (lhs.iw() ? rhs.iw() : false) {
677
+ } else if (lhs.aw() ? rhs.aw() : false) {
673
678
  var lhsStruct = lhs.castToStruct();
674
679
  var rhsStruct = rhs.castToStruct();
675
680
  var tmp_0;
676
- if (lhsStruct.wv() === rhsStruct.wv() ? lhsStruct.cw() === rhsStruct.cw() : false) {
677
- var tmp_1 = zip(lhsStruct.vw(), rhsStruct.vw());
681
+ if (lhsStruct.qv() === rhsStruct.qv() ? lhsStruct.wv() === rhsStruct.wv() : false) {
682
+ var tmp_1 = zip(lhsStruct.jw(), rhsStruct.jw());
678
683
  tmp_0 = flatMap(tmp_1, Equation$Companion$allOf$lambda(equalityChecker));
679
684
  } else {
680
- tmp_0 = sequenceOf([this.y1j(lhs, rhs, equalityChecker)]);
685
+ tmp_0 = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
681
686
  }
682
687
  tmp = tmp_0;
683
688
  } else {
684
- tmp = sequenceOf([this.y1j(lhs, rhs, equalityChecker)]);
689
+ tmp = sequenceOf([this.c1j(lhs, rhs, equalityChecker)]);
685
690
  }
686
691
  return tmp;
687
692
  };
693
+ protoOf(Companion).allOf = function (lhs, rhs, equalityChecker, $super) {
694
+ var tmp;
695
+ if (equalityChecker === VOID) {
696
+ tmp = Term$equals$ref_5();
697
+ } else {
698
+ tmp = equalityChecker;
699
+ }
700
+ equalityChecker = tmp;
701
+ return $super === VOID ? this.o1i(lhs, rhs, equalityChecker) : $super.o1i.call(this, lhs, rhs, equalityChecker);
702
+ };
688
703
  var Companion_instance;
689
704
  function Companion_getInstance_2() {
690
705
  if (Companion_instance == null)
@@ -700,93 +715,79 @@
700
715
  }
701
716
  function Equation(lhs, rhs) {
702
717
  Companion_getInstance_2();
703
- this.k1j_1 = lhs;
704
- this.l1j_1 = rhs;
718
+ this.p1i_1 = lhs;
719
+ this.q1i_1 = rhs;
705
720
  }
706
- Equation.prototype.m1j = function () {
707
- return this.k1j_1;
721
+ protoOf(Equation).r1i = function () {
722
+ return this.p1i_1;
708
723
  };
709
- Equation.prototype.n1j = function () {
710
- return this.l1j_1;
724
+ protoOf(Equation).s1i = function () {
725
+ return this.q1i_1;
711
726
  };
712
- Equation.prototype.p1j = function () {
727
+ protoOf(Equation).u1i = function () {
713
728
  return false;
714
729
  };
715
- Equation.prototype.w1j = function () {
730
+ protoOf(Equation).b1j = function () {
716
731
  return false;
717
732
  };
718
- Equation.prototype.i1k = function () {
733
+ protoOf(Equation).m1j = function () {
719
734
  return null;
720
735
  };
721
- Equation.prototype.r1j = function () {
722
- var tmp0_elvis_lhs = this.i1k();
736
+ protoOf(Equation).w1i = function () {
737
+ var tmp0_elvis_lhs = this.m1j();
723
738
  var tmp;
724
739
  if (tmp0_elvis_lhs == null) {
725
- throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).kd());
740
+ throw ClassCastException_init_$Create$('Cannot cast ' + this + ' to ' + getKClass(Assignment).md());
726
741
  } else {
727
742
  tmp = tmp0_elvis_lhs;
728
743
  }
729
744
  return tmp;
730
745
  };
731
- Equation.prototype.q1j = function () {
746
+ protoOf(Equation).v1i = function () {
732
747
  return false;
733
748
  };
734
- Equation.prototype.o1j = function () {
749
+ protoOf(Equation).t1i = function () {
735
750
  return false;
736
751
  };
737
- Equation.prototype.o1i = function () {
738
- return Companion_getInstance_1().of('=', [this.m1j(), this.n1j()]);
752
+ protoOf(Equation).u1h = function () {
753
+ return Companion_getInstance_1().of('=', [this.r1i(), this.s1i()]);
739
754
  };
740
- Equation.prototype.toTerm = function () {
741
- return this.o1i();
755
+ protoOf(Equation).toTerm = function () {
756
+ return this.u1h();
742
757
  };
743
- Equation.prototype.toPair = function () {
744
- return new Pair(this.m1j(), this.n1j());
758
+ protoOf(Equation).toPair = function () {
759
+ return new Pair(this.r1i(), this.s1i());
745
760
  };
746
- Equation.prototype.swap = function () {
747
- var tmp = Companion_getInstance_2();
748
- var tmp_0 = this.n1j();
749
- var tmp_1 = this.m1j();
750
- return tmp.t1k(tmp_0, tmp_1, null, 4, null);
761
+ protoOf(Equation).swap = function () {
762
+ return Companion_getInstance_2().of(this.s1i(), this.r1i());
751
763
  };
752
- Equation.prototype.apply = function (substitution, equalityChecker) {
764
+ protoOf(Equation).n1j = function (substitution, equalityChecker) {
765
+ return Companion_getInstance_2().c1j(this.r1i().getSubstituted(substitution, []), this.s1i().getSubstituted(substitution, []), equalityChecker);
766
+ };
767
+ protoOf(Equation).apply = function (substitution, equalityChecker, $super) {
753
768
  var tmp;
754
- if (equalityChecker === void 1) {
769
+ if (equalityChecker === VOID) {
755
770
  tmp = Term$equals$ref_6();
756
771
  } else {
757
772
  tmp = equalityChecker;
758
773
  }
759
- return this.j1k(substitution, tmp);
760
- };
761
- Equation.prototype.j1k = function (substitution, equalityChecker) {
762
- return Companion_getInstance_2().y1j(this.m1j().getSubstituted(substitution, []), this.n1j().getSubstituted(substitution, []), equalityChecker);
774
+ equalityChecker = tmp;
775
+ return $super === VOID ? this.n1j(substitution, equalityChecker) : $super.n1j.call(this, substitution, equalityChecker);
763
776
  };
764
- Equation.prototype.x1j = function (substitution, equalityChecker, $mask0, $handler) {
765
- if (!(($mask0 & 2) === 0)) {
766
- equalityChecker = Term$equals$ref_6();
767
- }
768
- return this.j1k(substitution, equalityChecker);
769
- };
770
- Object.defineProperty(Equation.prototype, 'lhs', {
771
- configurable: true,
772
- get: function () {
773
- return this.m1j();
774
- }
777
+ defineProp(protoOf(Equation), 'lhs', function () {
778
+ return this.r1i();
775
779
  });
776
- Object.defineProperty(Equation.prototype, 'rhs', {
777
- configurable: true,
778
- get: function () {
779
- return this.n1j();
780
- }
780
+ defineProp(protoOf(Equation), 'rhs', function () {
781
+ return this.s1i();
781
782
  });
782
783
  function toEquations(_this__u8e3s4) {
783
784
  var tmp$ret$4;
784
785
  // Inline function 'kotlin.collections.map' call
785
- var tmp0_map = _this__u8e3s4.z();
786
+ var tmp1_map = _this__u8e3s4.z();
786
787
  var tmp$ret$3;
787
788
  // Inline function 'kotlin.collections.mapTo' call
788
- var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp0_map, 10));
789
- var tmp0_iterator = tmp0_map.j();
789
+ var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
790
+ var tmp0_iterator = tmp1_map.j();
790
791
  while (tmp0_iterator.m()) {
791
792
  var item = tmp0_iterator.n();
792
793
  var tmp$ret$2;
@@ -813,12 +814,12 @@
813
814
  }
814
815
  function toAssignmentPair(_this__u8e3s4) {
815
816
  var tmp;
816
- if (_this__u8e3s4.w1j()) {
817
- tmp = _this__u8e3s4.r1j().k1k();
818
- } else if (_this__u8e3s4.m1j().yw()) {
819
- tmp = to(_this__u8e3s4.m1j().castToVar(), _this__u8e3s4.n1j());
820
- } else if (_this__u8e3s4.n1j().yw()) {
821
- tmp = to(_this__u8e3s4.n1j().castToVar(), _this__u8e3s4.m1j());
817
+ if (_this__u8e3s4.b1j()) {
818
+ tmp = _this__u8e3s4.w1i().o1j();
819
+ } else if (_this__u8e3s4.r1i().mw()) {
820
+ tmp = to(_this__u8e3s4.r1i().castToVar(), _this__u8e3s4.s1i());
821
+ } else if (_this__u8e3s4.s1i().mw()) {
822
+ tmp = to(_this__u8e3s4.s1i().castToVar(), _this__u8e3s4.r1i());
822
823
  } else {
823
824
  throw IllegalArgumentException_init_$Create$('Equation contains no variables: ' + _this__u8e3s4);
824
825
  }
@@ -833,12 +834,12 @@
833
834
  function Unificator$Companion$naive$1($context) {
834
835
  AbstractUnificator.call(this, $context);
835
836
  }
836
- Unificator$Companion$naive$1.prototype.h1j = function (first, second) {
837
+ protoOf(Unificator$Companion$naive$1).n1i = function (first, second) {
837
838
  var tmp;
838
- if (first.dx() ? second.dx() : false) {
839
- tmp = first.castToInteger().b1().ik(second.castToInteger().b1()) === 0;
840
- } else if (first.cx() ? second.cx() : false) {
841
- tmp = first.castToNumeric().u10().zj(second.castToNumeric().u10()) === 0;
839
+ if (first.pw() ? second.pw() : false) {
840
+ tmp = first.castToInteger().b1().ek(second.castToInteger().b1()) === 0;
841
+ } else if (first.ow() ? second.ow() : false) {
842
+ tmp = first.castToNumeric().iz().vj(second.castToNumeric().iz()) === 0;
842
843
  } else {
843
844
  tmp = first.equals(second);
844
845
  }
@@ -847,62 +848,60 @@
847
848
  function Unificator$Companion$strict$1($context) {
848
849
  AbstractUnificator.call(this, $context);
849
850
  }
850
- Unificator$Companion$strict$1.prototype.h1j = function (first, second) {
851
+ protoOf(Unificator$Companion$strict$1).n1i = function (first, second) {
851
852
  return first.equals(second);
852
853
  };
853
854
  function Companion_0() {
854
855
  Companion_instance_0 = this;
855
856
  var tmp = this;
856
- tmp.c1l_1 = lazy(Unificator$Companion$default$delegate$lambda);
857
- this.d1l_1 = 32;
857
+ tmp.f1k_1 = lazy(Unificator$Companion$default$delegate$lambda);
858
+ this.g1k_1 = 32;
858
859
  }
859
- Companion_0.prototype.e1l = function () {
860
+ protoOf(Companion_0).h1k = function () {
860
861
  var tmp$ret$0;
861
862
  // Inline function 'kotlin.getValue' call
862
863
  var tmp0_getValue = default$factory();
863
- tmp$ret$0 = this.c1l_1.b1();
864
+ tmp$ret$0 = this.f1k_1.b1();
864
865
  return tmp$ret$0;
865
866
  };
866
- Companion_0.prototype.mguWith = function (_this__u8e3s4, other) {
867
- return this.e1l().mgu(_this__u8e3s4, other);
867
+ protoOf(Companion_0).mguWith = function (_this__u8e3s4, other) {
868
+ return this.h1k().mgu(_this__u8e3s4, other);
868
869
  };
869
- Companion_0.prototype.matches = function (_this__u8e3s4, other) {
870
- return this.e1l().match(_this__u8e3s4, other);
870
+ protoOf(Companion_0).matches = function (_this__u8e3s4, other) {
871
+ return this.h1k().match(_this__u8e3s4, other);
871
872
  };
872
- Companion_0.prototype.unifyWith = function (_this__u8e3s4, other) {
873
- return this.e1l().unify(_this__u8e3s4, other);
873
+ protoOf(Companion_0).unifyWith = function (_this__u8e3s4, other) {
874
+ return this.h1k().unify(_this__u8e3s4, other);
874
875
  };
875
- Companion_0.prototype.mergeWith = function (_this__u8e3s4, other) {
876
- return this.e1l().merge(_this__u8e3s4, other);
876
+ protoOf(Companion_0).mergeWith = function (_this__u8e3s4, other) {
877
+ return this.h1k().merge(_this__u8e3s4, other);
877
878
  };
878
- Companion_0.prototype.naiveWithContext = function (context) {
879
+ protoOf(Companion_0).naiveWithContext = function (context) {
879
880
  return new Unificator$Companion$naive$1(context);
880
881
  };
881
- Companion_0.prototype.naive = function () {
882
+ protoOf(Companion_0).naive = function () {
882
883
  return this.naiveWithContext(Companion_getInstance().empty());
883
884
  };
884
- Companion_0.prototype.strictWithContext = function (context) {
885
+ protoOf(Companion_0).strictWithContext = function (context) {
885
886
  return new Unificator$Companion$strict$1(context);
886
887
  };
887
- Companion_0.prototype.strict = function () {
888
+ protoOf(Companion_0).strict = function () {
888
889
  return this.strictWithContext(Companion_getInstance().empty());
889
890
  };
890
- Companion_0.prototype.cached = function (other, capacity) {
891
- return this.f1l(other, capacity === void 1 ? 32 : capacity);
892
- };
893
- Companion_0.prototype.f1l = function (other, capacity) {
891
+ protoOf(Companion_0).i1k = function (other, capacity) {
894
892
  var tmp;
895
893
  if (other instanceof CachedUnificator) {
896
- tmp = new CachedUnificator(other.b1k_1, capacity);
894
+ tmp = new CachedUnificator(other.f1j_1, capacity);
897
895
  } else {
898
896
  tmp = new CachedUnificator(other, capacity);
899
897
  }
900
898
  return tmp;
901
899
  };
902
- Object.defineProperty(Companion_0.prototype, 'default', {
903
- configurable: true,
904
- get: Companion_0.prototype.e1l
905
- });
900
+ protoOf(Companion_0).cached = function (other, capacity, $super) {
901
+ capacity = capacity === VOID ? 32 : capacity;
902
+ return $super === VOID ? this.i1k(other, capacity) : $super.i1k.call(this, other, capacity);
903
+ };
904
+ defineProp(protoOf(Companion_0), 'default', protoOf(Companion_0).h1k);
906
905
  var Companion_instance_0;
907
906
  function Companion_getInstance_3() {
908
907
  if (Companion_instance_0 == null)
@@ -913,45 +912,45 @@
913
912
  }
914
913
  function default$factory() {
915
914
  return getPropertyCallableRef('default', 1, KProperty1, function (receiver) {
916
- return receiver.e1l();
915
+ return receiver.h1k();
917
916
  }, null);
918
917
  }
919
918
  //region block: post-declaration
920
- AbstractUnificator.prototype.mgu = mgu;
921
- AbstractUnificator.prototype.matchWithOccurCheck = matchWithOccurCheck;
922
- AbstractUnificator.prototype.match = match;
923
- AbstractUnificator.prototype.unifyWithOccurCheck = unifyWithOccurCheck;
924
- AbstractUnificator.prototype.unify = unify;
925
- AbstractUnificator.prototype.merge = merge;
926
- CachedUnificator.prototype.mgu = mgu;
927
- CachedUnificator.prototype.matchWithOccurCheck = matchWithOccurCheck;
928
- CachedUnificator.prototype.match = match;
929
- CachedUnificator.prototype.unifyWithOccurCheck = unifyWithOccurCheck;
930
- CachedUnificator.prototype.unify = unify;
931
- CachedUnificator.prototype.merge = merge;
932
- Equation.prototype.nq = castTo;
933
- Identity.prototype.nq = castTo;
934
- Assignment.prototype.nq = castTo;
935
- Comparison.prototype.nq = castTo;
936
- Contradiction.prototype.nq = castTo;
937
- Unificator$Companion$naive$1.prototype.mgu = mgu;
938
- Unificator$Companion$naive$1.prototype.merge = merge;
939
- Unificator$Companion$naive$1.prototype.matchWithOccurCheck = matchWithOccurCheck;
940
- Unificator$Companion$naive$1.prototype.match = match;
941
- Unificator$Companion$naive$1.prototype.unifyWithOccurCheck = unifyWithOccurCheck;
942
- Unificator$Companion$naive$1.prototype.unify = unify;
943
- Unificator$Companion$strict$1.prototype.mgu = mgu;
944
- Unificator$Companion$strict$1.prototype.merge = merge;
945
- Unificator$Companion$strict$1.prototype.matchWithOccurCheck = matchWithOccurCheck;
946
- Unificator$Companion$strict$1.prototype.match = match;
947
- Unificator$Companion$strict$1.prototype.unifyWithOccurCheck = unifyWithOccurCheck;
948
- Unificator$Companion$strict$1.prototype.unify = unify;
919
+ protoOf(AbstractUnificator).mgu = mgu;
920
+ protoOf(AbstractUnificator).matchWithOccurCheck = matchWithOccurCheck;
921
+ protoOf(AbstractUnificator).match = match;
922
+ protoOf(AbstractUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
923
+ protoOf(AbstractUnificator).unify = unify;
924
+ protoOf(AbstractUnificator).merge = merge;
925
+ protoOf(CachedUnificator).mgu = mgu;
926
+ protoOf(CachedUnificator).matchWithOccurCheck = matchWithOccurCheck;
927
+ protoOf(CachedUnificator).match = match;
928
+ protoOf(CachedUnificator).unifyWithOccurCheck = unifyWithOccurCheck;
929
+ protoOf(CachedUnificator).unify = unify;
930
+ protoOf(CachedUnificator).merge = merge;
931
+ protoOf(Equation).hq = castTo;
932
+ protoOf(Identity).hq = castTo;
933
+ protoOf(Assignment).hq = castTo;
934
+ protoOf(Comparison).hq = castTo;
935
+ protoOf(Contradiction).hq = castTo;
936
+ protoOf(Unificator$Companion$naive$1).mgu = mgu;
937
+ protoOf(Unificator$Companion$naive$1).merge = merge;
938
+ protoOf(Unificator$Companion$naive$1).matchWithOccurCheck = matchWithOccurCheck;
939
+ protoOf(Unificator$Companion$naive$1).match = match;
940
+ protoOf(Unificator$Companion$naive$1).unifyWithOccurCheck = unifyWithOccurCheck;
941
+ protoOf(Unificator$Companion$naive$1).unify = unify;
942
+ protoOf(Unificator$Companion$strict$1).mgu = mgu;
943
+ protoOf(Unificator$Companion$strict$1).merge = merge;
944
+ protoOf(Unificator$Companion$strict$1).matchWithOccurCheck = matchWithOccurCheck;
945
+ protoOf(Unificator$Companion$strict$1).match = match;
946
+ protoOf(Unificator$Companion$strict$1).unifyWithOccurCheck = unifyWithOccurCheck;
947
+ protoOf(Unificator$Companion$strict$1).unify = unify;
949
948
  //endregion
950
949
  //region block: exports
951
950
  _.$_$ = _.$_$ || {};
952
951
  _.$_$.a = Companion_getInstance_3;
953
952
  //endregion
954
953
  return _;
955
- }(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./2p-core.js'), require('./2p-utils.js')));
954
+ }));
956
955
 
957
956
  //# sourceMappingURL=2p-unify.js.map