@tuprolog/arg2p-core 0.8.1 → 0.8.3

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
@@ -105,237 +105,225 @@
105
105
  }
106
106
  setMetadataFor(BaseLogicProgrammingScope, 'BaseLogicProgrammingScope', interfaceMeta, VOID, [Scope]);
107
107
  setMetadataFor(Companion, 'Companion', objectMeta);
108
- function at_end_of_stream1(alias) {
109
- return this.structOf('at_end_of_stream', [this.convertToTerm(alias)]);
108
+ function varTo(_this__u8e3s4, termObject) {
109
+ return Companion_getInstance_0().of(_this__u8e3s4, this.convertToTerm(termObject));
110
110
  }
111
- function call1(goal) {
112
- return this.structOf('call', [this.convertToTerm(goal)]);
111
+ function stringTo(_this__u8e3s4, termObject) {
112
+ return Companion_getInstance_0().of(this.varOf(_this__u8e3s4), this.convertToTerm(termObject));
113
113
  }
114
- function catch3(goal, error, continuation) {
115
- return this.structOf('catch', [this.convertToTerm(goal), this.convertToTerm(error), this.convertToTerm(continuation)]);
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;
116
123
  }
117
- function throw1(error) {
118
- return this.structOf('throw', [this.convertToTerm(error)]);
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;
119
133
  }
120
- function not1(goal) {
121
- return this.structOf('not', [this.convertToTerm(goal)]);
134
+ function substitutionContains(_this__u8e3s4, term) {
135
+ return this.substitutionContainsKey(_this__u8e3s4, term);
122
136
  }
123
- function naf1(goal) {
124
- return this.structOf('\\+', [this.convertToTerm(goal)]);
137
+ function substitutionContainsValue(_this__u8e3s4, term) {
138
+ return _this__u8e3s4.v2(this.convertToTerm(term));
125
139
  }
126
- function assert1(clause) {
127
- return this.structOf('assert', [this.convertToTerm(clause)]);
140
+ setMetadataFor(LogicProgrammingScopeWithSubstitutions, 'LogicProgrammingScopeWithSubstitutions', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
141
+ function stringInvoke(_this__u8e3s4, term, terms) {
142
+ var tmp = sequenceOf(arrayConcat([[term], terms]));
143
+ return this.structOfSequence(_this__u8e3s4, map(tmp, MinimalLogicProgrammingScope$invoke$lambda(this)));
128
144
  }
129
- function asserta1(clause) {
130
- return this.structOf('asserta', [this.convertToTerm(clause)]);
145
+ function structOfAny(functor, args) {
146
+ // Inline function 'kotlin.collections.toTypedArray' call
147
+ // Inline function 'kotlin.collections.map' call
148
+ // Inline function 'kotlin.collections.mapTo' call
149
+ var destination = ArrayList_init_$Create$(args.length);
150
+ var inductionVariable = 0;
151
+ var last = args.length;
152
+ while (inductionVariable < last) {
153
+ var item = args[inductionVariable];
154
+ inductionVariable = inductionVariable + 1 | 0;
155
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.structOf.<anonymous>' call
156
+ var tmp$ret$0 = this.convertToTerm(item);
157
+ destination.o(tmp$ret$0);
158
+ }
159
+ var tmp$ret$3 = copyToArray(destination);
160
+ return this.structOf(functor, tmp$ret$3.slice());
131
161
  }
132
- function assertz1(clause) {
133
- return this.structOf('assertz', [this.convertToTerm(clause)]);
162
+ function tupleOfAny(terms) {
163
+ // Inline function 'kotlin.collections.toTypedArray' call
164
+ // Inline function 'kotlin.collections.map' call
165
+ // Inline function 'kotlin.collections.mapTo' call
166
+ var destination = ArrayList_init_$Create$(terms.length);
167
+ var inductionVariable = 0;
168
+ var last = terms.length;
169
+ while (inductionVariable < last) {
170
+ var item = terms[inductionVariable];
171
+ inductionVariable = inductionVariable + 1 | 0;
172
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.tupleOf.<anonymous>' call
173
+ var tmp$ret$0 = this.convertToTerm(item);
174
+ destination.o(tmp$ret$0);
175
+ }
176
+ var tmp$ret$3 = copyToArray(destination);
177
+ return this.tupleOf(tmp$ret$3.slice());
134
178
  }
135
- function arg3(index, compound, argument) {
136
- return this.structOf('arg', [this.convertToTerm(index), this.convertToTerm(compound), this.convertToTerm(argument)]);
179
+ function logicListOfAny(terms) {
180
+ // Inline function 'kotlin.collections.toTypedArray' call
181
+ // Inline function 'kotlin.collections.map' call
182
+ // Inline function 'kotlin.collections.mapTo' call
183
+ var destination = ArrayList_init_$Create$(terms.length);
184
+ var inductionVariable = 0;
185
+ var last = terms.length;
186
+ while (inductionVariable < last) {
187
+ var item = terms[inductionVariable];
188
+ inductionVariable = inductionVariable + 1 | 0;
189
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicListOf.<anonymous>' call
190
+ var tmp$ret$0 = this.convertToTerm(item);
191
+ destination.o(tmp$ret$0);
192
+ }
193
+ var tmp$ret$3 = copyToArray(destination);
194
+ return this.logicListOf(tmp$ret$3.slice());
137
195
  }
138
- function atom1(atom) {
139
- return this.structOf('atom', [this.convertToTerm(atom)]);
196
+ function blockOfAny(terms) {
197
+ // Inline function 'kotlin.collections.toTypedArray' call
198
+ // Inline function 'kotlin.collections.map' call
199
+ // Inline function 'kotlin.collections.mapTo' call
200
+ var destination = ArrayList_init_$Create$(terms.length);
201
+ var inductionVariable = 0;
202
+ var last = terms.length;
203
+ while (inductionVariable < last) {
204
+ var item = terms[inductionVariable];
205
+ inductionVariable = inductionVariable + 1 | 0;
206
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.blockOf.<anonymous>' call
207
+ var tmp$ret$0 = this.convertToTerm(item);
208
+ destination.o(tmp$ret$0);
209
+ }
210
+ var tmp$ret$3 = copyToArray(destination);
211
+ return this.blockOf(tmp$ret$3.slice());
140
212
  }
141
- function atomic1(atomic) {
142
- return this.structOf('atomic', [this.convertToTerm(atomic)]);
213
+ function factOfAny(term) {
214
+ var tmp = this.convertToTerm(term);
215
+ return this.factOf(isInterface(tmp, Struct) ? tmp : THROW_CCE());
143
216
  }
144
- function between3(min, max, number) {
145
- return this.structOf('between', [this.convertToTerm(min), this.convertToTerm(max), this.convertToTerm(number)]);
217
+ function consOfAny(head, tail) {
218
+ return this.consOf(this.convertToTerm(head), this.convertToTerm(tail));
146
219
  }
147
- function callable1(goal) {
148
- return this.structOf('callable', [this.convertToTerm(goal)]);
220
+ function directiveOfAny(term, terms) {
221
+ var tmp = this.convertToTerm(term);
222
+ // Inline function 'kotlin.collections.toTypedArray' call
223
+ // Inline function 'kotlin.collections.map' call
224
+ // Inline function 'kotlin.collections.mapTo' call
225
+ var destination = ArrayList_init_$Create$(terms.length);
226
+ var inductionVariable = 0;
227
+ var last = terms.length;
228
+ while (inductionVariable < last) {
229
+ var item = terms[inductionVariable];
230
+ inductionVariable = inductionVariable + 1 | 0;
231
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.directiveOf.<anonymous>' call
232
+ var tmp$ret$0 = this.convertToTerm(item);
233
+ destination.o(tmp$ret$0);
234
+ }
235
+ var tmp$ret$3 = copyToArray(destination);
236
+ return this.directiveOf(tmp, tmp$ret$3.slice());
149
237
  }
150
- function compound1(struct) {
151
- return this.structOf('compound', [this.convertToTerm(struct)]);
238
+ function withScope(function_0) {
239
+ return function_0(this.newScope());
152
240
  }
153
- function current_op3(precedence, specifier, functor) {
154
- return this.structOf('current_op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
241
+ function logicList(items, tail) {
242
+ // Inline function 'kotlin.let' call
243
+ // Inline function 'kotlin.collections.map' call
244
+ var this_0 = listOf(items.slice());
245
+ // Inline function 'kotlin.collections.mapTo' call
246
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
247
+ var tmp0_iterator = this_0.r();
248
+ while (tmp0_iterator.s()) {
249
+ var item = tmp0_iterator.u();
250
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
251
+ var tmp$ret$0 = this.convertToTerm(item);
252
+ destination.o(tmp$ret$0);
253
+ }
254
+ // Inline function 'kotlin.contracts.contract' call
255
+ // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
256
+ var tmp;
257
+ if (!(tail == null)) {
258
+ tmp = this.q10(destination, this.convertToTerm(tail));
259
+ } else {
260
+ tmp = this.logicListOfIterable(destination);
261
+ }
262
+ return tmp;
155
263
  }
156
- function op3(precedence, specifier, functor) {
157
- return this.structOf('op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
264
+ function logicList_0(items, tail, $super) {
265
+ tail = tail === VOID ? null : tail;
266
+ return $super === VOID ? this.x1i(items, tail) : logicList(items, tail);
158
267
  }
159
- function findall3(template, goal, bag) {
160
- return this.structOf('findall', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
268
+ function rule(function_0) {
269
+ var tmp = this.convertToTerm(function_0(this.newScope()));
270
+ return isInterface(tmp, Rule) ? tmp : THROW_CCE();
161
271
  }
162
- function float1(number) {
163
- return this.structOf('float', [this.convertToTerm(number)]);
272
+ function directive(function_0) {
273
+ var tmp = function_0(this.newScope());
274
+ var tmp_0 = getKClass(Directive);
275
+ return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$directive$directiveOf$ref(this));
164
276
  }
165
- function functor3(struct, functor, arity) {
166
- return this.structOf('functor', [this.convertToTerm(struct), this.convertToTerm(functor), this.convertToTerm(arity)]);
277
+ function fact(function_0) {
278
+ var tmp = function_0(this.newScope());
279
+ var tmp_0 = getKClass(Fact);
280
+ return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$factOf$ref(this));
167
281
  }
168
- function ground1(term) {
169
- return this.structOf('ground', [this.convertToTerm(term)]);
282
+ setMetadataFor(MinimalLogicProgrammingScope, 'MinimalLogicProgrammingScope', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
283
+ function termPlus(_this__u8e3s4, other) {
284
+ return this.structOf('+', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
170
285
  }
171
- function integer1(number) {
172
- return this.structOf('integer', [this.convertToTerm(number)]);
286
+ function number(_this__u8e3s4, other) {
287
+ return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
173
288
  }
174
- function natural(number) {
175
- return this.structOf('natural', [this.convertToTerm(number)]);
289
+ function booleanPlus(_this__u8e3s4, other) {
290
+ return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
176
291
  }
177
- function nonvar1(number) {
178
- return this.structOf('nonvar', [this.convertToTerm(number)]);
292
+ function charPlus(_this__u8e3s4, other) {
293
+ return this.termPlus(this.convertToTerm(new Char(_this__u8e3s4)), other);
179
294
  }
180
- function number1(number) {
181
- return this.structOf('number', [this.convertToTerm(number)]);
295
+ function termMinus(_this__u8e3s4, other) {
296
+ return this.structOf('-', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
182
297
  }
183
- function var1(term) {
184
- return this.structOf('var', [this.convertToTerm(term)]);
298
+ function numberMinus(_this__u8e3s4, other) {
299
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
185
300
  }
186
- function write1(term) {
187
- return this.structOf('write', [this.convertToTerm(term)]);
301
+ function booleanMinus(_this__u8e3s4, other) {
302
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
188
303
  }
189
- function univ2(_this__u8e3s4, other) {
190
- return this.structOf('=..', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
304
+ function charMinus(_this__u8e3s4, other) {
305
+ return this.termMinus(this.convertToTerm(new Char(_this__u8e3s4)), other);
191
306
  }
192
- function eq2(_this__u8e3s4, right) {
193
- return this.structOf('=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
307
+ function stringMinus(_this__u8e3s4, other) {
308
+ return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
194
309
  }
195
- function neq2(_this__u8e3s4, right) {
196
- return this.structOf('\\=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
310
+ function termTimes(_this__u8e3s4, other) {
311
+ return this.structOf('*', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
197
312
  }
198
- function id2(_this__u8e3s4, right) {
199
- return this.structOf('==', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
313
+ function numberTimes(_this__u8e3s4, other) {
314
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
200
315
  }
201
- function nid2(_this__u8e3s4, right) {
202
- return this.structOf('\\==', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
316
+ function booleanTimes(_this__u8e3s4, other) {
317
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
203
318
  }
204
- function arithEq2(_this__u8e3s4, right) {
205
- return this.structOf('=:=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
319
+ function charTimes(_this__u8e3s4, other) {
320
+ return this.termTimes(this.convertToTerm(new Char(_this__u8e3s4)), other);
206
321
  }
207
- function arithNeq2(_this__u8e3s4, right) {
208
- return this.structOf('=\\=', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(right)]);
322
+ function stringTimes(_this__u8e3s4, other) {
323
+ return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
209
324
  }
210
- function member2(item, list) {
211
- return this.structOf('member', [this.convertToTerm(item), this.convertToTerm(list)]);
212
- }
213
- function retract1(clause) {
214
- return this.structOf('retract', [this.convertToTerm(clause)]);
215
- }
216
- function append3(left, right, result) {
217
- return this.structOf('append', [this.convertToTerm(left), this.convertToTerm(right), this.convertToTerm(result)]);
218
- }
219
- function retractall1(clause) {
220
- return this.structOf('retractall', [this.convertToTerm(clause)]);
221
- }
222
- function abolish1(indicator) {
223
- return this.structOf('abolish', [this.convertToTerm(indicator)]);
224
- }
225
- function atom_chars2(atom, chars) {
226
- return this.structOf('atom_chars', [this.convertToTerm(atom), this.convertToTerm(chars)]);
227
- }
228
- function atom_codes2(atom, codes) {
229
- return this.structOf('atom_codes', [this.convertToTerm(atom), this.convertToTerm(codes)]);
230
- }
231
- function atom_concat3(first, second, result) {
232
- return this.structOf('atom_concat', [this.convertToTerm(first), this.convertToTerm(second), this.convertToTerm(result)]);
233
- }
234
- function atom_length2(atom, length) {
235
- return this.structOf('atom_length', [this.convertToTerm(atom), this.convertToTerm(length)]);
236
- }
237
- function char_code2(char, code) {
238
- return this.structOf('char_code', [this.convertToTerm(char), this.convertToTerm(code)]);
239
- }
240
- function clause2(head, body) {
241
- return this.structOf('clause', [this.convertToTerm(head), this.convertToTerm(body)]);
242
- }
243
- function copy_term2(term, copy) {
244
- return this.structOf('copy_term', [this.convertToTerm(term), this.convertToTerm(copy)]);
245
- }
246
- function current_flag2(name, value) {
247
- return this.structOf('current_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
248
- }
249
- function current_prolog_flag2(name, value) {
250
- return this.structOf('current_prolog_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
251
- }
252
- function sub_atom5(atom, before, length, after, sub_atom) {
253
- return this.structOf('sub_atom', [this.convertToTerm(atom), this.convertToTerm(before), this.convertToTerm(length), this.convertToTerm(after), this.convertToTerm(sub_atom)]);
254
- }
255
- function number_chars2(first, second) {
256
- return this.structOf('number_chars', [this.convertToTerm(first), this.convertToTerm(second)]);
257
- }
258
- function number_codes2(first, second) {
259
- return this.structOf('number_codes', [this.convertToTerm(first), this.convertToTerm(second)]);
260
- }
261
- function bagof3(template, goal, bag) {
262
- return this.structOf('bagof', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
263
- }
264
- function setof3(template, goal, bag) {
265
- return this.structOf('setof', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
266
- }
267
- function consult1(url) {
268
- return this.structOf('consult', [this.convertToTerm(url)]);
269
- }
270
- function set_flag2(name, value) {
271
- return this.structOf('set_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
272
- }
273
- function set_prolog_flag2(name, value) {
274
- return this.structOf('set_prolog_flag', [this.convertToTerm(name), this.convertToTerm(value)]);
275
- }
276
- function dynamic1(indicator) {
277
- return this.structOf('dynamic', [this.convertToTerm(indicator)]);
278
- }
279
- function static1(indicator) {
280
- return this.structOf('static', [this.convertToTerm(indicator)]);
281
- }
282
- function solve1(goal) {
283
- return this.structOf('solve', [this.convertToTerm(goal)]);
284
- }
285
- function initialization1(goal) {
286
- return this.structOf('initialization', [this.convertToTerm(goal)]);
287
- }
288
- function load1(url) {
289
- return this.structOf('load', [this.convertToTerm(url)]);
290
- }
291
- function include1(url) {
292
- return this.structOf('include', [this.convertToTerm(url)]);
293
- }
294
- setMetadataFor(LogicProgrammingScopeWithPrologStandardLibrary, 'LogicProgrammingScopeWithPrologStandardLibrary', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
295
- function termPlus(_this__u8e3s4, other) {
296
- return this.structOf('+', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
297
- }
298
- function number(_this__u8e3s4, other) {
299
- return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
300
- }
301
- function booleanPlus(_this__u8e3s4, other) {
302
- return this.termPlus(this.convertToTerm(_this__u8e3s4), other);
303
- }
304
- function charPlus(_this__u8e3s4, other) {
305
- return this.termPlus(this.convertToTerm(new Char(_this__u8e3s4)), other);
306
- }
307
- function termMinus(_this__u8e3s4, other) {
308
- return this.structOf('-', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
309
- }
310
- function numberMinus(_this__u8e3s4, other) {
311
- return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
312
- }
313
- function booleanMinus(_this__u8e3s4, other) {
314
- return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
315
- }
316
- function charMinus(_this__u8e3s4, other) {
317
- return this.termMinus(this.convertToTerm(new Char(_this__u8e3s4)), other);
318
- }
319
- function stringMinus(_this__u8e3s4, other) {
320
- return this.termMinus(this.convertToTerm(_this__u8e3s4), other);
321
- }
322
- function termTimes(_this__u8e3s4, other) {
323
- return this.structOf('*', [this.convertToTerm(_this__u8e3s4), this.convertToTerm(other)]);
324
- }
325
- function numberTimes(_this__u8e3s4, other) {
326
- return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
327
- }
328
- function booleanTimes(_this__u8e3s4, other) {
329
- return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
330
- }
331
- function charTimes(_this__u8e3s4, other) {
332
- return this.termTimes(this.convertToTerm(new Char(_this__u8e3s4)), other);
333
- }
334
- function stringTimes(_this__u8e3s4, other) {
335
- return this.termTimes(this.convertToTerm(_this__u8e3s4), other);
336
- }
337
- function termDiv(_this__u8e3s4, other) {
338
- return this.indicatorOf(this.convertToTerm(_this__u8e3s4), this.convertToTerm(other));
325
+ function termDiv(_this__u8e3s4, other) {
326
+ return this.indicatorOf(this.convertToTerm(_this__u8e3s4), this.convertToTerm(other));
339
327
  }
340
328
  function numberDiv(_this__u8e3s4, other) {
341
329
  return this.termDiv(this.convertToTerm(_this__u8e3s4), other);
@@ -453,182 +441,194 @@
453
441
  return this.anyImpliedByVararg(_this__u8e3s4, other.slice());
454
442
  }
455
443
  setMetadataFor(LogicProgrammingScopeWithOperators, 'LogicProgrammingScopeWithOperators', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
456
- function stringInvoke(_this__u8e3s4, term, terms) {
457
- var tmp = sequenceOf(arrayConcat([[term], terms]));
458
- return this.structOfSequence(_this__u8e3s4, map(tmp, MinimalLogicProgrammingScope$invoke$lambda(this)));
444
+ function at_end_of_stream1(alias) {
445
+ return this.structOf('at_end_of_stream', [this.convertToTerm(alias)]);
459
446
  }
460
- function structOfAny(functor, args) {
461
- // Inline function 'kotlin.collections.toTypedArray' call
462
- // Inline function 'kotlin.collections.map' call
463
- // Inline function 'kotlin.collections.mapTo' call
464
- var destination = ArrayList_init_$Create$(args.length);
465
- var inductionVariable = 0;
466
- var last = args.length;
467
- while (inductionVariable < last) {
468
- var item = args[inductionVariable];
469
- inductionVariable = inductionVariable + 1 | 0;
470
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.structOf.<anonymous>' call
471
- var tmp$ret$0 = this.convertToTerm(item);
472
- destination.o(tmp$ret$0);
473
- }
474
- var tmp$ret$3 = copyToArray(destination);
475
- return this.structOf(functor, tmp$ret$3.slice());
447
+ function call1(goal) {
448
+ return this.structOf('call', [this.convertToTerm(goal)]);
476
449
  }
477
- function tupleOfAny(terms) {
478
- // Inline function 'kotlin.collections.toTypedArray' call
479
- // Inline function 'kotlin.collections.map' call
480
- // Inline function 'kotlin.collections.mapTo' call
481
- var destination = ArrayList_init_$Create$(terms.length);
482
- var inductionVariable = 0;
483
- var last = terms.length;
484
- while (inductionVariable < last) {
485
- var item = terms[inductionVariable];
486
- inductionVariable = inductionVariable + 1 | 0;
487
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.tupleOf.<anonymous>' call
488
- var tmp$ret$0 = this.convertToTerm(item);
489
- destination.o(tmp$ret$0);
490
- }
491
- var tmp$ret$3 = copyToArray(destination);
492
- return this.tupleOf(tmp$ret$3.slice());
450
+ function catch3(goal, error, continuation) {
451
+ return this.structOf('catch', [this.convertToTerm(goal), this.convertToTerm(error), this.convertToTerm(continuation)]);
493
452
  }
494
- function logicListOfAny(terms) {
495
- // Inline function 'kotlin.collections.toTypedArray' call
496
- // Inline function 'kotlin.collections.map' call
497
- // Inline function 'kotlin.collections.mapTo' call
498
- var destination = ArrayList_init_$Create$(terms.length);
499
- var inductionVariable = 0;
500
- var last = terms.length;
501
- while (inductionVariable < last) {
502
- var item = terms[inductionVariable];
503
- inductionVariable = inductionVariable + 1 | 0;
504
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicListOf.<anonymous>' call
505
- var tmp$ret$0 = this.convertToTerm(item);
506
- destination.o(tmp$ret$0);
507
- }
508
- var tmp$ret$3 = copyToArray(destination);
509
- return this.logicListOf(tmp$ret$3.slice());
453
+ function throw1(error) {
454
+ return this.structOf('throw', [this.convertToTerm(error)]);
510
455
  }
511
- function blockOfAny(terms) {
512
- // Inline function 'kotlin.collections.toTypedArray' call
513
- // Inline function 'kotlin.collections.map' call
514
- // Inline function 'kotlin.collections.mapTo' call
515
- var destination = ArrayList_init_$Create$(terms.length);
516
- var inductionVariable = 0;
517
- var last = terms.length;
518
- while (inductionVariable < last) {
519
- var item = terms[inductionVariable];
520
- inductionVariable = inductionVariable + 1 | 0;
521
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.blockOf.<anonymous>' call
522
- var tmp$ret$0 = this.convertToTerm(item);
523
- destination.o(tmp$ret$0);
524
- }
525
- var tmp$ret$3 = copyToArray(destination);
526
- return this.blockOf(tmp$ret$3.slice());
456
+ function not1(goal) {
457
+ return this.structOf('not', [this.convertToTerm(goal)]);
527
458
  }
528
- function factOfAny(term) {
529
- var tmp = this.convertToTerm(term);
530
- return this.factOf(isInterface(tmp, Struct) ? tmp : THROW_CCE());
459
+ function naf1(goal) {
460
+ return this.structOf('\\+', [this.convertToTerm(goal)]);
531
461
  }
532
- function consOfAny(head, tail) {
533
- return this.consOf(this.convertToTerm(head), this.convertToTerm(tail));
462
+ function assert1(clause) {
463
+ return this.structOf('assert', [this.convertToTerm(clause)]);
534
464
  }
535
- function directiveOfAny(term, terms) {
536
- var tmp = this.convertToTerm(term);
537
- // Inline function 'kotlin.collections.toTypedArray' call
538
- // Inline function 'kotlin.collections.map' call
539
- // Inline function 'kotlin.collections.mapTo' call
540
- var destination = ArrayList_init_$Create$(terms.length);
541
- var inductionVariable = 0;
542
- var last = terms.length;
543
- while (inductionVariable < last) {
544
- var item = terms[inductionVariable];
545
- inductionVariable = inductionVariable + 1 | 0;
546
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.directiveOf.<anonymous>' call
547
- var tmp$ret$0 = this.convertToTerm(item);
548
- destination.o(tmp$ret$0);
549
- }
550
- var tmp$ret$3 = copyToArray(destination);
551
- return this.directiveOf(tmp, tmp$ret$3.slice());
465
+ function asserta1(clause) {
466
+ return this.structOf('asserta', [this.convertToTerm(clause)]);
552
467
  }
553
- function withScope(function_0) {
554
- return function_0(this.newScope());
468
+ function assertz1(clause) {
469
+ return this.structOf('assertz', [this.convertToTerm(clause)]);
555
470
  }
556
- function logicList(items, tail) {
557
- // Inline function 'kotlin.let' call
558
- // Inline function 'kotlin.collections.map' call
559
- var this_0 = listOf(items.slice());
560
- // Inline function 'kotlin.collections.mapTo' call
561
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
562
- var tmp0_iterator = this_0.r();
563
- while (tmp0_iterator.s()) {
564
- var item = tmp0_iterator.u();
565
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
566
- var tmp$ret$0 = this.convertToTerm(item);
567
- destination.o(tmp$ret$0);
568
- }
569
- // Inline function 'kotlin.contracts.contract' call
570
- // Inline function 'it.unibo.tuprolog.dsl.MinimalLogicProgrammingScope.logicList.<anonymous>' call
571
- var tmp;
572
- if (!(tail == null)) {
573
- tmp = this.q10(destination, this.convertToTerm(tail));
574
- } else {
575
- tmp = this.logicListOfIterable(destination);
576
- }
577
- return tmp;
471
+ function arg3(index, compound, argument) {
472
+ return this.structOf('arg', [this.convertToTerm(index), this.convertToTerm(compound), this.convertToTerm(argument)]);
578
473
  }
579
- function logicList_0(items, tail, $super) {
580
- tail = tail === VOID ? null : tail;
581
- return $super === VOID ? this.x1i(items, tail) : logicList(items, tail);
474
+ function atom1(atom) {
475
+ return this.structOf('atom', [this.convertToTerm(atom)]);
582
476
  }
583
- function rule(function_0) {
584
- var tmp = this.convertToTerm(function_0(this.newScope()));
585
- return isInterface(tmp, Rule) ? tmp : THROW_CCE();
477
+ function atomic1(atomic) {
478
+ return this.structOf('atomic', [this.convertToTerm(atomic)]);
586
479
  }
587
- function directive(function_0) {
588
- var tmp = function_0(this.newScope());
589
- var tmp_0 = getKClass(Directive);
590
- return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$directive$directiveOf$ref(this));
480
+ function between3(min, max, number) {
481
+ return this.structOf('between', [this.convertToTerm(min), this.convertToTerm(max), this.convertToTerm(number)]);
591
482
  }
592
- function fact(function_0) {
593
- var tmp = function_0(this.newScope());
594
- var tmp_0 = getKClass(Fact);
595
- return this.convertToSpecificSubTypeOfTerm(tmp, tmp_0, MinimalLogicProgrammingScope$factOf$ref(this));
483
+ function callable1(goal) {
484
+ return this.structOf('callable', [this.convertToTerm(goal)]);
596
485
  }
597
- setMetadataFor(MinimalLogicProgrammingScope, 'MinimalLogicProgrammingScope', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
598
- function varTo(_this__u8e3s4, termObject) {
599
- return Companion_getInstance_0().of(_this__u8e3s4, this.convertToTerm(termObject));
486
+ function compound1(struct) {
487
+ return this.structOf('compound', [this.convertToTerm(struct)]);
600
488
  }
601
- function stringTo(_this__u8e3s4, termObject) {
602
- return Companion_getInstance_0().of(this.varOf(_this__u8e3s4), this.convertToTerm(termObject));
489
+ function current_op3(precedence, specifier, functor) {
490
+ return this.structOf('current_op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
603
491
  }
604
- function substitutionGet(_this__u8e3s4, term) {
605
- var t = this.convertToTerm(term);
606
- var tmp;
607
- if (isInterface(t, Var)) {
608
- tmp = _this__u8e3s4.x2(t);
609
- } else {
610
- raiseErrorConvertingTo(term, getKClass(Var));
611
- }
612
- return tmp;
492
+ function op3(precedence, specifier, functor) {
493
+ return this.structOf('op', [this.convertToTerm(precedence), this.convertToTerm(specifier), this.convertToTerm(functor)]);
613
494
  }
614
- function substitutionContainsKey(_this__u8e3s4, term) {
615
- var t = this.convertToTerm(term);
616
- var tmp;
617
- if (isInterface(t, Var)) {
618
- tmp = _this__u8e3s4.u2(t);
619
- } else {
620
- raiseErrorConvertingTo(term, getKClass(Var));
621
- }
622
- return tmp;
495
+ function findall3(template, goal, bag) {
496
+ return this.structOf('findall', [this.convertToTerm(template), this.convertToTerm(goal), this.convertToTerm(bag)]);
623
497
  }
624
- function substitutionContains(_this__u8e3s4, term) {
625
- return this.substitutionContainsKey(_this__u8e3s4, term);
498
+ function float1(number) {
499
+ return this.structOf('float', [this.convertToTerm(number)]);
626
500
  }
627
- function substitutionContainsValue(_this__u8e3s4, term) {
628
- return _this__u8e3s4.v2(this.convertToTerm(term));
501
+ function functor3(struct, functor, arity) {
502
+ return this.structOf('functor', [this.convertToTerm(struct), this.convertToTerm(functor), this.convertToTerm(arity)]);
629
503
  }
630
- setMetadataFor(LogicProgrammingScopeWithSubstitutions, 'LogicProgrammingScopeWithSubstitutions', interfaceMeta, VOID, [BaseLogicProgrammingScope]);
631
- setMetadataFor(LogicProgrammingScopeImpl, 'LogicProgrammingScopeImpl', classMeta, VOID, [LogicProgrammingScopeWithPrologStandardLibrary, BaseLogicProgrammingScope, LogicProgrammingScopeWithOperators, Scope, MinimalLogicProgrammingScope, LogicProgrammingScopeWithSubstitutions]);
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, MinimalLogicProgrammingScope, Scope, LogicProgrammingScopeWithOperators, LogicProgrammingScopeWithPrologStandardLibrary, BaseLogicProgrammingScope]);
632
632
  setMetadataFor(Companion_0, 'Companion', objectMeta);
633
633
  setMetadataFor(DefaultTermificator, 'DefaultTermificator', classMeta, AbstractTermificator);
634
634
  //endregion