@tuprolog/arg2p-core 0.7.3 → 0.8.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-dsl-core.js CHANGED
@@ -1,13 +1,1628 @@
1
1
  (function (root, factory) {
2
2
  if (typeof define === 'function' && define.amd)
3
- define(['exports'], factory);
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './2p-core.js', './2p-utils.js', './kt-math.js'], factory);
4
4
  else if (typeof exports === 'object')
5
- factory(module.exports);
6
- else
7
- root['2p-dsl-core'] = factory(typeof this['2p-dsl-core'] === 'undefined' ? {} : this['2p-dsl-core']);
8
- }(this, function (_) {
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./2p-core.js'), require('./2p-utils.js'), require('./kt-math.js'));
6
+ else {
7
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module '2p-dsl-core'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to '2p-dsl-core'.");
9
+ }
10
+ if (typeof this['2p-core'] === 'undefined') {
11
+ throw new Error("Error loading module '2p-dsl-core'. Its dependency '2p-core' was not found. Please, check whether '2p-core' is loaded prior to '2p-dsl-core'.");
12
+ }
13
+ if (typeof this['2p-utils'] === 'undefined') {
14
+ throw new Error("Error loading module '2p-dsl-core'. Its dependency '2p-utils' was not found. Please, check whether '2p-utils' is loaded prior to '2p-dsl-core'.");
15
+ }
16
+ if (typeof this['kt-math'] === 'undefined') {
17
+ throw new Error("Error loading module '2p-dsl-core'. Its dependency 'kt-math' was not found. Please, check whether 'kt-math' is loaded prior to '2p-dsl-core'.");
18
+ }
19
+ root['2p-dsl-core'] = factory(typeof this['2p-dsl-core'] === 'undefined' ? {} : this['2p-dsl-core'], this['kotlin-kotlin-stdlib'], this['2p-core'], this['2p-utils'], this['kt-math']);
20
+ }
21
+ }(this, function (_, kotlin_kotlin, kotlin_it_unibo_tuprolog_core, kotlin_it_unibo_tuprolog_utils, kotlin_io_github_gciatto_kt_math) {
9
22
  'use strict';
23
+ //region block: imports
24
+ var THROW_CCE = kotlin_kotlin.$_$.v9;
25
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.h;
26
+ var protoOf = kotlin_kotlin.$_$.a6;
27
+ var Unit_instance = kotlin_kotlin.$_$.s1;
28
+ var toString = kotlin_kotlin.$_$.f6;
29
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s;
30
+ var Term = kotlin_it_unibo_tuprolog_core.$_$.q2;
31
+ var isInterface = kotlin_kotlin.$_$.q5;
32
+ var TermConvertible = kotlin_it_unibo_tuprolog_core.$_$.t1;
33
+ var getKClassFromExpression = kotlin_kotlin.$_$.b;
34
+ var getKClass = kotlin_kotlin.$_$.c;
35
+ var toString_0 = kotlin_kotlin.$_$.j1;
36
+ var Companion_getInstance = kotlin_it_unibo_tuprolog_core.$_$.z;
37
+ var asIterable = kotlin_kotlin.$_$.c2;
38
+ var assertItemsAreNotNull = kotlin_it_unibo_tuprolog_utils.$_$.q;
39
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.j2;
40
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.e;
41
+ var assertItemsAreNotNull_0 = kotlin_it_unibo_tuprolog_utils.$_$.p;
42
+ var map = kotlin_kotlin.$_$.s7;
43
+ var assertItemsAreNotNull_1 = kotlin_it_unibo_tuprolog_utils.$_$.r;
44
+ var Char = kotlin_kotlin.$_$.j9;
45
+ var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.p1;
46
+ var BigInteger = kotlin_io_github_gciatto_kt_math.$_$.g;
47
+ var BigDecimal = kotlin_io_github_gciatto_kt_math.$_$.f;
48
+ var Sequence = kotlin_kotlin.$_$.w6;
49
+ var Iterable = kotlin_kotlin.$_$.u1;
50
+ var List = kotlin_kotlin.$_$.v1;
51
+ var Set = kotlin_kotlin.$_$.y1;
52
+ var Pair = kotlin_kotlin.$_$.t9;
53
+ var Triple = kotlin_kotlin.$_$.x9;
54
+ var Entry = kotlin_kotlin.$_$.w1;
55
+ var Map = kotlin_kotlin.$_$.x1;
56
+ var classMeta = kotlin_kotlin.$_$.e5;
57
+ var setMetadataFor = kotlin_kotlin.$_$.b6;
58
+ var VOID = kotlin_kotlin.$_$.d;
59
+ var Struct = kotlin_it_unibo_tuprolog_core.$_$.r1;
60
+ var Scope = kotlin_it_unibo_tuprolog_core.$_$.q1;
61
+ var interfaceMeta = kotlin_kotlin.$_$.n5;
62
+ var Companion_instance = kotlin_it_unibo_tuprolog_core.$_$.t;
63
+ var Companion_instance_0 = kotlin_it_unibo_tuprolog_core.$_$.a1;
64
+ var objectMeta = kotlin_kotlin.$_$.z5;
65
+ var logicListFromFrom = kotlin_it_unibo_tuprolog_core.$_$.d;
66
+ var logicListFromIterable = kotlin_it_unibo_tuprolog_core.$_$.b;
67
+ var logicListFromSequence = kotlin_it_unibo_tuprolog_core.$_$.c;
68
+ var plus = kotlin_kotlin.$_$.b4;
69
+ var Tuple = kotlin_it_unibo_tuprolog_core.$_$.r2;
70
+ var Companion_instance_1 = kotlin_it_unibo_tuprolog_core.$_$.y;
71
+ var Companion_getInstance_0 = kotlin_it_unibo_tuprolog_core.$_$.v;
72
+ var Var = kotlin_it_unibo_tuprolog_core.$_$.s2;
73
+ var arrayConcat = kotlin_kotlin.$_$.a;
74
+ var sequenceOf = kotlin_kotlin.$_$.y7;
75
+ var copyToArray = kotlin_kotlin.$_$.r2;
76
+ var listOf = kotlin_kotlin.$_$.k3;
77
+ var Rule = kotlin_it_unibo_tuprolog_core.$_$.p1;
78
+ var Directive = kotlin_it_unibo_tuprolog_core.$_$.i1;
79
+ var Fact = kotlin_it_unibo_tuprolog_core.$_$.j1;
80
+ var NumberTypeTester = kotlin_it_unibo_tuprolog_utils.$_$.i;
81
+ //endregion
10
82
  //region block: pre-declaration
83
+ function copy(scope, $super) {
84
+ scope = scope === VOID ? this.t1g() : scope;
85
+ return $super === VOID ? this.u1g(scope) : $super.u1g.call(this, scope);
86
+ }
87
+ setMetadataFor(Termificator, 'Termificator', interfaceMeta);
88
+ setMetadataFor(AbstractTermificator, 'AbstractTermificator', classMeta, VOID, [Termificator]);
89
+ function convertToTerm(_this__u8e3s4) {
90
+ return this.r1i().toTerm(_this__u8e3s4);
91
+ }
92
+ function convertToSpecificSubTypeOfTerm(_this__u8e3s4, type, converter) {
93
+ var t = this.convertToTerm(_this__u8e3s4);
94
+ var tmp;
95
+ if (type.p6(t)) {
96
+ tmp = isInterface(t, Term) ? t : THROW_CCE();
97
+ } else {
98
+ if (isInterface(t, Struct)) {
99
+ tmp = converter(t);
100
+ } else {
101
+ raiseErrorConvertingTo(_this__u8e3s4, type);
102
+ }
103
+ }
104
+ return tmp;
105
+ }
106
+ setMetadataFor(BaseLogicProgrammingScope, 'BaseLogicProgrammingScope', interfaceMeta, VOID, [Scope]);
107
+ setMetadataFor(Companion, 'Companion', objectMeta);
108
+ function varTo(_this__u8e3s4, termObject) {
109
+ return Companion_getInstance_0().of(_this__u8e3s4, this.convertToTerm(termObject));
110
+ }
111
+ function stringTo(_this__u8e3s4, termObject) {
112
+ return Companion_getInstance_0().of(this.varOf(_this__u8e3s4), this.convertToTerm(termObject));
113
+ }
114
+ function substitutionGet(_this__u8e3s4, term) {
115
+ var t = this.convertToTerm(term);
116
+ var tmp;
117
+ if (isInterface(t, Var)) {
118
+ tmp = _this__u8e3s4.x2(t);
119
+ } else {
120
+ raiseErrorConvertingTo(term, getKClass(Var));
121
+ }
122
+ return tmp;
123
+ }
124
+ function substitutionContainsKey(_this__u8e3s4, term) {
125
+ var t = this.convertToTerm(term);
126
+ var tmp;
127
+ if (isInterface(t, Var)) {
128
+ tmp = _this__u8e3s4.u2(t);
129
+ } else {
130
+ raiseErrorConvertingTo(term, getKClass(Var));
131
+ }
132
+ return tmp;
133
+ }
134
+ function substitutionContains(_this__u8e3s4, term) {
135
+ return this.substitutionContainsKey(_this__u8e3s4, term);
136
+ }
137
+ function substitutionContainsValue(_this__u8e3s4, term) {
138
+ return _this__u8e3s4.v2(this.convertToTerm(term));
139
+ }
140
+ setMetadataFor(LogicProgrammingScopeWithSubstitutions, 'LogicProgrammingScopeWithSubstitutions', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
141
+ function termPlus(_this__u8e3s4, other) {
142
+ return this.structOf('+', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
143
+ }
144
+ function number(_this__u8e3s4, other) {
145
+ return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
146
+ }
147
+ function booleanPlus(_this__u8e3s4, other) {
148
+ return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
149
+ }
150
+ function charPlus(_this__u8e3s4, other) {
151
+ return this.termPlus(this.convertToTerm(new Char(_this__u8e3s4)), other);
152
+ }
153
+ function termMinus(_this__u8e3s4, other) {
154
+ return this.structOf('-', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
155
+ }
156
+ function numberMinus(_this__u8e3s4, other) {
157
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
158
+ }
159
+ function booleanMinus(_this__u8e3s4, other) {
160
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
161
+ }
162
+ function charMinus(_this__u8e3s4, other) {
163
+ return this.termMinus(this.convertToTerm(new Char(_this__u8e3s4)), other);
164
+ }
165
+ function stringMinus(_this__u8e3s4, other) {
166
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
167
+ }
168
+ function termTimes(_this__u8e3s4, other) {
169
+ return this.structOf('*', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
170
+ }
171
+ function numberTimes(_this__u8e3s4, other) {
172
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
173
+ }
174
+ function booleanTimes(_this__u8e3s4, other) {
175
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
176
+ }
177
+ function charTimes(_this__u8e3s4, other) {
178
+ return this.termTimes(this.convertToTerm(new Char(_this__u8e3s4)), other);
179
+ }
180
+ function stringTimes(_this__u8e3s4, other) {
181
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
182
+ }
183
+ function termDiv(_this__u8e3s4, other) {
184
+ return this.indicatorOf(this.convertToTerm(_this__u8e3s4), this.convertToTerm(other));
185
+ }
186
+ function numberDiv(_this__u8e3s4, other) {
187
+ return this.termDiv(this.convertToTerm(_this__u8e3s4), other);
188
+ }
189
+ function booleanDiv(_this__u8e3s4, other) {
190
+ return this.termDiv(this.convertToTerm(_this__u8e3s4), other);
191
+ }
192
+ function charDiv(_this__u8e3s4, other) {
193
+ return this.termDiv(this.convertToTerm(new Char(_this__u8e3s4)), other);
194
+ }
195
+ function stringDiv(_this__u8e3s4, other) {
196
+ return this.termDiv(this.convertToTerm(_this__u8e3s4), other);
197
+ }
198
+ function anyEqualsTo(_this__u8e3s4, other) {
199
+ return this.structOf('=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
200
+ }
201
+ function anyNotEqualsTo(_this__u8e3s4, other) {
202
+ return this.structOf('\\=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
203
+ }
204
+ function anyGreaterThan(_this__u8e3s4, other) {
205
+ return this.structOf('>', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
206
+ }
207
+ function anyGreaterThanOrEqualsTo(_this__u8e3s4, other) {
208
+ return this.structOf('>=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
209
+ }
210
+ function anyNonLowerThan(_this__u8e3s4, other) {
211
+ return this.anyGreaterThanOrEqualsTo(_this__u8e3s4, other);
212
+ }
213
+ function anyLowerThan(_this__u8e3s4, other) {
214
+ return this.structOf('<', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
215
+ }
216
+ function anyLowerThanOrEqualsTo(_this__u8e3s4, other) {
217
+ return this.structOf('=<', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
218
+ }
219
+ function anyNonGreaterThan(_this__u8e3s4, other) {
220
+ return this.anyLowerThanOrEqualsTo(_this__u8e3s4, other);
221
+ }
222
+ function anyIntDiv(_this__u8e3s4, other) {
223
+ return this.structOf('//', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
224
+ }
225
+ function termRem(_this__u8e3s4, other) {
226
+ return this.structOf('rem', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
227
+ }
228
+ function numberRem(_this__u8e3s4, other) {
229
+ return this.termRem(this.convertToTerm(_this__u8e3s4), other);
230
+ }
231
+ function booleanRem(_this__u8e3s4, other) {
232
+ return this.termRem(this.convertToTerm(_this__u8e3s4), other);
233
+ }
234
+ function charRem(_this__u8e3s4, other) {
235
+ return this.termRem(this.convertToTerm(new Char(_this__u8e3s4)), other);
236
+ }
237
+ function stringRem(_this__u8e3s4, other) {
238
+ return this.termRem(this.convertToTerm(_this__u8e3s4), other);
239
+ }
240
+ function anyAnd(_this__u8e3s4, other) {
241
+ // Inline function 'kotlin.let' call
242
+ // Inline function 'kotlin.contracts.contract' call
243
+ // Inline function 'it.unibo.tuprolog.dsl.LogicProgrammingScopeWithOperators.and.<anonymous>' call
244
+ var it = this.convertToTerm(_this__u8e3s4);
245
+ var otherTerm = this.convertToTerm(other);
246
+ var tmp;
247
+ if (isInterface(it, Tuple)) {
248
+ tmp = this.tupleOfIterable(plus(it.mw(), otherTerm));
249
+ } else {
250
+ tmp = this.tupleOf([this.convertToTerm(_this__u8e3s4), otherTerm]);
251
+ }
252
+ return tmp;
253
+ }
254
+ function anyOr(_this__u8e3s4, other) {
255
+ return this.structOf(';', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
256
+ }
257
+ function anyPow(_this__u8e3s4, other) {
258
+ return this.structOf('**', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
259
+ }
260
+ function anySup(_this__u8e3s4, other) {
261
+ return this.structOf('^', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
262
+ }
263
+ function anyIs(_this__u8e3s4, other) {
264
+ return this.structOf('is', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
265
+ }
266
+ function anyThen(_this__u8e3s4, other) {
267
+ return this.structOf('->', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
268
+ }
269
+ function anyImpliedBy(_this__u8e3s4, other) {
270
+ var t = this.convertToTerm(_this__u8e3s4);
271
+ var tmp;
272
+ if (isInterface(t, Struct)) {
273
+ tmp = this.ruleOf(t, this.convertToTerm(other), []);
274
+ } else {
275
+ raiseErrorConvertingTo(_this__u8e3s4, getKClass(Struct));
276
+ }
277
+ return tmp;
278
+ }
279
+ function anyIf(_this__u8e3s4, other) {
280
+ return this.anyImpliedBy(_this__u8e3s4, other);
281
+ }
282
+ function anyImpliedByVararg(_this__u8e3s4, other) {
283
+ var tmp = Companion_instance_1;
284
+ // Inline function 'kotlin.collections.map' call
285
+ // Inline function 'kotlin.collections.mapTo' call
286
+ var destination = ArrayList_init_$Create$(other.length);
287
+ var inductionVariable = 0;
288
+ var last = other.length;
289
+ while (inductionVariable < last) {
290
+ var item = other[inductionVariable];
291
+ inductionVariable = inductionVariable + 1 | 0;
292
+ // Inline function 'it.unibo.tuprolog.dsl.LogicProgrammingScopeWithOperators.impliedBy.<anonymous>' call
293
+ var tmp$ret$0 = this.convertToTerm(item);
294
+ destination.o(tmp$ret$0);
295
+ }
296
+ return this.anyImpliedBy(_this__u8e3s4, tmp.wrapIterableIfNeeded(destination));
297
+ }
298
+ function anyIfVararg(_this__u8e3s4, other) {
299
+ return this.anyImpliedByVararg(_this__u8e3s4, other.slice());
300
+ }
301
+ setMetadataFor(LogicProgrammingScopeWithOperators, 'LogicProgrammingScopeWithOperators', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
302
+ function stringInvoke(_this__u8e3s4, term, terms) {
303
+ var tmp = sequenceOf(arrayConcat([[term], terms]));
304
+ return this.structOfSequence(_this__u8e3s4, map(tmp, MinimalLogicProgrammingScope$invoke$lambda(this)));
305
+ }
306
+ function structOfAny(functor, args) {
307
+ // Inline function 'kotlin.collections.toTypedArray' call
308
+ // Inline function 'kotlin.collections.map' call
309
+ // Inline function 'kotlin.collections.mapTo' call
310
+ var destination = ArrayList_init_$Create$(args.length);
311
+ var inductionVariable = 0;
312
+ var last = args.length;
313
+ while (inductionVariable < last) {
314
+ var item = args[inductionVariable];
315
+ inductionVariable = inductionVariable + 1 | 0;
316
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.structOf.<anonymous>' call
317
+ var tmp$ret$0 = this.convertToTerm(item);
318
+ destination.o(tmp$ret$0);
319
+ }
320
+ var tmp$ret$3 = copyToArray(destination);
321
+ return this.structOf(functor, tmp$ret$3.slice());
322
+ }
323
+ function tupleOfAny(terms) {
324
+ // Inline function 'kotlin.collections.toTypedArray' call
325
+ // Inline function 'kotlin.collections.map' call
326
+ // Inline function 'kotlin.collections.mapTo' call
327
+ var destination = ArrayList_init_$Create$(terms.length);
328
+ var inductionVariable = 0;
329
+ var last = terms.length;
330
+ while (inductionVariable < last) {
331
+ var item = terms[inductionVariable];
332
+ inductionVariable = inductionVariable + 1 | 0;
333
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.tupleOf.<anonymous>' call
334
+ var tmp$ret$0 = this.convertToTerm(item);
335
+ destination.o(tmp$ret$0);
336
+ }
337
+ var tmp$ret$3 = copyToArray(destination);
338
+ return this.tupleOf(tmp$ret$3.slice());
339
+ }
340
+ function logicListOfAny(terms) {
341
+ // Inline function 'kotlin.collections.toTypedArray' call
342
+ // Inline function 'kotlin.collections.map' call
343
+ // Inline function 'kotlin.collections.mapTo' call
344
+ var destination = ArrayList_init_$Create$(terms.length);
345
+ var inductionVariable = 0;
346
+ var last = terms.length;
347
+ while (inductionVariable < last) {
348
+ var item = terms[inductionVariable];
349
+ inductionVariable = inductionVariable + 1 | 0;
350
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicListOf.<anonymous>' call
351
+ var tmp$ret$0 = this.convertToTerm(item);
352
+ destination.o(tmp$ret$0);
353
+ }
354
+ var tmp$ret$3 = copyToArray(destination);
355
+ return this.logicListOf(tmp$ret$3.slice());
356
+ }
357
+ function blockOfAny(terms) {
358
+ // Inline function 'kotlin.collections.toTypedArray' call
359
+ // Inline function 'kotlin.collections.map' call
360
+ // Inline function 'kotlin.collections.mapTo' call
361
+ var destination = ArrayList_init_$Create$(terms.length);
362
+ var inductionVariable = 0;
363
+ var last = terms.length;
364
+ while (inductionVariable < last) {
365
+ var item = terms[inductionVariable];
366
+ inductionVariable = inductionVariable + 1 | 0;
367
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.blockOf.<anonymous>' call
368
+ var tmp$ret$0 = this.convertToTerm(item);
369
+ destination.o(tmp$ret$0);
370
+ }
371
+ var tmp$ret$3 = copyToArray(destination);
372
+ return this.blockOf(tmp$ret$3.slice());
373
+ }
374
+ function factOfAny(term) {
375
+ var tmp = this.convertToTerm(term);
376
+ return this.factOf(isInterface(tmp, Struct) ? tmp : THROW_CCE());
377
+ }
378
+ function consOfAny(head, tail) {
379
+ return this.consOf(this.convertToTerm(head), this.convertToTerm(tail));
380
+ }
381
+ function directiveOfAny(term, terms) {
382
+ var tmp = this.convertToTerm(term);
383
+ // Inline function 'kotlin.collections.toTypedArray' call
384
+ // Inline function 'kotlin.collections.map' call
385
+ // Inline function 'kotlin.collections.mapTo' call
386
+ var destination = ArrayList_init_$Create$(terms.length);
387
+ var inductionVariable = 0;
388
+ var last = terms.length;
389
+ while (inductionVariable < last) {
390
+ var item = terms[inductionVariable];
391
+ inductionVariable = inductionVariable + 1 | 0;
392
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.directiveOf.<anonymous>' call
393
+ var tmp$ret$0 = this.convertToTerm(item);
394
+ destination.o(tmp$ret$0);
395
+ }
396
+ var tmp$ret$3 = copyToArray(destination);
397
+ return this.directiveOf(tmp, tmp$ret$3.slice());
398
+ }
399
+ function withScope(function_0) {
400
+ return function_0(this.newScope());
401
+ }
402
+ function logicList(items, tail) {
403
+ // Inline function 'kotlin.let' call
404
+ // Inline function 'kotlin.collections.map' call
405
+ var this_0 = listOf(items.slice());
406
+ // Inline function 'kotlin.collections.mapTo' call
407
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
408
+ var tmp0_iterator = this_0.r();
409
+ while (tmp0_iterator.s()) {
410
+ var item = tmp0_iterator.u();
411
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
412
+ var tmp$ret$0 = this.convertToTerm(item);
413
+ destination.o(tmp$ret$0);
414
+ }
415
+ // Inline function 'kotlin.contracts.contract' call
416
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
417
+ var tmp;
418
+ if (!(tail == null)) {
419
+ tmp = this.q10(destination, this.convertToTerm(tail));
420
+ } else {
421
+ tmp = this.logicListOfIterable(destination);
422
+ }
423
+ return tmp;
424
+ }
425
+ function logicList_0(items, tail, $super) {
426
+ tail = tail === VOID ? null : tail;
427
+ return $super === VOID ? this.x1i(items, tail) : logicList(items, tail);
428
+ }
429
+ function rule(function_0) {
430
+ var tmp = this.convertToTerm(function_0(this.newScope()));
431
+ return isInterface(tmp, Rule) ? tmp : THROW_CCE();
432
+ }
433
+ function directive(function_0) {
434
+ var tmp = function_0(this.newScope());
435
+ var tmp_0 = getKClass(Directive);
436
+ return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$directive$directiveOf$ref(this));
437
+ }
438
+ function fact(function_0) {
439
+ var tmp = function_0(this.newScope());
440
+ var tmp_0 = getKClass(Fact);
441
+ return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$factOf$ref(this));
442
+ }
443
+ setMetadataFor(MinimalLogicProgrammingScope, 'MinimalLogicProgrammingScope', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
444
+ function at_end_of_stream1(alias) {
445
+ return this.structOf('at_end_of_stream', [this.convertToTerm(alias)]);
446
+ }
447
+ function call1(goal) {
448
+ return this.structOf('call', [this.convertToTerm(goal)]);
449
+ }
450
+ function catch3(goal, error, continuation) {
451
+ return this.structOf('catch', [this.convertToTerm(goal), this.convertToTerm(error), this.convertToTerm(continuation)]);
452
+ }
453
+ function throw1(error) {
454
+ return this.structOf('throw', [this.convertToTerm(error)]);
455
+ }
456
+ function not1(goal) {
457
+ return this.structOf('not', [this.convertToTerm(goal)]);
458
+ }
459
+ function naf1(goal) {
460
+ return this.structOf('\\+', [this.convertToTerm(goal)]);
461
+ }
462
+ function assert1(clause) {
463
+ return this.structOf('assert', [this.convertToTerm(clause)]);
464
+ }
465
+ function asserta1(clause) {
466
+ return this.structOf('asserta', [this.convertToTerm(clause)]);
467
+ }
468
+ function assertz1(clause) {
469
+ return this.structOf('assertz', [this.convertToTerm(clause)]);
470
+ }
471
+ function arg3(index, compound, argument) {
472
+ return this.structOf('arg', [this.convertToTerm(index), this.convertToTerm(compound), this.convertToTerm(argument)]);
473
+ }
474
+ function atom1(atom) {
475
+ return this.structOf('atom', [this.convertToTerm(atom)]);
476
+ }
477
+ function atomic1(atomic) {
478
+ return this.structOf('atomic', [this.convertToTerm(atomic)]);
479
+ }
480
+ function between3(min, max, number) {
481
+ return this.structOf('between', [this.convertToTerm(min), this.convertToTerm(max), this.convertToTerm(number)]);
482
+ }
483
+ function callable1(goal) {
484
+ return this.structOf('callable', [this.convertToTerm(goal)]);
485
+ }
486
+ function compound1(struct) {
487
+ return this.structOf('compound', [this.convertToTerm(struct)]);
488
+ }
489
+ function current_op3(precedence, specifier, functor) {
490
+ return this.structOf('current_op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
491
+ }
492
+ function op3(precedence, specifier, functor) {
493
+ return this.structOf('op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
494
+ }
495
+ function findall3(template, goal, bag) {
496
+ return this.structOf('findall', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
497
+ }
498
+ function float1(number) {
499
+ return this.structOf('float', [this.convertToTerm(number)]);
500
+ }
501
+ function functor3(struct, functor, arity) {
502
+ return this.structOf('functor', [this.convertToTerm(struct), this.convertToTerm(functor), this.convertToTerm(arity)]);
503
+ }
504
+ function ground1(term) {
505
+ return this.structOf('ground', [this.convertToTerm(term)]);
506
+ }
507
+ function integer1(number) {
508
+ return this.structOf('integer', [this.convertToTerm(number)]);
509
+ }
510
+ function natural(number) {
511
+ return this.structOf('natural', [this.convertToTerm(number)]);
512
+ }
513
+ function nonvar1(number) {
514
+ return this.structOf('nonvar', [this.convertToTerm(number)]);
515
+ }
516
+ function number1(number) {
517
+ return this.structOf('number', [this.convertToTerm(number)]);
518
+ }
519
+ function var1(term) {
520
+ return this.structOf('var', [this.convertToTerm(term)]);
521
+ }
522
+ function write1(term) {
523
+ return this.structOf('write', [this.convertToTerm(term)]);
524
+ }
525
+ function univ2(_this__u8e3s4, other) {
526
+ return this.structOf('=..', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
527
+ }
528
+ function eq2(_this__u8e3s4, right) {
529
+ return this.structOf('=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
530
+ }
531
+ function neq2(_this__u8e3s4, right) {
532
+ return this.structOf('\\=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
533
+ }
534
+ function id2(_this__u8e3s4, right) {
535
+ return this.structOf('==', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
536
+ }
537
+ function nid2(_this__u8e3s4, right) {
538
+ return this.structOf('\\==', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
539
+ }
540
+ function arithEq2(_this__u8e3s4, right) {
541
+ return this.structOf('=:=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
542
+ }
543
+ function arithNeq2(_this__u8e3s4, right) {
544
+ return this.structOf('=\\=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
545
+ }
546
+ function member2(item, list) {
547
+ return this.structOf('member', [this.convertToTerm(item), this.convertToTerm(list)]);
548
+ }
549
+ function retract1(clause) {
550
+ return this.structOf('retract', [this.convertToTerm(clause)]);
551
+ }
552
+ function append3(left, right, result) {
553
+ return this.structOf('append', [this.convertToTerm(left), this.convertToTerm(right), this.convertToTerm(result)]);
554
+ }
555
+ function retractall1(clause) {
556
+ return this.structOf('retractall', [this.convertToTerm(clause)]);
557
+ }
558
+ function abolish1(indicator) {
559
+ return this.structOf('abolish', [this.convertToTerm(indicator)]);
560
+ }
561
+ function atom_chars2(atom, chars) {
562
+ return this.structOf('atom_chars', [this.convertToTerm(atom), this.convertToTerm(chars)]);
563
+ }
564
+ function atom_codes2(atom, codes) {
565
+ return this.structOf('atom_codes', [this.convertToTerm(atom), this.convertToTerm(codes)]);
566
+ }
567
+ function atom_concat3(first, second, result) {
568
+ return this.structOf('atom_concat', [this.convertToTerm(first), this.convertToTerm(second), this.convertToTerm(result)]);
569
+ }
570
+ function atom_length2(atom, length) {
571
+ return this.structOf('atom_length', [this.convertToTerm(atom), this.convertToTerm(length)]);
572
+ }
573
+ function char_code2(char, code) {
574
+ return this.structOf('char_code', [this.convertToTerm(char), this.convertToTerm(code)]);
575
+ }
576
+ function clause2(head, body) {
577
+ return this.structOf('clause', [this.convertToTerm(head), this.convertToTerm(body)]);
578
+ }
579
+ function copy_term2(term, copy) {
580
+ return this.structOf('copy_term', [this.convertToTerm(term), this.convertToTerm(copy)]);
581
+ }
582
+ function current_flag2(name, value) {
583
+ return this.structOf('current_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
584
+ }
585
+ function current_prolog_flag2(name, value) {
586
+ return this.structOf('current_prolog_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
587
+ }
588
+ function sub_atom5(atom, before, length, after, sub_atom) {
589
+ return this.structOf('sub_atom', [this.convertToTerm(atom), this.convertToTerm(before), this.convertToTerm(length), this.convertToTerm(after), this.convertToTerm(sub_atom)]);
590
+ }
591
+ function number_chars2(first, second) {
592
+ return this.structOf('number_chars', [this.convertToTerm(first), this.convertToTerm(second)]);
593
+ }
594
+ function number_codes2(first, second) {
595
+ return this.structOf('number_codes', [this.convertToTerm(first), this.convertToTerm(second)]);
596
+ }
597
+ function bagof3(template, goal, bag) {
598
+ return this.structOf('bagof', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
599
+ }
600
+ function setof3(template, goal, bag) {
601
+ return this.structOf('setof', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
602
+ }
603
+ function consult1(url) {
604
+ return this.structOf('consult', [this.convertToTerm(url)]);
605
+ }
606
+ function set_flag2(name, value) {
607
+ return this.structOf('set_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
608
+ }
609
+ function set_prolog_flag2(name, value) {
610
+ return this.structOf('set_prolog_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
611
+ }
612
+ function dynamic1(indicator) {
613
+ return this.structOf('dynamic', [this.convertToTerm(indicator)]);
614
+ }
615
+ function static1(indicator) {
616
+ return this.structOf('static', [this.convertToTerm(indicator)]);
617
+ }
618
+ function solve1(goal) {
619
+ return this.structOf('solve', [this.convertToTerm(goal)]);
620
+ }
621
+ function initialization1(goal) {
622
+ return this.structOf('initialization', [this.convertToTerm(goal)]);
623
+ }
624
+ function load1(url) {
625
+ return this.structOf('load', [this.convertToTerm(url)]);
626
+ }
627
+ function include1(url) {
628
+ return this.structOf('include', [this.convertToTerm(url)]);
629
+ }
630
+ setMetadataFor(LogicProgrammingScopeWithPrologStandardLibrary, 'LogicProgrammingScopeWithPrologStandardLibrary', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
631
+ setMetadataFor(LogicProgrammingScopeImpl, 'LogicProgrammingScopeImpl', classMeta, VOID, [LogicProgrammingScopeWithSubstitutions, LogicProgrammingScopeWithOperators, BaseLogicProgrammingScope, Scope, MinimalLogicProgrammingScope, LogicProgrammingScopeWithPrologStandardLibrary]);
632
+ setMetadataFor(Companion_0, 'Companion', objectMeta);
633
+ setMetadataFor(DefaultTermificator, 'DefaultTermificator', classMeta, AbstractTermificator);
634
+ //endregion
635
+ function AbstractTermificator$handleType$lambda($conversion) {
636
+ return function (it) {
637
+ return $conversion(!(it == null) ? it : THROW_CCE());
638
+ };
639
+ }
640
+ function AbstractTermificator$handleSequenceAsList$lambda(this$0) {
641
+ return function (it) {
642
+ return this$0.x1h(it);
643
+ };
644
+ }
645
+ function AbstractTermificator$handleCharAsString$ref($boundThis) {
646
+ var l = function (p0) {
647
+ return $boundThis.y1h(p0.j9_1);
648
+ };
649
+ l.callableName = 'handleCharAsString';
650
+ return l;
651
+ }
652
+ function AbstractTermificator$handleBooleanAsTruth$ref($boundThis) {
653
+ var l = function (p0) {
654
+ return $boundThis.z1h(p0);
655
+ };
656
+ l.callableName = 'handleBooleanAsTruth';
657
+ return l;
658
+ }
659
+ function AbstractTermificator$handleStringAsAtomOrVariable$ref($boundThis) {
660
+ var l = function (p0) {
661
+ return $boundThis.a1i(p0);
662
+ };
663
+ l.callableName = 'handleStringAsAtomOrVariable';
664
+ return l;
665
+ }
666
+ function AbstractTermificator$handleBigIntegerAsInteger$ref($boundThis) {
667
+ var l = function (p0) {
668
+ return $boundThis.b1i(p0);
669
+ };
670
+ l.callableName = 'handleBigIntegerAsInteger';
671
+ return l;
672
+ }
673
+ function AbstractTermificator$handleBigDecimalAsReal$ref($boundThis) {
674
+ var l = function (p0) {
675
+ return $boundThis.c1i(p0);
676
+ };
677
+ l.callableName = 'handleBigDecimalAsReal';
678
+ return l;
679
+ }
680
+ function AbstractTermificator$handleNumberAsNumeric$ref($boundThis) {
681
+ var l = function (p0) {
682
+ return $boundThis.d1i(p0);
683
+ };
684
+ l.callableName = 'handleNumberAsNumeric';
685
+ return l;
686
+ }
687
+ function AbstractTermificator$handleArrayAsList$ref($boundThis) {
688
+ var l = function (p0) {
689
+ return $boundThis.e1i(p0);
690
+ };
691
+ l.callableName = 'handleArrayAsList';
692
+ return l;
693
+ }
694
+ function AbstractTermificator$handleSequenceAsList$ref($boundThis) {
695
+ var l = function (p0) {
696
+ return $boundThis.f1i(p0);
697
+ };
698
+ l.callableName = 'handleSequenceAsList';
699
+ return l;
700
+ }
701
+ function AbstractTermificator$handleIterableAsList$ref($boundThis) {
702
+ var l = function (p0) {
703
+ return $boundThis.g1i(p0);
704
+ };
705
+ l.callableName = 'handleIterableAsList';
706
+ return l;
707
+ }
708
+ function AbstractTermificator$handleCharAsString$ref_0($boundThis) {
709
+ var l = function (p0) {
710
+ return $boundThis.y1h(p0.j9_1);
711
+ };
712
+ l.callableName = 'handleCharAsString';
713
+ return l;
714
+ }
715
+ function AbstractTermificator$handleBooleanAsTruth$ref_0($boundThis) {
716
+ var l = function (p0) {
717
+ return $boundThis.z1h(p0);
718
+ };
719
+ l.callableName = 'handleBooleanAsTruth';
720
+ return l;
721
+ }
722
+ function AbstractTermificator$handleStringAsAtomOrVariable$ref_0($boundThis) {
723
+ var l = function (p0) {
724
+ return $boundThis.a1i(p0);
725
+ };
726
+ l.callableName = 'handleStringAsAtomOrVariable';
727
+ return l;
728
+ }
729
+ function AbstractTermificator$handleBigIntegerAsInteger$ref_0($boundThis) {
730
+ var l = function (p0) {
731
+ return $boundThis.b1i(p0);
732
+ };
733
+ l.callableName = 'handleBigIntegerAsInteger';
734
+ return l;
735
+ }
736
+ function AbstractTermificator$handleBigDecimalAsReal$ref_0($boundThis) {
737
+ var l = function (p0) {
738
+ return $boundThis.c1i(p0);
739
+ };
740
+ l.callableName = 'handleBigDecimalAsReal';
741
+ return l;
742
+ }
743
+ function AbstractTermificator$handleNumberAsNumeric$ref_0($boundThis) {
744
+ var l = function (p0) {
745
+ return $boundThis.d1i(p0);
746
+ };
747
+ l.callableName = 'handleNumberAsNumeric';
748
+ return l;
749
+ }
750
+ function AbstractTermificator$handleArrayAsList$ref_0($boundThis) {
751
+ var l = function (p0) {
752
+ return $boundThis.e1i(p0);
753
+ };
754
+ l.callableName = 'handleArrayAsList';
755
+ return l;
756
+ }
757
+ function AbstractTermificator$handleSequenceAsList$ref_0($boundThis) {
758
+ var l = function (p0) {
759
+ return $boundThis.f1i(p0);
760
+ };
761
+ l.callableName = 'handleSequenceAsList';
762
+ return l;
763
+ }
764
+ function AbstractTermificator$handleKotlinListAsLogicList$ref($boundThis) {
765
+ var l = function (p0) {
766
+ return $boundThis.h1i(p0);
767
+ };
768
+ l.callableName = 'handleKotlinListAsLogicList';
769
+ return l;
770
+ }
771
+ function AbstractTermificator$handleSetAsBlock$ref($boundThis) {
772
+ var l = function (p0) {
773
+ return $boundThis.i1i(p0);
774
+ };
775
+ l.callableName = 'handleSetAsBlock';
776
+ return l;
777
+ }
778
+ function AbstractTermificator$handlePairAsTuple$ref($boundThis) {
779
+ var l = function (p0) {
780
+ return $boundThis.j1i(p0);
781
+ };
782
+ l.callableName = 'handlePairAsTuple';
783
+ return l;
784
+ }
785
+ function AbstractTermificator$handleTripletAsTuple$ref($boundThis) {
786
+ var l = function (p0) {
787
+ return $boundThis.k1i(p0);
788
+ };
789
+ l.callableName = 'handleTripletAsTuple';
790
+ return l;
791
+ }
792
+ function AbstractTermificator$handleKeyValuePairAsStruct$ref($boundThis) {
793
+ var l = function (p0) {
794
+ return $boundThis.l1i(p0);
795
+ };
796
+ l.callableName = 'handleKeyValuePairAsStruct';
797
+ return l;
798
+ }
799
+ function AbstractTermificator$handleMapAsBlock$ref($boundThis) {
800
+ var l = function (p0) {
801
+ return $boundThis.m1i(p0);
802
+ };
803
+ l.callableName = 'handleMapAsBlock';
804
+ return l;
805
+ }
806
+ function AbstractTermificator$handleIterableAsList$ref_0($boundThis) {
807
+ var l = function (p0) {
808
+ return $boundThis.g1i(p0);
809
+ };
810
+ l.callableName = 'handleIterableAsList';
811
+ return l;
812
+ }
813
+ function AbstractTermificator(scope) {
814
+ this.v1h_1 = scope;
815
+ var tmp = this;
816
+ // Inline function 'kotlin.collections.linkedMapOf' call
817
+ tmp.w1h_1 = LinkedHashMap_init_$Create$();
818
+ }
819
+ protoOf(AbstractTermificator).t1g = function () {
820
+ return this.v1h_1;
821
+ };
822
+ protoOf(AbstractTermificator).n1i = function (type, conversion) {
823
+ // Inline function 'kotlin.collections.set' call
824
+ var this_0 = this.w1h_1;
825
+ var value = AbstractTermificator$handleType$lambda(conversion);
826
+ this_0.o2(type, value);
827
+ };
828
+ protoOf(AbstractTermificator).x1h = function (value) {
829
+ $l$block: {
830
+ // Inline function 'kotlin.requireNotNull' call
831
+ // Inline function 'kotlin.contracts.contract' call
832
+ if (value == null) {
833
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.termify.<anonymous>' call
834
+ var message = 'Cannot termify null';
835
+ throw IllegalArgumentException_init_$Create$(toString(message));
836
+ } else {
837
+ break $l$block;
838
+ }
839
+ }
840
+ if (!(value == null) ? isInterface(value, Term) : false) {
841
+ return value;
842
+ }
843
+ if (!(value == null) ? isInterface(value, TermConvertible) : false) {
844
+ return value.toTerm();
845
+ }
846
+ var type = getKClassFromExpression(value);
847
+ var exactConverter = this.w1h_1.x2(type);
848
+ if (!(exactConverter == null)) {
849
+ return exactConverter(value);
850
+ }
851
+ // Inline function 'kotlin.collections.iterator' call
852
+ var tmp0_iterator = this.w1h_1.n2().r();
853
+ while (tmp0_iterator.s()) {
854
+ var tmp1_loop_parameter = tmp0_iterator.u();
855
+ // Inline function 'kotlin.collections.component1' call
856
+ var superType = tmp1_loop_parameter.q2();
857
+ // Inline function 'kotlin.collections.component2' call
858
+ var converter = tmp1_loop_parameter.r2();
859
+ if (superType.p6(value)) {
860
+ return converter(value);
861
+ }
862
+ }
863
+ raiseErrorConvertingTo(value, getKClass(Term));
864
+ };
865
+ protoOf(AbstractTermificator).toTerm = function (value) {
866
+ return this.x1h(value);
867
+ };
868
+ protoOf(AbstractTermificator).z1h = function (value) {
869
+ return this.t1g().truthOf(value);
870
+ };
871
+ protoOf(AbstractTermificator).y1h = function (value) {
872
+ return this.x1h(toString_0(value));
873
+ };
874
+ protoOf(AbstractTermificator).a1i = function (value) {
875
+ var tmp;
876
+ // Inline function 'kotlin.text.matches' call
877
+ if (Companion_getInstance().k13_1.i8(value)) {
878
+ tmp = this.t1g().varOf(value);
879
+ } else {
880
+ tmp = this.t1g().atomOf(value);
881
+ }
882
+ return tmp;
883
+ };
884
+ protoOf(AbstractTermificator).b1i = function (value) {
885
+ return this.t1g().intOfBigInteger(value);
886
+ };
887
+ protoOf(AbstractTermificator).c1i = function (value) {
888
+ return this.t1g().realOfBigDecimal(value);
889
+ };
890
+ protoOf(AbstractTermificator).e1i = function (value) {
891
+ var tmp = this.t1g();
892
+ // Inline function 'kotlin.collections.map' call
893
+ var this_0 = assertItemsAreNotNull(asIterable(value));
894
+ // Inline function 'kotlin.collections.mapTo' call
895
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
896
+ var tmp0_iterator = this_0.r();
897
+ while (tmp0_iterator.s()) {
898
+ var item = tmp0_iterator.u();
899
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.handleArrayAsList.<anonymous>' call
900
+ var tmp$ret$0 = this.x1h(item);
901
+ destination.o(tmp$ret$0);
902
+ }
903
+ return tmp.logicListOfIterable(destination);
904
+ };
905
+ protoOf(AbstractTermificator).f1i = function (value) {
906
+ var tmp = this.t1g();
907
+ var tmp_0 = assertItemsAreNotNull_0(value);
908
+ return tmp.logicListOfSequence(map(tmp_0, AbstractTermificator$handleSequenceAsList$lambda(this)));
909
+ };
910
+ protoOf(AbstractTermificator).g1i = function (value) {
911
+ var tmp = this.t1g();
912
+ // Inline function 'kotlin.collections.map' call
913
+ var this_0 = assertItemsAreNotNull(value);
914
+ // Inline function 'kotlin.collections.mapTo' call
915
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
916
+ var tmp0_iterator = this_0.r();
917
+ while (tmp0_iterator.s()) {
918
+ var item = tmp0_iterator.u();
919
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.handleIterableAsList.<anonymous>' call
920
+ var tmp$ret$0 = this.x1h(item);
921
+ destination.o(tmp$ret$0);
922
+ }
923
+ return tmp.logicListOfIterable(destination);
924
+ };
925
+ protoOf(AbstractTermificator).h1i = function (value) {
926
+ var tmp = this.t1g();
927
+ // Inline function 'kotlin.collections.map' call
928
+ var this_0 = assertItemsAreNotNull_1(value);
929
+ // Inline function 'kotlin.collections.mapTo' call
930
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
931
+ var tmp0_iterator = this_0.r();
932
+ while (tmp0_iterator.s()) {
933
+ var item = tmp0_iterator.u();
934
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.handleKotlinListAsLogicList.<anonymous>' call
935
+ var tmp$ret$0 = this.x1h(item);
936
+ destination.o(tmp$ret$0);
937
+ }
938
+ return tmp.logicListOfIterable(destination);
939
+ };
940
+ protoOf(AbstractTermificator).i1i = function (value) {
941
+ var tmp = this.t1g();
942
+ // Inline function 'kotlin.collections.map' call
943
+ var this_0 = assertItemsAreNotNull(value);
944
+ // Inline function 'kotlin.collections.mapTo' call
945
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
946
+ var tmp0_iterator = this_0.r();
947
+ while (tmp0_iterator.s()) {
948
+ var item = tmp0_iterator.u();
949
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.handleSetAsBlock.<anonymous>' call
950
+ var tmp$ret$0 = this.x1h(item);
951
+ destination.o(tmp$ret$0);
952
+ }
953
+ return tmp.blockOfIterable(destination);
954
+ };
955
+ protoOf(AbstractTermificator).j1i = function (value) {
956
+ return this.t1g().tupleOf([this.x1h(value.qd_1), this.x1h(value.rd_1)]);
957
+ };
958
+ protoOf(AbstractTermificator).k1i = function (value) {
959
+ return this.t1g().tupleOf([this.x1h(value.ei_1), this.x1h(value.fi_1), this.x1h(value.gi_1)]);
960
+ };
961
+ protoOf(AbstractTermificator).l1i = function (value) {
962
+ return this.t1g().structOf(':', [this.x1h(value.q2()), this.x1h(value.r2())]);
963
+ };
964
+ protoOf(AbstractTermificator).m1i = function (value) {
965
+ var tmp = this.t1g();
966
+ // Inline function 'kotlin.collections.map' call
967
+ var this_0 = assertItemsAreNotNull(value.n2());
968
+ // Inline function 'kotlin.collections.mapTo' call
969
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
970
+ var tmp0_iterator = this_0.r();
971
+ while (tmp0_iterator.s()) {
972
+ var item = tmp0_iterator.u();
973
+ // Inline function 'it.unibo.tuprolog.dsl.AbstractTermificator.handleMapAsBlock.<anonymous>' call
974
+ var tmp$ret$0 = this.l1i(item);
975
+ destination.o(tmp$ret$0);
976
+ }
977
+ return tmp.blockOfIterable(destination);
978
+ };
979
+ protoOf(AbstractTermificator).o1i = function () {
980
+ var tmp = getKClass(Char);
981
+ this.n1i(tmp, AbstractTermificator$handleCharAsString$ref(this));
982
+ var tmp_0 = PrimitiveClasses_getInstance().c7();
983
+ this.n1i(tmp_0, AbstractTermificator$handleBooleanAsTruth$ref(this));
984
+ var tmp_1 = PrimitiveClasses_getInstance().j7();
985
+ this.n1i(tmp_1, AbstractTermificator$handleStringAsAtomOrVariable$ref(this));
986
+ var tmp_2 = getKClass(BigInteger);
987
+ this.n1i(tmp_2, AbstractTermificator$handleBigIntegerAsInteger$ref(this));
988
+ var tmp_3 = getKClass(BigDecimal);
989
+ this.n1i(tmp_3, AbstractTermificator$handleBigDecimalAsReal$ref(this));
990
+ var tmp_4 = PrimitiveClasses_getInstance().a7();
991
+ this.n1i(tmp_4, AbstractTermificator$handleNumberAsNumeric$ref(this));
992
+ var tmp_5 = PrimitiveClasses_getInstance().i7();
993
+ this.n1i(tmp_5, AbstractTermificator$handleArrayAsList$ref(this));
994
+ var tmp_6 = getKClass(Sequence);
995
+ this.n1i(tmp_6, AbstractTermificator$handleSequenceAsList$ref(this));
996
+ var tmp_7 = getKClass(Iterable);
997
+ this.n1i(tmp_7, AbstractTermificator$handleIterableAsList$ref(this));
998
+ };
999
+ protoOf(AbstractTermificator).p1i = function () {
1000
+ var tmp = getKClass(Char);
1001
+ this.n1i(tmp, AbstractTermificator$handleCharAsString$ref_0(this));
1002
+ var tmp_0 = PrimitiveClasses_getInstance().c7();
1003
+ this.n1i(tmp_0, AbstractTermificator$handleBooleanAsTruth$ref_0(this));
1004
+ var tmp_1 = PrimitiveClasses_getInstance().j7();
1005
+ this.n1i(tmp_1, AbstractTermificator$handleStringAsAtomOrVariable$ref_0(this));
1006
+ var tmp_2 = getKClass(BigInteger);
1007
+ this.n1i(tmp_2, AbstractTermificator$handleBigIntegerAsInteger$ref_0(this));
1008
+ var tmp_3 = getKClass(BigDecimal);
1009
+ this.n1i(tmp_3, AbstractTermificator$handleBigDecimalAsReal$ref_0(this));
1010
+ var tmp_4 = PrimitiveClasses_getInstance().a7();
1011
+ this.n1i(tmp_4, AbstractTermificator$handleNumberAsNumeric$ref_0(this));
1012
+ var tmp_5 = PrimitiveClasses_getInstance().i7();
1013
+ this.n1i(tmp_5, AbstractTermificator$handleArrayAsList$ref_0(this));
1014
+ var tmp_6 = getKClass(Sequence);
1015
+ this.n1i(tmp_6, AbstractTermificator$handleSequenceAsList$ref_0(this));
1016
+ var tmp_7 = getKClass(List);
1017
+ this.n1i(tmp_7, AbstractTermificator$handleKotlinListAsLogicList$ref(this));
1018
+ var tmp_8 = getKClass(Set);
1019
+ this.n1i(tmp_8, AbstractTermificator$handleSetAsBlock$ref(this));
1020
+ var tmp_9 = getKClass(Pair);
1021
+ this.n1i(tmp_9, AbstractTermificator$handlePairAsTuple$ref(this));
1022
+ var tmp_10 = getKClass(Triple);
1023
+ this.n1i(tmp_10, AbstractTermificator$handleTripletAsTuple$ref(this));
1024
+ var tmp_11 = getKClass(Entry);
1025
+ this.n1i(tmp_11, AbstractTermificator$handleKeyValuePairAsStruct$ref(this));
1026
+ var tmp_12 = getKClass(Map);
1027
+ this.n1i(tmp_12, AbstractTermificator$handleMapAsBlock$ref(this));
1028
+ var tmp_13 = getKClass(Iterable);
1029
+ this.n1i(tmp_13, AbstractTermificator$handleIterableAsList$ref_0(this));
1030
+ };
1031
+ protoOf(AbstractTermificator).q1i = function (novel) {
1032
+ if (novel) {
1033
+ this.p1i();
1034
+ } else {
1035
+ this.o1i();
1036
+ }
1037
+ };
1038
+ function BaseLogicProgrammingScope() {
1039
+ }
1040
+ function logicProgramming(function_0) {
1041
+ return function_0(Companion_instance_2.empty());
1042
+ }
1043
+ function raiseErrorConvertingTo(_this__u8e3s4, class_0) {
1044
+ throw IllegalArgumentException_init_$Create$('Cannot convert ' + getKClassFromExpression(_this__u8e3s4) + ' into ' + class_0);
1045
+ }
1046
+ function Companion() {
1047
+ }
1048
+ protoOf(Companion).empty = function () {
1049
+ return this.of();
1050
+ };
1051
+ protoOf(Companion).s1i = function (scope, termificator, variablesProvider) {
1052
+ return new LogicProgrammingScopeImpl(scope, termificator.t1g() === scope ? termificator : termificator.u1g(scope), variablesProvider.t1g() === scope ? variablesProvider : variablesProvider.u1g(scope));
1053
+ };
1054
+ protoOf(Companion).of = function (scope, termificator, variablesProvider, $super) {
1055
+ scope = scope === VOID ? Companion_instance.empty() : scope;
1056
+ termificator = termificator === VOID ? Companion_instance_3.default(scope) : termificator;
1057
+ variablesProvider = variablesProvider === VOID ? Companion_instance_0.p13(scope) : variablesProvider;
1058
+ return $super === VOID ? this.s1i(scope, termificator, variablesProvider) : $super.s1i.call(this, scope, termificator, variablesProvider);
1059
+ };
1060
+ var Companion_instance_2;
1061
+ function Companion_getInstance_1() {
1062
+ return Companion_instance_2;
1063
+ }
1064
+ function LogicProgrammingScopeImpl(scope, termificator, variablesProvider) {
1065
+ this.t1i_1 = scope;
1066
+ this.u1i_1 = termificator;
1067
+ this.v1i_1 = variablesProvider;
1068
+ // Inline function 'kotlin.require' call
1069
+ // Inline function 'kotlin.contracts.contract' call
1070
+ if (!(this.t1i_1 === this.v1i_1.t1g() ? this.t1i_1 === this.u1i_1.t1g() : false)) {
1071
+ // Inline function 'it.unibo.tuprolog.dsl.LogicProgrammingScopeImpl.<anonymous>' call
1072
+ var message = 'The provided Scope should be the same object for both Termificator and VariablesProvider';
1073
+ throw IllegalArgumentException_init_$Create$(toString(message));
1074
+ }
1075
+ }
1076
+ protoOf(LogicProgrammingScopeImpl).t1g = function () {
1077
+ return this.t1i_1;
1078
+ };
1079
+ protoOf(LogicProgrammingScopeImpl).r1i = function () {
1080
+ return this.u1i_1;
1081
+ };
1082
+ protoOf(LogicProgrammingScopeImpl).w1g = function () {
1083
+ return this.v1i_1.w1g();
1084
+ };
1085
+ protoOf(LogicProgrammingScopeImpl).x1g = function () {
1086
+ return this.v1i_1.x1g();
1087
+ };
1088
+ protoOf(LogicProgrammingScopeImpl).o10 = function () {
1089
+ return this.v1i_1.o10();
1090
+ };
1091
+ protoOf(LogicProgrammingScopeImpl).n10 = function () {
1092
+ return this.v1i_1.n10();
1093
+ };
1094
+ protoOf(LogicProgrammingScopeImpl).anonymous = function () {
1095
+ return this.v1i_1.anonymous();
1096
+ };
1097
+ protoOf(LogicProgrammingScopeImpl).atomOfChar = function (value) {
1098
+ return this.v1i_1.atomOfChar(value);
1099
+ };
1100
+ protoOf(LogicProgrammingScopeImpl).atomOf = function (value) {
1101
+ return this.v1i_1.atomOf(value);
1102
+ };
1103
+ protoOf(LogicProgrammingScopeImpl).blockOf = function (terms) {
1104
+ return this.v1i_1.blockOf(terms);
1105
+ };
1106
+ protoOf(LogicProgrammingScopeImpl).blockOfIterable = function (terms) {
1107
+ return this.v1i_1.blockOfIterable(terms);
1108
+ };
1109
+ protoOf(LogicProgrammingScopeImpl).blockOfSequence = function (terms) {
1110
+ return this.v1i_1.blockOfSequence(terms);
1111
+ };
1112
+ protoOf(LogicProgrammingScopeImpl).clauseOf = function (head, body) {
1113
+ return this.v1i_1.clauseOf(head, body);
1114
+ };
1115
+ protoOf(LogicProgrammingScopeImpl).consOf = function (head, tail) {
1116
+ return this.v1i_1.consOf(head, tail);
1117
+ };
1118
+ protoOf(LogicProgrammingScopeImpl).containsVar = function (variable) {
1119
+ return this.v1i_1.containsVar(variable);
1120
+ };
1121
+ protoOf(LogicProgrammingScopeImpl).contains = function (variable) {
1122
+ return this.v1i_1.contains(variable);
1123
+ };
1124
+ protoOf(LogicProgrammingScopeImpl).directiveOf = function (body1, body) {
1125
+ return this.v1i_1.directiveOf(body1, body);
1126
+ };
1127
+ protoOf(LogicProgrammingScopeImpl).factOf = function (head) {
1128
+ return this.v1i_1.factOf(head);
1129
+ };
1130
+ protoOf(LogicProgrammingScopeImpl).get = function (variable) {
1131
+ return this.v1i_1.get(variable);
1132
+ };
1133
+ protoOf(LogicProgrammingScopeImpl).getValue = function (thisRef, property) {
1134
+ return this.v1i_1.getValue(thisRef, property);
1135
+ };
1136
+ protoOf(LogicProgrammingScopeImpl).indicatorOf = function (name, arity) {
1137
+ return this.v1i_1.indicatorOf(name, arity);
1138
+ };
1139
+ protoOf(LogicProgrammingScopeImpl).indicatorOfStringInt = function (name, arity) {
1140
+ return this.v1i_1.indicatorOfStringInt(name, arity);
1141
+ };
1142
+ protoOf(LogicProgrammingScopeImpl).intOfByte = function (value) {
1143
+ return this.v1i_1.intOfByte(value);
1144
+ };
1145
+ protoOf(LogicProgrammingScopeImpl).intOf = function (value) {
1146
+ return this.v1i_1.intOf(value);
1147
+ };
1148
+ protoOf(LogicProgrammingScopeImpl).intOfLong = function (value) {
1149
+ return this.v1i_1.intOfLong(value);
1150
+ };
1151
+ protoOf(LogicProgrammingScopeImpl).intOfShort = function (value) {
1152
+ return this.v1i_1.intOfShort(value);
1153
+ };
1154
+ protoOf(LogicProgrammingScopeImpl).parseInt = function (value) {
1155
+ return this.v1i_1.parseInt(value);
1156
+ };
1157
+ protoOf(LogicProgrammingScopeImpl).parseIntRadix = function (value, radix) {
1158
+ return this.v1i_1.parseIntRadix(value, radix);
1159
+ };
1160
+ protoOf(LogicProgrammingScopeImpl).intOfBigInteger = function (value) {
1161
+ return this.v1i_1.intOfBigInteger(value);
1162
+ };
1163
+ protoOf(LogicProgrammingScopeImpl).p10 = function (terms, last) {
1164
+ return this.v1i_1.p10(terms, last);
1165
+ };
1166
+ protoOf(LogicProgrammingScopeImpl).q10 = function (terms, last) {
1167
+ return this.v1i_1.q10(terms, last);
1168
+ };
1169
+ protoOf(LogicProgrammingScopeImpl).r10 = function (terms, last) {
1170
+ return this.v1i_1.r10(terms, last);
1171
+ };
1172
+ protoOf(LogicProgrammingScopeImpl).logicListOf = function (terms) {
1173
+ return this.v1i_1.logicListOf(terms);
1174
+ };
1175
+ protoOf(LogicProgrammingScopeImpl).logicListOfIterable = function (terms) {
1176
+ return this.v1i_1.logicListOfIterable(terms);
1177
+ };
1178
+ protoOf(LogicProgrammingScopeImpl).logicListOfSequence = function (terms) {
1179
+ return this.v1i_1.logicListOfSequence(terms);
1180
+ };
1181
+ protoOf(LogicProgrammingScopeImpl).numOfByte = function (value) {
1182
+ return this.v1i_1.numOfByte(value);
1183
+ };
1184
+ protoOf(LogicProgrammingScopeImpl).numOfDouble = function (value) {
1185
+ return this.v1i_1.numOfDouble(value);
1186
+ };
1187
+ protoOf(LogicProgrammingScopeImpl).numOfFloat = function (value) {
1188
+ return this.v1i_1.numOfFloat(value);
1189
+ };
1190
+ protoOf(LogicProgrammingScopeImpl).numOfInt = function (value) {
1191
+ return this.v1i_1.numOfInt(value);
1192
+ };
1193
+ protoOf(LogicProgrammingScopeImpl).numOfLong = function (value) {
1194
+ return this.v1i_1.numOfLong(value);
1195
+ };
1196
+ protoOf(LogicProgrammingScopeImpl).numOf = function (value) {
1197
+ return this.v1i_1.numOf(value);
1198
+ };
1199
+ protoOf(LogicProgrammingScopeImpl).numOfShort = function (value) {
1200
+ return this.v1i_1.numOfShort(value);
1201
+ };
1202
+ protoOf(LogicProgrammingScopeImpl).parseNum = function (value) {
1203
+ return this.v1i_1.parseNum(value);
1204
+ };
1205
+ protoOf(LogicProgrammingScopeImpl).numOfBigDecimal = function (value) {
1206
+ return this.v1i_1.numOfBigDecimal(value);
1207
+ };
1208
+ protoOf(LogicProgrammingScopeImpl).numOfBigInteger = function (value) {
1209
+ return this.v1i_1.numOfBigInteger(value);
1210
+ };
1211
+ protoOf(LogicProgrammingScopeImpl).realOf = function (value) {
1212
+ return this.v1i_1.realOf(value);
1213
+ };
1214
+ protoOf(LogicProgrammingScopeImpl).realOfFloat = function (value) {
1215
+ return this.v1i_1.realOfFloat(value);
1216
+ };
1217
+ protoOf(LogicProgrammingScopeImpl).parseReal = function (value) {
1218
+ return this.v1i_1.parseReal(value);
1219
+ };
1220
+ protoOf(LogicProgrammingScopeImpl).realOfBigDecimal = function (value) {
1221
+ return this.v1i_1.realOfBigDecimal(value);
1222
+ };
1223
+ protoOf(LogicProgrammingScopeImpl).ruleOf = function (head, body1, body) {
1224
+ return this.v1i_1.ruleOf(head, body1, body);
1225
+ };
1226
+ protoOf(LogicProgrammingScopeImpl).structOf = function (functor, args) {
1227
+ return this.v1i_1.structOf(functor, args);
1228
+ };
1229
+ protoOf(LogicProgrammingScopeImpl).structOfIterable = function (functor, args) {
1230
+ return this.v1i_1.structOfIterable(functor, args);
1231
+ };
1232
+ protoOf(LogicProgrammingScopeImpl).structOfList = function (functor, args) {
1233
+ return this.v1i_1.structOfList(functor, args);
1234
+ };
1235
+ protoOf(LogicProgrammingScopeImpl).structOfSequence = function (functor, args) {
1236
+ return this.v1i_1.structOfSequence(functor, args);
1237
+ };
1238
+ protoOf(LogicProgrammingScopeImpl).substitutionOf = function (assignments) {
1239
+ return this.v1i_1.substitutionOf(assignments);
1240
+ };
1241
+ protoOf(LogicProgrammingScopeImpl).substitutionOfIterable = function (assignments) {
1242
+ return this.v1i_1.substitutionOfIterable(assignments);
1243
+ };
1244
+ protoOf(LogicProgrammingScopeImpl).substitutionOfSequence = function (assignments) {
1245
+ return this.v1i_1.substitutionOfSequence(assignments);
1246
+ };
1247
+ protoOf(LogicProgrammingScopeImpl).truthOf = function (value) {
1248
+ return this.v1i_1.truthOf(value);
1249
+ };
1250
+ protoOf(LogicProgrammingScopeImpl).tupleOf = function (terms) {
1251
+ return this.v1i_1.tupleOf(terms);
1252
+ };
1253
+ protoOf(LogicProgrammingScopeImpl).tupleOfIterable = function (terms) {
1254
+ return this.v1i_1.tupleOfIterable(terms);
1255
+ };
1256
+ protoOf(LogicProgrammingScopeImpl).tupleOfSequence = function (terms) {
1257
+ return this.v1i_1.tupleOfSequence(terms);
1258
+ };
1259
+ protoOf(LogicProgrammingScopeImpl).unifierOf = function (assignments) {
1260
+ return this.v1i_1.unifierOf(assignments);
1261
+ };
1262
+ protoOf(LogicProgrammingScopeImpl).unifierOfIterable = function (assignments) {
1263
+ return this.v1i_1.unifierOfIterable(assignments);
1264
+ };
1265
+ protoOf(LogicProgrammingScopeImpl).unifierOfSequence = function (assignments) {
1266
+ return this.v1i_1.unifierOfSequence(assignments);
1267
+ };
1268
+ protoOf(LogicProgrammingScopeImpl).varOfChar = function (name) {
1269
+ return this.v1i_1.varOfChar(name);
1270
+ };
1271
+ protoOf(LogicProgrammingScopeImpl).varOf = function (name) {
1272
+ return this.v1i_1.varOf(name);
1273
+ };
1274
+ protoOf(LogicProgrammingScopeImpl).whatever = function () {
1275
+ return this.v1i_1.whatever();
1276
+ };
1277
+ protoOf(LogicProgrammingScopeImpl).where = function (lambda) {
1278
+ return this.v1i_1.where(lambda);
1279
+ };
1280
+ protoOf(LogicProgrammingScopeImpl).with = function (lambda) {
1281
+ return this.v1i_1.with(lambda);
1282
+ };
1283
+ protoOf(LogicProgrammingScopeImpl).u1g = function (scope) {
1284
+ return new LogicProgrammingScopeImpl(scope, this.u1i_1.u1g(scope), this.v1i_1.u1g(scope));
1285
+ };
1286
+ protoOf(LogicProgrammingScopeImpl).w1i = function () {
1287
+ return this.u1g(Companion_instance.empty());
1288
+ };
1289
+ protoOf(LogicProgrammingScopeImpl).newScope = function () {
1290
+ return this.w1i();
1291
+ };
1292
+ function LogicProgrammingScopeWithOperators() {
1293
+ }
1294
+ function LogicProgrammingScopeWithPrologStandardLibrary() {
1295
+ }
1296
+ function LogicProgrammingScopeWithSubstitutions() {
1297
+ }
1298
+ function directive$directiveOf(receiver, p0) {
1299
+ return receiver.directiveOf(p0, []);
1300
+ }
1301
+ function MinimalLogicProgrammingScope$invoke$lambda(this$0) {
1302
+ return function (it) {
1303
+ return this$0.convertToTerm(it);
1304
+ };
1305
+ }
1306
+ function MinimalLogicProgrammingScope$directive$directiveOf$ref($boundThis) {
1307
+ return function (p0) {
1308
+ return directive$directiveOf($boundThis, p0);
1309
+ };
1310
+ }
1311
+ function MinimalLogicProgrammingScope$factOf$ref($boundThis) {
1312
+ var l = function (p0) {
1313
+ return $boundThis.factOf(p0);
1314
+ };
1315
+ l.callableName = 'factOf';
1316
+ return l;
1317
+ }
1318
+ function MinimalLogicProgrammingScope() {
1319
+ }
1320
+ function Companion_0() {
1321
+ }
1322
+ protoOf(Companion_0).default = function (scope) {
1323
+ return new DefaultTermificator(scope, true);
1324
+ };
1325
+ protoOf(Companion_0).legacy = function (scope) {
1326
+ return new DefaultTermificator(scope, false);
1327
+ };
1328
+ var Companion_instance_3;
1329
+ function Companion_getInstance_2() {
1330
+ return Companion_instance_3;
1331
+ }
1332
+ function Termificator() {
1333
+ }
1334
+ function DefaultTermificator(scope, novel) {
1335
+ novel = novel === VOID ? false : novel;
1336
+ AbstractTermificator.call(this, scope);
1337
+ this.a1j_1 = novel;
1338
+ this.q1i(this.a1j_1);
1339
+ this.b1j_1 = new NumberTypeTester();
1340
+ }
1341
+ protoOf(DefaultTermificator).d1i = function (value) {
1342
+ var tmp;
1343
+ if (this.b1j_1.is(value)) {
1344
+ tmp = this.t1g().intOfBigInteger(this.b1j_1.js(value));
1345
+ } else {
1346
+ tmp = this.t1g().realOfBigDecimal(this.b1j_1.ks(value));
1347
+ }
1348
+ return tmp;
1349
+ };
1350
+ protoOf(DefaultTermificator).u1g = function (scope) {
1351
+ return new DefaultTermificator(scope, this.a1j_1);
1352
+ };
1353
+ //region block: post-declaration
1354
+ protoOf(AbstractTermificator).copy = copy;
1355
+ protoOf(LogicProgrammingScopeImpl).logicListFromFrom = logicListFromFrom;
1356
+ protoOf(LogicProgrammingScopeImpl).logicListFromIterable = logicListFromIterable;
1357
+ protoOf(LogicProgrammingScopeImpl).logicListFromSequence = logicListFromSequence;
1358
+ protoOf(LogicProgrammingScopeImpl).stringInvoke = stringInvoke;
1359
+ protoOf(LogicProgrammingScopeImpl).structOfAny = structOfAny;
1360
+ protoOf(LogicProgrammingScopeImpl).tupleOfAny = tupleOfAny;
1361
+ protoOf(LogicProgrammingScopeImpl).logicListOfAny = logicListOfAny;
1362
+ protoOf(LogicProgrammingScopeImpl).blockOfAny = blockOfAny;
1363
+ protoOf(LogicProgrammingScopeImpl).factOfAny = factOfAny;
1364
+ protoOf(LogicProgrammingScopeImpl).consOfAny = consOfAny;
1365
+ protoOf(LogicProgrammingScopeImpl).directiveOfAny = directiveOfAny;
1366
+ protoOf(LogicProgrammingScopeImpl).withScope = withScope;
1367
+ protoOf(LogicProgrammingScopeImpl).x1i = logicList;
1368
+ protoOf(LogicProgrammingScopeImpl).logicList = logicList_0;
1369
+ protoOf(LogicProgrammingScopeImpl).rule = rule;
1370
+ protoOf(LogicProgrammingScopeImpl).clause2 = clause2;
1371
+ protoOf(LogicProgrammingScopeImpl).directive = directive;
1372
+ protoOf(LogicProgrammingScopeImpl).fact = fact;
1373
+ protoOf(LogicProgrammingScopeImpl).convertToTerm = convertToTerm;
1374
+ protoOf(LogicProgrammingScopeImpl).convertToSpecificSubTypeOfTerm = convertToSpecificSubTypeOfTerm;
1375
+ protoOf(LogicProgrammingScopeImpl).substitutionContains = substitutionContains;
1376
+ protoOf(LogicProgrammingScopeImpl).substitutionGet = substitutionGet;
1377
+ protoOf(LogicProgrammingScopeImpl).varTo = varTo;
1378
+ protoOf(LogicProgrammingScopeImpl).stringTo = stringTo;
1379
+ protoOf(LogicProgrammingScopeImpl).substitutionContainsKey = substitutionContainsKey;
1380
+ protoOf(LogicProgrammingScopeImpl).substitutionContainsValue = substitutionContainsValue;
1381
+ protoOf(LogicProgrammingScopeImpl).at_end_of_stream1 = at_end_of_stream1;
1382
+ protoOf(LogicProgrammingScopeImpl).call1 = call1;
1383
+ protoOf(LogicProgrammingScopeImpl).catch3 = catch3;
1384
+ protoOf(LogicProgrammingScopeImpl).throw1 = throw1;
1385
+ protoOf(LogicProgrammingScopeImpl).not1 = not1;
1386
+ protoOf(LogicProgrammingScopeImpl).naf1 = naf1;
1387
+ protoOf(LogicProgrammingScopeImpl).assert1 = assert1;
1388
+ protoOf(LogicProgrammingScopeImpl).asserta1 = asserta1;
1389
+ protoOf(LogicProgrammingScopeImpl).assertz1 = assertz1;
1390
+ protoOf(LogicProgrammingScopeImpl).arg3 = arg3;
1391
+ protoOf(LogicProgrammingScopeImpl).atom1 = atom1;
1392
+ protoOf(LogicProgrammingScopeImpl).atomic1 = atomic1;
1393
+ protoOf(LogicProgrammingScopeImpl).between3 = between3;
1394
+ protoOf(LogicProgrammingScopeImpl).callable1 = callable1;
1395
+ protoOf(LogicProgrammingScopeImpl).compound1 = compound1;
1396
+ protoOf(LogicProgrammingScopeImpl).current_op3 = current_op3;
1397
+ protoOf(LogicProgrammingScopeImpl).op3 = op3;
1398
+ protoOf(LogicProgrammingScopeImpl).findall3 = findall3;
1399
+ protoOf(LogicProgrammingScopeImpl).float1 = float1;
1400
+ protoOf(LogicProgrammingScopeImpl).functor3 = functor3;
1401
+ protoOf(LogicProgrammingScopeImpl).ground1 = ground1;
1402
+ protoOf(LogicProgrammingScopeImpl).integer1 = integer1;
1403
+ protoOf(LogicProgrammingScopeImpl).natural = natural;
1404
+ protoOf(LogicProgrammingScopeImpl).nonvar1 = nonvar1;
1405
+ protoOf(LogicProgrammingScopeImpl).number1 = number1;
1406
+ protoOf(LogicProgrammingScopeImpl).var1 = var1;
1407
+ protoOf(LogicProgrammingScopeImpl).write1 = write1;
1408
+ protoOf(LogicProgrammingScopeImpl).univ2 = univ2;
1409
+ protoOf(LogicProgrammingScopeImpl).eq2 = eq2;
1410
+ protoOf(LogicProgrammingScopeImpl).neq2 = neq2;
1411
+ protoOf(LogicProgrammingScopeImpl).id2 = id2;
1412
+ protoOf(LogicProgrammingScopeImpl).nid2 = nid2;
1413
+ protoOf(LogicProgrammingScopeImpl).arithEq2 = arithEq2;
1414
+ protoOf(LogicProgrammingScopeImpl).arithNeq2 = arithNeq2;
1415
+ protoOf(LogicProgrammingScopeImpl).member2 = member2;
1416
+ protoOf(LogicProgrammingScopeImpl).retract1 = retract1;
1417
+ protoOf(LogicProgrammingScopeImpl).append3 = append3;
1418
+ protoOf(LogicProgrammingScopeImpl).retractall1 = retractall1;
1419
+ protoOf(LogicProgrammingScopeImpl).abolish1 = abolish1;
1420
+ protoOf(LogicProgrammingScopeImpl).atom_chars2 = atom_chars2;
1421
+ protoOf(LogicProgrammingScopeImpl).atom_codes2 = atom_codes2;
1422
+ protoOf(LogicProgrammingScopeImpl).atom_concat3 = atom_concat3;
1423
+ protoOf(LogicProgrammingScopeImpl).atom_length2 = atom_length2;
1424
+ protoOf(LogicProgrammingScopeImpl).char_code2 = char_code2;
1425
+ protoOf(LogicProgrammingScopeImpl).copy_term2 = copy_term2;
1426
+ protoOf(LogicProgrammingScopeImpl).current_flag2 = current_flag2;
1427
+ protoOf(LogicProgrammingScopeImpl).current_prolog_flag2 = current_prolog_flag2;
1428
+ protoOf(LogicProgrammingScopeImpl).sub_atom5 = sub_atom5;
1429
+ protoOf(LogicProgrammingScopeImpl).number_chars2 = number_chars2;
1430
+ protoOf(LogicProgrammingScopeImpl).number_codes2 = number_codes2;
1431
+ protoOf(LogicProgrammingScopeImpl).bagof3 = bagof3;
1432
+ protoOf(LogicProgrammingScopeImpl).setof3 = setof3;
1433
+ protoOf(LogicProgrammingScopeImpl).consult1 = consult1;
1434
+ protoOf(LogicProgrammingScopeImpl).set_flag2 = set_flag2;
1435
+ protoOf(LogicProgrammingScopeImpl).set_prolog_flag2 = set_prolog_flag2;
1436
+ protoOf(LogicProgrammingScopeImpl).dynamic1 = dynamic1;
1437
+ protoOf(LogicProgrammingScopeImpl).static1 = static1;
1438
+ protoOf(LogicProgrammingScopeImpl).solve1 = solve1;
1439
+ protoOf(LogicProgrammingScopeImpl).initialization1 = initialization1;
1440
+ protoOf(LogicProgrammingScopeImpl).load1 = load1;
1441
+ protoOf(LogicProgrammingScopeImpl).include1 = include1;
1442
+ protoOf(LogicProgrammingScopeImpl).termPlus = termPlus;
1443
+ protoOf(LogicProgrammingScopeImpl).number = number;
1444
+ protoOf(LogicProgrammingScopeImpl).booleanPlus = booleanPlus;
1445
+ protoOf(LogicProgrammingScopeImpl).charPlus = charPlus;
1446
+ protoOf(LogicProgrammingScopeImpl).termMinus = termMinus;
1447
+ protoOf(LogicProgrammingScopeImpl).numberMinus = numberMinus;
1448
+ protoOf(LogicProgrammingScopeImpl).booleanMinus = booleanMinus;
1449
+ protoOf(LogicProgrammingScopeImpl).charMinus = charMinus;
1450
+ protoOf(LogicProgrammingScopeImpl).stringMinus = stringMinus;
1451
+ protoOf(LogicProgrammingScopeImpl).termTimes = termTimes;
1452
+ protoOf(LogicProgrammingScopeImpl).numberTimes = numberTimes;
1453
+ protoOf(LogicProgrammingScopeImpl).booleanTimes = booleanTimes;
1454
+ protoOf(LogicProgrammingScopeImpl).charTimes = charTimes;
1455
+ protoOf(LogicProgrammingScopeImpl).stringTimes = stringTimes;
1456
+ protoOf(LogicProgrammingScopeImpl).termDiv = termDiv;
1457
+ protoOf(LogicProgrammingScopeImpl).numberDiv = numberDiv;
1458
+ protoOf(LogicProgrammingScopeImpl).booleanDiv = booleanDiv;
1459
+ protoOf(LogicProgrammingScopeImpl).charDiv = charDiv;
1460
+ protoOf(LogicProgrammingScopeImpl).stringDiv = stringDiv;
1461
+ protoOf(LogicProgrammingScopeImpl).anyEqualsTo = anyEqualsTo;
1462
+ protoOf(LogicProgrammingScopeImpl).anyNotEqualsTo = anyNotEqualsTo;
1463
+ protoOf(LogicProgrammingScopeImpl).anyGreaterThan = anyGreaterThan;
1464
+ protoOf(LogicProgrammingScopeImpl).anyGreaterThanOrEqualsTo = anyGreaterThanOrEqualsTo;
1465
+ protoOf(LogicProgrammingScopeImpl).anyNonLowerThan = anyNonLowerThan;
1466
+ protoOf(LogicProgrammingScopeImpl).anyLowerThan = anyLowerThan;
1467
+ protoOf(LogicProgrammingScopeImpl).anyLowerThanOrEqualsTo = anyLowerThanOrEqualsTo;
1468
+ protoOf(LogicProgrammingScopeImpl).anyNonGreaterThan = anyNonGreaterThan;
1469
+ protoOf(LogicProgrammingScopeImpl).anyIntDiv = anyIntDiv;
1470
+ protoOf(LogicProgrammingScopeImpl).termRem = termRem;
1471
+ protoOf(LogicProgrammingScopeImpl).numberRem = numberRem;
1472
+ protoOf(LogicProgrammingScopeImpl).booleanRem = booleanRem;
1473
+ protoOf(LogicProgrammingScopeImpl).charRem = charRem;
1474
+ protoOf(LogicProgrammingScopeImpl).stringRem = stringRem;
1475
+ protoOf(LogicProgrammingScopeImpl).anyAnd = anyAnd;
1476
+ protoOf(LogicProgrammingScopeImpl).anyOr = anyOr;
1477
+ protoOf(LogicProgrammingScopeImpl).anyPow = anyPow;
1478
+ protoOf(LogicProgrammingScopeImpl).anySup = anySup;
1479
+ protoOf(LogicProgrammingScopeImpl).anyIs = anyIs;
1480
+ protoOf(LogicProgrammingScopeImpl).anyThen = anyThen;
1481
+ protoOf(LogicProgrammingScopeImpl).anyImpliedBy = anyImpliedBy;
1482
+ protoOf(LogicProgrammingScopeImpl).anyImpliedByVararg = anyImpliedByVararg;
1483
+ protoOf(LogicProgrammingScopeImpl).anyIf = anyIf;
1484
+ protoOf(LogicProgrammingScopeImpl).anyIfVararg = anyIfVararg;
1485
+ //endregion
1486
+ //region block: init
1487
+ Companion_instance_2 = new Companion();
1488
+ Companion_instance_3 = new Companion_0();
1489
+ //endregion
1490
+ //region block: exports
1491
+ _.$_$ = _.$_$ || {};
1492
+ _.$_$.a = logicList_0;
1493
+ _.$_$.b = Companion_instance_3;
1494
+ _.$_$.c = convertToSpecificSubTypeOfTerm;
1495
+ _.$_$.d = convertToTerm;
1496
+ _.$_$.e = BaseLogicProgrammingScope;
1497
+ _.$_$.f = anyAnd;
1498
+ _.$_$.g = termDiv;
1499
+ _.$_$.h = stringDiv;
1500
+ _.$_$.i = charDiv;
1501
+ _.$_$.j = numberDiv;
1502
+ _.$_$.k = booleanDiv;
1503
+ _.$_$.l = anyEqualsTo;
1504
+ _.$_$.m = anyGreaterThanOrEqualsTo;
1505
+ _.$_$.n = anyGreaterThan;
1506
+ _.$_$.o = anyIf;
1507
+ _.$_$.p = anyIfVararg;
1508
+ _.$_$.q = anyImpliedBy;
1509
+ _.$_$.r = anyImpliedByVararg;
1510
+ _.$_$.s = anyIntDiv;
1511
+ _.$_$.t = anyIs;
1512
+ _.$_$.u = anyLowerThanOrEqualsTo;
1513
+ _.$_$.v = anyLowerThan;
1514
+ _.$_$.w = numberMinus;
1515
+ _.$_$.x = termMinus;
1516
+ _.$_$.y = charMinus;
1517
+ _.$_$.z = stringMinus;
1518
+ _.$_$.a1 = booleanMinus;
1519
+ _.$_$.b1 = anyNonGreaterThan;
1520
+ _.$_$.c1 = anyNonLowerThan;
1521
+ _.$_$.d1 = anyNotEqualsTo;
1522
+ _.$_$.e1 = anyOr;
1523
+ _.$_$.f1 = booleanPlus;
1524
+ _.$_$.g1 = termPlus;
1525
+ _.$_$.h1 = number;
1526
+ _.$_$.i1 = charPlus;
1527
+ _.$_$.j1 = anyPow;
1528
+ _.$_$.k1 = numberRem;
1529
+ _.$_$.l1 = stringRem;
1530
+ _.$_$.m1 = charRem;
1531
+ _.$_$.n1 = termRem;
1532
+ _.$_$.o1 = booleanRem;
1533
+ _.$_$.p1 = anySup;
1534
+ _.$_$.q1 = anyThen;
1535
+ _.$_$.r1 = numberTimes;
1536
+ _.$_$.s1 = charTimes;
1537
+ _.$_$.t1 = booleanTimes;
1538
+ _.$_$.u1 = stringTimes;
1539
+ _.$_$.v1 = termTimes;
1540
+ _.$_$.w1 = LogicProgrammingScopeWithOperators;
1541
+ _.$_$.x1 = abolish1;
1542
+ _.$_$.y1 = append3;
1543
+ _.$_$.z1 = arg3;
1544
+ _.$_$.a2 = arithEq2;
1545
+ _.$_$.b2 = arithNeq2;
1546
+ _.$_$.c2 = asserta1;
1547
+ _.$_$.d2 = assertz1;
1548
+ _.$_$.e2 = assert1;
1549
+ _.$_$.f2 = at_end_of_stream1;
1550
+ _.$_$.g2 = atom_chars2;
1551
+ _.$_$.h2 = atom_codes2;
1552
+ _.$_$.i2 = atom_concat3;
1553
+ _.$_$.j2 = atom_length2;
1554
+ _.$_$.k2 = atomic1;
1555
+ _.$_$.l2 = atom1;
1556
+ _.$_$.m2 = bagof3;
1557
+ _.$_$.n2 = between3;
1558
+ _.$_$.o2 = callable1;
1559
+ _.$_$.p2 = call1;
1560
+ _.$_$.q2 = catch3;
1561
+ _.$_$.r2 = char_code2;
1562
+ _.$_$.s2 = clause2;
1563
+ _.$_$.t2 = compound1;
1564
+ _.$_$.u2 = consult1;
1565
+ _.$_$.v2 = copy_term2;
1566
+ _.$_$.w2 = current_flag2;
1567
+ _.$_$.x2 = current_op3;
1568
+ _.$_$.y2 = current_prolog_flag2;
1569
+ _.$_$.z2 = dynamic1;
1570
+ _.$_$.a3 = eq2;
1571
+ _.$_$.b3 = findall3;
1572
+ _.$_$.c3 = float1;
1573
+ _.$_$.d3 = functor3;
1574
+ _.$_$.e3 = ground1;
1575
+ _.$_$.f3 = id2;
1576
+ _.$_$.g3 = include1;
1577
+ _.$_$.h3 = initialization1;
1578
+ _.$_$.i3 = integer1;
1579
+ _.$_$.j3 = load1;
1580
+ _.$_$.k3 = member2;
1581
+ _.$_$.l3 = naf1;
1582
+ _.$_$.m3 = natural;
1583
+ _.$_$.n3 = neq2;
1584
+ _.$_$.o3 = nid2;
1585
+ _.$_$.p3 = nonvar1;
1586
+ _.$_$.q3 = not1;
1587
+ _.$_$.r3 = number_chars2;
1588
+ _.$_$.s3 = number_codes2;
1589
+ _.$_$.t3 = number1;
1590
+ _.$_$.u3 = op3;
1591
+ _.$_$.v3 = retractall1;
1592
+ _.$_$.w3 = retract1;
1593
+ _.$_$.x3 = set_flag2;
1594
+ _.$_$.y3 = set_prolog_flag2;
1595
+ _.$_$.z3 = setof3;
1596
+ _.$_$.a4 = solve1;
1597
+ _.$_$.b4 = static1;
1598
+ _.$_$.c4 = sub_atom5;
1599
+ _.$_$.d4 = throw1;
1600
+ _.$_$.e4 = univ2;
1601
+ _.$_$.f4 = var1;
1602
+ _.$_$.g4 = write1;
1603
+ _.$_$.h4 = LogicProgrammingScopeWithPrologStandardLibrary;
1604
+ _.$_$.i4 = substitutionContainsKey;
1605
+ _.$_$.j4 = substitutionContainsValue;
1606
+ _.$_$.k4 = substitutionContains;
1607
+ _.$_$.l4 = substitutionGet;
1608
+ _.$_$.m4 = stringTo;
1609
+ _.$_$.n4 = varTo;
1610
+ _.$_$.o4 = LogicProgrammingScopeWithSubstitutions;
1611
+ _.$_$.p4 = blockOfAny;
1612
+ _.$_$.q4 = consOfAny;
1613
+ _.$_$.r4 = directiveOfAny;
1614
+ _.$_$.s4 = directive;
1615
+ _.$_$.t4 = factOfAny;
1616
+ _.$_$.u4 = fact;
1617
+ _.$_$.v4 = stringInvoke;
1618
+ _.$_$.w4 = logicListOfAny;
1619
+ _.$_$.x4 = logicList;
1620
+ _.$_$.y4 = rule;
1621
+ _.$_$.z4 = withScope;
1622
+ _.$_$.a5 = structOfAny;
1623
+ _.$_$.b5 = tupleOfAny;
1624
+ _.$_$.c5 = MinimalLogicProgrammingScope;
1625
+ _.$_$.d5 = logicProgramming;
11
1626
  //endregion
12
1627
  return _;
13
1628
  }));