@tuprolog/2p-full 1.3.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2p-bdd.js +136 -136
- package/2p-bdd.js.map +1 -1
- package/2p-core.js +1017 -863
- package/2p-core.js.map +1 -1
- package/2p-solve-classic.js +792 -792
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve-plp.js +1 -1
- package/2p-solve-plp.js.map +1 -1
- package/2p-solve-problog.js +894 -894
- package/2p-solve-problog.js.map +1 -1
- package/2p-solve-streams.js +619 -619
- package/2p-solve-streams.js.map +1 -1
- package/2p-solve.js +2657 -2657
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1204 -1204
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +520 -194
- package/2p-unify.js.map +1 -1
- package/2p-utils.js +9 -8
- package/2p-utils.js.map +1 -1
- package/README.md +3 -3
- package/kotlin-kotlin-stdlib.js +7 -7
- package/package.json +1 -1
package/2p-solve-problog.js
CHANGED
|
@@ -219,7 +219,7 @@
|
|
|
219
219
|
function get_probabilityOrNull() {
|
|
220
220
|
var tmp;
|
|
221
221
|
try {
|
|
222
|
-
tmp = this.
|
|
222
|
+
tmp = this.g39();
|
|
223
223
|
} catch ($p) {
|
|
224
224
|
var tmp_0;
|
|
225
225
|
if ($p instanceof Error) {
|
|
@@ -265,163 +265,163 @@
|
|
|
265
265
|
//endregion
|
|
266
266
|
function MutableProblogSolver(solver) {
|
|
267
267
|
ProblogSolver.call(this, solver);
|
|
268
|
-
this.
|
|
268
|
+
this.b37_1 = solver;
|
|
269
269
|
}
|
|
270
|
-
protoOf(MutableProblogSolver).
|
|
271
|
-
this.
|
|
270
|
+
protoOf(MutableProblogSolver).c31 = function (library) {
|
|
271
|
+
this.b37_1.loadLibrary(library);
|
|
272
272
|
};
|
|
273
273
|
protoOf(MutableProblogSolver).loadLibrary = function (library) {
|
|
274
|
-
return this.
|
|
274
|
+
return this.c31(library);
|
|
275
275
|
};
|
|
276
|
-
protoOf(MutableProblogSolver).
|
|
277
|
-
this.
|
|
276
|
+
protoOf(MutableProblogSolver).d31 = function (library) {
|
|
277
|
+
this.b37_1.unloadLibrary(library);
|
|
278
278
|
};
|
|
279
279
|
protoOf(MutableProblogSolver).unloadLibrary = function (library) {
|
|
280
|
-
return this.
|
|
280
|
+
return this.d31(library);
|
|
281
281
|
};
|
|
282
|
-
protoOf(MutableProblogSolver).
|
|
283
|
-
this.
|
|
282
|
+
protoOf(MutableProblogSolver).e31 = function (libraries) {
|
|
283
|
+
this.b37_1.setLibraries(libraries);
|
|
284
284
|
};
|
|
285
285
|
protoOf(MutableProblogSolver).setLibraries = function (libraries) {
|
|
286
|
-
return this.
|
|
286
|
+
return this.e31(libraries);
|
|
287
287
|
};
|
|
288
|
-
protoOf(MutableProblogSolver).
|
|
289
|
-
this.
|
|
288
|
+
protoOf(MutableProblogSolver).f31 = function (theory) {
|
|
289
|
+
this.b37_1.loadStaticKb(Companion_instance_10.ofIterable(this.b37_1.r1k(), theory));
|
|
290
290
|
};
|
|
291
291
|
protoOf(MutableProblogSolver).loadStaticKb = function (theory) {
|
|
292
|
-
return this.
|
|
292
|
+
return this.f31(theory);
|
|
293
293
|
};
|
|
294
|
-
protoOf(MutableProblogSolver).
|
|
295
|
-
this.
|
|
294
|
+
protoOf(MutableProblogSolver).g31 = function (theory) {
|
|
295
|
+
this.b37_1.appendStaticKb(Companion_instance_10.ofIterable(this.b37_1.r1k(), theory));
|
|
296
296
|
};
|
|
297
297
|
protoOf(MutableProblogSolver).appendStaticKb = function (theory) {
|
|
298
|
-
return this.
|
|
298
|
+
return this.g31(theory);
|
|
299
299
|
};
|
|
300
|
-
protoOf(MutableProblogSolver).
|
|
301
|
-
this.
|
|
300
|
+
protoOf(MutableProblogSolver).h31 = function () {
|
|
301
|
+
this.b37_1.resetStaticKb();
|
|
302
302
|
};
|
|
303
303
|
protoOf(MutableProblogSolver).resetStaticKb = function () {
|
|
304
|
-
return this.
|
|
304
|
+
return this.h31();
|
|
305
305
|
};
|
|
306
|
-
protoOf(MutableProblogSolver).
|
|
307
|
-
this.
|
|
306
|
+
protoOf(MutableProblogSolver).i31 = function (theory) {
|
|
307
|
+
this.b37_1.loadDynamicKb(Companion_instance_10.ofIterable(this.b37_1.r1k(), theory));
|
|
308
308
|
};
|
|
309
309
|
protoOf(MutableProblogSolver).loadDynamicKb = function (theory) {
|
|
310
|
-
return this.
|
|
310
|
+
return this.i31(theory);
|
|
311
311
|
};
|
|
312
|
-
protoOf(MutableProblogSolver).
|
|
313
|
-
this.
|
|
312
|
+
protoOf(MutableProblogSolver).j31 = function (theory) {
|
|
313
|
+
this.b37_1.appendDynamicKb(Companion_instance_10.ofIterable(this.b37_1.r1k(), theory));
|
|
314
314
|
};
|
|
315
315
|
protoOf(MutableProblogSolver).appendDynamicKb = function (theory) {
|
|
316
|
-
return this.
|
|
316
|
+
return this.j31(theory);
|
|
317
317
|
};
|
|
318
|
-
protoOf(MutableProblogSolver).
|
|
319
|
-
this.
|
|
318
|
+
protoOf(MutableProblogSolver).k31 = function () {
|
|
319
|
+
this.b37_1.resetDynamicKb();
|
|
320
320
|
};
|
|
321
321
|
protoOf(MutableProblogSolver).resetDynamicKb = function () {
|
|
322
|
-
return this.
|
|
322
|
+
return this.k31();
|
|
323
323
|
};
|
|
324
|
-
protoOf(MutableProblogSolver).
|
|
325
|
-
this.
|
|
324
|
+
protoOf(MutableProblogSolver).d1m = function (clause) {
|
|
325
|
+
this.b37_1.assertA(first(Companion_instance_10.of(this.b37_1.r1k(), [clause]).b1l()));
|
|
326
326
|
};
|
|
327
327
|
protoOf(MutableProblogSolver).assertA = function (clause) {
|
|
328
|
-
return this.
|
|
328
|
+
return this.d1m(clause);
|
|
329
329
|
};
|
|
330
|
-
protoOf(MutableProblogSolver).
|
|
331
|
-
this.
|
|
330
|
+
protoOf(MutableProblogSolver).l31 = function (fact) {
|
|
331
|
+
this.b37_1.assertA(first(Companion_instance_10.of(this.b37_1.r1k(), [Companion_instance.of(fact)]).b1l()));
|
|
332
332
|
};
|
|
333
333
|
protoOf(MutableProblogSolver).assertAFact = function (fact) {
|
|
334
|
-
return this.
|
|
334
|
+
return this.l31(fact);
|
|
335
335
|
};
|
|
336
|
-
protoOf(MutableProblogSolver).
|
|
337
|
-
this.
|
|
336
|
+
protoOf(MutableProblogSolver).e1l = function (clause) {
|
|
337
|
+
this.b37_1.assertZ(first(Companion_instance_10.of(this.b37_1.r1k(), [clause]).b1l()));
|
|
338
338
|
};
|
|
339
339
|
protoOf(MutableProblogSolver).assertZ = function (clause) {
|
|
340
|
-
return this.
|
|
340
|
+
return this.e1l(clause);
|
|
341
341
|
};
|
|
342
|
-
protoOf(MutableProblogSolver).
|
|
343
|
-
this.
|
|
342
|
+
protoOf(MutableProblogSolver).m31 = function (fact) {
|
|
343
|
+
this.b37_1.assertA(first(Companion_instance_10.of(this.b37_1.r1k(), [Companion_instance.of(fact)]).b1l()));
|
|
344
344
|
};
|
|
345
345
|
protoOf(MutableProblogSolver).assertZFact = function (fact) {
|
|
346
|
-
return this.
|
|
346
|
+
return this.m31(fact);
|
|
347
347
|
};
|
|
348
|
-
protoOf(MutableProblogSolver).
|
|
349
|
-
return this.
|
|
348
|
+
protoOf(MutableProblogSolver).x1s = function (clause) {
|
|
349
|
+
return this.b37_1.retract(first(Companion_instance_10.of(this.b37_1.r1k(), [clause]).b1l()));
|
|
350
350
|
};
|
|
351
351
|
protoOf(MutableProblogSolver).retract = function (clause) {
|
|
352
|
-
return this.
|
|
352
|
+
return this.x1s(clause);
|
|
353
353
|
};
|
|
354
|
-
protoOf(MutableProblogSolver).
|
|
355
|
-
return this.
|
|
354
|
+
protoOf(MutableProblogSolver).y1s = function (fact) {
|
|
355
|
+
return this.b37_1.retract(first(Companion_instance_10.of(this.b37_1.r1k(), [Companion_instance.of(fact)]).b1l()));
|
|
356
356
|
};
|
|
357
357
|
protoOf(MutableProblogSolver).retractByHead = function (fact) {
|
|
358
|
-
return this.
|
|
358
|
+
return this.y1s(fact);
|
|
359
359
|
};
|
|
360
|
-
protoOf(MutableProblogSolver).
|
|
361
|
-
return this.
|
|
360
|
+
protoOf(MutableProblogSolver).j1l = function (clause) {
|
|
361
|
+
return this.b37_1.retractAll(first(Companion_instance_10.of(this.b37_1.r1k(), [clause]).b1l()));
|
|
362
362
|
};
|
|
363
363
|
protoOf(MutableProblogSolver).retractAll = function (clause) {
|
|
364
|
-
return this.
|
|
364
|
+
return this.j1l(clause);
|
|
365
365
|
};
|
|
366
|
-
protoOf(MutableProblogSolver).
|
|
367
|
-
return this.
|
|
366
|
+
protoOf(MutableProblogSolver).n31 = function (fact) {
|
|
367
|
+
return this.b37_1.retractAll(first(Companion_instance_10.of(this.b37_1.r1k(), [Companion_instance.of(fact)]).b1l()));
|
|
368
368
|
};
|
|
369
369
|
protoOf(MutableProblogSolver).retractAllBeHead = function (fact) {
|
|
370
|
-
return this.
|
|
370
|
+
return this.n31(fact);
|
|
371
371
|
};
|
|
372
|
-
protoOf(MutableProblogSolver).
|
|
373
|
-
this.
|
|
372
|
+
protoOf(MutableProblogSolver).o31 = function (name, value) {
|
|
373
|
+
this.b37_1.setFlag(name, value);
|
|
374
374
|
};
|
|
375
375
|
protoOf(MutableProblogSolver).setFlag = function (name, value) {
|
|
376
|
-
return this.
|
|
376
|
+
return this.o31(name, value);
|
|
377
377
|
};
|
|
378
|
-
protoOf(MutableProblogSolver).
|
|
379
|
-
this.
|
|
378
|
+
protoOf(MutableProblogSolver).p31 = function (flag) {
|
|
379
|
+
this.b37_1.setFlagPair(flag);
|
|
380
380
|
};
|
|
381
381
|
protoOf(MutableProblogSolver).setFlagPair = function (flag) {
|
|
382
|
-
return this.
|
|
382
|
+
return this.p31(flag);
|
|
383
383
|
};
|
|
384
|
-
protoOf(MutableProblogSolver).
|
|
385
|
-
this.
|
|
384
|
+
protoOf(MutableProblogSolver).q31 = function (flag) {
|
|
385
|
+
this.b37_1.setFlagNotable(flag);
|
|
386
386
|
};
|
|
387
387
|
protoOf(MutableProblogSolver).setFlagNotable = function (flag) {
|
|
388
|
-
return this.
|
|
388
|
+
return this.q31(flag);
|
|
389
389
|
};
|
|
390
|
-
protoOf(MutableProblogSolver).
|
|
391
|
-
this.
|
|
390
|
+
protoOf(MutableProblogSolver).r31 = function (stdIn) {
|
|
391
|
+
this.b37_1.setStandardInput(stdIn);
|
|
392
392
|
};
|
|
393
393
|
protoOf(MutableProblogSolver).setStandardInput = function (stdIn) {
|
|
394
|
-
return this.
|
|
394
|
+
return this.r31(stdIn);
|
|
395
395
|
};
|
|
396
|
-
protoOf(MutableProblogSolver).
|
|
397
|
-
this.
|
|
396
|
+
protoOf(MutableProblogSolver).s31 = function (stdErr) {
|
|
397
|
+
this.b37_1.setStandardError(stdErr);
|
|
398
398
|
};
|
|
399
399
|
protoOf(MutableProblogSolver).setStandardError = function (stdErr) {
|
|
400
|
-
return this.
|
|
400
|
+
return this.s31(stdErr);
|
|
401
401
|
};
|
|
402
|
-
protoOf(MutableProblogSolver).
|
|
403
|
-
this.
|
|
402
|
+
protoOf(MutableProblogSolver).t31 = function (stdOut) {
|
|
403
|
+
this.b37_1.setStandardOutput(stdOut);
|
|
404
404
|
};
|
|
405
405
|
protoOf(MutableProblogSolver).setStandardOutput = function (stdOut) {
|
|
406
|
-
return this.
|
|
406
|
+
return this.t31(stdOut);
|
|
407
407
|
};
|
|
408
|
-
protoOf(MutableProblogSolver).
|
|
409
|
-
this.
|
|
408
|
+
protoOf(MutableProblogSolver).u31 = function (warnings) {
|
|
409
|
+
this.b37_1.setWarnings(warnings);
|
|
410
410
|
};
|
|
411
411
|
protoOf(MutableProblogSolver).setWarnings = function (warnings) {
|
|
412
|
-
return this.
|
|
412
|
+
return this.u31(warnings);
|
|
413
413
|
};
|
|
414
|
-
protoOf(MutableProblogSolver).
|
|
415
|
-
return new MutableProblogSolver(this.
|
|
414
|
+
protoOf(MutableProblogSolver).f1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
415
|
+
return new MutableProblogSolver(this.b37_1.f1v(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings));
|
|
416
416
|
};
|
|
417
417
|
protoOf(MutableProblogSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
418
418
|
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof MutableProblogSolver) ? $super : THROW_CCE());
|
|
419
419
|
};
|
|
420
|
-
protoOf(MutableProblogSolver).
|
|
421
|
-
return new MutableProblogSolver(this.
|
|
420
|
+
protoOf(MutableProblogSolver).g1s = function () {
|
|
421
|
+
return new MutableProblogSolver(this.b37_1.g1s());
|
|
422
422
|
};
|
|
423
423
|
protoOf(MutableProblogSolver).clone = function () {
|
|
424
|
-
return this.
|
|
424
|
+
return this.g1s();
|
|
425
425
|
};
|
|
426
426
|
function get_ANNOTATION_OPERATOR() {
|
|
427
427
|
_init_properties_Operators_kt__ggskrn();
|
|
@@ -449,11 +449,11 @@
|
|
|
449
449
|
var tmp_0 = Companion_getInstance_1();
|
|
450
450
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
451
451
|
var tmp$ret$0 = ProbSetConfig_getInstance().signature.name;
|
|
452
|
-
var tmp_1 = tmp_0.of(tmp$ret$0, [ProbSetConfig_getInstance().
|
|
452
|
+
var tmp_1 = tmp_0.of(tmp$ret$0, [ProbSetConfig_getInstance().p37(options)]);
|
|
453
453
|
var tmp_2 = Companion_getInstance_1();
|
|
454
454
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
455
455
|
var tmp$ret$1 = Prob_getInstance().signature.name;
|
|
456
|
-
var tmp_3 = $this.
|
|
456
|
+
var tmp_3 = $this.c37_1.solveWithOptions(tmp.of(tmp_1, tmp_2.of(tmp$ret$1, [anonVar, goal])), options);
|
|
457
457
|
return map(tmp_3, ProblogSolver$solveNonProbabilistically$lambda(goal, anonVar));
|
|
458
458
|
}
|
|
459
459
|
function solveProbabilistically($this, goal, options) {
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
var tmp = Companion_getInstance_1();
|
|
463
463
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
464
464
|
var tmp$ret$0 = ProbQuery_getInstance().signature.name;
|
|
465
|
-
var tmp_0 = $this.
|
|
465
|
+
var tmp_0 = $this.c37_1.solveWithOptions(tmp.of(tmp$ret$0, [probabilityVar, goal, ProbSetConfig_getInstance().p37(options), bddVar]), options);
|
|
466
466
|
return map(tmp_0, ProblogSolver$solveProbabilistically$lambda(probabilityVar, bddVar, goal, options));
|
|
467
467
|
}
|
|
468
468
|
function ProblogSolver$solveNonProbabilistically$lambda$lambda($anonVar) {
|
|
@@ -475,11 +475,11 @@
|
|
|
475
475
|
var tmp;
|
|
476
476
|
if (isInterface(it, Yes)) {
|
|
477
477
|
var tmp_0 = Companion_instance_1;
|
|
478
|
-
var tmp_1 = it.
|
|
479
|
-
tmp = tmp_0.
|
|
478
|
+
var tmp_1 = it.k1u();
|
|
479
|
+
tmp = tmp_0.a1w($goal, tmp_1.yz(ProblogSolver$solveNonProbabilistically$lambda$lambda($anonVar)));
|
|
480
480
|
} else {
|
|
481
481
|
if (isInterface(it, Halt)) {
|
|
482
|
-
tmp = Companion_instance_1.halt($goal, it.
|
|
482
|
+
tmp = Companion_instance_1.halt($goal, it.q1v());
|
|
483
483
|
} else {
|
|
484
484
|
tmp = Companion_instance_1.no($goal);
|
|
485
485
|
}
|
|
@@ -494,16 +494,16 @@
|
|
|
494
494
|
}
|
|
495
495
|
function ProblogSolver$solveProbabilistically$lambda($probabilityVar, $bddVar, $goal, $options) {
|
|
496
496
|
return function (it) {
|
|
497
|
-
var probabilityTerm = it.
|
|
498
|
-
var bddTerm = it.
|
|
497
|
+
var probabilityTerm = it.k1u().h2($probabilityVar);
|
|
498
|
+
var bddTerm = it.k1u().h2($bddVar);
|
|
499
499
|
var tmp;
|
|
500
500
|
if (isInterface(it, Yes)) {
|
|
501
501
|
var tmp_0 = Companion_instance_1;
|
|
502
|
-
var tmp_1 = it.
|
|
503
|
-
tmp = tmp_0.
|
|
502
|
+
var tmp_1 = it.k1u();
|
|
503
|
+
tmp = tmp_0.a1w($goal, tmp_1.yz(ProblogSolver$solveProbabilistically$lambda$lambda($probabilityVar, $bddVar)));
|
|
504
504
|
} else {
|
|
505
505
|
if (isInterface(it, Halt)) {
|
|
506
|
-
tmp = Companion_instance_1.halt($goal, it.
|
|
506
|
+
tmp = Companion_instance_1.halt($goal, it.q1v());
|
|
507
507
|
} else {
|
|
508
508
|
tmp = Companion_instance_1.no($goal);
|
|
509
509
|
}
|
|
@@ -527,9 +527,9 @@
|
|
|
527
527
|
tmp_4 = false;
|
|
528
528
|
}
|
|
529
529
|
if (tmp_4) {
|
|
530
|
-
var explanation = bddTerm.
|
|
530
|
+
var explanation = bddTerm.r37_1;
|
|
531
531
|
if (explanation instanceof BinaryDecisionDiagramExplanation) {
|
|
532
|
-
newSolution = setBinaryDecisionDiagram(newSolution, explanation.
|
|
532
|
+
newSolution = setBinaryDecisionDiagram(newSolution, explanation.s37_1);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
tmp_2 = newSolution;
|
|
@@ -538,9 +538,9 @@
|
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
540
|
function ProblogSolver(solver) {
|
|
541
|
-
this.
|
|
541
|
+
this.c37_1 = solver;
|
|
542
542
|
}
|
|
543
|
-
protoOf(ProblogSolver).
|
|
543
|
+
protoOf(ProblogSolver).l2a = function (goal, options) {
|
|
544
544
|
var tmp;
|
|
545
545
|
if (!get_isProbabilistic(options)) {
|
|
546
546
|
tmp = solveNonProbabilistically(this, goal, options);
|
|
@@ -550,103 +550,103 @@
|
|
|
550
550
|
return tmp;
|
|
551
551
|
};
|
|
552
552
|
protoOf(ProblogSolver).solveWithOptions = function (goal, options) {
|
|
553
|
-
return this.
|
|
553
|
+
return this.l2a(goal, options);
|
|
554
554
|
};
|
|
555
|
-
protoOf(ProblogSolver).
|
|
556
|
-
return this.
|
|
555
|
+
protoOf(ProblogSolver).d37 = function (goal, timeout) {
|
|
556
|
+
return this.l2a(goal, Companion_getInstance_2().allLazilyWithTimeout(timeout));
|
|
557
557
|
};
|
|
558
558
|
protoOf(ProblogSolver).solveWithTimeout = function (goal, timeout) {
|
|
559
|
-
return this.
|
|
559
|
+
return this.d37(goal, timeout);
|
|
560
560
|
};
|
|
561
|
-
protoOf(ProblogSolver).
|
|
562
|
-
return this.
|
|
561
|
+
protoOf(ProblogSolver).e37 = function (goal) {
|
|
562
|
+
return this.l2a(goal, Companion_getInstance_2().DEFAULT);
|
|
563
563
|
};
|
|
564
564
|
protoOf(ProblogSolver).solve = function (goal) {
|
|
565
|
-
return this.
|
|
565
|
+
return this.e37(goal);
|
|
566
566
|
};
|
|
567
|
-
protoOf(ProblogSolver).
|
|
568
|
-
return toList(this.
|
|
567
|
+
protoOf(ProblogSolver).f37 = function (goal, timeout) {
|
|
568
|
+
return toList(this.d37(goal, timeout));
|
|
569
569
|
};
|
|
570
570
|
protoOf(ProblogSolver).solveListWithTimeout = function (goal, timeout) {
|
|
571
|
-
return this.
|
|
571
|
+
return this.f37(goal, timeout);
|
|
572
572
|
};
|
|
573
|
-
protoOf(ProblogSolver).
|
|
574
|
-
return toList(this.
|
|
573
|
+
protoOf(ProblogSolver).g37 = function (goal) {
|
|
574
|
+
return toList(this.e37(goal));
|
|
575
575
|
};
|
|
576
576
|
protoOf(ProblogSolver).solveList = function (goal) {
|
|
577
|
-
return this.
|
|
577
|
+
return this.g37(goal);
|
|
578
578
|
};
|
|
579
|
-
protoOf(ProblogSolver).
|
|
580
|
-
return toList(this.
|
|
579
|
+
protoOf(ProblogSolver).h37 = function (goal, options) {
|
|
580
|
+
return toList(this.l2a(goal, options));
|
|
581
581
|
};
|
|
582
582
|
protoOf(ProblogSolver).solveListWithOptions = function (goal, options) {
|
|
583
|
-
return this.
|
|
583
|
+
return this.h37(goal, options);
|
|
584
584
|
};
|
|
585
|
-
protoOf(ProblogSolver).
|
|
586
|
-
return first_0(this.
|
|
585
|
+
protoOf(ProblogSolver).i37 = function (goal, timeout) {
|
|
586
|
+
return first_0(this.l2a(goal, Companion_getInstance_2().someLazilyWithTimeout(1, timeout)));
|
|
587
587
|
};
|
|
588
588
|
protoOf(ProblogSolver).solveOnceWithTimeout = function (goal, timeout) {
|
|
589
|
-
return this.
|
|
589
|
+
return this.i37(goal, timeout);
|
|
590
590
|
};
|
|
591
|
-
protoOf(ProblogSolver).
|
|
592
|
-
return first_0(this.
|
|
591
|
+
protoOf(ProblogSolver).j37 = function (goal) {
|
|
592
|
+
return first_0(this.l2a(goal, Companion_getInstance_2().someLazily(1)));
|
|
593
593
|
};
|
|
594
594
|
protoOf(ProblogSolver).solveOnce = function (goal) {
|
|
595
|
-
return this.
|
|
595
|
+
return this.j37(goal);
|
|
596
596
|
};
|
|
597
|
-
protoOf(ProblogSolver).
|
|
598
|
-
return first_0(this.
|
|
597
|
+
protoOf(ProblogSolver).k37 = function (goal, options) {
|
|
598
|
+
return first_0(this.l2a(goal, options.setLimit(1)));
|
|
599
599
|
};
|
|
600
600
|
protoOf(ProblogSolver).solveOnceWithOptions = function (goal, options) {
|
|
601
|
-
return this.
|
|
601
|
+
return this.k37(goal, options);
|
|
602
602
|
};
|
|
603
|
-
protoOf(ProblogSolver).
|
|
604
|
-
return new ProblogSolver(this.
|
|
603
|
+
protoOf(ProblogSolver).f1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
604
|
+
return new ProblogSolver(this.c37_1.f1v(unificator, libraries, flags, Companion_instance_10.ofIterable(unificator, staticKb), Companion_instance_10.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
605
605
|
};
|
|
606
606
|
protoOf(ProblogSolver).copy = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
607
607
|
return this.copy(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ProblogSolver) ? $super : THROW_CCE());
|
|
608
608
|
};
|
|
609
|
-
protoOf(ProblogSolver).
|
|
610
|
-
return new ProblogSolver(this.
|
|
609
|
+
protoOf(ProblogSolver).g1s = function () {
|
|
610
|
+
return new ProblogSolver(this.c37_1.clone());
|
|
611
611
|
};
|
|
612
612
|
protoOf(ProblogSolver).clone = function () {
|
|
613
|
-
return this.
|
|
613
|
+
return this.g1s();
|
|
614
614
|
};
|
|
615
|
-
protoOf(ProblogSolver).
|
|
616
|
-
return this.
|
|
615
|
+
protoOf(ProblogSolver).o1u = function () {
|
|
616
|
+
return this.c37_1.o1u();
|
|
617
617
|
};
|
|
618
|
-
protoOf(ProblogSolver).
|
|
619
|
-
return this.
|
|
618
|
+
protoOf(ProblogSolver).p1u = function () {
|
|
619
|
+
return this.c37_1.p1u();
|
|
620
620
|
};
|
|
621
|
-
protoOf(ProblogSolver).
|
|
622
|
-
return this.
|
|
621
|
+
protoOf(ProblogSolver).q1u = function () {
|
|
622
|
+
return this.c37_1.q1u();
|
|
623
623
|
};
|
|
624
|
-
protoOf(ProblogSolver).
|
|
625
|
-
return this.
|
|
624
|
+
protoOf(ProblogSolver).r1u = function () {
|
|
625
|
+
return this.c37_1.r1u();
|
|
626
626
|
};
|
|
627
|
-
protoOf(ProblogSolver).
|
|
628
|
-
return this.
|
|
627
|
+
protoOf(ProblogSolver).x1u = function () {
|
|
628
|
+
return this.c37_1.x1u();
|
|
629
629
|
};
|
|
630
|
-
protoOf(ProblogSolver).
|
|
631
|
-
return this.
|
|
630
|
+
protoOf(ProblogSolver).s1u = function () {
|
|
631
|
+
return this.c37_1.s1u();
|
|
632
632
|
};
|
|
633
|
-
protoOf(ProblogSolver).
|
|
634
|
-
return this.
|
|
633
|
+
protoOf(ProblogSolver).t1u = function () {
|
|
634
|
+
return this.c37_1.t1u();
|
|
635
635
|
};
|
|
636
|
-
protoOf(ProblogSolver).
|
|
637
|
-
return this.
|
|
636
|
+
protoOf(ProblogSolver).y1u = function () {
|
|
637
|
+
return this.c37_1.y1u();
|
|
638
638
|
};
|
|
639
|
-
protoOf(ProblogSolver).
|
|
640
|
-
return this.
|
|
639
|
+
protoOf(ProblogSolver).z1u = function () {
|
|
640
|
+
return this.c37_1.z1u();
|
|
641
641
|
};
|
|
642
|
-
protoOf(ProblogSolver).
|
|
643
|
-
return this.
|
|
642
|
+
protoOf(ProblogSolver).a1v = function () {
|
|
643
|
+
return this.c37_1.a1v();
|
|
644
644
|
};
|
|
645
|
-
protoOf(ProblogSolver).
|
|
646
|
-
return this.
|
|
645
|
+
protoOf(ProblogSolver).b1v = function () {
|
|
646
|
+
return this.c37_1.b1v();
|
|
647
647
|
};
|
|
648
|
-
protoOf(ProblogSolver).
|
|
649
|
-
return this.
|
|
648
|
+
protoOf(ProblogSolver).r1k = function () {
|
|
649
|
+
return this.c37_1.r1k();
|
|
650
650
|
};
|
|
651
651
|
function ensureVariablesTracking($this, flags) {
|
|
652
652
|
var tmp = TrackVariables_getInstance();
|
|
@@ -656,7 +656,7 @@
|
|
|
656
656
|
var tmp;
|
|
657
657
|
// Inline function 'kotlin.collections.contains' call
|
|
658
658
|
// Inline function 'kotlin.collections.containsKey' call
|
|
659
|
-
var key = ProblogLib_getInstance().
|
|
659
|
+
var key = ProblogLib_getInstance().c2d();
|
|
660
660
|
if (!(isInterface(libraries, KtMap) ? libraries : THROW_CCE()).f2(key)) {
|
|
661
661
|
tmp = libraries.plusLibrary(MinimalBuiltins_getInstance());
|
|
662
662
|
} else {
|
|
@@ -665,36 +665,36 @@
|
|
|
665
665
|
return tmp;
|
|
666
666
|
}
|
|
667
667
|
function ProblogSolverFactory$ensureVariablesTracking$lambda($this$TrackVariables) {
|
|
668
|
-
return $this$TrackVariables.
|
|
668
|
+
return $this$TrackVariables.d28_1;
|
|
669
669
|
}
|
|
670
670
|
function ProblogSolverFactory() {
|
|
671
671
|
}
|
|
672
|
-
protoOf(ProblogSolverFactory).
|
|
672
|
+
protoOf(ProblogSolverFactory).a1x = function () {
|
|
673
673
|
return DefaultBuiltins_getInstance_0();
|
|
674
674
|
};
|
|
675
|
-
protoOf(ProblogSolverFactory).
|
|
675
|
+
protoOf(ProblogSolverFactory).c1x = function () {
|
|
676
676
|
return ensureVariablesTracking(this, get_defaultFlags.call(this));
|
|
677
677
|
};
|
|
678
|
-
protoOf(ProblogSolverFactory).
|
|
679
|
-
return new ProblogSolver(ClassicSolverFactory_instance.
|
|
678
|
+
protoOf(ProblogSolverFactory).l1x = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
679
|
+
return new ProblogSolver(ClassicSolverFactory_instance.l1x(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_10.ofIterable(unificator, staticKb), Companion_instance_10.ofIterable(unificator, dynamicKb), inputs, outputs));
|
|
680
680
|
};
|
|
681
681
|
protoOf(ProblogSolverFactory).rawSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
682
682
|
return this.rawSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ProblogSolverFactory) ? $super : THROW_CCE());
|
|
683
683
|
};
|
|
684
|
-
protoOf(ProblogSolverFactory).
|
|
685
|
-
return new ProblogSolver(ClassicSolverFactory_instance.
|
|
684
|
+
protoOf(ProblogSolverFactory).r1x = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
685
|
+
return new ProblogSolver(ClassicSolverFactory_instance.r1x(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_10.ofIterable(unificator, staticKb), Companion_instance_10.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
686
686
|
};
|
|
687
687
|
protoOf(ProblogSolverFactory).solverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
688
688
|
return this.solverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ProblogSolverFactory) ? $super : THROW_CCE());
|
|
689
689
|
};
|
|
690
|
-
protoOf(ProblogSolverFactory).
|
|
691
|
-
return new MutableProblogSolver(ClassicSolverFactory_instance.
|
|
690
|
+
protoOf(ProblogSolverFactory).t1x = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
691
|
+
return new MutableProblogSolver(ClassicSolverFactory_instance.t1x(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_10.ofIterable(unificator, staticKb), Companion_instance_10.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
692
692
|
};
|
|
693
693
|
protoOf(ProblogSolverFactory).mutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, $super) {
|
|
694
694
|
return this.mutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings, ($super == null ? true : $super instanceof ProblogSolverFactory) ? $super : THROW_CCE());
|
|
695
695
|
};
|
|
696
|
-
protoOf(ProblogSolverFactory).
|
|
697
|
-
return new MutableProblogSolver(ClassicSolverFactory_instance.
|
|
696
|
+
protoOf(ProblogSolverFactory).v1x = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
697
|
+
return new MutableProblogSolver(ClassicSolverFactory_instance.v1x(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_10.ofIterable(unificator, staticKb), Companion_instance_10.ofIterable(unificator, dynamicKb), inputs, outputs));
|
|
698
698
|
};
|
|
699
699
|
protoOf(ProblogSolverFactory).rawMutableSolverOf = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, $super) {
|
|
700
700
|
return this.rawMutableSolverOf(unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs, ($super == null ? true : $super instanceof ProblogSolverFactory) ? $super : THROW_CCE());
|
|
@@ -707,17 +707,17 @@
|
|
|
707
707
|
DefaultBuiltins_instance = this;
|
|
708
708
|
ExtensionLibrary.call(this, DefaultBuiltins_getInstance());
|
|
709
709
|
}
|
|
710
|
-
protoOf(DefaultBuiltins).
|
|
711
|
-
return ProblogLib_getInstance().
|
|
710
|
+
protoOf(DefaultBuiltins).c2d = function () {
|
|
711
|
+
return ProblogLib_getInstance().c2d();
|
|
712
712
|
};
|
|
713
|
-
protoOf(DefaultBuiltins).
|
|
714
|
-
return ProblogLib_getInstance().
|
|
713
|
+
protoOf(DefaultBuiltins).n2d = function () {
|
|
714
|
+
return ProblogLib_getInstance().n2d();
|
|
715
715
|
};
|
|
716
|
-
protoOf(DefaultBuiltins).
|
|
717
|
-
return ProblogLib_getInstance().
|
|
716
|
+
protoOf(DefaultBuiltins).p2d = function () {
|
|
717
|
+
return ProblogLib_getInstance().p2d();
|
|
718
718
|
};
|
|
719
|
-
protoOf(DefaultBuiltins).
|
|
720
|
-
return ProblogLib_getInstance().
|
|
719
|
+
protoOf(DefaultBuiltins).o2d = function () {
|
|
720
|
+
return ProblogLib_getInstance().o2d();
|
|
721
721
|
};
|
|
722
722
|
var DefaultBuiltins_instance;
|
|
723
723
|
function DefaultBuiltins_getInstance_0() {
|
|
@@ -729,10 +729,10 @@
|
|
|
729
729
|
MinimalBuiltins_instance = this;
|
|
730
730
|
ExtensionLibrary.call(this, ProblogLib_getInstance());
|
|
731
731
|
}
|
|
732
|
-
protoOf(MinimalBuiltins).
|
|
732
|
+
protoOf(MinimalBuiltins).p2d = function () {
|
|
733
733
|
return listOf(EnsureExecutable_getInstance());
|
|
734
734
|
};
|
|
735
|
-
protoOf(MinimalBuiltins).
|
|
735
|
+
protoOf(MinimalBuiltins).o2d = function () {
|
|
736
736
|
return listOf(Call_getInstance());
|
|
737
737
|
};
|
|
738
738
|
var MinimalBuiltins_instance;
|
|
@@ -744,17 +744,17 @@
|
|
|
744
744
|
function ProblogLib() {
|
|
745
745
|
ProblogLib_instance = this;
|
|
746
746
|
ExtensionLibrary.call(this, Companion_getInstance_3().of('problog.lang'));
|
|
747
|
-
this.
|
|
748
|
-
this.
|
|
749
|
-
this.
|
|
747
|
+
this.j38_1 = 'EXPL';
|
|
748
|
+
this.k38_1 = 'evidence';
|
|
749
|
+
this.l38_1 = 'prob';
|
|
750
750
|
}
|
|
751
|
-
protoOf(ProblogLib).
|
|
751
|
+
protoOf(ProblogLib).n2d = function () {
|
|
752
752
|
return get_PROBLOG_SPECIFIC_OPERATORS();
|
|
753
753
|
};
|
|
754
|
-
protoOf(ProblogLib).
|
|
754
|
+
protoOf(ProblogLib).o2d = function () {
|
|
755
755
|
return listOf(Prob_getInstance());
|
|
756
756
|
};
|
|
757
|
-
protoOf(ProblogLib).
|
|
757
|
+
protoOf(ProblogLib).p2d = function () {
|
|
758
758
|
return listOf_0([ProbHelper_getInstance(), ProbSolve_getInstance(), ProbExplAnd_getInstance(), ProbQuery_getInstance(), ProbSolveEvidence_getInstance(), ProbSolveWithEvidence_getInstance(), ProbNegationAsFailure_getInstance(), ProbSetConfig_getInstance()]);
|
|
759
759
|
};
|
|
760
760
|
var ProblogLib_instance;
|
|
@@ -767,11 +767,11 @@
|
|
|
767
767
|
cause = cause === VOID ? null : cause;
|
|
768
768
|
TuPrologException_init_$Init$(cause, this);
|
|
769
769
|
captureStack(this, ClauseMappingException);
|
|
770
|
-
this.
|
|
770
|
+
this.s38_1 = message;
|
|
771
771
|
delete this.message;
|
|
772
772
|
}
|
|
773
773
|
protoOf(ClauseMappingException).o1 = function () {
|
|
774
|
-
return this.
|
|
774
|
+
return this.s38_1;
|
|
775
775
|
};
|
|
776
776
|
function Companion() {
|
|
777
777
|
}
|
|
@@ -807,11 +807,11 @@
|
|
|
807
807
|
}
|
|
808
808
|
function Companion_0() {
|
|
809
809
|
Companion_instance_9 = this;
|
|
810
|
-
this.
|
|
811
|
-
this.
|
|
810
|
+
this.t38_1 = new BinaryDecisionDiagramExplanation(bddTerminalOf(false), Companion_getInstance_13().w38_1);
|
|
811
|
+
this.u38_1 = new BinaryDecisionDiagramExplanation(bddTerminalOf(true), Companion_getInstance_13().x38_1);
|
|
812
812
|
}
|
|
813
|
-
protoOf(Companion_0).
|
|
814
|
-
return new BinaryDecisionDiagramExplanation(bddOf(term), new ComputedValue(term.
|
|
813
|
+
protoOf(Companion_0).y38 = function (term) {
|
|
814
|
+
return new BinaryDecisionDiagramExplanation(bddOf(term), new ComputedValue(term.b39_1));
|
|
815
815
|
};
|
|
816
816
|
var Companion_instance_9;
|
|
817
817
|
function Companion_getInstance_11() {
|
|
@@ -831,12 +831,12 @@
|
|
|
831
831
|
}
|
|
832
832
|
function ProbExplanationTerm$apply$lambda($substitution) {
|
|
833
833
|
return function (it) {
|
|
834
|
-
return it.
|
|
834
|
+
return it.p14($substitution);
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
837
|
function ProbExplanationTerm(explanation) {
|
|
838
|
-
this.
|
|
839
|
-
this.
|
|
838
|
+
this.q37_1 = Companion_getInstance_4().of('<expl:' + explanation.toString() + '>');
|
|
839
|
+
this.r37_1 = explanation;
|
|
840
840
|
}
|
|
841
841
|
protoOf(ProbExplanationTerm).wu = function () {
|
|
842
842
|
return false;
|
|
@@ -848,322 +848,322 @@
|
|
|
848
848
|
return this.av();
|
|
849
849
|
};
|
|
850
850
|
protoOf(ProbExplanationTerm).au = function () {
|
|
851
|
-
return new ProbExplanationTerm(this.
|
|
851
|
+
return new ProbExplanationTerm(this.r37_1.applyTransformation(ProbExplanationTerm$freshCopy$lambda));
|
|
852
852
|
};
|
|
853
853
|
protoOf(ProbExplanationTerm).freshCopy = function () {
|
|
854
854
|
return this.au();
|
|
855
855
|
};
|
|
856
856
|
protoOf(ProbExplanationTerm).bu = function (scope) {
|
|
857
|
-
return new ProbExplanationTerm(this.
|
|
857
|
+
return new ProbExplanationTerm(this.r37_1.applyTransformation(ProbExplanationTerm$freshCopy$lambda_0(scope)));
|
|
858
858
|
};
|
|
859
859
|
protoOf(ProbExplanationTerm).freshCopyFromScope = function (scope) {
|
|
860
860
|
return this.bu(scope);
|
|
861
861
|
};
|
|
862
|
-
protoOf(ProbExplanationTerm).
|
|
863
|
-
return this.
|
|
862
|
+
protoOf(ProbExplanationTerm).n2l = function (substitution, substitutions) {
|
|
863
|
+
return this.o2l(substitution, substitutions.slice());
|
|
864
864
|
};
|
|
865
865
|
protoOf(ProbExplanationTerm).getSubstituted = function (substitution, substitutions) {
|
|
866
|
-
return this.
|
|
866
|
+
return this.n2l(substitution, substitutions);
|
|
867
867
|
};
|
|
868
|
-
protoOf(ProbExplanationTerm).
|
|
869
|
-
return this.
|
|
868
|
+
protoOf(ProbExplanationTerm).o2l = function (substitution, substitutions) {
|
|
869
|
+
return this.p14(Companion_getInstance_5().ofSubstitution(substitution, substitutions.slice()));
|
|
870
870
|
};
|
|
871
871
|
protoOf(ProbExplanationTerm).apply = function (substitution, substitutions) {
|
|
872
|
-
return this.
|
|
872
|
+
return this.o2l(substitution, substitutions);
|
|
873
873
|
};
|
|
874
|
-
protoOf(ProbExplanationTerm).
|
|
874
|
+
protoOf(ProbExplanationTerm).p14 = function (substitution) {
|
|
875
875
|
var tmp;
|
|
876
876
|
if (substitution.h() || this.bv()) {
|
|
877
877
|
tmp = this;
|
|
878
878
|
} else {
|
|
879
|
-
tmp = new ProbExplanationTerm(this.
|
|
879
|
+
tmp = new ProbExplanationTerm(this.r37_1.applyTransformation(ProbExplanationTerm$apply$lambda(substitution)));
|
|
880
880
|
}
|
|
881
881
|
return tmp;
|
|
882
882
|
};
|
|
883
883
|
protoOf(ProbExplanationTerm).applySubstitution = function (substitution) {
|
|
884
|
-
return this.
|
|
884
|
+
return this.p14(substitution);
|
|
885
885
|
};
|
|
886
886
|
protoOf(ProbExplanationTerm).bv = function () {
|
|
887
|
-
return !this.
|
|
887
|
+
return !this.r37_1.i39();
|
|
888
888
|
};
|
|
889
889
|
protoOf(ProbExplanationTerm).cu = function () {
|
|
890
|
-
return this.
|
|
890
|
+
return this.q37_1.cu();
|
|
891
891
|
};
|
|
892
892
|
protoOf(ProbExplanationTerm).asAtom = function () {
|
|
893
893
|
return this.cu();
|
|
894
894
|
};
|
|
895
895
|
protoOf(ProbExplanationTerm).rt = function () {
|
|
896
|
-
return this.
|
|
896
|
+
return this.q37_1.rt();
|
|
897
897
|
};
|
|
898
898
|
protoOf(ProbExplanationTerm).st = function () {
|
|
899
|
-
return this.
|
|
899
|
+
return this.q37_1.st();
|
|
900
900
|
};
|
|
901
901
|
protoOf(ProbExplanationTerm).tt = function () {
|
|
902
|
-
return this.
|
|
902
|
+
return this.q37_1.tt();
|
|
903
903
|
};
|
|
904
904
|
protoOf(ProbExplanationTerm).ut = function () {
|
|
905
|
-
return this.
|
|
905
|
+
return this.q37_1.ut();
|
|
906
906
|
};
|
|
907
907
|
protoOf(ProbExplanationTerm).vt = function () {
|
|
908
|
-
return this.
|
|
908
|
+
return this.q37_1.vt();
|
|
909
909
|
};
|
|
910
910
|
protoOf(ProbExplanationTerm).e2 = function () {
|
|
911
|
-
return this.
|
|
911
|
+
return this.q37_1.e2();
|
|
912
912
|
};
|
|
913
913
|
protoOf(ProbExplanationTerm).yt = function () {
|
|
914
|
-
return this.
|
|
914
|
+
return this.q37_1.yt();
|
|
915
915
|
};
|
|
916
916
|
protoOf(ProbExplanationTerm).zt = function () {
|
|
917
|
-
return this.
|
|
917
|
+
return this.q37_1.zt();
|
|
918
918
|
};
|
|
919
919
|
protoOf(ProbExplanationTerm).nu = function () {
|
|
920
|
-
return this.
|
|
920
|
+
return this.q37_1.nu();
|
|
921
921
|
};
|
|
922
922
|
protoOf(ProbExplanationTerm).asStruct = function () {
|
|
923
923
|
return this.nu();
|
|
924
924
|
};
|
|
925
925
|
protoOf(ProbExplanationTerm).append = function (argument) {
|
|
926
|
-
return this.
|
|
926
|
+
return this.q37_1.append(argument);
|
|
927
927
|
};
|
|
928
928
|
protoOf(ProbExplanationTerm).addLast = function (argument) {
|
|
929
|
-
return this.
|
|
929
|
+
return this.q37_1.addLast(argument);
|
|
930
930
|
};
|
|
931
931
|
protoOf(ProbExplanationTerm).addFirst = function (argument) {
|
|
932
|
-
return this.
|
|
932
|
+
return this.q37_1.addFirst(argument);
|
|
933
933
|
};
|
|
934
934
|
protoOf(ProbExplanationTerm).insertAt = function (index, argument) {
|
|
935
|
-
return this.
|
|
935
|
+
return this.q37_1.insertAt(index, argument);
|
|
936
936
|
};
|
|
937
937
|
protoOf(ProbExplanationTerm).setFunctor = function (functor) {
|
|
938
|
-
return this.
|
|
938
|
+
return this.q37_1.setFunctor(functor);
|
|
939
939
|
};
|
|
940
940
|
protoOf(ProbExplanationTerm).getArgAt = function (index) {
|
|
941
|
-
return this.
|
|
941
|
+
return this.q37_1.getArgAt(index);
|
|
942
942
|
};
|
|
943
943
|
protoOf(ProbExplanationTerm).setArgs = function (args) {
|
|
944
|
-
return this.
|
|
944
|
+
return this.q37_1.setArgs(args);
|
|
945
945
|
};
|
|
946
946
|
protoOf(ProbExplanationTerm).setArgsIterable = function (args) {
|
|
947
|
-
return this.
|
|
947
|
+
return this.q37_1.setArgsIterable(args);
|
|
948
948
|
};
|
|
949
949
|
protoOf(ProbExplanationTerm).setArgsSequence = function (args) {
|
|
950
|
-
return this.
|
|
950
|
+
return this.q37_1.setArgsSequence(args);
|
|
951
951
|
};
|
|
952
952
|
protoOf(ProbExplanationTerm).get = function (index) {
|
|
953
|
-
return this.
|
|
953
|
+
return this.q37_1.get(index);
|
|
954
954
|
};
|
|
955
955
|
protoOf(ProbExplanationTerm).du = function () {
|
|
956
|
-
return this.
|
|
956
|
+
return this.q37_1.du();
|
|
957
957
|
};
|
|
958
958
|
protoOf(ProbExplanationTerm).eu = function () {
|
|
959
|
-
return this.
|
|
959
|
+
return this.q37_1.eu();
|
|
960
960
|
};
|
|
961
961
|
protoOf(ProbExplanationTerm).fu = function () {
|
|
962
|
-
return this.
|
|
962
|
+
return this.q37_1.fu();
|
|
963
963
|
};
|
|
964
964
|
protoOf(ProbExplanationTerm).iu = function () {
|
|
965
|
-
return this.
|
|
965
|
+
return this.q37_1.iu();
|
|
966
966
|
};
|
|
967
967
|
protoOf(ProbExplanationTerm).ju = function () {
|
|
968
|
-
return this.
|
|
968
|
+
return this.q37_1.ju();
|
|
969
969
|
};
|
|
970
970
|
protoOf(ProbExplanationTerm).ku = function () {
|
|
971
|
-
return this.
|
|
971
|
+
return this.q37_1.ku();
|
|
972
972
|
};
|
|
973
973
|
protoOf(ProbExplanationTerm).mu = function () {
|
|
974
|
-
return this.
|
|
974
|
+
return this.q37_1.mu();
|
|
975
975
|
};
|
|
976
976
|
protoOf(ProbExplanationTerm).xt = function () {
|
|
977
|
-
return this.
|
|
977
|
+
return this.q37_1.xt();
|
|
978
978
|
};
|
|
979
979
|
protoOf(ProbExplanationTerm).ou = function () {
|
|
980
|
-
return this.
|
|
980
|
+
return this.q37_1.ou();
|
|
981
981
|
};
|
|
982
982
|
protoOf(ProbExplanationTerm).pu = function () {
|
|
983
|
-
return this.
|
|
983
|
+
return this.q37_1.pu();
|
|
984
984
|
};
|
|
985
985
|
protoOf(ProbExplanationTerm).qu = function () {
|
|
986
|
-
return this.
|
|
986
|
+
return this.q37_1.qu();
|
|
987
987
|
};
|
|
988
988
|
protoOf(ProbExplanationTerm).ru = function () {
|
|
989
|
-
return this.
|
|
989
|
+
return this.q37_1.ru();
|
|
990
990
|
};
|
|
991
991
|
protoOf(ProbExplanationTerm).ep = function () {
|
|
992
992
|
return this.ru();
|
|
993
993
|
};
|
|
994
994
|
protoOf(ProbExplanationTerm).su = function (other) {
|
|
995
|
-
return this.
|
|
995
|
+
return this.q37_1.su(other);
|
|
996
996
|
};
|
|
997
997
|
protoOf(ProbExplanationTerm).d = function (other) {
|
|
998
998
|
return this.su((!(other == null) ? isInterface(other, Term) : false) ? other : THROW_CCE());
|
|
999
999
|
};
|
|
1000
1000
|
protoOf(ProbExplanationTerm).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
1001
|
-
return this.
|
|
1001
|
+
return this.q37_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
1002
1002
|
};
|
|
1003
1003
|
protoOf(ProbExplanationTerm).equals = function (other) {
|
|
1004
|
-
return this.
|
|
1004
|
+
return this.q37_1.equals(other);
|
|
1005
1005
|
};
|
|
1006
1006
|
protoOf(ProbExplanationTerm).structurallyEquals = function (other) {
|
|
1007
|
-
return this.
|
|
1007
|
+
return this.q37_1.structurallyEquals(other);
|
|
1008
1008
|
};
|
|
1009
1009
|
protoOf(ProbExplanationTerm).accept = function (visitor) {
|
|
1010
|
-
return this.
|
|
1010
|
+
return this.q37_1.accept(visitor);
|
|
1011
1011
|
};
|
|
1012
1012
|
protoOf(ProbExplanationTerm).castToAtom = function () {
|
|
1013
|
-
return this.
|
|
1013
|
+
return this.q37_1.castToAtom();
|
|
1014
1014
|
};
|
|
1015
1015
|
protoOf(ProbExplanationTerm).castToClause = function () {
|
|
1016
|
-
return this.
|
|
1016
|
+
return this.q37_1.castToClause();
|
|
1017
1017
|
};
|
|
1018
1018
|
protoOf(ProbExplanationTerm).castToCons = function () {
|
|
1019
|
-
return this.
|
|
1019
|
+
return this.q37_1.castToCons();
|
|
1020
1020
|
};
|
|
1021
1021
|
protoOf(ProbExplanationTerm).castToConstant = function () {
|
|
1022
|
-
return this.
|
|
1022
|
+
return this.q37_1.castToConstant();
|
|
1023
1023
|
};
|
|
1024
1024
|
protoOf(ProbExplanationTerm).castToDirective = function () {
|
|
1025
|
-
return this.
|
|
1025
|
+
return this.q37_1.castToDirective();
|
|
1026
1026
|
};
|
|
1027
1027
|
protoOf(ProbExplanationTerm).castToEmptyList = function () {
|
|
1028
|
-
return this.
|
|
1028
|
+
return this.q37_1.castToEmptyList();
|
|
1029
1029
|
};
|
|
1030
1030
|
protoOf(ProbExplanationTerm).castToEmptyBlock = function () {
|
|
1031
|
-
return this.
|
|
1031
|
+
return this.q37_1.castToEmptyBlock();
|
|
1032
1032
|
};
|
|
1033
1033
|
protoOf(ProbExplanationTerm).castToFact = function () {
|
|
1034
|
-
return this.
|
|
1034
|
+
return this.q37_1.castToFact();
|
|
1035
1035
|
};
|
|
1036
1036
|
protoOf(ProbExplanationTerm).castToIndicator = function () {
|
|
1037
|
-
return this.
|
|
1037
|
+
return this.q37_1.castToIndicator();
|
|
1038
1038
|
};
|
|
1039
1039
|
protoOf(ProbExplanationTerm).castToInteger = function () {
|
|
1040
|
-
return this.
|
|
1040
|
+
return this.q37_1.castToInteger();
|
|
1041
1041
|
};
|
|
1042
1042
|
protoOf(ProbExplanationTerm).castToList = function () {
|
|
1043
|
-
return this.
|
|
1043
|
+
return this.q37_1.castToList();
|
|
1044
1044
|
};
|
|
1045
1045
|
protoOf(ProbExplanationTerm).castToNumeric = function () {
|
|
1046
|
-
return this.
|
|
1046
|
+
return this.q37_1.castToNumeric();
|
|
1047
1047
|
};
|
|
1048
1048
|
protoOf(ProbExplanationTerm).castToReal = function () {
|
|
1049
|
-
return this.
|
|
1049
|
+
return this.q37_1.castToReal();
|
|
1050
1050
|
};
|
|
1051
1051
|
protoOf(ProbExplanationTerm).castToRule = function () {
|
|
1052
|
-
return this.
|
|
1052
|
+
return this.q37_1.castToRule();
|
|
1053
1053
|
};
|
|
1054
1054
|
protoOf(ProbExplanationTerm).castToBlock = function () {
|
|
1055
|
-
return this.
|
|
1055
|
+
return this.q37_1.castToBlock();
|
|
1056
1056
|
};
|
|
1057
1057
|
protoOf(ProbExplanationTerm).castToStruct = function () {
|
|
1058
|
-
return this.
|
|
1058
|
+
return this.q37_1.castToStruct();
|
|
1059
1059
|
};
|
|
1060
1060
|
protoOf(ProbExplanationTerm).castToRecursive = function () {
|
|
1061
|
-
return this.
|
|
1061
|
+
return this.q37_1.castToRecursive();
|
|
1062
1062
|
};
|
|
1063
1063
|
protoOf(ProbExplanationTerm).castToTerm = function () {
|
|
1064
|
-
return this.
|
|
1064
|
+
return this.q37_1.castToTerm();
|
|
1065
1065
|
};
|
|
1066
1066
|
protoOf(ProbExplanationTerm).castToTruth = function () {
|
|
1067
|
-
return this.
|
|
1067
|
+
return this.q37_1.castToTruth();
|
|
1068
1068
|
};
|
|
1069
1069
|
protoOf(ProbExplanationTerm).castToTuple = function () {
|
|
1070
|
-
return this.
|
|
1070
|
+
return this.q37_1.castToTuple();
|
|
1071
1071
|
};
|
|
1072
1072
|
protoOf(ProbExplanationTerm).castToVar = function () {
|
|
1073
|
-
return this.
|
|
1073
|
+
return this.q37_1.castToVar();
|
|
1074
1074
|
};
|
|
1075
1075
|
protoOf(ProbExplanationTerm).asClause = function () {
|
|
1076
|
-
return this.
|
|
1076
|
+
return this.q37_1.asClause();
|
|
1077
1077
|
};
|
|
1078
1078
|
protoOf(ProbExplanationTerm).asCons = function () {
|
|
1079
|
-
return this.
|
|
1079
|
+
return this.q37_1.asCons();
|
|
1080
1080
|
};
|
|
1081
1081
|
protoOf(ProbExplanationTerm).asDirective = function () {
|
|
1082
|
-
return this.
|
|
1082
|
+
return this.q37_1.asDirective();
|
|
1083
1083
|
};
|
|
1084
1084
|
protoOf(ProbExplanationTerm).asEmptyList = function () {
|
|
1085
|
-
return this.
|
|
1085
|
+
return this.q37_1.asEmptyList();
|
|
1086
1086
|
};
|
|
1087
1087
|
protoOf(ProbExplanationTerm).asEmptyBlock = function () {
|
|
1088
|
-
return this.
|
|
1088
|
+
return this.q37_1.asEmptyBlock();
|
|
1089
1089
|
};
|
|
1090
1090
|
protoOf(ProbExplanationTerm).asFact = function () {
|
|
1091
|
-
return this.
|
|
1091
|
+
return this.q37_1.asFact();
|
|
1092
1092
|
};
|
|
1093
1093
|
protoOf(ProbExplanationTerm).asIndicator = function () {
|
|
1094
|
-
return this.
|
|
1094
|
+
return this.q37_1.asIndicator();
|
|
1095
1095
|
};
|
|
1096
1096
|
protoOf(ProbExplanationTerm).asInteger = function () {
|
|
1097
|
-
return this.
|
|
1097
|
+
return this.q37_1.asInteger();
|
|
1098
1098
|
};
|
|
1099
1099
|
protoOf(ProbExplanationTerm).asList = function () {
|
|
1100
|
-
return this.
|
|
1100
|
+
return this.q37_1.asList();
|
|
1101
1101
|
};
|
|
1102
1102
|
protoOf(ProbExplanationTerm).asNumeric = function () {
|
|
1103
|
-
return this.
|
|
1103
|
+
return this.q37_1.asNumeric();
|
|
1104
1104
|
};
|
|
1105
1105
|
protoOf(ProbExplanationTerm).asReal = function () {
|
|
1106
|
-
return this.
|
|
1106
|
+
return this.q37_1.asReal();
|
|
1107
1107
|
};
|
|
1108
1108
|
protoOf(ProbExplanationTerm).asRule = function () {
|
|
1109
|
-
return this.
|
|
1109
|
+
return this.q37_1.asRule();
|
|
1110
1110
|
};
|
|
1111
1111
|
protoOf(ProbExplanationTerm).asBlock = function () {
|
|
1112
|
-
return this.
|
|
1112
|
+
return this.q37_1.asBlock();
|
|
1113
1113
|
};
|
|
1114
1114
|
protoOf(ProbExplanationTerm).asRecursive = function () {
|
|
1115
|
-
return this.
|
|
1115
|
+
return this.q37_1.asRecursive();
|
|
1116
1116
|
};
|
|
1117
1117
|
protoOf(ProbExplanationTerm).asTerm = function () {
|
|
1118
|
-
return this.
|
|
1118
|
+
return this.q37_1.asTerm();
|
|
1119
1119
|
};
|
|
1120
1120
|
protoOf(ProbExplanationTerm).asTruth = function () {
|
|
1121
|
-
return this.
|
|
1121
|
+
return this.q37_1.asTruth();
|
|
1122
1122
|
};
|
|
1123
1123
|
protoOf(ProbExplanationTerm).asTuple = function () {
|
|
1124
|
-
return this.
|
|
1124
|
+
return this.q37_1.asTuple();
|
|
1125
1125
|
};
|
|
1126
1126
|
protoOf(ProbExplanationTerm).asVar = function () {
|
|
1127
|
-
return this.
|
|
1127
|
+
return this.q37_1.asVar();
|
|
1128
1128
|
};
|
|
1129
1129
|
protoOf(ProbExplanationTerm).hashCode = function () {
|
|
1130
|
-
return this.
|
|
1130
|
+
return this.q37_1.hashCode();
|
|
1131
1131
|
};
|
|
1132
1132
|
protoOf(ProbExplanationTerm).toString = function () {
|
|
1133
|
-
return this.
|
|
1133
|
+
return this.q37_1.toString();
|
|
1134
1134
|
};
|
|
1135
1135
|
protoOf(ProbExplanationTerm).tu = function () {
|
|
1136
|
-
return this.
|
|
1136
|
+
return this.q37_1.tu();
|
|
1137
1137
|
};
|
|
1138
1138
|
protoOf(ProbExplanationTerm).uu = function () {
|
|
1139
|
-
return this.
|
|
1139
|
+
return this.q37_1.uu();
|
|
1140
1140
|
};
|
|
1141
1141
|
protoOf(ProbExplanationTerm).vu = function () {
|
|
1142
|
-
return this.
|
|
1142
|
+
return this.q37_1.vu();
|
|
1143
1143
|
};
|
|
1144
1144
|
protoOf(ProbExplanationTerm).xu = function () {
|
|
1145
|
-
return this.
|
|
1145
|
+
return this.q37_1.xu();
|
|
1146
1146
|
};
|
|
1147
1147
|
protoOf(ProbExplanationTerm).yu = function () {
|
|
1148
|
-
return this.
|
|
1148
|
+
return this.q37_1.yu();
|
|
1149
1149
|
};
|
|
1150
1150
|
protoOf(ProbExplanationTerm).zu = function () {
|
|
1151
|
-
return this.
|
|
1151
|
+
return this.q37_1.zu();
|
|
1152
1152
|
};
|
|
1153
1153
|
protoOf(ProbExplanationTerm).getTag = function (name) {
|
|
1154
|
-
return this.
|
|
1154
|
+
return this.q37_1.getTag(name);
|
|
1155
1155
|
};
|
|
1156
1156
|
protoOf(ProbExplanationTerm).resetTags = function (tags) {
|
|
1157
|
-
return this.
|
|
1157
|
+
return this.q37_1.resetTags(tags);
|
|
1158
1158
|
};
|
|
1159
1159
|
protoOf(ProbExplanationTerm).containsTag = function (name) {
|
|
1160
|
-
return this.
|
|
1160
|
+
return this.q37_1.containsTag(name);
|
|
1161
1161
|
};
|
|
1162
1162
|
protoOf(ProbExplanationTerm).lr = function () {
|
|
1163
|
-
return this.
|
|
1163
|
+
return this.q37_1.lr();
|
|
1164
1164
|
};
|
|
1165
1165
|
function _get_cachedHashCode__d7x0zy($this) {
|
|
1166
|
-
var tmp0 = $this.
|
|
1166
|
+
var tmp0 = $this.f39_1;
|
|
1167
1167
|
var tmp = KProperty1;
|
|
1168
1168
|
// Inline function 'kotlin.getValue' call
|
|
1169
1169
|
getPropertyCallableRef('cachedHashCode', 1, tmp, ProbTerm$_get_cachedHashCode_$ref_1qdqtc(), null);
|
|
@@ -1172,8 +1172,8 @@
|
|
|
1172
1172
|
function ProbTerm$isGround$delegate$lambda(this$0) {
|
|
1173
1173
|
return function () {
|
|
1174
1174
|
var tmp;
|
|
1175
|
-
if (this$0.
|
|
1176
|
-
var tmp0 = this$0.
|
|
1175
|
+
if (this$0.c39_1.bv()) {
|
|
1176
|
+
var tmp0 = this$0.d39_1;
|
|
1177
1177
|
var tmp$ret$0;
|
|
1178
1178
|
$l$block_0: {
|
|
1179
1179
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -1211,10 +1211,10 @@
|
|
|
1211
1211
|
}
|
|
1212
1212
|
function ProbTerm$cachedHashCode$delegate$lambda(this$0) {
|
|
1213
1213
|
return function () {
|
|
1214
|
-
var result = getBigIntHashCode(this$0.
|
|
1215
|
-
result = imul(31, result) + getNumberHashCode(this$0.
|
|
1216
|
-
result = imul(31, result) + this$0.
|
|
1217
|
-
result = imul(31, result) + hashCode(this$0.
|
|
1214
|
+
var result = getBigIntHashCode(this$0.a39_1);
|
|
1215
|
+
result = imul(31, result) + getNumberHashCode(this$0.b39_1) | 0;
|
|
1216
|
+
result = imul(31, result) + this$0.c39_1.hashCode() | 0;
|
|
1217
|
+
result = imul(31, result) + hashCode(this$0.d39_1) | 0;
|
|
1218
1218
|
return result;
|
|
1219
1219
|
};
|
|
1220
1220
|
}
|
|
@@ -1225,20 +1225,20 @@
|
|
|
1225
1225
|
}
|
|
1226
1226
|
function ProbTerm(id, probability, term, extraVariables) {
|
|
1227
1227
|
extraVariables = extraVariables === VOID ? emptySet() : extraVariables;
|
|
1228
|
-
this.
|
|
1229
|
-
this.
|
|
1230
|
-
this.
|
|
1231
|
-
this.
|
|
1232
|
-
this.
|
|
1228
|
+
this.z38_1 = Companion_getInstance_1().of('::', [Companion_getInstance_6().ofDouble(probability), term]);
|
|
1229
|
+
this.a39_1 = id;
|
|
1230
|
+
this.b39_1 = probability;
|
|
1231
|
+
this.c39_1 = term;
|
|
1232
|
+
this.d39_1 = extraVariables;
|
|
1233
1233
|
var tmp = this;
|
|
1234
|
-
tmp.
|
|
1234
|
+
tmp.e39_1 = lazy(ProbTerm$isGround$delegate$lambda(this));
|
|
1235
1235
|
var tmp_0 = this;
|
|
1236
|
-
tmp_0.
|
|
1236
|
+
tmp_0.f39_1 = lazy(ProbTerm$cachedHashCode$delegate$lambda(this));
|
|
1237
1237
|
}
|
|
1238
1238
|
protoOf(ProbTerm).au = function () {
|
|
1239
|
-
var termCopy = this.
|
|
1239
|
+
var termCopy = this.c39_1.freshCopy();
|
|
1240
1240
|
// Inline function 'kotlin.collections.map' call
|
|
1241
|
-
var this_0 = this.
|
|
1241
|
+
var this_0 = this.d39_1;
|
|
1242
1242
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1243
1243
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1244
1244
|
var _iterator__ex2g4s = this_0.n();
|
|
@@ -1247,15 +1247,15 @@
|
|
|
1247
1247
|
var tmp$ret$2 = item.freshCopy();
|
|
1248
1248
|
destination.l(tmp$ret$2);
|
|
1249
1249
|
}
|
|
1250
|
-
return new ProbTerm(this.
|
|
1250
|
+
return new ProbTerm(this.a39_1, this.b39_1, termCopy, toSet(destination));
|
|
1251
1251
|
};
|
|
1252
1252
|
protoOf(ProbTerm).freshCopy = function () {
|
|
1253
1253
|
return this.au();
|
|
1254
1254
|
};
|
|
1255
1255
|
protoOf(ProbTerm).bu = function (scope) {
|
|
1256
|
-
var termCopy = this.
|
|
1256
|
+
var termCopy = this.c39_1.freshCopyFromScope(scope);
|
|
1257
1257
|
// Inline function 'kotlin.collections.map' call
|
|
1258
|
-
var this_0 = this.
|
|
1258
|
+
var this_0 = this.d39_1;
|
|
1259
1259
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1260
1260
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1261
1261
|
var _iterator__ex2g4s = this_0.n();
|
|
@@ -1264,30 +1264,30 @@
|
|
|
1264
1264
|
var tmp$ret$2 = item.freshCopyFromScope(scope);
|
|
1265
1265
|
destination.l(tmp$ret$2);
|
|
1266
1266
|
}
|
|
1267
|
-
return new ProbTerm(this.
|
|
1267
|
+
return new ProbTerm(this.a39_1, this.b39_1, termCopy, toSet(destination));
|
|
1268
1268
|
};
|
|
1269
1269
|
protoOf(ProbTerm).freshCopyFromScope = function (scope) {
|
|
1270
1270
|
return this.bu(scope);
|
|
1271
1271
|
};
|
|
1272
|
-
protoOf(ProbTerm).
|
|
1273
|
-
return this.
|
|
1272
|
+
protoOf(ProbTerm).n2l = function (substitution, substitutions) {
|
|
1273
|
+
return this.o2l(substitution, substitutions.slice());
|
|
1274
1274
|
};
|
|
1275
1275
|
protoOf(ProbTerm).getSubstituted = function (substitution, substitutions) {
|
|
1276
|
-
return this.
|
|
1276
|
+
return this.n2l(substitution, substitutions);
|
|
1277
1277
|
};
|
|
1278
|
-
protoOf(ProbTerm).
|
|
1279
|
-
return this.
|
|
1278
|
+
protoOf(ProbTerm).o2l = function (substitution, substitutions) {
|
|
1279
|
+
return this.p14(Companion_getInstance_5().ofSubstitution(substitution, substitutions.slice()));
|
|
1280
1280
|
};
|
|
1281
1281
|
protoOf(ProbTerm).apply = function (substitution, substitutions) {
|
|
1282
|
-
return this.
|
|
1282
|
+
return this.o2l(substitution, substitutions);
|
|
1283
1283
|
};
|
|
1284
|
-
protoOf(ProbTerm).
|
|
1284
|
+
protoOf(ProbTerm).p14 = function (substitution) {
|
|
1285
1285
|
var tmp;
|
|
1286
1286
|
if (substitution.h() || this.bv()) {
|
|
1287
1287
|
tmp = this;
|
|
1288
1288
|
} else {
|
|
1289
1289
|
var tmp_0;
|
|
1290
|
-
var tmp0 = this.
|
|
1290
|
+
var tmp0 = this.d39_1;
|
|
1291
1291
|
var tmp$ret$0;
|
|
1292
1292
|
$l$block_0: {
|
|
1293
1293
|
// Inline function 'kotlin.collections.any' call
|
|
@@ -1312,10 +1312,10 @@
|
|
|
1312
1312
|
tmp$ret$0 = false;
|
|
1313
1313
|
}
|
|
1314
1314
|
if (!tmp$ret$0) {
|
|
1315
|
-
tmp_0 = this.
|
|
1315
|
+
tmp_0 = this.d39_1;
|
|
1316
1316
|
} else {
|
|
1317
1317
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1318
|
-
var tmp0_0 = this.
|
|
1318
|
+
var tmp0_0 = this.d39_1;
|
|
1319
1319
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
1320
1320
|
var destination = ArrayList_init_$Create$_0();
|
|
1321
1321
|
// Inline function 'kotlin.collections.forEach' call
|
|
@@ -1333,15 +1333,15 @@
|
|
|
1333
1333
|
tmp_0 = toSet(destination);
|
|
1334
1334
|
}
|
|
1335
1335
|
var newExtraVars = tmp_0;
|
|
1336
|
-
tmp = new ProbTerm(this.
|
|
1336
|
+
tmp = new ProbTerm(this.a39_1, this.b39_1, this.c39_1.applySubstitution(substitution), newExtraVars);
|
|
1337
1337
|
}
|
|
1338
1338
|
return tmp;
|
|
1339
1339
|
};
|
|
1340
1340
|
protoOf(ProbTerm).applySubstitution = function (substitution) {
|
|
1341
|
-
return this.
|
|
1341
|
+
return this.p14(substitution);
|
|
1342
1342
|
};
|
|
1343
1343
|
protoOf(ProbTerm).bv = function () {
|
|
1344
|
-
var tmp0 = this.
|
|
1344
|
+
var tmp0 = this.e39_1;
|
|
1345
1345
|
var tmp = KProperty1;
|
|
1346
1346
|
// Inline function 'kotlin.getValue' call
|
|
1347
1347
|
getPropertyCallableRef('isGround', 1, tmp, ProbTerm$_get_isGround_$ref_ue0rck(), null);
|
|
@@ -1351,16 +1351,16 @@
|
|
|
1351
1351
|
if (!(other instanceof ProbTerm)) {
|
|
1352
1352
|
return compareTo.call(this, other);
|
|
1353
1353
|
}
|
|
1354
|
-
var res = compareTo_0(this.
|
|
1354
|
+
var res = compareTo_0(this.a39_1, other.a39_1);
|
|
1355
1355
|
if (!(res === 0))
|
|
1356
1356
|
return res;
|
|
1357
|
-
res = this.
|
|
1357
|
+
res = this.c39_1.su(other.c39_1);
|
|
1358
1358
|
if (!(res === 0))
|
|
1359
1359
|
return res;
|
|
1360
|
-
res = equals(this.
|
|
1360
|
+
res = equals(this.d39_1, other.d39_1) ? 0 : -1;
|
|
1361
1361
|
if (!(res === 0))
|
|
1362
1362
|
return res;
|
|
1363
|
-
res = compareTo_0(this.
|
|
1363
|
+
res = compareTo_0(this.b39_1, other.b39_1);
|
|
1364
1364
|
return res;
|
|
1365
1365
|
};
|
|
1366
1366
|
protoOf(ProbTerm).d = function (other) {
|
|
@@ -1379,214 +1379,214 @@
|
|
|
1379
1379
|
return _get_cachedHashCode__d7x0zy(this);
|
|
1380
1380
|
};
|
|
1381
1381
|
protoOf(ProbTerm).toString = function () {
|
|
1382
|
-
return '' + round(this.
|
|
1382
|
+
return '' + round(this.b39_1 * 100) / 100.0 + '::' + this.c39_1.toString();
|
|
1383
1383
|
};
|
|
1384
1384
|
protoOf(ProbTerm).ru = function () {
|
|
1385
|
-
return this.
|
|
1385
|
+
return this.z38_1.ru();
|
|
1386
1386
|
};
|
|
1387
1387
|
protoOf(ProbTerm).ep = function () {
|
|
1388
1388
|
return this.ru();
|
|
1389
1389
|
};
|
|
1390
1390
|
protoOf(ProbTerm).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
1391
|
-
return this.
|
|
1391
|
+
return this.z38_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
1392
1392
|
};
|
|
1393
1393
|
protoOf(ProbTerm).structurallyEquals = function (other) {
|
|
1394
|
-
return this.
|
|
1394
|
+
return this.z38_1.structurallyEquals(other);
|
|
1395
1395
|
};
|
|
1396
1396
|
protoOf(ProbTerm).accept = function (visitor) {
|
|
1397
|
-
return this.
|
|
1397
|
+
return this.z38_1.accept(visitor);
|
|
1398
1398
|
};
|
|
1399
1399
|
protoOf(ProbTerm).castToAtom = function () {
|
|
1400
|
-
return this.
|
|
1400
|
+
return this.z38_1.castToAtom();
|
|
1401
1401
|
};
|
|
1402
1402
|
protoOf(ProbTerm).castToClause = function () {
|
|
1403
|
-
return this.
|
|
1403
|
+
return this.z38_1.castToClause();
|
|
1404
1404
|
};
|
|
1405
1405
|
protoOf(ProbTerm).castToCons = function () {
|
|
1406
|
-
return this.
|
|
1406
|
+
return this.z38_1.castToCons();
|
|
1407
1407
|
};
|
|
1408
1408
|
protoOf(ProbTerm).castToConstant = function () {
|
|
1409
|
-
return this.
|
|
1409
|
+
return this.z38_1.castToConstant();
|
|
1410
1410
|
};
|
|
1411
1411
|
protoOf(ProbTerm).castToDirective = function () {
|
|
1412
|
-
return this.
|
|
1412
|
+
return this.z38_1.castToDirective();
|
|
1413
1413
|
};
|
|
1414
1414
|
protoOf(ProbTerm).castToEmptyList = function () {
|
|
1415
|
-
return this.
|
|
1415
|
+
return this.z38_1.castToEmptyList();
|
|
1416
1416
|
};
|
|
1417
1417
|
protoOf(ProbTerm).castToEmptyBlock = function () {
|
|
1418
|
-
return this.
|
|
1418
|
+
return this.z38_1.castToEmptyBlock();
|
|
1419
1419
|
};
|
|
1420
1420
|
protoOf(ProbTerm).castToFact = function () {
|
|
1421
|
-
return this.
|
|
1421
|
+
return this.z38_1.castToFact();
|
|
1422
1422
|
};
|
|
1423
1423
|
protoOf(ProbTerm).castToIndicator = function () {
|
|
1424
|
-
return this.
|
|
1424
|
+
return this.z38_1.castToIndicator();
|
|
1425
1425
|
};
|
|
1426
1426
|
protoOf(ProbTerm).castToInteger = function () {
|
|
1427
|
-
return this.
|
|
1427
|
+
return this.z38_1.castToInteger();
|
|
1428
1428
|
};
|
|
1429
1429
|
protoOf(ProbTerm).castToList = function () {
|
|
1430
|
-
return this.
|
|
1430
|
+
return this.z38_1.castToList();
|
|
1431
1431
|
};
|
|
1432
1432
|
protoOf(ProbTerm).castToNumeric = function () {
|
|
1433
|
-
return this.
|
|
1433
|
+
return this.z38_1.castToNumeric();
|
|
1434
1434
|
};
|
|
1435
1435
|
protoOf(ProbTerm).castToReal = function () {
|
|
1436
|
-
return this.
|
|
1436
|
+
return this.z38_1.castToReal();
|
|
1437
1437
|
};
|
|
1438
1438
|
protoOf(ProbTerm).castToRule = function () {
|
|
1439
|
-
return this.
|
|
1439
|
+
return this.z38_1.castToRule();
|
|
1440
1440
|
};
|
|
1441
1441
|
protoOf(ProbTerm).castToBlock = function () {
|
|
1442
|
-
return this.
|
|
1442
|
+
return this.z38_1.castToBlock();
|
|
1443
1443
|
};
|
|
1444
1444
|
protoOf(ProbTerm).castToStruct = function () {
|
|
1445
|
-
return this.
|
|
1445
|
+
return this.z38_1.castToStruct();
|
|
1446
1446
|
};
|
|
1447
1447
|
protoOf(ProbTerm).castToRecursive = function () {
|
|
1448
|
-
return this.
|
|
1448
|
+
return this.z38_1.castToRecursive();
|
|
1449
1449
|
};
|
|
1450
1450
|
protoOf(ProbTerm).castToTerm = function () {
|
|
1451
|
-
return this.
|
|
1451
|
+
return this.z38_1.castToTerm();
|
|
1452
1452
|
};
|
|
1453
1453
|
protoOf(ProbTerm).castToTruth = function () {
|
|
1454
|
-
return this.
|
|
1454
|
+
return this.z38_1.castToTruth();
|
|
1455
1455
|
};
|
|
1456
1456
|
protoOf(ProbTerm).castToTuple = function () {
|
|
1457
|
-
return this.
|
|
1457
|
+
return this.z38_1.castToTuple();
|
|
1458
1458
|
};
|
|
1459
1459
|
protoOf(ProbTerm).castToVar = function () {
|
|
1460
|
-
return this.
|
|
1460
|
+
return this.z38_1.castToVar();
|
|
1461
1461
|
};
|
|
1462
1462
|
protoOf(ProbTerm).asAtom = function () {
|
|
1463
|
-
return this.
|
|
1463
|
+
return this.z38_1.asAtom();
|
|
1464
1464
|
};
|
|
1465
1465
|
protoOf(ProbTerm).asClause = function () {
|
|
1466
|
-
return this.
|
|
1466
|
+
return this.z38_1.asClause();
|
|
1467
1467
|
};
|
|
1468
1468
|
protoOf(ProbTerm).asCons = function () {
|
|
1469
|
-
return this.
|
|
1469
|
+
return this.z38_1.asCons();
|
|
1470
1470
|
};
|
|
1471
1471
|
protoOf(ProbTerm).asConstant = function () {
|
|
1472
|
-
return this.
|
|
1472
|
+
return this.z38_1.asConstant();
|
|
1473
1473
|
};
|
|
1474
1474
|
protoOf(ProbTerm).asDirective = function () {
|
|
1475
|
-
return this.
|
|
1475
|
+
return this.z38_1.asDirective();
|
|
1476
1476
|
};
|
|
1477
1477
|
protoOf(ProbTerm).asEmptyList = function () {
|
|
1478
|
-
return this.
|
|
1478
|
+
return this.z38_1.asEmptyList();
|
|
1479
1479
|
};
|
|
1480
1480
|
protoOf(ProbTerm).asEmptyBlock = function () {
|
|
1481
|
-
return this.
|
|
1481
|
+
return this.z38_1.asEmptyBlock();
|
|
1482
1482
|
};
|
|
1483
1483
|
protoOf(ProbTerm).asFact = function () {
|
|
1484
|
-
return this.
|
|
1484
|
+
return this.z38_1.asFact();
|
|
1485
1485
|
};
|
|
1486
1486
|
protoOf(ProbTerm).asIndicator = function () {
|
|
1487
|
-
return this.
|
|
1487
|
+
return this.z38_1.asIndicator();
|
|
1488
1488
|
};
|
|
1489
1489
|
protoOf(ProbTerm).asInteger = function () {
|
|
1490
|
-
return this.
|
|
1490
|
+
return this.z38_1.asInteger();
|
|
1491
1491
|
};
|
|
1492
1492
|
protoOf(ProbTerm).asList = function () {
|
|
1493
|
-
return this.
|
|
1493
|
+
return this.z38_1.asList();
|
|
1494
1494
|
};
|
|
1495
1495
|
protoOf(ProbTerm).asNumeric = function () {
|
|
1496
|
-
return this.
|
|
1496
|
+
return this.z38_1.asNumeric();
|
|
1497
1497
|
};
|
|
1498
1498
|
protoOf(ProbTerm).asReal = function () {
|
|
1499
|
-
return this.
|
|
1499
|
+
return this.z38_1.asReal();
|
|
1500
1500
|
};
|
|
1501
1501
|
protoOf(ProbTerm).asRule = function () {
|
|
1502
|
-
return this.
|
|
1502
|
+
return this.z38_1.asRule();
|
|
1503
1503
|
};
|
|
1504
1504
|
protoOf(ProbTerm).asBlock = function () {
|
|
1505
|
-
return this.
|
|
1505
|
+
return this.z38_1.asBlock();
|
|
1506
1506
|
};
|
|
1507
1507
|
protoOf(ProbTerm).asStruct = function () {
|
|
1508
|
-
return this.
|
|
1508
|
+
return this.z38_1.nu();
|
|
1509
1509
|
};
|
|
1510
1510
|
protoOf(ProbTerm).asRecursive = function () {
|
|
1511
|
-
return this.
|
|
1511
|
+
return this.z38_1.asRecursive();
|
|
1512
1512
|
};
|
|
1513
1513
|
protoOf(ProbTerm).asTerm = function () {
|
|
1514
|
-
return this.
|
|
1514
|
+
return this.z38_1.asTerm();
|
|
1515
1515
|
};
|
|
1516
1516
|
protoOf(ProbTerm).asTruth = function () {
|
|
1517
|
-
return this.
|
|
1517
|
+
return this.z38_1.asTruth();
|
|
1518
1518
|
};
|
|
1519
1519
|
protoOf(ProbTerm).asTuple = function () {
|
|
1520
|
-
return this.
|
|
1520
|
+
return this.z38_1.asTuple();
|
|
1521
1521
|
};
|
|
1522
1522
|
protoOf(ProbTerm).asVar = function () {
|
|
1523
|
-
return this.
|
|
1523
|
+
return this.z38_1.asVar();
|
|
1524
1524
|
};
|
|
1525
1525
|
protoOf(ProbTerm).tu = function () {
|
|
1526
|
-
return this.
|
|
1526
|
+
return this.z38_1.tu();
|
|
1527
1527
|
};
|
|
1528
1528
|
protoOf(ProbTerm).du = function () {
|
|
1529
|
-
return this.
|
|
1529
|
+
return this.z38_1.du();
|
|
1530
1530
|
};
|
|
1531
1531
|
protoOf(ProbTerm).uu = function () {
|
|
1532
|
-
return this.
|
|
1532
|
+
return this.z38_1.uu();
|
|
1533
1533
|
};
|
|
1534
1534
|
protoOf(ProbTerm).vu = function () {
|
|
1535
|
-
return this.
|
|
1535
|
+
return this.z38_1.vu();
|
|
1536
1536
|
};
|
|
1537
1537
|
protoOf(ProbTerm).st = function () {
|
|
1538
|
-
return this.
|
|
1538
|
+
return this.z38_1.st();
|
|
1539
1539
|
};
|
|
1540
1540
|
protoOf(ProbTerm).wu = function () {
|
|
1541
|
-
return this.
|
|
1541
|
+
return this.z38_1.wu();
|
|
1542
1542
|
};
|
|
1543
1543
|
protoOf(ProbTerm).xu = function () {
|
|
1544
|
-
return this.
|
|
1544
|
+
return this.z38_1.xu();
|
|
1545
1545
|
};
|
|
1546
1546
|
protoOf(ProbTerm).yu = function () {
|
|
1547
|
-
return this.
|
|
1547
|
+
return this.z38_1.yu();
|
|
1548
1548
|
};
|
|
1549
1549
|
protoOf(ProbTerm).zu = function () {
|
|
1550
|
-
return this.
|
|
1550
|
+
return this.z38_1.zu();
|
|
1551
1551
|
};
|
|
1552
1552
|
protoOf(ProbTerm).ju = function () {
|
|
1553
|
-
return this.
|
|
1553
|
+
return this.z38_1.ju();
|
|
1554
1554
|
};
|
|
1555
1555
|
protoOf(ProbTerm).iu = function () {
|
|
1556
|
-
return this.
|
|
1556
|
+
return this.z38_1.iu();
|
|
1557
1557
|
};
|
|
1558
1558
|
protoOf(ProbTerm).tt = function () {
|
|
1559
|
-
return this.
|
|
1559
|
+
return this.z38_1.tt();
|
|
1560
1560
|
};
|
|
1561
1561
|
protoOf(ProbTerm).eu = function () {
|
|
1562
|
-
return this.
|
|
1562
|
+
return this.z38_1.eu();
|
|
1563
1563
|
};
|
|
1564
1564
|
protoOf(ProbTerm).ku = function () {
|
|
1565
|
-
return this.
|
|
1565
|
+
return this.z38_1.ku();
|
|
1566
1566
|
};
|
|
1567
1567
|
protoOf(ProbTerm).ut = function () {
|
|
1568
|
-
return this.
|
|
1568
|
+
return this.z38_1.ut();
|
|
1569
1569
|
};
|
|
1570
1570
|
protoOf(ProbTerm).vt = function () {
|
|
1571
|
-
return this.
|
|
1571
|
+
return this.z38_1.vt();
|
|
1572
1572
|
};
|
|
1573
1573
|
protoOf(ProbTerm).mu = function () {
|
|
1574
|
-
return this.
|
|
1574
|
+
return this.z38_1.mu();
|
|
1575
1575
|
};
|
|
1576
1576
|
protoOf(ProbTerm).getTag = function (name) {
|
|
1577
|
-
return this.
|
|
1577
|
+
return this.z38_1.getTag(name);
|
|
1578
1578
|
};
|
|
1579
1579
|
protoOf(ProbTerm).resetTags = function (tags) {
|
|
1580
|
-
return this.
|
|
1580
|
+
return this.z38_1.resetTags(tags);
|
|
1581
1581
|
};
|
|
1582
1582
|
protoOf(ProbTerm).containsTag = function (name) {
|
|
1583
|
-
return this.
|
|
1583
|
+
return this.z38_1.containsTag(name);
|
|
1584
1584
|
};
|
|
1585
1585
|
protoOf(ProbTerm).lr = function () {
|
|
1586
|
-
return this.
|
|
1586
|
+
return this.z38_1.lr();
|
|
1587
1587
|
};
|
|
1588
1588
|
protoOf(ProbTerm).zt = function () {
|
|
1589
|
-
return this.
|
|
1589
|
+
return this.z38_1.zt();
|
|
1590
1590
|
};
|
|
1591
1591
|
function Companion_1() {
|
|
1592
1592
|
}
|
|
@@ -1669,7 +1669,7 @@
|
|
|
1669
1669
|
}
|
|
1670
1670
|
function AnnotatedDisjunctionClauseMapper() {
|
|
1671
1671
|
}
|
|
1672
|
-
protoOf(AnnotatedDisjunctionClauseMapper).
|
|
1672
|
+
protoOf(AnnotatedDisjunctionClauseMapper).j39 = function (clause) {
|
|
1673
1673
|
var tmp;
|
|
1674
1674
|
if (isInterface(clause, Rule)) {
|
|
1675
1675
|
tmp = clause.dw().xt() === ';';
|
|
@@ -1678,7 +1678,7 @@
|
|
|
1678
1678
|
}
|
|
1679
1679
|
return tmp;
|
|
1680
1680
|
};
|
|
1681
|
-
protoOf(AnnotatedDisjunctionClauseMapper).
|
|
1681
|
+
protoOf(AnnotatedDisjunctionClauseMapper).k39 = function (clause) {
|
|
1682
1682
|
if (!isInterface(clause, Rule)) {
|
|
1683
1683
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause.toString());
|
|
1684
1684
|
}
|
|
@@ -1705,21 +1705,21 @@
|
|
|
1705
1705
|
}
|
|
1706
1706
|
var curRuleHead = tmp_0;
|
|
1707
1707
|
probSum = probSum + curProb;
|
|
1708
|
-
var tmp$ret$3 = ProbabilisticClauseMapper_instance.
|
|
1708
|
+
var tmp$ret$3 = ProbabilisticClauseMapper_instance.l39(Companion_instance_3.of(Companion_getInstance_1().of('::', [Companion_getInstance_6().ofDouble(curProb / (1.0 - (probSum - curProb))), curRuleHead]), [body]));
|
|
1709
1709
|
destination.l(tmp$ret$3);
|
|
1710
1710
|
}
|
|
1711
1711
|
var mappedRules = toList_0(destination);
|
|
1712
|
-
var explanation = Companion_getInstance_11().
|
|
1712
|
+
var explanation = Companion_getInstance_11().u38_1;
|
|
1713
1713
|
// Inline function 'kotlin.collections.map' call
|
|
1714
1714
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1715
1715
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(mappedRules, 10));
|
|
1716
1716
|
var _iterator__ex2g4s_0 = mappedRules.n();
|
|
1717
1717
|
while (_iterator__ex2g4s_0.q()) {
|
|
1718
1718
|
var item_0 = _iterator__ex2g4s_0.r();
|
|
1719
|
-
var thisExplanation = Companion_getInstance_11().
|
|
1719
|
+
var thisExplanation = Companion_getInstance_11().y38(item_0.second);
|
|
1720
1720
|
var resultExplanation = thisExplanation.and(explanation);
|
|
1721
1721
|
explanation = explanation.and(thisExplanation.not());
|
|
1722
|
-
var tmp$ret$6 = ProbabilisticClauseMapper_instance.
|
|
1722
|
+
var tmp$ret$6 = ProbabilisticClauseMapper_instance.m39(item_0.first, resultExplanation);
|
|
1723
1723
|
destination_0.l(tmp$ret$6);
|
|
1724
1724
|
}
|
|
1725
1725
|
return destination_0;
|
|
@@ -1729,28 +1729,28 @@
|
|
|
1729
1729
|
return AnnotatedDisjunctionClauseMapper_instance;
|
|
1730
1730
|
}
|
|
1731
1731
|
function ComputedValue(probability) {
|
|
1732
|
-
this.
|
|
1732
|
+
this.n39_1 = probability;
|
|
1733
1733
|
}
|
|
1734
1734
|
protoOf(ComputedValue).toString = function () {
|
|
1735
|
-
return 'ComputedValue(probability=' + this.
|
|
1735
|
+
return 'ComputedValue(probability=' + this.n39_1 + ')';
|
|
1736
1736
|
};
|
|
1737
1737
|
protoOf(ComputedValue).hashCode = function () {
|
|
1738
|
-
return this.
|
|
1738
|
+
return this.n39_1 == null ? 0 : getNumberHashCode(this.n39_1);
|
|
1739
1739
|
};
|
|
1740
1740
|
protoOf(ComputedValue).equals = function (other) {
|
|
1741
1741
|
if (this === other)
|
|
1742
1742
|
return true;
|
|
1743
1743
|
if (!(other instanceof ComputedValue))
|
|
1744
1744
|
return false;
|
|
1745
|
-
if (!equals(this.
|
|
1745
|
+
if (!equals(this.n39_1, other.n39_1))
|
|
1746
1746
|
return false;
|
|
1747
1747
|
return true;
|
|
1748
1748
|
};
|
|
1749
1749
|
function Companion_2() {
|
|
1750
1750
|
Companion_instance_11 = this;
|
|
1751
|
-
this.
|
|
1752
|
-
this.
|
|
1753
|
-
this.
|
|
1751
|
+
this.v38_1 = new ComputedValue(null);
|
|
1752
|
+
this.w38_1 = new ComputedValue(0.0);
|
|
1753
|
+
this.x38_1 = new ComputedValue(1.0);
|
|
1754
1754
|
}
|
|
1755
1755
|
var Companion_instance_11;
|
|
1756
1756
|
function Companion_getInstance_13() {
|
|
@@ -1766,15 +1766,15 @@
|
|
|
1766
1766
|
}
|
|
1767
1767
|
function computeExpansion($this, value, low, high) {
|
|
1768
1768
|
var tmp;
|
|
1769
|
-
if (!(low.
|
|
1770
|
-
tmp = value.
|
|
1769
|
+
if (!(low.n39_1 == null) && !(high.n39_1 == null)) {
|
|
1770
|
+
tmp = value.b39_1 * high.n39_1 + (1.0 - value.b39_1) * low.n39_1;
|
|
1771
1771
|
} else {
|
|
1772
1772
|
tmp = null;
|
|
1773
1773
|
}
|
|
1774
1774
|
return new ComputedValue(tmp);
|
|
1775
1775
|
}
|
|
1776
1776
|
function _get_cachedNot__l38068($this) {
|
|
1777
|
-
var tmp0 = $this.
|
|
1777
|
+
var tmp0 = $this.u37_1;
|
|
1778
1778
|
var tmp = KProperty1;
|
|
1779
1779
|
// Inline function 'kotlin.getValue' call
|
|
1780
1780
|
getPropertyCallableRef('cachedNot', 1, tmp, BinaryDecisionDiagramExplanation$_get_cachedNot_$ref_q3r5qq(), null);
|
|
@@ -1787,9 +1787,9 @@
|
|
|
1787
1787
|
}
|
|
1788
1788
|
function BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda(this$0) {
|
|
1789
1789
|
return function () {
|
|
1790
|
-
var tmp = Companion_getInstance_13().
|
|
1791
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1792
|
-
var result = notThenExpansion(this$0.
|
|
1790
|
+
var tmp = Companion_getInstance_13().w38_1;
|
|
1791
|
+
var tmp_0 = Companion_getInstance_13().x38_1;
|
|
1792
|
+
var result = notThenExpansion(this$0.s37_1, tmp, tmp_0, BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda$lambda(this$0));
|
|
1793
1793
|
return new BinaryDecisionDiagramExplanation(result.first, result.second);
|
|
1794
1794
|
};
|
|
1795
1795
|
}
|
|
@@ -1809,14 +1809,14 @@
|
|
|
1809
1809
|
};
|
|
1810
1810
|
}
|
|
1811
1811
|
function BinaryDecisionDiagramExplanation$probability$delegate$lambda$lambda(node, low, high) {
|
|
1812
|
-
return node.
|
|
1812
|
+
return node.b39_1 * high + (1.0 - node.b39_1) * low;
|
|
1813
1813
|
}
|
|
1814
1814
|
function BinaryDecisionDiagramExplanation$probability$delegate$lambda(this$0) {
|
|
1815
1815
|
return function () {
|
|
1816
|
-
var tmp0_elvis_lhs = this$0.
|
|
1816
|
+
var tmp0_elvis_lhs = this$0.t37_1.n39_1;
|
|
1817
1817
|
var tmp;
|
|
1818
1818
|
if (tmp0_elvis_lhs == null) {
|
|
1819
|
-
tmp = expansion(this$0.
|
|
1819
|
+
tmp = expansion(this$0.s37_1, 0.0, 1.0, BinaryDecisionDiagramExplanation$probability$delegate$lambda$lambda);
|
|
1820
1820
|
} else {
|
|
1821
1821
|
tmp = tmp0_elvis_lhs;
|
|
1822
1822
|
}
|
|
@@ -1825,7 +1825,7 @@
|
|
|
1825
1825
|
}
|
|
1826
1826
|
function BinaryDecisionDiagramExplanation$_get_probability_$ref_gzzr62() {
|
|
1827
1827
|
return constructCallableReference(function (p0) {
|
|
1828
|
-
return p0.
|
|
1828
|
+
return p0.g39();
|
|
1829
1829
|
}, 1, 0, 92);
|
|
1830
1830
|
}
|
|
1831
1831
|
function BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda$lambda(it) {
|
|
@@ -1833,12 +1833,12 @@
|
|
|
1833
1833
|
}
|
|
1834
1834
|
function BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda(this$0) {
|
|
1835
1835
|
return function () {
|
|
1836
|
-
return anyWhere(this$0.
|
|
1836
|
+
return anyWhere(this$0.s37_1, BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda$lambda);
|
|
1837
1837
|
};
|
|
1838
1838
|
}
|
|
1839
1839
|
function BinaryDecisionDiagramExplanation$_get_containsAnyNotGroundTerm_$ref_82xwv2() {
|
|
1840
1840
|
return constructCallableReference(function (p0) {
|
|
1841
|
-
return p0.
|
|
1841
|
+
return p0.i39();
|
|
1842
1842
|
}, 1, 0, 93);
|
|
1843
1843
|
}
|
|
1844
1844
|
function BinaryDecisionDiagramExplanation$apply$lambda($transformation) {
|
|
@@ -1848,64 +1848,64 @@
|
|
|
1848
1848
|
}
|
|
1849
1849
|
function BinaryDecisionDiagramExplanation(diagram, computedValue) {
|
|
1850
1850
|
Companion_getInstance_13();
|
|
1851
|
-
computedValue = computedValue === VOID ? Companion_getInstance_13().
|
|
1852
|
-
this.
|
|
1853
|
-
this.
|
|
1851
|
+
computedValue = computedValue === VOID ? Companion_getInstance_13().v38_1 : computedValue;
|
|
1852
|
+
this.s37_1 = diagram;
|
|
1853
|
+
this.t37_1 = computedValue;
|
|
1854
1854
|
var tmp = this;
|
|
1855
|
-
tmp.
|
|
1855
|
+
tmp.u37_1 = lazy(BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda(this));
|
|
1856
1856
|
var tmp_0 = this;
|
|
1857
|
-
tmp_0.
|
|
1857
|
+
tmp_0.v37_1 = lazy(BinaryDecisionDiagramExplanation$probability$delegate$lambda(this));
|
|
1858
1858
|
var tmp_1 = this;
|
|
1859
|
-
tmp_1.
|
|
1859
|
+
tmp_1.w37_1 = lazy(BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda(this));
|
|
1860
1860
|
}
|
|
1861
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1861
|
+
protoOf(BinaryDecisionDiagramExplanation).o39 = function () {
|
|
1862
1862
|
return _get_cachedNot__l38068(this);
|
|
1863
1863
|
};
|
|
1864
1864
|
protoOf(BinaryDecisionDiagramExplanation).not = function () {
|
|
1865
|
-
return this.
|
|
1865
|
+
return this.o39();
|
|
1866
1866
|
};
|
|
1867
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1868
|
-
var tmp = getAsInternal(this, that).
|
|
1869
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1870
|
-
var tmp_1 = Companion_getInstance_13().
|
|
1871
|
-
var result = andThenExpansion(this.
|
|
1867
|
+
protoOf(BinaryDecisionDiagramExplanation).p39 = function (that) {
|
|
1868
|
+
var tmp = getAsInternal(this, that).s37_1;
|
|
1869
|
+
var tmp_0 = Companion_getInstance_13().w38_1;
|
|
1870
|
+
var tmp_1 = Companion_getInstance_13().x38_1;
|
|
1871
|
+
var result = andThenExpansion(this.s37_1, tmp, tmp_0, tmp_1, BinaryDecisionDiagramExplanation$and$lambda(this));
|
|
1872
1872
|
return new BinaryDecisionDiagramExplanation(result.first, result.second);
|
|
1873
1873
|
};
|
|
1874
1874
|
protoOf(BinaryDecisionDiagramExplanation).and = function (that) {
|
|
1875
|
-
return this.
|
|
1875
|
+
return this.p39(that);
|
|
1876
1876
|
};
|
|
1877
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1878
|
-
var tmp = getAsInternal(this, that).
|
|
1879
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1880
|
-
var tmp_1 = Companion_getInstance_13().
|
|
1881
|
-
var result = orThenExpansion(this.
|
|
1877
|
+
protoOf(BinaryDecisionDiagramExplanation).q39 = function (that) {
|
|
1878
|
+
var tmp = getAsInternal(this, that).s37_1;
|
|
1879
|
+
var tmp_0 = Companion_getInstance_13().w38_1;
|
|
1880
|
+
var tmp_1 = Companion_getInstance_13().x38_1;
|
|
1881
|
+
var result = orThenExpansion(this.s37_1, tmp, tmp_0, tmp_1, BinaryDecisionDiagramExplanation$or$lambda(this));
|
|
1882
1882
|
return new BinaryDecisionDiagramExplanation(result.first, result.second);
|
|
1883
1883
|
};
|
|
1884
1884
|
protoOf(BinaryDecisionDiagramExplanation).or = function (that) {
|
|
1885
|
-
return this.
|
|
1885
|
+
return this.q39(that);
|
|
1886
1886
|
};
|
|
1887
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1888
|
-
var tmp0 = this.
|
|
1887
|
+
protoOf(BinaryDecisionDiagramExplanation).g39 = function () {
|
|
1888
|
+
var tmp0 = this.v37_1;
|
|
1889
1889
|
var tmp = KProperty1;
|
|
1890
1890
|
// Inline function 'kotlin.getValue' call
|
|
1891
1891
|
getPropertyCallableRef('probability', 1, tmp, BinaryDecisionDiagramExplanation$_get_probability_$ref_gzzr62(), null);
|
|
1892
1892
|
return tmp0.e2();
|
|
1893
1893
|
};
|
|
1894
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1895
|
-
var tmp0 = this.
|
|
1894
|
+
protoOf(BinaryDecisionDiagramExplanation).i39 = function () {
|
|
1895
|
+
var tmp0 = this.w37_1;
|
|
1896
1896
|
var tmp = KProperty1;
|
|
1897
1897
|
// Inline function 'kotlin.getValue' call
|
|
1898
1898
|
getPropertyCallableRef('containsAnyNotGroundTerm', 1, tmp, BinaryDecisionDiagramExplanation$_get_containsAnyNotGroundTerm_$ref_82xwv2(), null);
|
|
1899
1899
|
return tmp0.e2();
|
|
1900
1900
|
};
|
|
1901
1901
|
protoOf(BinaryDecisionDiagramExplanation).toString = function () {
|
|
1902
|
-
return 'bdd:' + hashCode(this.
|
|
1902
|
+
return 'bdd:' + hashCode(this.s37_1);
|
|
1903
1903
|
};
|
|
1904
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1905
|
-
return new BinaryDecisionDiagramExplanation(map_0(this.
|
|
1904
|
+
protoOf(BinaryDecisionDiagramExplanation).r39 = function (transformation) {
|
|
1905
|
+
return new BinaryDecisionDiagramExplanation(map_0(this.s37_1, BinaryDecisionDiagramExplanation$apply$lambda(transformation)));
|
|
1906
1906
|
};
|
|
1907
1907
|
protoOf(BinaryDecisionDiagramExplanation).applyTransformation = function (transformation) {
|
|
1908
|
-
return this.
|
|
1908
|
+
return this.r39(transformation);
|
|
1909
1909
|
};
|
|
1910
1910
|
function get_nonWrappableFunctors() {
|
|
1911
1911
|
_init_properties_ClauseMappingUtils_kt__go80e();
|
|
@@ -1914,27 +1914,27 @@
|
|
|
1914
1914
|
var nonWrappableFunctors;
|
|
1915
1915
|
function ClauseMappingUtils() {
|
|
1916
1916
|
ClauseMappingUtils_instance = this;
|
|
1917
|
-
this.
|
|
1918
|
-
this.
|
|
1917
|
+
this.s39_1 = 1n;
|
|
1918
|
+
this.t39_1 = listOf_0([DirectiveClauseMapper_instance, AnnotatedDisjunctionClauseMapper_instance, ProbabilisticClauseMapper_instance, EvidenceClauseMapper_instance, PrologClauseMapper_instance, NothingClauseMapper_instance]);
|
|
1919
1919
|
}
|
|
1920
|
-
protoOf(ClauseMappingUtils).
|
|
1921
|
-
var _unary__edvuaz = this.
|
|
1922
|
-
this.
|
|
1920
|
+
protoOf(ClauseMappingUtils).u39 = function () {
|
|
1921
|
+
var _unary__edvuaz = this.s39_1;
|
|
1922
|
+
this.s39_1 = add(_unary__edvuaz, get_ONE());
|
|
1923
1923
|
return _unary__edvuaz;
|
|
1924
1924
|
};
|
|
1925
|
-
protoOf(ClauseMappingUtils).
|
|
1925
|
+
protoOf(ClauseMappingUtils).v39 = function (clause) {
|
|
1926
1926
|
var tmp;
|
|
1927
1927
|
if (get_isMappedAsProblog(clause)) {
|
|
1928
1928
|
tmp = listOf(clause);
|
|
1929
1929
|
} else {
|
|
1930
|
-
var tmp0 = this.
|
|
1930
|
+
var tmp0 = this.t39_1;
|
|
1931
1931
|
var tmp$ret$0;
|
|
1932
1932
|
$l$block: {
|
|
1933
1933
|
// Inline function 'kotlin.collections.first' call
|
|
1934
1934
|
var _iterator__ex2g4s = tmp0.n();
|
|
1935
1935
|
while (_iterator__ex2g4s.q()) {
|
|
1936
1936
|
var element = _iterator__ex2g4s.r();
|
|
1937
|
-
if (element.
|
|
1937
|
+
if (element.j39(clause)) {
|
|
1938
1938
|
tmp$ret$0 = element;
|
|
1939
1939
|
break $l$block;
|
|
1940
1940
|
}
|
|
@@ -1942,7 +1942,7 @@
|
|
|
1942
1942
|
throw NoSuchElementException_init_$Create$('Collection contains no element matching the predicate.');
|
|
1943
1943
|
}
|
|
1944
1944
|
// Inline function 'kotlin.collections.map' call
|
|
1945
|
-
var this_0 = tmp$ret$0.
|
|
1945
|
+
var this_0 = tmp$ret$0.k39(clause);
|
|
1946
1946
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1947
1947
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1948
1948
|
var _iterator__ex2g4s_0 = this_0.n();
|
|
@@ -1955,7 +1955,7 @@
|
|
|
1955
1955
|
}
|
|
1956
1956
|
return tmp;
|
|
1957
1957
|
};
|
|
1958
|
-
protoOf(ClauseMappingUtils).
|
|
1958
|
+
protoOf(ClauseMappingUtils).w39 = function (indicator) {
|
|
1959
1959
|
var arityTerm = indicator.ey();
|
|
1960
1960
|
var tmp = Companion_instance_4;
|
|
1961
1961
|
var tmp_0 = indicator.dy();
|
|
@@ -2059,7 +2059,7 @@
|
|
|
2059
2059
|
}
|
|
2060
2060
|
function withExplanationNonWrappable(_this__u8e3s4, explanation) {
|
|
2061
2061
|
_init_properties_ClauseMappingUtils_kt__go80e();
|
|
2062
|
-
return Companion_instance_0.of(_this__u8e3s4, Companion_getInstance_1().of('=', [explanation, toTerm(Companion_getInstance_11().
|
|
2062
|
+
return Companion_instance_0.of(_this__u8e3s4, Companion_getInstance_1().of('=', [explanation, toTerm(Companion_getInstance_11().u38_1)]));
|
|
2063
2063
|
}
|
|
2064
2064
|
function wrapInPredicate(_this__u8e3s4, functor, explanation) {
|
|
2065
2065
|
_init_properties_ClauseMappingUtils_kt__go80e();
|
|
@@ -2107,7 +2107,7 @@
|
|
|
2107
2107
|
var _iterator__ex2g4s = tmp0.n();
|
|
2108
2108
|
while (_iterator__ex2g4s.q()) {
|
|
2109
2109
|
var element = _iterator__ex2g4s.r();
|
|
2110
|
-
if (element.
|
|
2110
|
+
if (element.u12()) {
|
|
2111
2111
|
destination.l(element);
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
@@ -2154,10 +2154,10 @@
|
|
|
2154
2154
|
}
|
|
2155
2155
|
function DirectiveClauseMapper() {
|
|
2156
2156
|
}
|
|
2157
|
-
protoOf(DirectiveClauseMapper).
|
|
2157
|
+
protoOf(DirectiveClauseMapper).j39 = function (clause) {
|
|
2158
2158
|
return clause.gu();
|
|
2159
2159
|
};
|
|
2160
|
-
protoOf(DirectiveClauseMapper).
|
|
2160
|
+
protoOf(DirectiveClauseMapper).k39 = function (clause) {
|
|
2161
2161
|
var body = clause.ew();
|
|
2162
2162
|
if (!isInterface(clause, Directive)) {
|
|
2163
2163
|
throw new ClauseMappingException('Clause is not an instance of Directive: ' + clause.toString());
|
|
@@ -2197,7 +2197,7 @@
|
|
|
2197
2197
|
}
|
|
2198
2198
|
function EvidenceClauseMapper() {
|
|
2199
2199
|
}
|
|
2200
|
-
protoOf(EvidenceClauseMapper).
|
|
2200
|
+
protoOf(EvidenceClauseMapper).j39 = function (clause) {
|
|
2201
2201
|
var tmp;
|
|
2202
2202
|
if (isInterface(clause, Rule)) {
|
|
2203
2203
|
tmp = clause.dw().xt() === 'evidence';
|
|
@@ -2206,7 +2206,7 @@
|
|
|
2206
2206
|
}
|
|
2207
2207
|
return tmp;
|
|
2208
2208
|
};
|
|
2209
|
-
protoOf(EvidenceClauseMapper).
|
|
2209
|
+
protoOf(EvidenceClauseMapper).k39 = function (clause) {
|
|
2210
2210
|
if (!isInterface(clause, Rule)) {
|
|
2211
2211
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause.toString());
|
|
2212
2212
|
}
|
|
@@ -2241,7 +2241,7 @@
|
|
|
2241
2241
|
return EvidenceClauseMapper_instance;
|
|
2242
2242
|
}
|
|
2243
2243
|
function MappedMutableProblogTheory(clauses, unificator, theory) {
|
|
2244
|
-
unificator = unificator === VOID ? Companion_getInstance_8().
|
|
2244
|
+
unificator = unificator === VOID ? Companion_getInstance_8().k1k() : unificator;
|
|
2245
2245
|
var tmp;
|
|
2246
2246
|
if (theory === VOID) {
|
|
2247
2247
|
var tmp_0 = Companion_instance_6;
|
|
@@ -2255,7 +2255,7 @@
|
|
|
2255
2255
|
var _iterator__ex2g4s = clauses.n();
|
|
2256
2256
|
while (_iterator__ex2g4s.q()) {
|
|
2257
2257
|
var element = _iterator__ex2g4s.r();
|
|
2258
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2258
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2259
2259
|
addAll(destination, list);
|
|
2260
2260
|
}
|
|
2261
2261
|
tmp_1 = destination;
|
|
@@ -2266,102 +2266,102 @@
|
|
|
2266
2266
|
tmp = theory;
|
|
2267
2267
|
}
|
|
2268
2268
|
theory = tmp;
|
|
2269
|
-
this.
|
|
2269
|
+
this.x39_1 = theory;
|
|
2270
2270
|
}
|
|
2271
|
-
protoOf(MappedMutableProblogTheory).
|
|
2271
|
+
protoOf(MappedMutableProblogTheory).h1s = function () {
|
|
2272
2272
|
return false;
|
|
2273
2273
|
};
|
|
2274
|
-
protoOf(MappedMutableProblogTheory).
|
|
2275
|
-
return Companion_instance_8.ofIterable(this.
|
|
2274
|
+
protoOf(MappedMutableProblogTheory).u1s = function () {
|
|
2275
|
+
return Companion_instance_8.ofIterable(this.r1k(), this);
|
|
2276
2276
|
};
|
|
2277
2277
|
protoOf(MappedMutableProblogTheory).toMutableTheory = function () {
|
|
2278
|
-
return this.
|
|
2278
|
+
return this.u1s();
|
|
2279
2279
|
};
|
|
2280
|
-
protoOf(MappedMutableProblogTheory).
|
|
2280
|
+
protoOf(MappedMutableProblogTheory).h1r = function () {
|
|
2281
2281
|
return this;
|
|
2282
2282
|
};
|
|
2283
2283
|
protoOf(MappedMutableProblogTheory).toImmutableTheory = function () {
|
|
2284
|
-
return this.
|
|
2284
|
+
return this.h1r();
|
|
2285
2285
|
};
|
|
2286
|
-
protoOf(MappedMutableProblogTheory).
|
|
2287
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2286
|
+
protoOf(MappedMutableProblogTheory).y39 = function (theory) {
|
|
2287
|
+
return new MappedMutableProblogTheory(null, this.r1k(), this.x39_1.u1r(theory));
|
|
2288
2288
|
};
|
|
2289
|
-
protoOf(MappedMutableProblogTheory).
|
|
2289
|
+
protoOf(MappedMutableProblogTheory).u1r = function (theory) {
|
|
2290
2290
|
var tmp;
|
|
2291
2291
|
if (isInterface(theory, ProblogTheory)) {
|
|
2292
|
-
tmp = this.
|
|
2292
|
+
tmp = this.y39(theory);
|
|
2293
2293
|
} else {
|
|
2294
|
-
tmp = this.
|
|
2294
|
+
tmp = this.y39(new MappedMutableProblogTheory(theory, this.r1k()));
|
|
2295
2295
|
}
|
|
2296
2296
|
return tmp;
|
|
2297
2297
|
};
|
|
2298
2298
|
protoOf(MappedMutableProblogTheory).plusTheory = function (theory) {
|
|
2299
|
-
return this.
|
|
2299
|
+
return this.u1r(theory);
|
|
2300
2300
|
};
|
|
2301
|
-
protoOf(MappedMutableProblogTheory).
|
|
2302
|
-
var mapped = ClauseMappingUtils_getInstance().
|
|
2303
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2301
|
+
protoOf(MappedMutableProblogTheory).i1r = function (clause) {
|
|
2302
|
+
var mapped = ClauseMappingUtils_getInstance().v39(clause);
|
|
2303
|
+
return new MappedMutableProblogTheory(null, this.r1k(), this.x39_1.u1r(Companion_instance_7.indexedOfIterable(this.r1k(), mapped)));
|
|
2304
2304
|
};
|
|
2305
2305
|
protoOf(MappedMutableProblogTheory).plus = function (clause) {
|
|
2306
|
-
return this.
|
|
2306
|
+
return this.i1r(clause);
|
|
2307
2307
|
};
|
|
2308
|
-
protoOf(MappedMutableProblogTheory).
|
|
2308
|
+
protoOf(MappedMutableProblogTheory).y1r = function (clauses) {
|
|
2309
2309
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2310
2310
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2311
2311
|
var destination = ArrayList_init_$Create$_0();
|
|
2312
2312
|
var _iterator__ex2g4s = clauses.n();
|
|
2313
2313
|
while (_iterator__ex2g4s.q()) {
|
|
2314
2314
|
var element = _iterator__ex2g4s.r();
|
|
2315
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2315
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2316
2316
|
addAll(destination, list);
|
|
2317
2317
|
}
|
|
2318
2318
|
var mapped = destination;
|
|
2319
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2319
|
+
return new MappedMutableProblogTheory(null, this.r1k(), this.x39_1.y1r(mapped));
|
|
2320
2320
|
};
|
|
2321
2321
|
protoOf(MappedMutableProblogTheory).assertAIterable = function (clauses) {
|
|
2322
|
-
return this.
|
|
2322
|
+
return this.y1r(clauses);
|
|
2323
2323
|
};
|
|
2324
|
-
protoOf(MappedMutableProblogTheory).
|
|
2324
|
+
protoOf(MappedMutableProblogTheory).b1s = function (clauses) {
|
|
2325
2325
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2326
2326
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2327
2327
|
var destination = ArrayList_init_$Create$_0();
|
|
2328
2328
|
var _iterator__ex2g4s = clauses.n();
|
|
2329
2329
|
while (_iterator__ex2g4s.q()) {
|
|
2330
2330
|
var element = _iterator__ex2g4s.r();
|
|
2331
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2331
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2332
2332
|
addAll(destination, list);
|
|
2333
2333
|
}
|
|
2334
2334
|
var mapped = destination;
|
|
2335
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2335
|
+
return new MappedMutableProblogTheory(null, this.r1k(), this.x39_1.b1s(mapped));
|
|
2336
2336
|
};
|
|
2337
2337
|
protoOf(MappedMutableProblogTheory).assertZIterable = function (clauses) {
|
|
2338
|
-
return this.
|
|
2338
|
+
return this.b1s(clauses);
|
|
2339
2339
|
};
|
|
2340
|
-
protoOf(MappedMutableProblogTheory).
|
|
2340
|
+
protoOf(MappedMutableProblogTheory).f1s = function (clauses) {
|
|
2341
2341
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2342
2342
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2343
2343
|
var destination = ArrayList_init_$Create$_0();
|
|
2344
2344
|
var _iterator__ex2g4s = clauses.n();
|
|
2345
2345
|
while (_iterator__ex2g4s.q()) {
|
|
2346
2346
|
var element = _iterator__ex2g4s.r();
|
|
2347
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2347
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2348
2348
|
addAll(destination, list);
|
|
2349
2349
|
}
|
|
2350
2350
|
var mapped = destination;
|
|
2351
|
-
var result = this.
|
|
2351
|
+
var result = this.x39_1.f1s(mapped);
|
|
2352
2352
|
var tmp;
|
|
2353
2353
|
if (result instanceof Success) {
|
|
2354
|
-
tmp = new Success(new MappedMutableProblogTheory(null, this.
|
|
2354
|
+
tmp = new Success(new MappedMutableProblogTheory(null, this.r1k(), result.a1t_1), result.b1t_1);
|
|
2355
2355
|
} else {
|
|
2356
|
-
tmp = new Failure(new MappedMutableProblogTheory(null, this.
|
|
2356
|
+
tmp = new Failure(new MappedMutableProblogTheory(null, this.r1k(), result.o1r()));
|
|
2357
2357
|
}
|
|
2358
2358
|
return tmp;
|
|
2359
2359
|
};
|
|
2360
2360
|
protoOf(MappedMutableProblogTheory).retractIterable = function (clauses) {
|
|
2361
|
-
return this.
|
|
2361
|
+
return this.f1s(clauses);
|
|
2362
2362
|
};
|
|
2363
|
-
protoOf(MappedMutableProblogTheory).
|
|
2364
|
-
var mappedClauses = ClauseMappingUtils_getInstance().
|
|
2363
|
+
protoOf(MappedMutableProblogTheory).j1l = function (clause) {
|
|
2364
|
+
var mappedClauses = ClauseMappingUtils_getInstance().v39(clause);
|
|
2365
2365
|
var result = null;
|
|
2366
2366
|
var _iterator__ex2g4s = mappedClauses.n();
|
|
2367
2367
|
while (_iterator__ex2g4s.q()) {
|
|
@@ -2373,16 +2373,16 @@
|
|
|
2373
2373
|
tmp = !(result instanceof Failure);
|
|
2374
2374
|
}
|
|
2375
2375
|
if (tmp) {
|
|
2376
|
-
result = this.
|
|
2376
|
+
result = this.x39_1.j1l(c);
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
2379
|
var tmp0_subject = result;
|
|
2380
2380
|
var tmp_0;
|
|
2381
2381
|
if (tmp0_subject instanceof Success) {
|
|
2382
|
-
tmp_0 = new Success(new MappedMutableProblogTheory(null, this.
|
|
2382
|
+
tmp_0 = new Success(new MappedMutableProblogTheory(null, this.r1k(), result.a1t_1), result.b1t_1);
|
|
2383
2383
|
} else {
|
|
2384
2384
|
if (tmp0_subject instanceof Failure) {
|
|
2385
|
-
tmp_0 = new Failure(new MappedMutableProblogTheory(null, this.
|
|
2385
|
+
tmp_0 = new Failure(new MappedMutableProblogTheory(null, this.r1k(), result.c1t_1));
|
|
2386
2386
|
} else {
|
|
2387
2387
|
tmp_0 = new Failure(this);
|
|
2388
2388
|
}
|
|
@@ -2390,145 +2390,145 @@
|
|
|
2390
2390
|
return tmp_0;
|
|
2391
2391
|
};
|
|
2392
2392
|
protoOf(MappedMutableProblogTheory).retractAll = function (clause) {
|
|
2393
|
-
return this.
|
|
2393
|
+
return this.j1l(clause);
|
|
2394
2394
|
};
|
|
2395
|
-
protoOf(MappedMutableProblogTheory).
|
|
2396
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2395
|
+
protoOf(MappedMutableProblogTheory).n1r = function (indicator) {
|
|
2396
|
+
return new MappedMutableProblogTheory(null, this.r1k(), this.x39_1.n1r(ClauseMappingUtils_getInstance().w39(indicator)));
|
|
2397
2397
|
};
|
|
2398
2398
|
protoOf(MappedMutableProblogTheory).abolish = function (indicator) {
|
|
2399
|
-
return this.
|
|
2399
|
+
return this.n1r(indicator);
|
|
2400
2400
|
};
|
|
2401
|
-
protoOf(MappedMutableProblogTheory).
|
|
2402
|
-
return this.
|
|
2401
|
+
protoOf(MappedMutableProblogTheory).v1s = function (struct) {
|
|
2402
|
+
return this.w1r(Companion_instance.of(struct));
|
|
2403
2403
|
};
|
|
2404
2404
|
protoOf(MappedMutableProblogTheory).assertAFact = function (struct) {
|
|
2405
|
-
return this.
|
|
2405
|
+
return this.v1s(struct);
|
|
2406
2406
|
};
|
|
2407
|
-
protoOf(MappedMutableProblogTheory).
|
|
2408
|
-
return this.
|
|
2407
|
+
protoOf(MappedMutableProblogTheory).w1s = function (struct) {
|
|
2408
|
+
return this.a1s(Companion_instance.of(struct));
|
|
2409
2409
|
};
|
|
2410
2410
|
protoOf(MappedMutableProblogTheory).assertZFact = function (struct) {
|
|
2411
|
-
return this.
|
|
2411
|
+
return this.w1s(struct);
|
|
2412
2412
|
};
|
|
2413
|
-
protoOf(MappedMutableProblogTheory).
|
|
2414
|
-
return this.
|
|
2413
|
+
protoOf(MappedMutableProblogTheory).w1r = function (clause) {
|
|
2414
|
+
return this.y1r(listOf(clause));
|
|
2415
2415
|
};
|
|
2416
2416
|
protoOf(MappedMutableProblogTheory).assertA = function (clause) {
|
|
2417
|
-
return this.
|
|
2417
|
+
return this.w1r(clause);
|
|
2418
2418
|
};
|
|
2419
|
-
protoOf(MappedMutableProblogTheory).
|
|
2420
|
-
return this.
|
|
2419
|
+
protoOf(MappedMutableProblogTheory).z1r = function (clauses) {
|
|
2420
|
+
return this.y1r(asIterable_0(clauses));
|
|
2421
2421
|
};
|
|
2422
2422
|
protoOf(MappedMutableProblogTheory).assertASequence = function (clauses) {
|
|
2423
|
-
return this.
|
|
2423
|
+
return this.z1r(clauses);
|
|
2424
2424
|
};
|
|
2425
|
-
protoOf(MappedMutableProblogTheory).
|
|
2426
|
-
return this.
|
|
2425
|
+
protoOf(MappedMutableProblogTheory).a1s = function (clause) {
|
|
2426
|
+
return this.b1s(listOf(clause));
|
|
2427
2427
|
};
|
|
2428
2428
|
protoOf(MappedMutableProblogTheory).assertZ = function (clause) {
|
|
2429
|
-
return this.
|
|
2429
|
+
return this.a1s(clause);
|
|
2430
2430
|
};
|
|
2431
|
-
protoOf(MappedMutableProblogTheory).
|
|
2432
|
-
return this.
|
|
2431
|
+
protoOf(MappedMutableProblogTheory).c1s = function (clauses) {
|
|
2432
|
+
return this.b1s(asIterable_0(clauses));
|
|
2433
2433
|
};
|
|
2434
2434
|
protoOf(MappedMutableProblogTheory).assertZSequence = function (clauses) {
|
|
2435
|
-
return this.
|
|
2435
|
+
return this.c1s(clauses);
|
|
2436
2436
|
};
|
|
2437
|
-
protoOf(MappedMutableProblogTheory).
|
|
2438
|
-
return this.
|
|
2437
|
+
protoOf(MappedMutableProblogTheory).y1s = function (head) {
|
|
2438
|
+
return this.x1s(Companion_instance_3.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2439
2439
|
};
|
|
2440
2440
|
protoOf(MappedMutableProblogTheory).retractByHead = function (head) {
|
|
2441
|
-
return this.
|
|
2441
|
+
return this.y1s(head);
|
|
2442
2442
|
};
|
|
2443
|
-
protoOf(MappedMutableProblogTheory).
|
|
2444
|
-
return this.
|
|
2443
|
+
protoOf(MappedMutableProblogTheory).x1s = function (clause) {
|
|
2444
|
+
return this.f1s(listOf(clause));
|
|
2445
2445
|
};
|
|
2446
2446
|
protoOf(MappedMutableProblogTheory).retract = function (clause) {
|
|
2447
|
-
return this.
|
|
2447
|
+
return this.x1s(clause);
|
|
2448
2448
|
};
|
|
2449
|
-
protoOf(MappedMutableProblogTheory).
|
|
2450
|
-
return this.
|
|
2449
|
+
protoOf(MappedMutableProblogTheory).e1s = function (clauses) {
|
|
2450
|
+
return this.f1s(asIterable_0(clauses));
|
|
2451
2451
|
};
|
|
2452
2452
|
protoOf(MappedMutableProblogTheory).retractSequence = function (clauses) {
|
|
2453
|
-
return this.
|
|
2453
|
+
return this.e1s(clauses);
|
|
2454
2454
|
};
|
|
2455
|
-
protoOf(MappedMutableProblogTheory).
|
|
2456
|
-
return this.
|
|
2455
|
+
protoOf(MappedMutableProblogTheory).z1s = function (head) {
|
|
2456
|
+
return this.j1l(Companion_instance_3.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2457
2457
|
};
|
|
2458
2458
|
protoOf(MappedMutableProblogTheory).retractAllByHead = function (head) {
|
|
2459
|
-
return this.
|
|
2459
|
+
return this.z1s(head);
|
|
2460
2460
|
};
|
|
2461
|
-
protoOf(MappedMutableProblogTheory).
|
|
2462
|
-
return this.
|
|
2461
|
+
protoOf(MappedMutableProblogTheory).s1r = function (unificator) {
|
|
2462
|
+
return this.x39_1.s1r(unificator);
|
|
2463
2463
|
};
|
|
2464
2464
|
protoOf(MappedMutableProblogTheory).setUnificator = function (unificator) {
|
|
2465
|
-
return this.
|
|
2465
|
+
return this.s1r(unificator);
|
|
2466
2466
|
};
|
|
2467
2467
|
protoOf(MappedMutableProblogTheory).b10 = function (tags) {
|
|
2468
|
-
return this.
|
|
2468
|
+
return this.x39_1.b10(tags);
|
|
2469
2469
|
};
|
|
2470
2470
|
protoOf(MappedMutableProblogTheory).resetTags = function (tags) {
|
|
2471
2471
|
return this.b10(tags);
|
|
2472
2472
|
};
|
|
2473
|
-
protoOf(MappedMutableProblogTheory).
|
|
2474
|
-
return this.
|
|
2473
|
+
protoOf(MappedMutableProblogTheory).g1s = function () {
|
|
2474
|
+
return this.x39_1.g1s();
|
|
2475
2475
|
};
|
|
2476
2476
|
protoOf(MappedMutableProblogTheory).clone = function () {
|
|
2477
|
-
return this.
|
|
2477
|
+
return this.g1s();
|
|
2478
2478
|
};
|
|
2479
2479
|
protoOf(MappedMutableProblogTheory).contains = function (clause) {
|
|
2480
|
-
return this.
|
|
2480
|
+
return this.x39_1.contains(clause);
|
|
2481
2481
|
};
|
|
2482
2482
|
protoOf(MappedMutableProblogTheory).containsHead = function (head) {
|
|
2483
|
-
return this.
|
|
2483
|
+
return this.x39_1.containsHead(head);
|
|
2484
2484
|
};
|
|
2485
2485
|
protoOf(MappedMutableProblogTheory).containsIndicator = function (indicator) {
|
|
2486
|
-
return this.
|
|
2486
|
+
return this.x39_1.containsIndicator(indicator);
|
|
2487
2487
|
};
|
|
2488
2488
|
protoOf(MappedMutableProblogTheory).get = function (clause) {
|
|
2489
|
-
return this.
|
|
2489
|
+
return this.x39_1.get(clause);
|
|
2490
2490
|
};
|
|
2491
2491
|
protoOf(MappedMutableProblogTheory).getByHead = function (head) {
|
|
2492
|
-
return this.
|
|
2492
|
+
return this.x39_1.getByHead(head);
|
|
2493
2493
|
};
|
|
2494
2494
|
protoOf(MappedMutableProblogTheory).getByIndicator = function (indicator) {
|
|
2495
|
-
return this.
|
|
2495
|
+
return this.x39_1.getByIndicator(indicator);
|
|
2496
2496
|
};
|
|
2497
2497
|
protoOf(MappedMutableProblogTheory).toStringAsProlog = function (asPrologText) {
|
|
2498
|
-
return this.
|
|
2498
|
+
return this.x39_1.toStringAsProlog(asPrologText);
|
|
2499
2499
|
};
|
|
2500
2500
|
protoOf(MappedMutableProblogTheory).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
2501
|
-
return this.
|
|
2501
|
+
return this.x39_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
2502
2502
|
};
|
|
2503
|
-
protoOf(MappedMutableProblogTheory).
|
|
2504
|
-
return this.
|
|
2503
|
+
protoOf(MappedMutableProblogTheory).b1l = function () {
|
|
2504
|
+
return this.x39_1.b1l();
|
|
2505
2505
|
};
|
|
2506
|
-
protoOf(MappedMutableProblogTheory).
|
|
2507
|
-
return this.
|
|
2506
|
+
protoOf(MappedMutableProblogTheory).u1k = function () {
|
|
2507
|
+
return this.x39_1.u1k();
|
|
2508
2508
|
};
|
|
2509
|
-
protoOf(MappedMutableProblogTheory).
|
|
2510
|
-
return this.
|
|
2509
|
+
protoOf(MappedMutableProblogTheory).w1k = function () {
|
|
2510
|
+
return this.x39_1.w1k();
|
|
2511
2511
|
};
|
|
2512
|
-
protoOf(MappedMutableProblogTheory).
|
|
2513
|
-
return this.
|
|
2512
|
+
protoOf(MappedMutableProblogTheory).r1r = function () {
|
|
2513
|
+
return this.x39_1.r1r();
|
|
2514
2514
|
};
|
|
2515
2515
|
protoOf(MappedMutableProblogTheory).n = function () {
|
|
2516
|
-
return this.
|
|
2516
|
+
return this.x39_1.n();
|
|
2517
2517
|
};
|
|
2518
2518
|
protoOf(MappedMutableProblogTheory).getTag = function (name) {
|
|
2519
|
-
return this.
|
|
2519
|
+
return this.x39_1.getTag(name);
|
|
2520
2520
|
};
|
|
2521
2521
|
protoOf(MappedMutableProblogTheory).containsTag = function (name) {
|
|
2522
|
-
return this.
|
|
2522
|
+
return this.x39_1.containsTag(name);
|
|
2523
2523
|
};
|
|
2524
2524
|
protoOf(MappedMutableProblogTheory).lr = function () {
|
|
2525
|
-
return this.
|
|
2525
|
+
return this.x39_1.lr();
|
|
2526
2526
|
};
|
|
2527
|
-
protoOf(MappedMutableProblogTheory).
|
|
2528
|
-
return this.
|
|
2527
|
+
protoOf(MappedMutableProblogTheory).r1k = function () {
|
|
2528
|
+
return this.x39_1.r1k();
|
|
2529
2529
|
};
|
|
2530
2530
|
function MappedProblogTheory(clauses, unificator, theory) {
|
|
2531
|
-
unificator = unificator === VOID ? Companion_getInstance_8().
|
|
2531
|
+
unificator = unificator === VOID ? Companion_getInstance_8().k1k() : unificator;
|
|
2532
2532
|
var tmp;
|
|
2533
2533
|
if (theory === VOID) {
|
|
2534
2534
|
var tmp_0 = Companion_instance_7;
|
|
@@ -2542,7 +2542,7 @@
|
|
|
2542
2542
|
var _iterator__ex2g4s = clauses.n();
|
|
2543
2543
|
while (_iterator__ex2g4s.q()) {
|
|
2544
2544
|
var element = _iterator__ex2g4s.r();
|
|
2545
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2545
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2546
2546
|
addAll(destination, list);
|
|
2547
2547
|
}
|
|
2548
2548
|
tmp_1 = destination;
|
|
@@ -2553,102 +2553,102 @@
|
|
|
2553
2553
|
tmp = theory;
|
|
2554
2554
|
}
|
|
2555
2555
|
theory = tmp;
|
|
2556
|
-
this.
|
|
2556
|
+
this.z39_1 = theory;
|
|
2557
2557
|
}
|
|
2558
|
-
protoOf(MappedProblogTheory).
|
|
2558
|
+
protoOf(MappedProblogTheory).h1s = function () {
|
|
2559
2559
|
return false;
|
|
2560
2560
|
};
|
|
2561
|
-
protoOf(MappedProblogTheory).
|
|
2562
|
-
return Companion_instance_8.ofIterable(this.
|
|
2561
|
+
protoOf(MappedProblogTheory).u1s = function () {
|
|
2562
|
+
return Companion_instance_8.ofIterable(this.r1k(), this);
|
|
2563
2563
|
};
|
|
2564
2564
|
protoOf(MappedProblogTheory).toMutableTheory = function () {
|
|
2565
|
-
return this.
|
|
2565
|
+
return this.u1s();
|
|
2566
2566
|
};
|
|
2567
|
-
protoOf(MappedProblogTheory).
|
|
2567
|
+
protoOf(MappedProblogTheory).h1r = function () {
|
|
2568
2568
|
return this;
|
|
2569
2569
|
};
|
|
2570
2570
|
protoOf(MappedProblogTheory).toImmutableTheory = function () {
|
|
2571
|
-
return this.
|
|
2571
|
+
return this.h1r();
|
|
2572
2572
|
};
|
|
2573
|
-
protoOf(MappedProblogTheory).
|
|
2574
|
-
return new MappedProblogTheory(null, this.
|
|
2573
|
+
protoOf(MappedProblogTheory).y39 = function (theory) {
|
|
2574
|
+
return new MappedProblogTheory(null, this.r1k(), this.z39_1.plusTheory(theory));
|
|
2575
2575
|
};
|
|
2576
|
-
protoOf(MappedProblogTheory).
|
|
2576
|
+
protoOf(MappedProblogTheory).u1r = function (theory) {
|
|
2577
2577
|
var tmp;
|
|
2578
2578
|
if (isInterface(theory, ProblogTheory)) {
|
|
2579
|
-
tmp = this.
|
|
2579
|
+
tmp = this.y39(theory);
|
|
2580
2580
|
} else {
|
|
2581
|
-
tmp = this.
|
|
2581
|
+
tmp = this.y39(new MappedProblogTheory(theory, this.r1k()));
|
|
2582
2582
|
}
|
|
2583
2583
|
return tmp;
|
|
2584
2584
|
};
|
|
2585
2585
|
protoOf(MappedProblogTheory).plusTheory = function (theory) {
|
|
2586
|
-
return this.
|
|
2586
|
+
return this.u1r(theory);
|
|
2587
2587
|
};
|
|
2588
|
-
protoOf(MappedProblogTheory).
|
|
2589
|
-
var mapped = ClauseMappingUtils_getInstance().
|
|
2590
|
-
return new MappedProblogTheory(null, this.
|
|
2588
|
+
protoOf(MappedProblogTheory).i1r = function (clause) {
|
|
2589
|
+
var mapped = ClauseMappingUtils_getInstance().v39(clause);
|
|
2590
|
+
return new MappedProblogTheory(null, this.r1k(), this.z39_1.plusTheory(Companion_instance_7.indexedOfIterable(this.r1k(), mapped)));
|
|
2591
2591
|
};
|
|
2592
2592
|
protoOf(MappedProblogTheory).plus = function (clause) {
|
|
2593
|
-
return this.
|
|
2593
|
+
return this.i1r(clause);
|
|
2594
2594
|
};
|
|
2595
|
-
protoOf(MappedProblogTheory).
|
|
2595
|
+
protoOf(MappedProblogTheory).y1r = function (clauses) {
|
|
2596
2596
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2597
2597
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2598
2598
|
var destination = ArrayList_init_$Create$_0();
|
|
2599
2599
|
var _iterator__ex2g4s = clauses.n();
|
|
2600
2600
|
while (_iterator__ex2g4s.q()) {
|
|
2601
2601
|
var element = _iterator__ex2g4s.r();
|
|
2602
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2602
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2603
2603
|
addAll(destination, list);
|
|
2604
2604
|
}
|
|
2605
2605
|
var mapped = destination;
|
|
2606
|
-
return new MappedProblogTheory(null, this.
|
|
2606
|
+
return new MappedProblogTheory(null, this.r1k(), this.z39_1.assertAIterable(mapped));
|
|
2607
2607
|
};
|
|
2608
2608
|
protoOf(MappedProblogTheory).assertAIterable = function (clauses) {
|
|
2609
|
-
return this.
|
|
2609
|
+
return this.y1r(clauses);
|
|
2610
2610
|
};
|
|
2611
|
-
protoOf(MappedProblogTheory).
|
|
2611
|
+
protoOf(MappedProblogTheory).b1s = function (clauses) {
|
|
2612
2612
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2613
2613
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2614
2614
|
var destination = ArrayList_init_$Create$_0();
|
|
2615
2615
|
var _iterator__ex2g4s = clauses.n();
|
|
2616
2616
|
while (_iterator__ex2g4s.q()) {
|
|
2617
2617
|
var element = _iterator__ex2g4s.r();
|
|
2618
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2618
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2619
2619
|
addAll(destination, list);
|
|
2620
2620
|
}
|
|
2621
2621
|
var mapped = destination;
|
|
2622
|
-
return new MappedProblogTheory(null, this.
|
|
2622
|
+
return new MappedProblogTheory(null, this.r1k(), this.z39_1.assertZIterable(mapped));
|
|
2623
2623
|
};
|
|
2624
2624
|
protoOf(MappedProblogTheory).assertZIterable = function (clauses) {
|
|
2625
|
-
return this.
|
|
2625
|
+
return this.b1s(clauses);
|
|
2626
2626
|
};
|
|
2627
|
-
protoOf(MappedProblogTheory).
|
|
2627
|
+
protoOf(MappedProblogTheory).f1s = function (clauses) {
|
|
2628
2628
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2629
2629
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2630
2630
|
var destination = ArrayList_init_$Create$_0();
|
|
2631
2631
|
var _iterator__ex2g4s = clauses.n();
|
|
2632
2632
|
while (_iterator__ex2g4s.q()) {
|
|
2633
2633
|
var element = _iterator__ex2g4s.r();
|
|
2634
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2634
|
+
var list = ClauseMappingUtils_getInstance().v39(element);
|
|
2635
2635
|
addAll(destination, list);
|
|
2636
2636
|
}
|
|
2637
2637
|
var mapped = destination;
|
|
2638
|
-
var result = this.
|
|
2638
|
+
var result = this.z39_1.retractIterable(mapped);
|
|
2639
2639
|
var tmp;
|
|
2640
2640
|
if (result instanceof Success) {
|
|
2641
|
-
tmp = new Success(new MappedProblogTheory(null, this.
|
|
2641
|
+
tmp = new Success(new MappedProblogTheory(null, this.r1k(), result.a1t_1), result.b1t_1);
|
|
2642
2642
|
} else {
|
|
2643
|
-
tmp = new Failure(new MappedProblogTheory(null, this.
|
|
2643
|
+
tmp = new Failure(new MappedProblogTheory(null, this.r1k(), result.o1r()));
|
|
2644
2644
|
}
|
|
2645
2645
|
return tmp;
|
|
2646
2646
|
};
|
|
2647
2647
|
protoOf(MappedProblogTheory).retractIterable = function (clauses) {
|
|
2648
|
-
return this.
|
|
2648
|
+
return this.f1s(clauses);
|
|
2649
2649
|
};
|
|
2650
|
-
protoOf(MappedProblogTheory).
|
|
2651
|
-
var mappedClauses = ClauseMappingUtils_getInstance().
|
|
2650
|
+
protoOf(MappedProblogTheory).j1l = function (clause) {
|
|
2651
|
+
var mappedClauses = ClauseMappingUtils_getInstance().v39(clause);
|
|
2652
2652
|
var result = null;
|
|
2653
2653
|
var _iterator__ex2g4s = mappedClauses.n();
|
|
2654
2654
|
while (_iterator__ex2g4s.q()) {
|
|
@@ -2660,152 +2660,152 @@
|
|
|
2660
2660
|
tmp = !(result instanceof Failure);
|
|
2661
2661
|
}
|
|
2662
2662
|
if (tmp) {
|
|
2663
|
-
result = this.
|
|
2663
|
+
result = this.z39_1.retractAll(c);
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
2666
2666
|
var tmp_0;
|
|
2667
2667
|
if (result instanceof Success) {
|
|
2668
|
-
tmp_0 = new Success(new MappedProblogTheory(null, this.
|
|
2668
|
+
tmp_0 = new Success(new MappedProblogTheory(null, this.r1k(), result.a1t_1), result.b1t_1);
|
|
2669
2669
|
} else {
|
|
2670
2670
|
tmp_0 = new Failure(this);
|
|
2671
2671
|
}
|
|
2672
2672
|
return tmp_0;
|
|
2673
2673
|
};
|
|
2674
2674
|
protoOf(MappedProblogTheory).retractAll = function (clause) {
|
|
2675
|
-
return this.
|
|
2675
|
+
return this.j1l(clause);
|
|
2676
2676
|
};
|
|
2677
|
-
protoOf(MappedProblogTheory).
|
|
2678
|
-
return new MappedProblogTheory(null, this.
|
|
2677
|
+
protoOf(MappedProblogTheory).n1r = function (indicator) {
|
|
2678
|
+
return new MappedProblogTheory(null, this.r1k(), this.z39_1.abolish(ClauseMappingUtils_getInstance().w39(indicator)));
|
|
2679
2679
|
};
|
|
2680
2680
|
protoOf(MappedProblogTheory).abolish = function (indicator) {
|
|
2681
|
-
return this.
|
|
2681
|
+
return this.n1r(indicator);
|
|
2682
2682
|
};
|
|
2683
|
-
protoOf(MappedProblogTheory).
|
|
2684
|
-
return this.
|
|
2683
|
+
protoOf(MappedProblogTheory).v1s = function (struct) {
|
|
2684
|
+
return this.w1r(Companion_instance.of(struct));
|
|
2685
2685
|
};
|
|
2686
2686
|
protoOf(MappedProblogTheory).assertAFact = function (struct) {
|
|
2687
|
-
return this.
|
|
2687
|
+
return this.v1s(struct);
|
|
2688
2688
|
};
|
|
2689
|
-
protoOf(MappedProblogTheory).
|
|
2690
|
-
return this.
|
|
2689
|
+
protoOf(MappedProblogTheory).w1s = function (struct) {
|
|
2690
|
+
return this.a1s(Companion_instance.of(struct));
|
|
2691
2691
|
};
|
|
2692
2692
|
protoOf(MappedProblogTheory).assertZFact = function (struct) {
|
|
2693
|
-
return this.
|
|
2693
|
+
return this.w1s(struct);
|
|
2694
2694
|
};
|
|
2695
|
-
protoOf(MappedProblogTheory).
|
|
2696
|
-
return this.
|
|
2695
|
+
protoOf(MappedProblogTheory).w1r = function (clause) {
|
|
2696
|
+
return this.y1r(listOf(clause));
|
|
2697
2697
|
};
|
|
2698
2698
|
protoOf(MappedProblogTheory).assertA = function (clause) {
|
|
2699
|
-
return this.
|
|
2699
|
+
return this.w1r(clause);
|
|
2700
2700
|
};
|
|
2701
|
-
protoOf(MappedProblogTheory).
|
|
2702
|
-
return this.
|
|
2701
|
+
protoOf(MappedProblogTheory).z1r = function (clauses) {
|
|
2702
|
+
return this.y1r(asIterable_0(clauses));
|
|
2703
2703
|
};
|
|
2704
2704
|
protoOf(MappedProblogTheory).assertASequence = function (clauses) {
|
|
2705
|
-
return this.
|
|
2705
|
+
return this.z1r(clauses);
|
|
2706
2706
|
};
|
|
2707
|
-
protoOf(MappedProblogTheory).
|
|
2708
|
-
return this.
|
|
2707
|
+
protoOf(MappedProblogTheory).a1s = function (clause) {
|
|
2708
|
+
return this.b1s(listOf(clause));
|
|
2709
2709
|
};
|
|
2710
2710
|
protoOf(MappedProblogTheory).assertZ = function (clause) {
|
|
2711
|
-
return this.
|
|
2711
|
+
return this.a1s(clause);
|
|
2712
2712
|
};
|
|
2713
|
-
protoOf(MappedProblogTheory).
|
|
2714
|
-
return this.
|
|
2713
|
+
protoOf(MappedProblogTheory).c1s = function (clauses) {
|
|
2714
|
+
return this.b1s(asIterable_0(clauses));
|
|
2715
2715
|
};
|
|
2716
2716
|
protoOf(MappedProblogTheory).assertZSequence = function (clauses) {
|
|
2717
|
-
return this.
|
|
2717
|
+
return this.c1s(clauses);
|
|
2718
2718
|
};
|
|
2719
|
-
protoOf(MappedProblogTheory).
|
|
2720
|
-
return this.
|
|
2719
|
+
protoOf(MappedProblogTheory).y1s = function (head) {
|
|
2720
|
+
return this.x1s(Companion_instance_3.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2721
2721
|
};
|
|
2722
2722
|
protoOf(MappedProblogTheory).retractByHead = function (head) {
|
|
2723
|
-
return this.
|
|
2723
|
+
return this.y1s(head);
|
|
2724
2724
|
};
|
|
2725
|
-
protoOf(MappedProblogTheory).
|
|
2726
|
-
return this.
|
|
2725
|
+
protoOf(MappedProblogTheory).x1s = function (clause) {
|
|
2726
|
+
return this.f1s(listOf(clause));
|
|
2727
2727
|
};
|
|
2728
2728
|
protoOf(MappedProblogTheory).retract = function (clause) {
|
|
2729
|
-
return this.
|
|
2729
|
+
return this.x1s(clause);
|
|
2730
2730
|
};
|
|
2731
|
-
protoOf(MappedProblogTheory).
|
|
2732
|
-
return this.
|
|
2731
|
+
protoOf(MappedProblogTheory).e1s = function (clauses) {
|
|
2732
|
+
return this.f1s(asIterable_0(clauses));
|
|
2733
2733
|
};
|
|
2734
2734
|
protoOf(MappedProblogTheory).retractSequence = function (clauses) {
|
|
2735
|
-
return this.
|
|
2735
|
+
return this.e1s(clauses);
|
|
2736
2736
|
};
|
|
2737
|
-
protoOf(MappedProblogTheory).
|
|
2738
|
-
return this.
|
|
2737
|
+
protoOf(MappedProblogTheory).z1s = function (head) {
|
|
2738
|
+
return this.j1l(Companion_instance_3.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2739
2739
|
};
|
|
2740
2740
|
protoOf(MappedProblogTheory).retractAllByHead = function (head) {
|
|
2741
|
-
return this.
|
|
2741
|
+
return this.z1s(head);
|
|
2742
2742
|
};
|
|
2743
2743
|
protoOf(MappedProblogTheory).setUnificator = function (unificator) {
|
|
2744
|
-
return this.
|
|
2744
|
+
return this.z39_1.setUnificator(unificator);
|
|
2745
2745
|
};
|
|
2746
2746
|
protoOf(MappedProblogTheory).contains = function (clause) {
|
|
2747
|
-
return this.
|
|
2747
|
+
return this.z39_1.contains(clause);
|
|
2748
2748
|
};
|
|
2749
2749
|
protoOf(MappedProblogTheory).containsHead = function (head) {
|
|
2750
|
-
return this.
|
|
2750
|
+
return this.z39_1.containsHead(head);
|
|
2751
2751
|
};
|
|
2752
2752
|
protoOf(MappedProblogTheory).containsIndicator = function (indicator) {
|
|
2753
|
-
return this.
|
|
2753
|
+
return this.z39_1.containsIndicator(indicator);
|
|
2754
2754
|
};
|
|
2755
2755
|
protoOf(MappedProblogTheory).get = function (clause) {
|
|
2756
|
-
return this.
|
|
2756
|
+
return this.z39_1.get(clause);
|
|
2757
2757
|
};
|
|
2758
2758
|
protoOf(MappedProblogTheory).getByHead = function (head) {
|
|
2759
|
-
return this.
|
|
2759
|
+
return this.z39_1.getByHead(head);
|
|
2760
2760
|
};
|
|
2761
2761
|
protoOf(MappedProblogTheory).getByIndicator = function (indicator) {
|
|
2762
|
-
return this.
|
|
2762
|
+
return this.z39_1.getByIndicator(indicator);
|
|
2763
2763
|
};
|
|
2764
2764
|
protoOf(MappedProblogTheory).toStringAsProlog = function (asPrologText) {
|
|
2765
|
-
return this.
|
|
2765
|
+
return this.z39_1.toStringAsProlog(asPrologText);
|
|
2766
2766
|
};
|
|
2767
2767
|
protoOf(MappedProblogTheory).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
2768
|
-
return this.
|
|
2768
|
+
return this.z39_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
2769
2769
|
};
|
|
2770
2770
|
protoOf(MappedProblogTheory).clone = function () {
|
|
2771
|
-
return this.
|
|
2771
|
+
return this.z39_1.clone();
|
|
2772
2772
|
};
|
|
2773
|
-
protoOf(MappedProblogTheory).
|
|
2774
|
-
return this.
|
|
2773
|
+
protoOf(MappedProblogTheory).b1l = function () {
|
|
2774
|
+
return this.z39_1.b1l();
|
|
2775
2775
|
};
|
|
2776
|
-
protoOf(MappedProblogTheory).
|
|
2777
|
-
return this.
|
|
2776
|
+
protoOf(MappedProblogTheory).u1k = function () {
|
|
2777
|
+
return this.z39_1.u1k();
|
|
2778
2778
|
};
|
|
2779
|
-
protoOf(MappedProblogTheory).
|
|
2780
|
-
return this.
|
|
2779
|
+
protoOf(MappedProblogTheory).w1k = function () {
|
|
2780
|
+
return this.z39_1.w1k();
|
|
2781
2781
|
};
|
|
2782
|
-
protoOf(MappedProblogTheory).
|
|
2783
|
-
return this.
|
|
2782
|
+
protoOf(MappedProblogTheory).r1r = function () {
|
|
2783
|
+
return this.z39_1.r1r();
|
|
2784
2784
|
};
|
|
2785
2785
|
protoOf(MappedProblogTheory).n = function () {
|
|
2786
|
-
return this.
|
|
2786
|
+
return this.z39_1.n();
|
|
2787
2787
|
};
|
|
2788
2788
|
protoOf(MappedProblogTheory).getTag = function (name) {
|
|
2789
|
-
return this.
|
|
2789
|
+
return this.z39_1.getTag(name);
|
|
2790
2790
|
};
|
|
2791
2791
|
protoOf(MappedProblogTheory).resetTags = function (tags) {
|
|
2792
|
-
return this.
|
|
2792
|
+
return this.z39_1.resetTags(tags);
|
|
2793
2793
|
};
|
|
2794
2794
|
protoOf(MappedProblogTheory).containsTag = function (name) {
|
|
2795
|
-
return this.
|
|
2795
|
+
return this.z39_1.containsTag(name);
|
|
2796
2796
|
};
|
|
2797
2797
|
protoOf(MappedProblogTheory).lr = function () {
|
|
2798
|
-
return this.
|
|
2798
|
+
return this.z39_1.lr();
|
|
2799
2799
|
};
|
|
2800
|
-
protoOf(MappedProblogTheory).
|
|
2801
|
-
return this.
|
|
2800
|
+
protoOf(MappedProblogTheory).r1k = function () {
|
|
2801
|
+
return this.z39_1.r1k();
|
|
2802
2802
|
};
|
|
2803
2803
|
function NothingClauseMapper() {
|
|
2804
2804
|
}
|
|
2805
|
-
protoOf(NothingClauseMapper).
|
|
2805
|
+
protoOf(NothingClauseMapper).j39 = function (clause) {
|
|
2806
2806
|
return true;
|
|
2807
2807
|
};
|
|
2808
|
-
protoOf(NothingClauseMapper).
|
|
2808
|
+
protoOf(NothingClauseMapper).k39 = function (clause) {
|
|
2809
2809
|
return listOf(clause);
|
|
2810
2810
|
};
|
|
2811
2811
|
var NothingClauseMapper_instance;
|
|
@@ -2814,7 +2814,7 @@
|
|
|
2814
2814
|
}
|
|
2815
2815
|
function ProbabilisticClauseMapper() {
|
|
2816
2816
|
}
|
|
2817
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2817
|
+
protoOf(ProbabilisticClauseMapper).j39 = function (clause) {
|
|
2818
2818
|
var tmp;
|
|
2819
2819
|
if (isInterface(clause, Rule)) {
|
|
2820
2820
|
tmp = clause.dw().xt() === '::';
|
|
@@ -2823,14 +2823,14 @@
|
|
|
2823
2823
|
}
|
|
2824
2824
|
return tmp;
|
|
2825
2825
|
};
|
|
2826
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2826
|
+
protoOf(ProbabilisticClauseMapper).k39 = function (clause) {
|
|
2827
2827
|
if (!isInterface(clause, Rule)) {
|
|
2828
2828
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause.toString());
|
|
2829
2829
|
}
|
|
2830
|
-
var mapped = this.
|
|
2831
|
-
return listOf(this.
|
|
2830
|
+
var mapped = this.l39(clause);
|
|
2831
|
+
return listOf(this.m39(mapped.first, Companion_getInstance_11().y38(mapped.second)));
|
|
2832
2832
|
};
|
|
2833
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2833
|
+
protoOf(ProbabilisticClauseMapper).l39 = function (rule) {
|
|
2834
2834
|
if (!(rule.dw().rt() === 2)) {
|
|
2835
2835
|
throw TuPrologException_init_$Create$('Invalid probabilistic rule: ' + rule.dw().toString());
|
|
2836
2836
|
}
|
|
@@ -2858,10 +2858,10 @@
|
|
|
2858
2858
|
headTerm = anonVariablesFix.dw();
|
|
2859
2859
|
bodyTerm = anonVariablesFix.ew();
|
|
2860
2860
|
var extraVariables = get_extraVariables(Companion_instance_3.of(headTerm, [bodyTerm]));
|
|
2861
|
-
var probTerm_0 = new ProbTerm(ClauseMappingUtils_getInstance().
|
|
2861
|
+
var probTerm_0 = new ProbTerm(ClauseMappingUtils_getInstance().u39(), probability, headTerm, extraVariables);
|
|
2862
2862
|
return new Pair(Companion_instance_3.of(headTerm, [bodyTerm]), probTerm_0);
|
|
2863
2863
|
};
|
|
2864
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2864
|
+
protoOf(ProbabilisticClauseMapper).m39 = function (rule, explanation) {
|
|
2865
2865
|
var tmp = rule.ew();
|
|
2866
2866
|
if (isInterface(tmp, Truth)) {
|
|
2867
2867
|
return Companion_instance_3.of(withExplanation(rule.dw(), toTerm(explanation)), [rule.ew()]);
|
|
@@ -2883,16 +2883,16 @@
|
|
|
2883
2883
|
}
|
|
2884
2884
|
function PrologClauseMapper() {
|
|
2885
2885
|
}
|
|
2886
|
-
protoOf(PrologClauseMapper).
|
|
2886
|
+
protoOf(PrologClauseMapper).j39 = function (clause) {
|
|
2887
2887
|
return isInterface(clause, Rule);
|
|
2888
2888
|
};
|
|
2889
|
-
protoOf(PrologClauseMapper).
|
|
2889
|
+
protoOf(PrologClauseMapper).k39 = function (clause) {
|
|
2890
2890
|
if (!isInterface(clause, Rule)) {
|
|
2891
2891
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause.toString());
|
|
2892
2892
|
}
|
|
2893
2893
|
var tmp = clause.ew();
|
|
2894
2894
|
if (isInterface(tmp, Truth)) {
|
|
2895
|
-
return listOf(Companion_instance_3.of(withExplanation(clause.dw(), toTerm(Companion_getInstance_11().
|
|
2895
|
+
return listOf(Companion_instance_3.of(withExplanation(clause.dw(), toTerm(Companion_getInstance_11().u38_1)), [clause.ew()]));
|
|
2896
2896
|
}
|
|
2897
2897
|
var explanationVar = Companion_getInstance_0().of('EXPL_Res');
|
|
2898
2898
|
return listOf(Companion_instance_3.of(withExplanation(clause.dw(), explanationVar), [withBodyExplanation(clause.ew(), explanationVar)]));
|
|
@@ -2902,17 +2902,17 @@
|
|
|
2902
2902
|
return PrologClauseMapper_instance;
|
|
2903
2903
|
}
|
|
2904
2904
|
function _get_prob__dc6m52($this, $receiver) {
|
|
2905
|
-
return $receiver.
|
|
2905
|
+
return $receiver.r37_1.g39();
|
|
2906
2906
|
}
|
|
2907
2907
|
function ProbExplAnd() {
|
|
2908
2908
|
ProbExplAnd_instance = this;
|
|
2909
2909
|
NonBacktrackable.call(this, 'prob_expl_and');
|
|
2910
2910
|
}
|
|
2911
|
-
protoOf(ProbExplAnd).
|
|
2912
|
-
Companion_getInstance_9().
|
|
2913
|
-
Companion_getInstance_9().
|
|
2914
|
-
if (ProbSetConfig_getInstance().
|
|
2915
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
2911
|
+
protoOf(ProbExplAnd).l2o = function (_this__u8e3s4, first, second, third) {
|
|
2912
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 1);
|
|
2913
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 1);
|
|
2914
|
+
if (ProbSetConfig_getInstance().b3a(_this__u8e3s4.context)) {
|
|
2915
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().n2f(_this__u8e3s4, first, toTerm(Companion_getInstance_11().u38_1)), VOID, []);
|
|
2916
2916
|
}
|
|
2917
2917
|
var tmp;
|
|
2918
2918
|
var tmp_0;
|
|
@@ -2928,12 +2928,12 @@
|
|
|
2928
2928
|
tmp_0 = false;
|
|
2929
2929
|
}
|
|
2930
2930
|
if (tmp_0) {
|
|
2931
|
-
var explanation = _get_prob__dc6m52(this, second) === 0.0 || _get_prob__dc6m52(this, third) === 0.0 ? Companion_getInstance_11().
|
|
2931
|
+
var explanation = _get_prob__dc6m52(this, second) === 0.0 || _get_prob__dc6m52(this, third) === 0.0 ? Companion_getInstance_11().t38_1 : _get_prob__dc6m52(this, second) === 1.0 && _get_prob__dc6m52(this, third) === 1.0 ? Companion_getInstance_11().u38_1 : _get_prob__dc6m52(this, second) === 1.0 ? third.r37_1 : _get_prob__dc6m52(this, third) === 1.0 ? second.r37_1 : second.r37_1.and(third.r37_1);
|
|
2932
2932
|
var tmp_2;
|
|
2933
|
-
if (explanation.
|
|
2933
|
+
if (explanation.g39() === 0.0) {
|
|
2934
2934
|
tmp_2 = _this__u8e3s4.replyWithCondition(false, VOID, []);
|
|
2935
2935
|
} else {
|
|
2936
|
-
tmp_2 = _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
2936
|
+
tmp_2 = _this__u8e3s4.replyWith(Companion_getInstance_9().n2f(_this__u8e3s4, first, new ProbExplanationTerm(explanation)), VOID, []);
|
|
2937
2937
|
}
|
|
2938
2938
|
tmp = tmp_2;
|
|
2939
2939
|
} else {
|
|
@@ -2943,8 +2943,8 @@
|
|
|
2943
2943
|
}
|
|
2944
2944
|
return tmp;
|
|
2945
2945
|
};
|
|
2946
|
-
protoOf(ProbExplAnd).
|
|
2947
|
-
return this.
|
|
2946
|
+
protoOf(ProbExplAnd).t2h = function (_this__u8e3s4, first, second, third) {
|
|
2947
|
+
return this.l2o(_this__u8e3s4, first, second, third);
|
|
2948
2948
|
};
|
|
2949
2949
|
var ProbExplAnd_instance;
|
|
2950
2950
|
function ProbExplAnd_getInstance() {
|
|
@@ -2953,22 +2953,22 @@
|
|
|
2953
2953
|
return ProbExplAnd_instance;
|
|
2954
2954
|
}
|
|
2955
2955
|
function ProbHelper$computeAllSubstitutions$slambda($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation) {
|
|
2956
|
-
this.
|
|
2957
|
-
this.
|
|
2958
|
-
this.
|
|
2959
|
-
this.
|
|
2960
|
-
this.
|
|
2961
|
-
this.
|
|
2956
|
+
this.k3a_1 = $goal;
|
|
2957
|
+
this.l3a_1 = $this_computeAllSubstitutions;
|
|
2958
|
+
this.m3a_1 = $third;
|
|
2959
|
+
this.n3a_1 = $first;
|
|
2960
|
+
this.o3a_1 = $second;
|
|
2961
|
+
this.p3a_1 = $goalSignature;
|
|
2962
2962
|
CoroutineImpl.call(this, resultContinuation);
|
|
2963
2963
|
}
|
|
2964
|
-
protoOf(ProbHelper$computeAllSubstitutions$slambda).
|
|
2965
|
-
var tmp = this.
|
|
2964
|
+
protoOf(ProbHelper$computeAllSubstitutions$slambda).c2q = function ($this$sequence, $completion) {
|
|
2965
|
+
var tmp = this.d2q($this$sequence, $completion);
|
|
2966
2966
|
tmp.d8_1 = Unit_instance;
|
|
2967
2967
|
tmp.e8_1 = null;
|
|
2968
2968
|
return tmp.j8();
|
|
2969
2969
|
};
|
|
2970
2970
|
protoOf(ProbHelper$computeAllSubstitutions$slambda).a9 = function (p1, $completion) {
|
|
2971
|
-
return this.
|
|
2971
|
+
return this.c2q(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
2972
2972
|
};
|
|
2973
2973
|
protoOf(ProbHelper$computeAllSubstitutions$slambda).j8 = function () {
|
|
2974
2974
|
var suspendResult = this.d8_1;
|
|
@@ -2978,27 +2978,27 @@
|
|
|
2978
2978
|
switch (tmp) {
|
|
2979
2979
|
case 0:
|
|
2980
2980
|
this.c8_1 = 18;
|
|
2981
|
-
var tmp0_subject = this.
|
|
2981
|
+
var tmp0_subject = this.k3a_1.xt();
|
|
2982
2982
|
switch (tmp0_subject) {
|
|
2983
2983
|
case '\\+':
|
|
2984
2984
|
case 'not':
|
|
2985
2985
|
this.b8_1 = 16;
|
|
2986
2986
|
var tmp_0;
|
|
2987
|
-
if (ProbSetConfig_getInstance().
|
|
2987
|
+
if (ProbSetConfig_getInstance().b3a(this.l3a_1.context)) {
|
|
2988
2988
|
var tmp_1 = Companion_getInstance_9();
|
|
2989
2989
|
var tmp_2 = Companion_getInstance_1();
|
|
2990
|
-
var tmp_3 = this.
|
|
2990
|
+
var tmp_3 = this.k3a_1.xt();
|
|
2991
2991
|
var tmp_4 = Companion_getInstance_1();
|
|
2992
2992
|
var this_0 = Prob_getInstance();
|
|
2993
|
-
tmp_0 = tmp_1.
|
|
2993
|
+
tmp_0 = tmp_1.n2f(this.l3a_1, this.m3a_1, tmp_2.of(tmp_3, [tmp_4.of(this_0.signature.name, [Companion_getInstance_0().anonymous(), this.k3a_1.get(0)])])).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1)));
|
|
2994
2994
|
} else {
|
|
2995
2995
|
var tmp_5 = Companion_getInstance_9();
|
|
2996
2996
|
var tmp_6 = Companion_getInstance_1();
|
|
2997
2997
|
var this_1 = ProbNegationAsFailure_getInstance();
|
|
2998
|
-
tmp_0 = tmp_5.
|
|
2998
|
+
tmp_0 = tmp_5.n2f(this.l3a_1, this.m3a_1, tmp_6.of(this_1.signature.name, [this.n3a_1, this.k3a_1.get(0)]));
|
|
2999
2999
|
}
|
|
3000
3000
|
|
|
3001
|
-
suspendResult = this.
|
|
3001
|
+
suspendResult = this.q3a_1.bd(tmp_0, this);
|
|
3002
3002
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3003
3003
|
return suspendResult;
|
|
3004
3004
|
}
|
|
@@ -3011,13 +3011,13 @@
|
|
|
3011
3011
|
case '->':
|
|
3012
3012
|
this.b8_1 = 15;
|
|
3013
3013
|
var tmp_7;
|
|
3014
|
-
if (ProbSetConfig_getInstance().
|
|
3015
|
-
tmp_7 = Companion_getInstance_9().
|
|
3014
|
+
if (ProbSetConfig_getInstance().b3a(this.l3a_1.context)) {
|
|
3015
|
+
tmp_7 = Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, withBodyExplanation(this.k3a_1, Companion_getInstance_0().anonymous())).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1)));
|
|
3016
3016
|
} else {
|
|
3017
|
-
tmp_7 = Companion_getInstance_9().
|
|
3017
|
+
tmp_7 = Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, withBodyExplanation(this.k3a_1, this.n3a_1));
|
|
3018
3018
|
}
|
|
3019
3019
|
|
|
3020
|
-
suspendResult = this.
|
|
3020
|
+
suspendResult = this.q3a_1.bd(tmp_7, this);
|
|
3021
3021
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3022
3022
|
return suspendResult;
|
|
3023
3023
|
}
|
|
@@ -3025,9 +3025,9 @@
|
|
|
3025
3025
|
continue $sm;
|
|
3026
3026
|
default:
|
|
3027
3027
|
if (tmp0_subject === 'call') {
|
|
3028
|
-
var newGoal = this.
|
|
3028
|
+
var newGoal = this.k3a_1.get(0);
|
|
3029
3029
|
this.b8_1 = 14;
|
|
3030
|
-
suspendResult = this.
|
|
3030
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, Companion_instance_0.of(Companion_getInstance_1().of('ensure_executable', [newGoal]), Companion_getInstance_1().of(this.k3a_1.xt(), [withBodyExplanation(newGoal, this.n3a_1)]))), this);
|
|
3031
3031
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3032
3032
|
return suspendResult;
|
|
3033
3033
|
}
|
|
@@ -3035,18 +3035,18 @@
|
|
|
3035
3035
|
} else {
|
|
3036
3036
|
if (tmp0_subject === 'catch') {
|
|
3037
3037
|
this.b8_1 = 13;
|
|
3038
|
-
suspendResult = this.
|
|
3038
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, Companion_getInstance_1().of(this.k3a_1.xt(), [withBodyExplanation(this.k3a_1.get(0), this.n3a_1), this.k3a_1.get(1), withBodyExplanation(this.k3a_1.get(2), this.n3a_1)])), this);
|
|
3039
3039
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3040
3040
|
return suspendResult;
|
|
3041
3041
|
}
|
|
3042
3042
|
continue $sm;
|
|
3043
3043
|
} else {
|
|
3044
3044
|
if (tmp0_subject === 'findall') {
|
|
3045
|
-
var this_2 = this.
|
|
3045
|
+
var this_2 = this.k3a_1.yt();
|
|
3046
3046
|
var goalArgs = copyToArray(this_2);
|
|
3047
3047
|
goalArgs[1] = withBodyExplanation(goalArgs[1], Companion_getInstance_0().anonymous());
|
|
3048
3048
|
this.b8_1 = 12;
|
|
3049
|
-
suspendResult = this.
|
|
3049
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, Companion_getInstance_1().of(this.k3a_1.xt(), goalArgs.slice())).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1))), this);
|
|
3050
3050
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3051
3051
|
return suspendResult;
|
|
3052
3052
|
}
|
|
@@ -3056,7 +3056,7 @@
|
|
|
3056
3056
|
case 'assert':
|
|
3057
3057
|
case 'asserta':
|
|
3058
3058
|
case 'assertz':
|
|
3059
|
-
var subGoal = this.
|
|
3059
|
+
var subGoal = this.k3a_1.get(0);
|
|
3060
3060
|
var tmp_8;
|
|
3061
3061
|
if (isInterface(subGoal, Clause)) {
|
|
3062
3062
|
tmp_8 = extractSignature(ensureNotNull(subGoal.dw()));
|
|
@@ -3066,7 +3066,7 @@
|
|
|
3066
3066
|
|
|
3067
3067
|
var subGoalSignature = tmp_8;
|
|
3068
3068
|
var tmp_9;
|
|
3069
|
-
if (this.
|
|
3069
|
+
if (this.l3a_1.context.o1u().containsSignature(subGoalSignature)) {
|
|
3070
3070
|
tmp_9 = true;
|
|
3071
3071
|
} else {
|
|
3072
3072
|
var tmp_10;
|
|
@@ -3080,7 +3080,7 @@
|
|
|
3080
3080
|
|
|
3081
3081
|
if (tmp_9) {
|
|
3082
3082
|
this.b8_1 = 10;
|
|
3083
|
-
suspendResult = this.
|
|
3083
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, this.k3a_1).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1))), this);
|
|
3084
3084
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3085
3085
|
return suspendResult;
|
|
3086
3086
|
}
|
|
@@ -3088,10 +3088,10 @@
|
|
|
3088
3088
|
} else {
|
|
3089
3089
|
var tmp_11;
|
|
3090
3090
|
if (isInterface(subGoal, Clause)) {
|
|
3091
|
-
tmp_11 = ClauseMappingUtils_getInstance().
|
|
3091
|
+
tmp_11 = ClauseMappingUtils_getInstance().v39(subGoal);
|
|
3092
3092
|
} else {
|
|
3093
3093
|
if (isInterface(subGoal, Struct)) {
|
|
3094
|
-
var this_3 = ClauseMappingUtils_getInstance().
|
|
3094
|
+
var this_3 = ClauseMappingUtils_getInstance().v39(Companion_instance.of(subGoal));
|
|
3095
3095
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
|
|
3096
3096
|
var _iterator__ex2g4s = this_3.n();
|
|
3097
3097
|
while (_iterator__ex2g4s.q()) {
|
|
@@ -3109,9 +3109,9 @@
|
|
|
3109
3109
|
var _iterator__ex2g4s_0 = newGoals.n();
|
|
3110
3110
|
while (_iterator__ex2g4s_0.q()) {
|
|
3111
3111
|
var item_0 = _iterator__ex2g4s_0.r();
|
|
3112
|
-
destination_0.l(Companion_getInstance_9().
|
|
3112
|
+
destination_0.l(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, Companion_getInstance_1().of(this.k3a_1.xt(), [item_0])).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1))));
|
|
3113
3113
|
}
|
|
3114
|
-
suspendResult = this.
|
|
3114
|
+
suspendResult = this.q3a_1.dd(destination_0, this);
|
|
3115
3115
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3116
3116
|
return suspendResult;
|
|
3117
3117
|
}
|
|
@@ -3122,11 +3122,11 @@
|
|
|
3122
3122
|
switch (tmp0_subject) {
|
|
3123
3123
|
case 'retract':
|
|
3124
3124
|
case 'retractall':
|
|
3125
|
-
var goalArg = this.
|
|
3125
|
+
var goalArg = this.k3a_1.get(0);
|
|
3126
3126
|
this.b8_1 = 8;
|
|
3127
3127
|
var tmp_12 = Companion_getInstance_9();
|
|
3128
3128
|
var tmp_13 = Companion_getInstance_1();
|
|
3129
|
-
var tmp_14 = this.
|
|
3129
|
+
var tmp_14 = this.k3a_1.xt();
|
|
3130
3130
|
var tmp_15;
|
|
3131
3131
|
var tmp_16;
|
|
3132
3132
|
var tmp_17;
|
|
@@ -3145,16 +3145,16 @@
|
|
|
3145
3145
|
if (tmp_17) {
|
|
3146
3146
|
tmp_16 = true;
|
|
3147
3147
|
} else {
|
|
3148
|
-
tmp_16 = this.
|
|
3148
|
+
tmp_16 = this.l3a_1.context.o1u().containsSignature(extractSignature(safeToStruct(goalArg)));
|
|
3149
3149
|
}
|
|
3150
3150
|
|
|
3151
3151
|
if (tmp_16) {
|
|
3152
3152
|
tmp_15 = goalArg;
|
|
3153
3153
|
} else {
|
|
3154
|
-
tmp_15 = withExplanation(goalArg, this.
|
|
3154
|
+
tmp_15 = withExplanation(goalArg, this.n3a_1);
|
|
3155
3155
|
}
|
|
3156
3156
|
|
|
3157
|
-
suspendResult = this.
|
|
3157
|
+
suspendResult = this.q3a_1.bd(tmp_12.n2f(this.l3a_1, this.m3a_1, tmp_13.of(tmp_14, [tmp_15])), this);
|
|
3158
3158
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3159
3159
|
return suspendResult;
|
|
3160
3160
|
}
|
|
@@ -3162,23 +3162,23 @@
|
|
|
3162
3162
|
continue $sm;
|
|
3163
3163
|
default:
|
|
3164
3164
|
if (tmp0_subject === 'clause') {
|
|
3165
|
-
var subGoal_0 = this.
|
|
3165
|
+
var subGoal_0 = this.k3a_1.get(0);
|
|
3166
3166
|
var tmp_19;
|
|
3167
3167
|
if (!isInterface(subGoal_0, Struct)) {
|
|
3168
3168
|
tmp_19 = true;
|
|
3169
3169
|
} else {
|
|
3170
|
-
tmp_19 = this.
|
|
3170
|
+
tmp_19 = this.l3a_1.context.o1u().hasProtected(extractSignature(subGoal_0));
|
|
3171
3171
|
}
|
|
3172
3172
|
if (tmp_19) {
|
|
3173
3173
|
this.b8_1 = 6;
|
|
3174
|
-
suspendResult = this.
|
|
3174
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, this.k3a_1).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1))), this);
|
|
3175
3175
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3176
3176
|
return suspendResult;
|
|
3177
3177
|
}
|
|
3178
3178
|
continue $sm;
|
|
3179
3179
|
} else {
|
|
3180
3180
|
this.b8_1 = 5;
|
|
3181
|
-
suspendResult = this.
|
|
3181
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, Companion_getInstance_1().of(this.k3a_1.xt(), [withExplanation(this.k3a_1.get(0), this.n3a_1), this.k3a_1.get(1)])), this);
|
|
3182
3182
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3183
3183
|
return suspendResult;
|
|
3184
3184
|
}
|
|
@@ -3187,16 +3187,16 @@
|
|
|
3187
3187
|
} else {
|
|
3188
3188
|
var tmp_20 = this;
|
|
3189
3189
|
var tmp_21;
|
|
3190
|
-
var tmp_22 = this.
|
|
3190
|
+
var tmp_22 = this.o3a_1;
|
|
3191
3191
|
if (isInterface(tmp_22, Truth)) {
|
|
3192
3192
|
tmp_21 = true;
|
|
3193
3193
|
} else {
|
|
3194
|
-
tmp_21 = this.
|
|
3194
|
+
tmp_21 = this.l3a_1.context.o1u().containsSignature(this.p3a_1);
|
|
3195
3195
|
}
|
|
3196
|
-
tmp_20.
|
|
3197
|
-
if (this.
|
|
3196
|
+
tmp_20.r3a_1 = tmp_21;
|
|
3197
|
+
if (this.r3a_1 || this.l3a_1.context.q1u().containsIndicator(this.p3a_1.toIndicator()) || this.l3a_1.context.r1u().containsIndicator(this.p3a_1.toIndicator())) {
|
|
3198
3198
|
this.b8_1 = 1;
|
|
3199
|
-
suspendResult = this.
|
|
3199
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, this.k3a_1).plus(Companion_getInstance_9().n2f(this.l3a_1, this.n3a_1, toTerm(Companion_getInstance_11().u38_1))), this);
|
|
3200
3200
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3201
3201
|
return suspendResult;
|
|
3202
3202
|
}
|
|
@@ -3226,9 +3226,9 @@
|
|
|
3226
3226
|
this.b8_1 = 2;
|
|
3227
3227
|
continue $sm;
|
|
3228
3228
|
case 2:
|
|
3229
|
-
if (!this.
|
|
3229
|
+
if (!this.r3a_1) {
|
|
3230
3230
|
this.b8_1 = 3;
|
|
3231
|
-
suspendResult = this.
|
|
3231
|
+
suspendResult = this.q3a_1.bd(Companion_getInstance_9().n2f(this.l3a_1, this.m3a_1, withExplanation(this.k3a_1, this.n3a_1)), this);
|
|
3232
3232
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3233
3233
|
return suspendResult;
|
|
3234
3234
|
}
|
|
@@ -3296,30 +3296,30 @@
|
|
|
3296
3296
|
}
|
|
3297
3297
|
while (true);
|
|
3298
3298
|
};
|
|
3299
|
-
protoOf(ProbHelper$computeAllSubstitutions$slambda).
|
|
3300
|
-
var i = new ProbHelper$computeAllSubstitutions$slambda(this.
|
|
3301
|
-
i.
|
|
3299
|
+
protoOf(ProbHelper$computeAllSubstitutions$slambda).d2q = function ($this$sequence, completion) {
|
|
3300
|
+
var i = new ProbHelper$computeAllSubstitutions$slambda(this.k3a_1, this.l3a_1, this.m3a_1, this.n3a_1, this.o3a_1, this.p3a_1, completion);
|
|
3301
|
+
i.q3a_1 = $this$sequence;
|
|
3302
3302
|
return i;
|
|
3303
3303
|
};
|
|
3304
3304
|
function ProbHelper$computeAllSubstitutions$slambda_0($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation) {
|
|
3305
3305
|
var i = new ProbHelper$computeAllSubstitutions$slambda($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation);
|
|
3306
3306
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
3307
|
-
return i.
|
|
3307
|
+
return i.c2q($this$sequence, $completion);
|
|
3308
3308
|
}, 1);
|
|
3309
3309
|
}
|
|
3310
3310
|
function ProbHelper() {
|
|
3311
3311
|
ProbHelper_instance = this;
|
|
3312
3312
|
WithoutSideEffects.call(this, 'prob_helper');
|
|
3313
3313
|
}
|
|
3314
|
-
protoOf(ProbHelper).
|
|
3315
|
-
Companion_getInstance_9().
|
|
3316
|
-
Companion_getInstance_9().
|
|
3314
|
+
protoOf(ProbHelper).d2m = function (_this__u8e3s4, first, second, third) {
|
|
3315
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 1);
|
|
3316
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 1);
|
|
3317
3317
|
var goal = safeToStruct(second);
|
|
3318
3318
|
var goalSignature = extractSignature(goal);
|
|
3319
3319
|
return sequence(ProbHelper$computeAllSubstitutions$slambda_0(goal, _this__u8e3s4, third, first, second, goalSignature, null));
|
|
3320
3320
|
};
|
|
3321
|
-
protoOf(ProbHelper).
|
|
3322
|
-
return this.
|
|
3321
|
+
protoOf(ProbHelper).p2h = function (_this__u8e3s4, first, second, third) {
|
|
3322
|
+
return this.d2m(_this__u8e3s4, first, second, third);
|
|
3323
3323
|
};
|
|
3324
3324
|
var ProbHelper_instance;
|
|
3325
3325
|
function ProbHelper_getInstance() {
|
|
@@ -3331,9 +3331,9 @@
|
|
|
3331
3331
|
ProbNegationAsFailure_instance = this;
|
|
3332
3332
|
NonBacktrackable_0.call(this, 'prob_negation_as_failure');
|
|
3333
3333
|
}
|
|
3334
|
-
protoOf(ProbNegationAsFailure).
|
|
3335
|
-
Companion_getInstance_9().
|
|
3336
|
-
Companion_getInstance_9().
|
|
3334
|
+
protoOf(ProbNegationAsFailure).j2m = function (_this__u8e3s4, first, second) {
|
|
3335
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 1);
|
|
3336
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 1);
|
|
3337
3337
|
var tmp;
|
|
3338
3338
|
if (!second.bv()) {
|
|
3339
3339
|
tmp = _this__u8e3s4.replyException(ResolutionException_init_$Create$('Probabilistic negation does not support non-ground goals: ' + second.toString(), VOID, _this__u8e3s4.context, []), VOID, []);
|
|
@@ -3348,7 +3348,7 @@
|
|
|
3348
3348
|
if (solution == null) {
|
|
3349
3349
|
tmp_2 = _this__u8e3s4.replyFail(VOID, []);
|
|
3350
3350
|
} else {
|
|
3351
|
-
var explanationTerm = solution.
|
|
3351
|
+
var explanationTerm = solution.k1u().h2(explanationTermVar);
|
|
3352
3352
|
var tmp_3;
|
|
3353
3353
|
var tmp_4;
|
|
3354
3354
|
if (explanationTerm == null) {
|
|
@@ -3359,7 +3359,7 @@
|
|
|
3359
3359
|
if (tmp_4) {
|
|
3360
3360
|
tmp_3 = _this__u8e3s4.replyException(ResolutionException_init_$Create$('No valid explanation has been solved for goal: ' + second.toString(), VOID, _this__u8e3s4.context, []), VOID, []);
|
|
3361
3361
|
} else {
|
|
3362
|
-
tmp_3 = _this__u8e3s4.replyWith(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().
|
|
3362
|
+
tmp_3 = _this__u8e3s4.replyWith(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().n2f(_this__u8e3s4, first, new ProbExplanationTerm(explanationTerm.r37_1.not())), []), VOID, []);
|
|
3363
3363
|
}
|
|
3364
3364
|
tmp_2 = tmp_3;
|
|
3365
3365
|
}
|
|
@@ -3367,8 +3367,8 @@
|
|
|
3367
3367
|
}
|
|
3368
3368
|
return tmp;
|
|
3369
3369
|
};
|
|
3370
|
-
protoOf(ProbNegationAsFailure).
|
|
3371
|
-
return this.
|
|
3370
|
+
protoOf(ProbNegationAsFailure).r2e = function (_this__u8e3s4, first, second) {
|
|
3371
|
+
return this.j2m(_this__u8e3s4, first, second);
|
|
3372
3372
|
};
|
|
3373
3373
|
var ProbNegationAsFailure_instance;
|
|
3374
3374
|
function ProbNegationAsFailure_getInstance() {
|
|
@@ -3382,22 +3382,22 @@
|
|
|
3382
3382
|
};
|
|
3383
3383
|
}
|
|
3384
3384
|
function ProbQuery$computeAllSubstitutions$slambda($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation) {
|
|
3385
|
-
this.
|
|
3386
|
-
this.
|
|
3387
|
-
this.
|
|
3388
|
-
this.
|
|
3389
|
-
this.
|
|
3390
|
-
this.
|
|
3385
|
+
this.c3b_1 = $solutions;
|
|
3386
|
+
this.d3b_1 = $queryWithEvidenceExplanation;
|
|
3387
|
+
this.e3b_1 = $evidenceExplanation;
|
|
3388
|
+
this.f3b_1 = $this_computeAllSubstitutions;
|
|
3389
|
+
this.g3b_1 = $first;
|
|
3390
|
+
this.h3b_1 = $fourth;
|
|
3391
3391
|
CoroutineImpl.call(this, resultContinuation);
|
|
3392
3392
|
}
|
|
3393
|
-
protoOf(ProbQuery$computeAllSubstitutions$slambda).
|
|
3394
|
-
var tmp = this.
|
|
3393
|
+
protoOf(ProbQuery$computeAllSubstitutions$slambda).c2q = function ($this$sequence, $completion) {
|
|
3394
|
+
var tmp = this.d2q($this$sequence, $completion);
|
|
3395
3395
|
tmp.d8_1 = Unit_instance;
|
|
3396
3396
|
tmp.e8_1 = null;
|
|
3397
3397
|
return tmp.j8();
|
|
3398
3398
|
};
|
|
3399
3399
|
protoOf(ProbQuery$computeAllSubstitutions$slambda).a9 = function (p1, $completion) {
|
|
3400
|
-
return this.
|
|
3400
|
+
return this.c2q(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3401
3401
|
};
|
|
3402
3402
|
protoOf(ProbQuery$computeAllSubstitutions$slambda).j8 = function () {
|
|
3403
3403
|
var suspendResult = this.d8_1;
|
|
@@ -3407,20 +3407,20 @@
|
|
|
3407
3407
|
switch (tmp) {
|
|
3408
3408
|
case 0:
|
|
3409
3409
|
this.c8_1 = 8;
|
|
3410
|
-
this.
|
|
3410
|
+
this.j3b_1 = this.c3b_1.n();
|
|
3411
3411
|
this.b8_1 = 1;
|
|
3412
3412
|
continue $sm;
|
|
3413
3413
|
case 1:
|
|
3414
|
-
if (!this.
|
|
3414
|
+
if (!this.j3b_1.q()) {
|
|
3415
3415
|
this.b8_1 = 7;
|
|
3416
3416
|
continue $sm;
|
|
3417
3417
|
}
|
|
3418
3418
|
|
|
3419
|
-
var solution = this.
|
|
3420
|
-
if (solution.
|
|
3421
|
-
throw ensureNotNull(solution.
|
|
3422
|
-
var queryWithEvidenceExplanationTerm = solution.
|
|
3423
|
-
var evidenceExplanationTerm = solution.
|
|
3419
|
+
var solution = this.j3b_1.r();
|
|
3420
|
+
if (solution.t1v())
|
|
3421
|
+
throw ensureNotNull(solution.q1v());
|
|
3422
|
+
var queryWithEvidenceExplanationTerm = solution.k1u().h2(this.d3b_1);
|
|
3423
|
+
var evidenceExplanationTerm = solution.k1u().h2(this.e3b_1);
|
|
3424
3424
|
var tmp_0;
|
|
3425
3425
|
var tmp_1;
|
|
3426
3426
|
var tmp_2;
|
|
@@ -3444,27 +3444,27 @@
|
|
|
3444
3444
|
|
|
3445
3445
|
if (tmp_0) {
|
|
3446
3446
|
this.b8_1 = 5;
|
|
3447
|
-
suspendResult = this.
|
|
3447
|
+
suspendResult = this.i3b_1.bd(Companion_getInstance_5().failed(), this);
|
|
3448
3448
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3449
3449
|
return suspendResult;
|
|
3450
3450
|
}
|
|
3451
3451
|
continue $sm;
|
|
3452
3452
|
} else {
|
|
3453
|
-
var queryWithEvidenceProbability = queryWithEvidenceExplanationTerm.
|
|
3454
|
-
var evidenceProbability = evidenceExplanationTerm.
|
|
3453
|
+
var queryWithEvidenceProbability = queryWithEvidenceExplanationTerm.r37_1.h39();
|
|
3454
|
+
var evidenceProbability = evidenceExplanationTerm.r37_1.h39();
|
|
3455
3455
|
if (queryWithEvidenceProbability == null || evidenceProbability == null) {
|
|
3456
3456
|
this.b8_1 = 3;
|
|
3457
|
-
suspendResult = this.
|
|
3457
|
+
suspendResult = this.i3b_1.bd(Companion_getInstance_5().failed(), this);
|
|
3458
3458
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3459
3459
|
return suspendResult;
|
|
3460
3460
|
}
|
|
3461
3461
|
continue $sm;
|
|
3462
3462
|
} else {
|
|
3463
|
-
var tmp_3 = solution.
|
|
3464
|
-
var solutionSubstitution = tmp_3.filter(ProbQuery$computeAllSubstitutions$slambda$lambda(this.
|
|
3463
|
+
var tmp_3 = solution.k1u();
|
|
3464
|
+
var solutionSubstitution = tmp_3.filter(ProbQuery$computeAllSubstitutions$slambda$lambda(this.e3b_1, this.d3b_1));
|
|
3465
3465
|
var probabilityTerm = Companion_getInstance_6().ofDouble(queryWithEvidenceProbability / evidenceProbability);
|
|
3466
3466
|
this.b8_1 = 2;
|
|
3467
|
-
suspendResult = this.
|
|
3467
|
+
suspendResult = this.i3b_1.bd(Companion_getInstance_5().ofSubstitution(solutionSubstitution, [Companion_getInstance_9().n2f(this.f3b_1, this.g3b_1, probabilityTerm), Companion_getInstance_9().n2f(this.f3b_1, this.h3b_1, queryWithEvidenceExplanationTerm)]), this);
|
|
3468
3468
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3469
3469
|
return suspendResult;
|
|
3470
3470
|
}
|
|
@@ -3503,26 +3503,26 @@
|
|
|
3503
3503
|
}
|
|
3504
3504
|
while (true);
|
|
3505
3505
|
};
|
|
3506
|
-
protoOf(ProbQuery$computeAllSubstitutions$slambda).
|
|
3507
|
-
var i = new ProbQuery$computeAllSubstitutions$slambda(this.
|
|
3508
|
-
i.
|
|
3506
|
+
protoOf(ProbQuery$computeAllSubstitutions$slambda).d2q = function ($this$sequence, completion) {
|
|
3507
|
+
var i = new ProbQuery$computeAllSubstitutions$slambda(this.c3b_1, this.d3b_1, this.e3b_1, this.f3b_1, this.g3b_1, this.h3b_1, completion);
|
|
3508
|
+
i.i3b_1 = $this$sequence;
|
|
3509
3509
|
return i;
|
|
3510
3510
|
};
|
|
3511
3511
|
function ProbQuery$computeAllSubstitutions$slambda_0($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation) {
|
|
3512
3512
|
var i = new ProbQuery$computeAllSubstitutions$slambda($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation);
|
|
3513
3513
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
3514
|
-
return i.
|
|
3514
|
+
return i.c2q($this$sequence, $completion);
|
|
3515
3515
|
}, 1);
|
|
3516
3516
|
}
|
|
3517
3517
|
function ProbQuery() {
|
|
3518
3518
|
ProbQuery_instance = this;
|
|
3519
3519
|
WithoutSideEffects_0.call(this, 'prob_query');
|
|
3520
3520
|
}
|
|
3521
|
-
protoOf(ProbQuery).
|
|
3522
|
-
Companion_getInstance_9().
|
|
3523
|
-
Companion_getInstance_9().
|
|
3524
|
-
Companion_getInstance_9().
|
|
3525
|
-
Companion_getInstance_9().
|
|
3521
|
+
protoOf(ProbQuery).l3b = function (_this__u8e3s4, first, second, third, fourth) {
|
|
3522
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 1);
|
|
3523
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 1);
|
|
3524
|
+
Companion_getInstance_9().v2f(_this__u8e3s4, 1);
|
|
3525
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 2);
|
|
3526
3526
|
var queryWithEvidenceExplanation = Companion_getInstance_0().of('QueryWithEvidenceExplanation');
|
|
3527
3527
|
var evidenceExplanation = Companion_getInstance_0().of('EvidenceExplanation');
|
|
3528
3528
|
var tmp = _this__u8e3s4.subSolver();
|
|
@@ -3534,11 +3534,11 @@
|
|
|
3534
3534
|
var tmp_3 = Companion_getInstance_1();
|
|
3535
3535
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3536
3536
|
var tmp$ret$1 = ProbSolveWithEvidence_getInstance().signature.name;
|
|
3537
|
-
var solutions = tmp.solveWithOptions(tmp_0.of(tmp_2, tmp_3.of(tmp$ret$1, [queryWithEvidenceExplanation, evidenceExplanation, second])), ProbSetConfig_getInstance().
|
|
3537
|
+
var solutions = tmp.solveWithOptions(tmp_0.of(tmp_2, tmp_3.of(tmp$ret$1, [queryWithEvidenceExplanation, evidenceExplanation, second])), ProbSetConfig_getInstance().m3b(third));
|
|
3538
3538
|
return sequence(ProbQuery$computeAllSubstitutions$slambda_0(solutions, queryWithEvidenceExplanation, evidenceExplanation, _this__u8e3s4, first, fourth, null));
|
|
3539
3539
|
};
|
|
3540
|
-
protoOf(ProbQuery).
|
|
3541
|
-
return this.
|
|
3540
|
+
protoOf(ProbQuery).m2g = function (_this__u8e3s4, first, second, third, fourth) {
|
|
3541
|
+
return this.l3b(_this__u8e3s4, first, second, third, fourth);
|
|
3542
3542
|
};
|
|
3543
3543
|
var ProbQuery_instance;
|
|
3544
3544
|
function ProbQuery_getInstance() {
|
|
@@ -3551,40 +3551,40 @@
|
|
|
3551
3551
|
NonBacktrackable_1.call(this, 'prob_set_config');
|
|
3552
3552
|
var tmp = this;
|
|
3553
3553
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3554
|
-
tmp.
|
|
3554
|
+
tmp.m37_1 = this.signature.name + '_flag';
|
|
3555
3555
|
var tmp_0 = this;
|
|
3556
3556
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3557
|
-
tmp_0.
|
|
3557
|
+
tmp_0.n37_1 = this.signature.name + '_term';
|
|
3558
3558
|
var tmp_1 = this;
|
|
3559
3559
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3560
|
-
tmp_1.
|
|
3560
|
+
tmp_1.o37_1 = 'it.unibo.tuprolog.solve.probability' + this.signature.name + '_tag';
|
|
3561
3561
|
}
|
|
3562
|
-
protoOf(ProbSetConfig).
|
|
3563
|
-
Companion_getInstance_9().
|
|
3564
|
-
Companion_getInstance_9().
|
|
3562
|
+
protoOf(ProbSetConfig).s2l = function (_this__u8e3s4, first) {
|
|
3563
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 0);
|
|
3564
|
+
Companion_getInstance_9().z2f(_this__u8e3s4, 0);
|
|
3565
3565
|
// Inline function 'kotlin.arrayOf' call
|
|
3566
3566
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
3567
3567
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3568
|
-
var tmp$ret$0 = [SetFlags_init_$Create$([new Pair(this.
|
|
3568
|
+
var tmp$ret$0 = [SetFlags_init_$Create$([new Pair(this.m37_1, first)])];
|
|
3569
3569
|
return _this__u8e3s4.replySuccess(VOID, VOID, tmp$ret$0.slice());
|
|
3570
3570
|
};
|
|
3571
|
-
protoOf(ProbSetConfig).
|
|
3572
|
-
return this.
|
|
3571
|
+
protoOf(ProbSetConfig).a2i = function (_this__u8e3s4, first) {
|
|
3572
|
+
return this.s2l(_this__u8e3s4, first);
|
|
3573
3573
|
};
|
|
3574
|
-
protoOf(ProbSetConfig).
|
|
3575
|
-
var tmp0_elvis_lhs = _this__u8e3s4.getTag(this.
|
|
3574
|
+
protoOf(ProbSetConfig).m3b = function (_this__u8e3s4) {
|
|
3575
|
+
var tmp0_elvis_lhs = _this__u8e3s4.getTag(this.o37_1);
|
|
3576
3576
|
return tmp0_elvis_lhs == null ? Companion_getInstance_2().DEFAULT : tmp0_elvis_lhs;
|
|
3577
3577
|
};
|
|
3578
|
-
protoOf(ProbSetConfig).
|
|
3579
|
-
return setTag(Companion_getInstance_4().of(this.
|
|
3578
|
+
protoOf(ProbSetConfig).p37 = function (_this__u8e3s4) {
|
|
3579
|
+
return setTag(Companion_getInstance_4().of(this.n37_1), this.o37_1, _this__u8e3s4);
|
|
3580
3580
|
};
|
|
3581
|
-
protoOf(ProbSetConfig).
|
|
3582
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
3583
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
3581
|
+
protoOf(ProbSetConfig).n3b = function (_this__u8e3s4) {
|
|
3582
|
+
var tmp0_safe_receiver = _this__u8e3s4.p1u().cb(this.m37_1);
|
|
3583
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.m3b(tmp0_safe_receiver);
|
|
3584
3584
|
return tmp1_elvis_lhs == null ? Companion_getInstance_2().DEFAULT : tmp1_elvis_lhs;
|
|
3585
3585
|
};
|
|
3586
|
-
protoOf(ProbSetConfig).
|
|
3587
|
-
return !get_isProbabilistic(this.
|
|
3586
|
+
protoOf(ProbSetConfig).b3a = function (_this__u8e3s4) {
|
|
3587
|
+
return !get_isProbabilistic(this.n3b(_this__u8e3s4));
|
|
3588
3588
|
};
|
|
3589
3589
|
var ProbSetConfig_instance;
|
|
3590
3590
|
function ProbSetConfig_getInstance() {
|
|
@@ -3593,9 +3593,9 @@
|
|
|
3593
3593
|
return ProbSetConfig_instance;
|
|
3594
3594
|
}
|
|
3595
3595
|
function ProbSolve$computeAllSubstitutions$lambda(it) {
|
|
3596
|
-
if (it.
|
|
3597
|
-
throw ensureNotNull(it.
|
|
3598
|
-
return it.
|
|
3596
|
+
if (it.t1v())
|
|
3597
|
+
throw ensureNotNull(it.q1v());
|
|
3598
|
+
return it.k1u();
|
|
3599
3599
|
}
|
|
3600
3600
|
function ProbSolve$computeAllSubstitutions$lambda_0(it) {
|
|
3601
3601
|
return !(it == null) ? isInterface(it, Halt) : false;
|
|
@@ -3606,20 +3606,20 @@
|
|
|
3606
3606
|
};
|
|
3607
3607
|
}
|
|
3608
3608
|
function ProbSolve$computeAllSubstitutions$slambda($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation) {
|
|
3609
|
-
this.
|
|
3610
|
-
this.
|
|
3611
|
-
this.
|
|
3612
|
-
this.
|
|
3609
|
+
this.w3b_1 = $solutionGroups;
|
|
3610
|
+
this.x3b_1 = $explanationVar;
|
|
3611
|
+
this.y3b_1 = $this_computeAllSubstitutions;
|
|
3612
|
+
this.z3b_1 = $first;
|
|
3613
3613
|
CoroutineImpl.call(this, resultContinuation);
|
|
3614
3614
|
}
|
|
3615
|
-
protoOf(ProbSolve$computeAllSubstitutions$slambda).
|
|
3616
|
-
var tmp = this.
|
|
3615
|
+
protoOf(ProbSolve$computeAllSubstitutions$slambda).c2q = function ($this$sequence, $completion) {
|
|
3616
|
+
var tmp = this.d2q($this$sequence, $completion);
|
|
3617
3617
|
tmp.d8_1 = Unit_instance;
|
|
3618
3618
|
tmp.e8_1 = null;
|
|
3619
3619
|
return tmp.j8();
|
|
3620
3620
|
};
|
|
3621
3621
|
protoOf(ProbSolve$computeAllSubstitutions$slambda).a9 = function (p1, $completion) {
|
|
3622
|
-
return this.
|
|
3622
|
+
return this.c2q(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3623
3623
|
};
|
|
3624
3624
|
protoOf(ProbSolve$computeAllSubstitutions$slambda).j8 = function () {
|
|
3625
3625
|
var suspendResult = this.d8_1;
|
|
@@ -3630,22 +3630,22 @@
|
|
|
3630
3630
|
case 0:
|
|
3631
3631
|
this.c8_1 = 4;
|
|
3632
3632
|
var tmp_0 = this;
|
|
3633
|
-
tmp_0.
|
|
3633
|
+
tmp_0.b3c_1 = this.w3b_1.d1().n();
|
|
3634
3634
|
this.b8_1 = 1;
|
|
3635
3635
|
continue $sm;
|
|
3636
3636
|
case 1:
|
|
3637
|
-
if (!this.
|
|
3637
|
+
if (!this.b3c_1.q()) {
|
|
3638
3638
|
this.b8_1 = 3;
|
|
3639
3639
|
continue $sm;
|
|
3640
3640
|
}
|
|
3641
3641
|
|
|
3642
|
-
var solutionGroup = this.
|
|
3642
|
+
var solutionGroup = this.b3c_1.r();
|
|
3643
3643
|
var this_0 = solutionGroup.e2();
|
|
3644
3644
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
3645
3645
|
var _iterator__ex2g4s = this_0.n();
|
|
3646
3646
|
while (_iterator__ex2g4s.q()) {
|
|
3647
3647
|
var item = _iterator__ex2g4s.r();
|
|
3648
|
-
destination.l(item.
|
|
3648
|
+
destination.l(item.k1u().h2(this.x3b_1));
|
|
3649
3649
|
}
|
|
3650
3650
|
|
|
3651
3651
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
@@ -3661,7 +3661,7 @@
|
|
|
3661
3661
|
var _iterator__ex2g4s_1 = destination_0.n();
|
|
3662
3662
|
while (_iterator__ex2g4s_1.q()) {
|
|
3663
3663
|
var item_0 = _iterator__ex2g4s_1.r();
|
|
3664
|
-
destination_1.l(item_0.
|
|
3664
|
+
destination_1.l(item_0.r37_1);
|
|
3665
3665
|
}
|
|
3666
3666
|
|
|
3667
3667
|
var iterator = destination_1.n();
|
|
@@ -3671,13 +3671,13 @@
|
|
|
3671
3671
|
while (iterator.q()) {
|
|
3672
3672
|
var tmp0 = accumulator;
|
|
3673
3673
|
var expl = iterator.r();
|
|
3674
|
-
accumulator = expl.
|
|
3674
|
+
accumulator = expl.g39() === 1.0 ? tmp0 : tmp0.g39() === 1.0 ? expl : tmp0.or(expl);
|
|
3675
3675
|
}
|
|
3676
3676
|
|
|
3677
3677
|
var explanation = accumulator;
|
|
3678
|
-
var substitution = Companion_getInstance_5().ofSubstitution(solutionGroup.d2(), [Companion_getInstance_9().
|
|
3678
|
+
var substitution = Companion_getInstance_5().ofSubstitution(solutionGroup.d2(), [Companion_getInstance_9().n2f(this.y3b_1, this.z3b_1, new ProbExplanationTerm(explanation))]);
|
|
3679
3679
|
this.b8_1 = 2;
|
|
3680
|
-
suspendResult = this.
|
|
3680
|
+
suspendResult = this.a3c_1.bd(substitution, this);
|
|
3681
3681
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3682
3682
|
return suspendResult;
|
|
3683
3683
|
}
|
|
@@ -3702,30 +3702,30 @@
|
|
|
3702
3702
|
}
|
|
3703
3703
|
while (true);
|
|
3704
3704
|
};
|
|
3705
|
-
protoOf(ProbSolve$computeAllSubstitutions$slambda).
|
|
3706
|
-
var i = new ProbSolve$computeAllSubstitutions$slambda(this.
|
|
3707
|
-
i.
|
|
3705
|
+
protoOf(ProbSolve$computeAllSubstitutions$slambda).d2q = function ($this$sequence, completion) {
|
|
3706
|
+
var i = new ProbSolve$computeAllSubstitutions$slambda(this.w3b_1, this.x3b_1, this.y3b_1, this.z3b_1, completion);
|
|
3707
|
+
i.a3c_1 = $this$sequence;
|
|
3708
3708
|
return i;
|
|
3709
3709
|
};
|
|
3710
3710
|
function ProbSolve$computeAllSubstitutions$slambda_0($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation) {
|
|
3711
3711
|
var i = new ProbSolve$computeAllSubstitutions$slambda($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation);
|
|
3712
3712
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
3713
|
-
return i.
|
|
3713
|
+
return i.c2q($this$sequence, $completion);
|
|
3714
3714
|
}, 1);
|
|
3715
3715
|
}
|
|
3716
3716
|
function ProbSolve() {
|
|
3717
3717
|
ProbSolve_instance = this;
|
|
3718
3718
|
WithoutSideEffects_1.call(this, 'prob_solve');
|
|
3719
3719
|
}
|
|
3720
|
-
protoOf(ProbSolve).
|
|
3721
|
-
Companion_getInstance_9().
|
|
3722
|
-
Companion_getInstance_9().
|
|
3723
|
-
if (ProbSetConfig_getInstance().
|
|
3720
|
+
protoOf(ProbSolve).i2n = function (_this__u8e3s4, first, second) {
|
|
3721
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 1);
|
|
3722
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 1);
|
|
3723
|
+
if (ProbSetConfig_getInstance().b3a(_this__u8e3s4.context)) {
|
|
3724
3724
|
var tmp = _this__u8e3s4.subSolver();
|
|
3725
3725
|
var tmp_0 = Companion_getInstance_1();
|
|
3726
3726
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3727
3727
|
var tmp$ret$0 = Prob_getInstance().signature.name;
|
|
3728
|
-
var tmp_1 = tmp.solveWithOptions(tmp_0.of(tmp$ret$0, [first, second]), ProbSetConfig_getInstance().
|
|
3728
|
+
var tmp_1 = tmp.solveWithOptions(tmp_0.of(tmp$ret$0, [first, second]), ProbSetConfig_getInstance().n3b(_this__u8e3s4.context));
|
|
3729
3729
|
return map(tmp_1, ProbSolve$computeAllSubstitutions$lambda);
|
|
3730
3730
|
}
|
|
3731
3731
|
var explanationVar = Companion_getInstance_0().of('EXPL');
|
|
@@ -3733,14 +3733,14 @@
|
|
|
3733
3733
|
var tmp_3 = Companion_getInstance_1();
|
|
3734
3734
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3735
3735
|
var tmp$ret$1 = Prob_getInstance().signature.name;
|
|
3736
|
-
var solutions = toList(tmp_2.solveWithOptions(tmp_3.of(tmp$ret$1, [explanationVar, second]), ProbSetConfig_getInstance().
|
|
3736
|
+
var solutions = toList(tmp_2.solveWithOptions(tmp_3.of(tmp$ret$1, [explanationVar, second]), ProbSetConfig_getInstance().n3b(_this__u8e3s4.context)));
|
|
3737
3737
|
// Inline function 'kotlin.sequences.filterIsInstance' call
|
|
3738
3738
|
var this_0 = asSequence(solutions);
|
|
3739
3739
|
var tmp_4 = filter(this_0, ProbSolve$computeAllSubstitutions$lambda_0);
|
|
3740
3740
|
var tmp$ret$2 = isInterface(tmp_4, Sequence) ? tmp_4 : THROW_CCE();
|
|
3741
3741
|
var error = firstOrNull(tmp$ret$2);
|
|
3742
3742
|
if (!(error == null))
|
|
3743
|
-
throw error.
|
|
3743
|
+
throw error.q1v();
|
|
3744
3744
|
var tmp_5;
|
|
3745
3745
|
var tmp$ret$3;
|
|
3746
3746
|
$l$block_0: {
|
|
@@ -3766,7 +3766,7 @@
|
|
|
3766
3766
|
tmp$ret$3 = false;
|
|
3767
3767
|
}
|
|
3768
3768
|
if (!tmp$ret$3) {
|
|
3769
|
-
tmp_5 = sequenceOf(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().
|
|
3769
|
+
tmp_5 = sequenceOf(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().n2f(_this__u8e3s4, first, new ProbExplanationTerm(Companion_getInstance_11().t38_1)), []));
|
|
3770
3770
|
} else {
|
|
3771
3771
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
3772
3772
|
// Inline function 'kotlin.collections.filterIsInstanceTo' call
|
|
@@ -3784,7 +3784,7 @@
|
|
|
3784
3784
|
var _iterator__ex2g4s_1 = destination.n();
|
|
3785
3785
|
while (_iterator__ex2g4s_1.q()) {
|
|
3786
3786
|
var element_1 = _iterator__ex2g4s_1.r();
|
|
3787
|
-
var tmp_7 = element_1.
|
|
3787
|
+
var tmp_7 = element_1.k1u();
|
|
3788
3788
|
var key = tmp_7.yz(ProbSolve$computeAllSubstitutions$lambda_1(explanationVar));
|
|
3789
3789
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
3790
3790
|
var value = destination_0.h2(key);
|
|
@@ -3804,8 +3804,8 @@
|
|
|
3804
3804
|
}
|
|
3805
3805
|
return tmp_5;
|
|
3806
3806
|
};
|
|
3807
|
-
protoOf(ProbSolve).
|
|
3808
|
-
return this.
|
|
3807
|
+
protoOf(ProbSolve).y2e = function (_this__u8e3s4, first, second) {
|
|
3808
|
+
return this.i2n(_this__u8e3s4, first, second);
|
|
3809
3809
|
};
|
|
3810
3810
|
var ProbSolve_instance;
|
|
3811
3811
|
function ProbSolve_getInstance() {
|
|
@@ -3818,28 +3818,28 @@
|
|
|
3818
3818
|
}
|
|
3819
3819
|
function ProbSolveEvidence$computeOne$lambda_0($explanationVar) {
|
|
3820
3820
|
return function (s) {
|
|
3821
|
-
return s.
|
|
3821
|
+
return s.k1u().h2($explanationVar);
|
|
3822
3822
|
};
|
|
3823
3823
|
}
|
|
3824
3824
|
function ProbSolveEvidence$computeOne$lambda_1(it) {
|
|
3825
3825
|
return it instanceof ProbExplanationTerm;
|
|
3826
3826
|
}
|
|
3827
3827
|
function ProbSolveEvidence$computeOne$lambda_2(t) {
|
|
3828
|
-
return t.
|
|
3828
|
+
return t.r37_1;
|
|
3829
3829
|
}
|
|
3830
3830
|
function ProbSolveEvidence() {
|
|
3831
3831
|
ProbSolveEvidence_instance = this;
|
|
3832
3832
|
NonBacktrackable_1.call(this, 'prob_solve_evidence');
|
|
3833
3833
|
}
|
|
3834
|
-
protoOf(ProbSolveEvidence).
|
|
3834
|
+
protoOf(ProbSolveEvidence).s2l = function (_this__u8e3s4, first) {
|
|
3835
3835
|
var evidenceIndicator = Companion_instance_4.ofString('evidence', 2);
|
|
3836
|
-
if (!_this__u8e3s4.context.
|
|
3837
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
3836
|
+
if (!_this__u8e3s4.context.q1u().containsIndicator(evidenceIndicator) && !_this__u8e3s4.context.r1u().containsIndicator(evidenceIndicator)) {
|
|
3837
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().n2f(_this__u8e3s4, first, new ProbExplanationTerm(Companion_getInstance_11().u38_1)), VOID, []);
|
|
3838
3838
|
}
|
|
3839
3839
|
var evidenceTermVar = Companion_getInstance_0().of('TermVar');
|
|
3840
3840
|
var evidenceTruthVar = Companion_getInstance_0().of('TruthVar');
|
|
3841
3841
|
var subQuery = Companion_getInstance_1().of('evidence', [evidenceTermVar, evidenceTruthVar]);
|
|
3842
|
-
var subOptions = ProbSetConfig_getInstance().
|
|
3842
|
+
var subOptions = ProbSetConfig_getInstance().n3b(_this__u8e3s4.context).setLimit(-1).setLazy(false);
|
|
3843
3843
|
// Inline function 'kotlin.sequences.filterIsInstance' call
|
|
3844
3844
|
var this_0 = _this__u8e3s4.subSolver().solveWithOptions(subQuery, subOptions);
|
|
3845
3845
|
var tmp = filter(this_0, ProbSolveEvidence$computeOne$lambda);
|
|
@@ -3851,8 +3851,8 @@
|
|
|
3851
3851
|
var _iterator__ex2g4s = this_1.n();
|
|
3852
3852
|
while (_iterator__ex2g4s.q()) {
|
|
3853
3853
|
var item = _iterator__ex2g4s.r();
|
|
3854
|
-
var truth = item.
|
|
3855
|
-
var term = item.
|
|
3854
|
+
var truth = item.k1u().h2(evidenceTruthVar);
|
|
3855
|
+
var term = item.k1u().h2(evidenceTermVar);
|
|
3856
3856
|
var tmp_0;
|
|
3857
3857
|
var tmp_1;
|
|
3858
3858
|
if (term == null || term.tu() || truth == null) {
|
|
@@ -3861,7 +3861,7 @@
|
|
|
3861
3861
|
tmp_1 = !isInterface(truth, Truth);
|
|
3862
3862
|
}
|
|
3863
3863
|
if (tmp_1) {
|
|
3864
|
-
tmp_0 = Companion_getInstance_11().
|
|
3864
|
+
tmp_0 = Companion_getInstance_11().t38_1;
|
|
3865
3865
|
} else {
|
|
3866
3866
|
var explanationVar = Companion_getInstance_0().of('EXPL');
|
|
3867
3867
|
var tmp_2 = Companion_getInstance_1();
|
|
@@ -3880,7 +3880,7 @@
|
|
|
3880
3880
|
while (iterator.q()) {
|
|
3881
3881
|
var tmp0 = accumulator;
|
|
3882
3882
|
var t = iterator.r();
|
|
3883
|
-
accumulator = t.
|
|
3883
|
+
accumulator = t.g39() === 1.0 ? tmp0 : tmp0.g39() === 1.0 ? t : t.or(tmp0);
|
|
3884
3884
|
}
|
|
3885
3885
|
var totalExplanation = accumulator;
|
|
3886
3886
|
tmp_0 = truth.vt() ? totalExplanation : totalExplanation.not();
|
|
@@ -3894,14 +3894,14 @@
|
|
|
3894
3894
|
var _iterator__ex2g4s_0 = destination.n();
|
|
3895
3895
|
while (_iterator__ex2g4s_0.q()) {
|
|
3896
3896
|
var element = _iterator__ex2g4s_0.r();
|
|
3897
|
-
if (!equals(element, Companion_getInstance_11().
|
|
3897
|
+
if (!equals(element, Companion_getInstance_11().t38_1)) {
|
|
3898
3898
|
destination_0.l(element);
|
|
3899
3899
|
}
|
|
3900
3900
|
}
|
|
3901
3901
|
var result = destination_0;
|
|
3902
3902
|
var tmp_6;
|
|
3903
3903
|
if (result.h()) {
|
|
3904
|
-
tmp_6 = Companion_getInstance_11().
|
|
3904
|
+
tmp_6 = Companion_getInstance_11().u38_1;
|
|
3905
3905
|
} else {
|
|
3906
3906
|
// Inline function 'kotlin.collections.reduce' call
|
|
3907
3907
|
var iterator_0 = result.n();
|
|
@@ -3915,10 +3915,10 @@
|
|
|
3915
3915
|
tmp_6 = accumulator_0;
|
|
3916
3916
|
}
|
|
3917
3917
|
var resultExplanation = tmp_6;
|
|
3918
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
3918
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().n2f(_this__u8e3s4, first, new ProbExplanationTerm(resultExplanation)), VOID, []);
|
|
3919
3919
|
};
|
|
3920
|
-
protoOf(ProbSolveEvidence).
|
|
3921
|
-
return this.
|
|
3920
|
+
protoOf(ProbSolveEvidence).a2i = function (_this__u8e3s4, first) {
|
|
3921
|
+
return this.s2l(_this__u8e3s4, first);
|
|
3922
3922
|
};
|
|
3923
3923
|
var ProbSolveEvidence_instance;
|
|
3924
3924
|
function ProbSolveEvidence_getInstance() {
|
|
@@ -3932,22 +3932,22 @@
|
|
|
3932
3932
|
};
|
|
3933
3933
|
}
|
|
3934
3934
|
function ProbSolveWithEvidence$computeAllSubstitutions$slambda($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation) {
|
|
3935
|
-
this.
|
|
3936
|
-
this.
|
|
3937
|
-
this.
|
|
3938
|
-
this.
|
|
3939
|
-
this.
|
|
3940
|
-
this.
|
|
3935
|
+
this.m3c_1 = $solutions;
|
|
3936
|
+
this.n3c_1 = $goalExplanationVar;
|
|
3937
|
+
this.o3c_1 = $evidenceExplanationTerm;
|
|
3938
|
+
this.p3c_1 = $this_computeAllSubstitutions;
|
|
3939
|
+
this.q3c_1 = $first;
|
|
3940
|
+
this.r3c_1 = $second;
|
|
3941
3941
|
CoroutineImpl.call(this, resultContinuation);
|
|
3942
3942
|
}
|
|
3943
|
-
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).
|
|
3944
|
-
var tmp = this.
|
|
3943
|
+
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).c2q = function ($this$sequence, $completion) {
|
|
3944
|
+
var tmp = this.d2q($this$sequence, $completion);
|
|
3945
3945
|
tmp.d8_1 = Unit_instance;
|
|
3946
3946
|
tmp.e8_1 = null;
|
|
3947
3947
|
return tmp.j8();
|
|
3948
3948
|
};
|
|
3949
3949
|
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).a9 = function (p1, $completion) {
|
|
3950
|
-
return this.
|
|
3950
|
+
return this.c2q(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3951
3951
|
};
|
|
3952
3952
|
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).j8 = function () {
|
|
3953
3953
|
var suspendResult = this.d8_1;
|
|
@@ -3957,26 +3957,26 @@
|
|
|
3957
3957
|
switch (tmp) {
|
|
3958
3958
|
case 0:
|
|
3959
3959
|
this.c8_1 = 6;
|
|
3960
|
-
this.
|
|
3960
|
+
this.t3c_1 = this.m3c_1.n();
|
|
3961
3961
|
this.b8_1 = 1;
|
|
3962
3962
|
continue $sm;
|
|
3963
3963
|
case 1:
|
|
3964
|
-
if (!this.
|
|
3964
|
+
if (!this.t3c_1.q()) {
|
|
3965
3965
|
this.b8_1 = 5;
|
|
3966
3966
|
continue $sm;
|
|
3967
3967
|
}
|
|
3968
3968
|
|
|
3969
|
-
var solution = this.
|
|
3970
|
-
if (solution.
|
|
3971
|
-
throw ensureNotNull(solution.
|
|
3972
|
-
var goalExplanationTerm = solution.
|
|
3969
|
+
var solution = this.t3c_1.r();
|
|
3970
|
+
if (solution.t1v())
|
|
3971
|
+
throw ensureNotNull(solution.q1v());
|
|
3972
|
+
var goalExplanationTerm = solution.k1u().h2(this.n3c_1);
|
|
3973
3973
|
var tmp_0;
|
|
3974
3974
|
var tmp_1;
|
|
3975
3975
|
var tmp_2;
|
|
3976
|
-
if (this.
|
|
3976
|
+
if (this.o3c_1 == null) {
|
|
3977
3977
|
tmp_2 = true;
|
|
3978
3978
|
} else {
|
|
3979
|
-
var tmp_3 = this.
|
|
3979
|
+
var tmp_3 = this.o3c_1;
|
|
3980
3980
|
tmp_2 = !(tmp_3 instanceof ProbExplanationTerm);
|
|
3981
3981
|
}
|
|
3982
3982
|
|
|
@@ -3994,19 +3994,19 @@
|
|
|
3994
3994
|
|
|
3995
3995
|
if (tmp_0) {
|
|
3996
3996
|
this.b8_1 = 3;
|
|
3997
|
-
suspendResult = this.
|
|
3997
|
+
suspendResult = this.s3c_1.bd(Companion_getInstance_5().failed(), this);
|
|
3998
3998
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3999
3999
|
return suspendResult;
|
|
4000
4000
|
}
|
|
4001
4001
|
continue $sm;
|
|
4002
4002
|
} else {
|
|
4003
|
-
var explanationWithEvidenceTerm = new ProbExplanationTerm(goalExplanationTerm.
|
|
4003
|
+
var explanationWithEvidenceTerm = new ProbExplanationTerm(goalExplanationTerm.r37_1.and(this.o3c_1.r37_1));
|
|
4004
4004
|
this.b8_1 = 2;
|
|
4005
4005
|
var tmp_4 = Companion_getInstance_5();
|
|
4006
|
-
var tmp_5 = Companion_getInstance_9().
|
|
4007
|
-
var tmp_6 = Companion_getInstance_9().
|
|
4008
|
-
var tmp_7 = solution.
|
|
4009
|
-
suspendResult = this.
|
|
4006
|
+
var tmp_5 = Companion_getInstance_9().n2f(this.p3c_1, this.q3c_1, explanationWithEvidenceTerm);
|
|
4007
|
+
var tmp_6 = Companion_getInstance_9().n2f(this.p3c_1, this.r3c_1, this.o3c_1);
|
|
4008
|
+
var tmp_7 = solution.k1u();
|
|
4009
|
+
suspendResult = this.s3c_1.bd(tmp_4.ofSubstitution(tmp_5, [tmp_6, tmp_7.filter(ProbSolveWithEvidence$computeAllSubstitutions$slambda$lambda(this.n3c_1))]), this);
|
|
4010
4010
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4011
4011
|
return suspendResult;
|
|
4012
4012
|
}
|
|
@@ -4038,35 +4038,35 @@
|
|
|
4038
4038
|
}
|
|
4039
4039
|
while (true);
|
|
4040
4040
|
};
|
|
4041
|
-
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).
|
|
4042
|
-
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda(this.
|
|
4043
|
-
i.
|
|
4041
|
+
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).d2q = function ($this$sequence, completion) {
|
|
4042
|
+
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda(this.m3c_1, this.n3c_1, this.o3c_1, this.p3c_1, this.q3c_1, this.r3c_1, completion);
|
|
4043
|
+
i.s3c_1 = $this$sequence;
|
|
4044
4044
|
return i;
|
|
4045
4045
|
};
|
|
4046
4046
|
function ProbSolveWithEvidence$computeAllSubstitutions$slambda_0($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation) {
|
|
4047
4047
|
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation);
|
|
4048
4048
|
return constructCallableReference(function ($this$sequence, $completion) {
|
|
4049
|
-
return i.
|
|
4049
|
+
return i.c2q($this$sequence, $completion);
|
|
4050
4050
|
}, 1);
|
|
4051
4051
|
}
|
|
4052
4052
|
function ProbSolveWithEvidence() {
|
|
4053
4053
|
ProbSolveWithEvidence_instance = this;
|
|
4054
4054
|
WithoutSideEffects.call(this, 'prob_solve_with_evidence');
|
|
4055
4055
|
}
|
|
4056
|
-
protoOf(ProbSolveWithEvidence).
|
|
4057
|
-
Companion_getInstance_9().
|
|
4058
|
-
Companion_getInstance_9().
|
|
4056
|
+
protoOf(ProbSolveWithEvidence).d2m = function (_this__u8e3s4, first, second, third) {
|
|
4057
|
+
Companion_getInstance_9().t2f(_this__u8e3s4, 2);
|
|
4058
|
+
Companion_getInstance_9().x2f(_this__u8e3s4, 2);
|
|
4059
4059
|
var evidenceExplanationVar = Companion_getInstance_0().of('EvidenceExplanation');
|
|
4060
4060
|
var tmp;
|
|
4061
|
-
if (ProbSetConfig_getInstance().
|
|
4062
|
-
tmp = toTerm(Companion_getInstance_11().
|
|
4061
|
+
if (ProbSetConfig_getInstance().b3a(_this__u8e3s4.context)) {
|
|
4062
|
+
tmp = toTerm(Companion_getInstance_11().u38_1);
|
|
4063
4063
|
} else {
|
|
4064
4064
|
var tmp_0 = Companion_getInstance_1();
|
|
4065
4065
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
4066
4066
|
var tmp$ret$0 = ProbSolveEvidence_getInstance().signature.name;
|
|
4067
4067
|
var subQuery = tmp_0.of(tmp$ret$0, [evidenceExplanationVar]);
|
|
4068
|
-
var solution = _this__u8e3s4.subSolver().solveOnceWithOptions(subQuery, ProbSetConfig_getInstance().
|
|
4069
|
-
tmp = solution.
|
|
4068
|
+
var solution = _this__u8e3s4.subSolver().solveOnceWithOptions(subQuery, ProbSetConfig_getInstance().n3b(_this__u8e3s4.context));
|
|
4069
|
+
tmp = solution.k1u().h2(evidenceExplanationVar);
|
|
4070
4070
|
}
|
|
4071
4071
|
var evidenceExplanationTerm = tmp;
|
|
4072
4072
|
var goalExplanationVar = Companion_getInstance_0().of('GoalExplanation');
|
|
@@ -4074,11 +4074,11 @@
|
|
|
4074
4074
|
var tmp_2 = Companion_getInstance_1();
|
|
4075
4075
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
4076
4076
|
var tmp$ret$1 = ProbSolve_getInstance().signature.name;
|
|
4077
|
-
var solutions = tmp_1.solveWithOptions(tmp_2.of(tmp$ret$1, [goalExplanationVar, third]), ProbSetConfig_getInstance().
|
|
4077
|
+
var solutions = tmp_1.solveWithOptions(tmp_2.of(tmp$ret$1, [goalExplanationVar, third]), ProbSetConfig_getInstance().n3b(_this__u8e3s4.context));
|
|
4078
4078
|
return sequence(ProbSolveWithEvidence$computeAllSubstitutions$slambda_0(solutions, goalExplanationVar, evidenceExplanationTerm, _this__u8e3s4, first, second, null));
|
|
4079
4079
|
};
|
|
4080
|
-
protoOf(ProbSolveWithEvidence).
|
|
4081
|
-
return this.
|
|
4080
|
+
protoOf(ProbSolveWithEvidence).p2h = function (_this__u8e3s4, first, second, third) {
|
|
4081
|
+
return this.d2m(_this__u8e3s4, first, second, third);
|
|
4082
4082
|
};
|
|
4083
4083
|
var ProbSolveWithEvidence_instance;
|
|
4084
4084
|
function ProbSolveWithEvidence_getInstance() {
|
|
@@ -4090,10 +4090,10 @@
|
|
|
4090
4090
|
Prob_instance = this;
|
|
4091
4091
|
RuleWrapper_init_$Init$('prob', 2, VOID, this);
|
|
4092
4092
|
}
|
|
4093
|
-
protoOf(Prob).
|
|
4093
|
+
protoOf(Prob).g2i = function (_this__u8e3s4) {
|
|
4094
4094
|
return listOf_0([_this__u8e3s4.varOf('EXPL'), _this__u8e3s4.varOf('GOAL')]);
|
|
4095
4095
|
};
|
|
4096
|
-
protoOf(Prob).
|
|
4096
|
+
protoOf(Prob).h2i = function (_this__u8e3s4) {
|
|
4097
4097
|
var expl = _this__u8e3s4.varOf('EXPL');
|
|
4098
4098
|
var goal = _this__u8e3s4.varOf('GOAL');
|
|
4099
4099
|
var newGoal = _this__u8e3s4.varOf('NEW_GOAL');
|
|
@@ -4122,22 +4122,22 @@
|
|
|
4122
4122
|
protoOf(ProblogSolverFactory).mutableSolverOf = mutableSolverOf;
|
|
4123
4123
|
protoOf(ProblogSolverFactory).rawMutableSolverOf = rawMutableSolverOf;
|
|
4124
4124
|
protoOf(ProblogSolverFactory).newBuilder = newBuilder;
|
|
4125
|
-
protoOf(ProblogSolverFactory).
|
|
4126
|
-
protoOf(ProblogSolverFactory).
|
|
4127
|
-
protoOf(ProblogSolverFactory).
|
|
4128
|
-
protoOf(ProblogSolverFactory).
|
|
4129
|
-
protoOf(ProblogSolverFactory).
|
|
4130
|
-
protoOf(ProblogSolverFactory).
|
|
4131
|
-
protoOf(ProblogSolverFactory).
|
|
4132
|
-
protoOf(ProblogSolverFactory).
|
|
4133
|
-
protoOf(ProblogSolverFactory).
|
|
4125
|
+
protoOf(ProblogSolverFactory).z1w = get_defaultRuntime;
|
|
4126
|
+
protoOf(ProblogSolverFactory).b1x = get_defaultUnificator;
|
|
4127
|
+
protoOf(ProblogSolverFactory).f1x = get_defaultStaticKb;
|
|
4128
|
+
protoOf(ProblogSolverFactory).g1x = get_defaultDynamicKb;
|
|
4129
|
+
protoOf(ProblogSolverFactory).h1x = get_defaultInputChannel;
|
|
4130
|
+
protoOf(ProblogSolverFactory).i1x = get_defaultOutputChannel;
|
|
4131
|
+
protoOf(ProblogSolverFactory).j1x = get_defaultErrorChannel;
|
|
4132
|
+
protoOf(ProblogSolverFactory).k1x = get_defaultWarningsChannel;
|
|
4133
|
+
protoOf(ProblogSolverFactory).s1x = solverWithDefaultBuiltins;
|
|
4134
4134
|
protoOf(ProblogSolverFactory).solverWithDefaultBuiltinsAnd = solverWithDefaultBuiltinsAnd;
|
|
4135
|
-
protoOf(ProblogSolverFactory).
|
|
4135
|
+
protoOf(ProblogSolverFactory).u1x = mutableSolverWithDefaultBuiltins;
|
|
4136
4136
|
protoOf(ProblogSolverFactory).mutableSolverWithDefaultBuiltinsAnd = mutableSolverWithDefaultBuiltinsAnd;
|
|
4137
4137
|
defineProp(protoOf(ClauseMappingException), 'message', function () {
|
|
4138
4138
|
return this.o1();
|
|
4139
4139
|
});
|
|
4140
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
4140
|
+
protoOf(BinaryDecisionDiagramExplanation).h39 = get_probabilityOrNull;
|
|
4141
4141
|
//endregion
|
|
4142
4142
|
//region block: init
|
|
4143
4143
|
ProblogSolverFactory_instance = new ProblogSolverFactory();
|