@tuprolog/2p-full 0.32.4 → 1.0.0
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-core.js +379 -412
- package/2p-core.js.map +1 -1
- package/2p-io-lib.js +463 -463
- package/2p-oop-lib.js +594 -594
- package/2p-oop-lib.js.map +1 -1
- package/2p-parser-core.js +114 -114
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-theory.js +11 -11
- package/2p-repl.js +63 -63
- package/2p-repl.js.map +1 -1
- package/2p-solve-classic.js +794 -794
- package/2p-solve-classic.js.map +1 -1
- package/2p-solve-plp.js +1 -1
- package/2p-solve-problog.js +922 -922
- package/2p-solve-problog.js.map +1 -1
- package/2p-solve-streams.js +641 -641
- package/2p-solve.js +2877 -2867
- package/2p-solve.js.map +1 -1
- package/2p-test-dsl.js +15 -0
- package/2p-test-dsl.js.map +1 -0
- package/2p-theory.js +1342 -1065
- package/2p-theory.js.map +1 -1
- package/2p-unify.js +160 -160
- package/2p-utils.js +3 -3
- package/2p-utils.js.map +1 -1
- package/clikt-clikt-js-ir.js +1010 -1010
- package/kotlin-kotlin-stdlib.js +31 -31
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlin-test-kotlin-test-js-ir.js +15 -0
- package/kotlin-kotlin-test-kotlin-test-js-ir.js.map +1 -0
- package/package.json +1 -1
package/2p-solve-problog.js
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
function get_probabilityOrNull() {
|
|
218
218
|
var tmp;
|
|
219
219
|
try {
|
|
220
|
-
tmp = this.
|
|
220
|
+
tmp = this.n3d();
|
|
221
221
|
} catch ($p) {
|
|
222
222
|
var tmp_0;
|
|
223
223
|
if ($p instanceof Error) {
|
|
@@ -263,160 +263,160 @@
|
|
|
263
263
|
//endregion
|
|
264
264
|
function MutableProblogSolver(solver) {
|
|
265
265
|
ProblogSolver.call(this, solver);
|
|
266
|
-
this.
|
|
266
|
+
this.i3b_1 = solver;
|
|
267
267
|
}
|
|
268
|
-
protoOf(MutableProblogSolver).
|
|
269
|
-
this.
|
|
268
|
+
protoOf(MutableProblogSolver).v36 = function (library) {
|
|
269
|
+
this.i3b_1.loadLibrary(library);
|
|
270
270
|
};
|
|
271
271
|
protoOf(MutableProblogSolver).loadLibrary = function (library) {
|
|
272
|
-
return this.
|
|
272
|
+
return this.v36(library);
|
|
273
273
|
};
|
|
274
|
-
protoOf(MutableProblogSolver).
|
|
275
|
-
this.
|
|
274
|
+
protoOf(MutableProblogSolver).w36 = function (library) {
|
|
275
|
+
this.i3b_1.unloadLibrary(library);
|
|
276
276
|
};
|
|
277
277
|
protoOf(MutableProblogSolver).unloadLibrary = function (library) {
|
|
278
|
-
return this.
|
|
278
|
+
return this.w36(library);
|
|
279
279
|
};
|
|
280
|
-
protoOf(MutableProblogSolver).
|
|
281
|
-
this.
|
|
280
|
+
protoOf(MutableProblogSolver).x36 = function (libraries) {
|
|
281
|
+
this.i3b_1.setLibraries(libraries);
|
|
282
282
|
};
|
|
283
283
|
protoOf(MutableProblogSolver).setLibraries = function (libraries) {
|
|
284
|
-
return this.
|
|
284
|
+
return this.x36(libraries);
|
|
285
285
|
};
|
|
286
|
-
protoOf(MutableProblogSolver).
|
|
287
|
-
this.
|
|
286
|
+
protoOf(MutableProblogSolver).y36 = function (theory) {
|
|
287
|
+
this.i3b_1.loadStaticKb(Companion_instance_11.ofIterable(this.i3b_1.f1l(), theory));
|
|
288
288
|
};
|
|
289
289
|
protoOf(MutableProblogSolver).loadStaticKb = function (theory) {
|
|
290
|
-
return this.
|
|
290
|
+
return this.y36(theory);
|
|
291
291
|
};
|
|
292
|
-
protoOf(MutableProblogSolver).
|
|
293
|
-
this.
|
|
292
|
+
protoOf(MutableProblogSolver).z36 = function (theory) {
|
|
293
|
+
this.i3b_1.appendStaticKb(Companion_instance_11.ofIterable(this.i3b_1.f1l(), theory));
|
|
294
294
|
};
|
|
295
295
|
protoOf(MutableProblogSolver).appendStaticKb = function (theory) {
|
|
296
|
-
return this.
|
|
296
|
+
return this.z36(theory);
|
|
297
297
|
};
|
|
298
|
-
protoOf(MutableProblogSolver).
|
|
299
|
-
this.
|
|
298
|
+
protoOf(MutableProblogSolver).a37 = function () {
|
|
299
|
+
this.i3b_1.resetStaticKb();
|
|
300
300
|
};
|
|
301
301
|
protoOf(MutableProblogSolver).resetStaticKb = function () {
|
|
302
|
-
return this.
|
|
302
|
+
return this.a37();
|
|
303
303
|
};
|
|
304
|
-
protoOf(MutableProblogSolver).
|
|
305
|
-
this.
|
|
304
|
+
protoOf(MutableProblogSolver).b37 = function (theory) {
|
|
305
|
+
this.i3b_1.loadDynamicKb(Companion_instance_11.ofIterable(this.i3b_1.f1l(), theory));
|
|
306
306
|
};
|
|
307
307
|
protoOf(MutableProblogSolver).loadDynamicKb = function (theory) {
|
|
308
|
-
return this.
|
|
308
|
+
return this.b37(theory);
|
|
309
309
|
};
|
|
310
|
-
protoOf(MutableProblogSolver).
|
|
311
|
-
this.
|
|
310
|
+
protoOf(MutableProblogSolver).c37 = function (theory) {
|
|
311
|
+
this.i3b_1.appendDynamicKb(Companion_instance_11.ofIterable(this.i3b_1.f1l(), theory));
|
|
312
312
|
};
|
|
313
313
|
protoOf(MutableProblogSolver).appendDynamicKb = function (theory) {
|
|
314
|
-
return this.
|
|
314
|
+
return this.c37(theory);
|
|
315
315
|
};
|
|
316
|
-
protoOf(MutableProblogSolver).
|
|
317
|
-
this.
|
|
316
|
+
protoOf(MutableProblogSolver).d37 = function () {
|
|
317
|
+
this.i3b_1.resetDynamicKb();
|
|
318
318
|
};
|
|
319
319
|
protoOf(MutableProblogSolver).resetDynamicKb = function () {
|
|
320
|
-
return this.
|
|
320
|
+
return this.d37();
|
|
321
321
|
};
|
|
322
|
-
protoOf(MutableProblogSolver).
|
|
323
|
-
this.
|
|
322
|
+
protoOf(MutableProblogSolver).r1m = function (clause) {
|
|
323
|
+
this.i3b_1.assertA(first(Companion_instance_11.of(this.i3b_1.f1l(), [clause]).p1l()));
|
|
324
324
|
};
|
|
325
325
|
protoOf(MutableProblogSolver).assertA = function (clause) {
|
|
326
|
-
return this.
|
|
326
|
+
return this.r1m(clause);
|
|
327
327
|
};
|
|
328
|
-
protoOf(MutableProblogSolver).
|
|
329
|
-
this.
|
|
328
|
+
protoOf(MutableProblogSolver).e37 = function (fact) {
|
|
329
|
+
this.i3b_1.assertA(first(Companion_instance_11.of(this.i3b_1.f1l(), [Companion_instance.of(fact)]).p1l()));
|
|
330
330
|
};
|
|
331
331
|
protoOf(MutableProblogSolver).assertAFact = function (fact) {
|
|
332
|
-
return this.
|
|
332
|
+
return this.e37(fact);
|
|
333
333
|
};
|
|
334
|
-
protoOf(MutableProblogSolver).
|
|
335
|
-
this.
|
|
334
|
+
protoOf(MutableProblogSolver).s1l = function (clause) {
|
|
335
|
+
this.i3b_1.assertZ(first(Companion_instance_11.of(this.i3b_1.f1l(), [clause]).p1l()));
|
|
336
336
|
};
|
|
337
337
|
protoOf(MutableProblogSolver).assertZ = function (clause) {
|
|
338
|
-
return this.
|
|
338
|
+
return this.s1l(clause);
|
|
339
339
|
};
|
|
340
|
-
protoOf(MutableProblogSolver).
|
|
341
|
-
this.
|
|
340
|
+
protoOf(MutableProblogSolver).f37 = function (fact) {
|
|
341
|
+
this.i3b_1.assertA(first(Companion_instance_11.of(this.i3b_1.f1l(), [Companion_instance.of(fact)]).p1l()));
|
|
342
342
|
};
|
|
343
343
|
protoOf(MutableProblogSolver).assertZFact = function (fact) {
|
|
344
|
-
return this.
|
|
344
|
+
return this.f37(fact);
|
|
345
345
|
};
|
|
346
|
-
protoOf(MutableProblogSolver).
|
|
347
|
-
return this.
|
|
346
|
+
protoOf(MutableProblogSolver).l1t = function (clause) {
|
|
347
|
+
return this.i3b_1.retract(first(Companion_instance_11.of(this.i3b_1.f1l(), [clause]).p1l()));
|
|
348
348
|
};
|
|
349
349
|
protoOf(MutableProblogSolver).retract = function (clause) {
|
|
350
|
-
return this.
|
|
350
|
+
return this.l1t(clause);
|
|
351
351
|
};
|
|
352
|
-
protoOf(MutableProblogSolver).
|
|
353
|
-
return this.
|
|
352
|
+
protoOf(MutableProblogSolver).m1t = function (fact) {
|
|
353
|
+
return this.i3b_1.retract(first(Companion_instance_11.of(this.i3b_1.f1l(), [Companion_instance.of(fact)]).p1l()));
|
|
354
354
|
};
|
|
355
355
|
protoOf(MutableProblogSolver).retractByHead = function (fact) {
|
|
356
|
-
return this.
|
|
356
|
+
return this.m1t(fact);
|
|
357
357
|
};
|
|
358
|
-
protoOf(MutableProblogSolver).
|
|
359
|
-
return this.
|
|
358
|
+
protoOf(MutableProblogSolver).x1l = function (clause) {
|
|
359
|
+
return this.i3b_1.retractAll(first(Companion_instance_11.of(this.i3b_1.f1l(), [clause]).p1l()));
|
|
360
360
|
};
|
|
361
361
|
protoOf(MutableProblogSolver).retractAll = function (clause) {
|
|
362
|
-
return this.
|
|
362
|
+
return this.x1l(clause);
|
|
363
363
|
};
|
|
364
|
-
protoOf(MutableProblogSolver).
|
|
365
|
-
return this.
|
|
364
|
+
protoOf(MutableProblogSolver).g37 = function (fact) {
|
|
365
|
+
return this.i3b_1.retractAll(first(Companion_instance_11.of(this.i3b_1.f1l(), [Companion_instance.of(fact)]).p1l()));
|
|
366
366
|
};
|
|
367
367
|
protoOf(MutableProblogSolver).retractAllBeHead = function (fact) {
|
|
368
|
-
return this.
|
|
368
|
+
return this.g37(fact);
|
|
369
369
|
};
|
|
370
|
-
protoOf(MutableProblogSolver).
|
|
371
|
-
this.
|
|
370
|
+
protoOf(MutableProblogSolver).h37 = function (name, value) {
|
|
371
|
+
this.i3b_1.setFlag(name, value);
|
|
372
372
|
};
|
|
373
373
|
protoOf(MutableProblogSolver).setFlag = function (name, value) {
|
|
374
|
-
return this.
|
|
374
|
+
return this.h37(name, value);
|
|
375
375
|
};
|
|
376
|
-
protoOf(MutableProblogSolver).
|
|
377
|
-
this.
|
|
376
|
+
protoOf(MutableProblogSolver).i37 = function (flag) {
|
|
377
|
+
this.i3b_1.setFlagPair(flag);
|
|
378
378
|
};
|
|
379
379
|
protoOf(MutableProblogSolver).setFlagPair = function (flag) {
|
|
380
|
-
return this.
|
|
380
|
+
return this.i37(flag);
|
|
381
381
|
};
|
|
382
|
-
protoOf(MutableProblogSolver).
|
|
383
|
-
this.
|
|
382
|
+
protoOf(MutableProblogSolver).j37 = function (flag) {
|
|
383
|
+
this.i3b_1.setFlagNotable(flag);
|
|
384
384
|
};
|
|
385
385
|
protoOf(MutableProblogSolver).setFlagNotable = function (flag) {
|
|
386
|
-
return this.
|
|
386
|
+
return this.j37(flag);
|
|
387
387
|
};
|
|
388
|
-
protoOf(MutableProblogSolver).
|
|
389
|
-
this.
|
|
388
|
+
protoOf(MutableProblogSolver).k37 = function (stdIn) {
|
|
389
|
+
this.i3b_1.setStandardInput(stdIn);
|
|
390
390
|
};
|
|
391
391
|
protoOf(MutableProblogSolver).setStandardInput = function (stdIn) {
|
|
392
|
-
return this.
|
|
392
|
+
return this.k37(stdIn);
|
|
393
393
|
};
|
|
394
|
-
protoOf(MutableProblogSolver).
|
|
395
|
-
this.
|
|
394
|
+
protoOf(MutableProblogSolver).l37 = function (stdErr) {
|
|
395
|
+
this.i3b_1.setStandardError(stdErr);
|
|
396
396
|
};
|
|
397
397
|
protoOf(MutableProblogSolver).setStandardError = function (stdErr) {
|
|
398
|
-
return this.
|
|
398
|
+
return this.l37(stdErr);
|
|
399
399
|
};
|
|
400
|
-
protoOf(MutableProblogSolver).
|
|
401
|
-
this.
|
|
400
|
+
protoOf(MutableProblogSolver).m37 = function (stdOut) {
|
|
401
|
+
this.i3b_1.setStandardOutput(stdOut);
|
|
402
402
|
};
|
|
403
403
|
protoOf(MutableProblogSolver).setStandardOutput = function (stdOut) {
|
|
404
|
-
return this.
|
|
404
|
+
return this.m37(stdOut);
|
|
405
405
|
};
|
|
406
|
-
protoOf(MutableProblogSolver).
|
|
407
|
-
this.
|
|
406
|
+
protoOf(MutableProblogSolver).n37 = function (warnings) {
|
|
407
|
+
this.i3b_1.setWarnings(warnings);
|
|
408
408
|
};
|
|
409
409
|
protoOf(MutableProblogSolver).setWarnings = function (warnings) {
|
|
410
|
-
return this.
|
|
410
|
+
return this.n37(warnings);
|
|
411
411
|
};
|
|
412
|
-
protoOf(MutableProblogSolver).
|
|
413
|
-
return new MutableProblogSolver(this.
|
|
412
|
+
protoOf(MutableProblogSolver).t1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
413
|
+
return new MutableProblogSolver(this.i3b_1.t1v(unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings));
|
|
414
414
|
};
|
|
415
|
-
protoOf(MutableProblogSolver).
|
|
416
|
-
return new MutableProblogSolver(this.
|
|
415
|
+
protoOf(MutableProblogSolver).u1s = function () {
|
|
416
|
+
return new MutableProblogSolver(this.i3b_1.u1s());
|
|
417
417
|
};
|
|
418
418
|
protoOf(MutableProblogSolver).clone = function () {
|
|
419
|
-
return this.
|
|
419
|
+
return this.u1s();
|
|
420
420
|
};
|
|
421
421
|
function get_ANNOTATION_OPERATOR() {
|
|
422
422
|
_init_properties_Operators_kt__ggskrn();
|
|
@@ -448,11 +448,11 @@
|
|
|
448
448
|
var tmp_0 = Companion_getInstance_1();
|
|
449
449
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
450
450
|
var tmp$ret$0 = ProbSetConfig_getInstance().signature.name;
|
|
451
|
-
var tmp_1 = tmp_0.of(tmp$ret$0, [ProbSetConfig_getInstance().
|
|
451
|
+
var tmp_1 = tmp_0.of(tmp$ret$0, [ProbSetConfig_getInstance().w3b(options)]);
|
|
452
452
|
var tmp_2 = Companion_getInstance_1();
|
|
453
453
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
454
454
|
var tmp$ret$1 = Prob_getInstance().signature.name;
|
|
455
|
-
var tmp_3 = $this.
|
|
455
|
+
var tmp_3 = $this.j3b_1.solveWithOptions(tmp.of(tmp_1, tmp_2.of(tmp$ret$1, [anonVar, goal])), options);
|
|
456
456
|
return map(tmp_3, ProblogSolver$solveNonProbabilistically$lambda(goal, anonVar));
|
|
457
457
|
}
|
|
458
458
|
function solveProbabilistically($this, goal, options) {
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
var tmp = Companion_getInstance_1();
|
|
462
462
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
463
463
|
var tmp$ret$0 = ProbQuery_getInstance().signature.name;
|
|
464
|
-
var tmp_0 = $this.
|
|
464
|
+
var tmp_0 = $this.j3b_1.solveWithOptions(tmp.of(tmp$ret$0, [probabilityVar, goal, ProbSetConfig_getInstance().w3b(options), bddVar]), options);
|
|
465
465
|
return map(tmp_0, ProblogSolver$solveProbabilistically$lambda(probabilityVar, bddVar, goal, options));
|
|
466
466
|
}
|
|
467
467
|
function ProblogSolver$solveNonProbabilistically$lambda$lambda($anonVar) {
|
|
@@ -474,11 +474,11 @@
|
|
|
474
474
|
var tmp;
|
|
475
475
|
if (isInterface(it, Yes)) {
|
|
476
476
|
var tmp_0 = Companion_instance_1;
|
|
477
|
-
var tmp_1 = it.
|
|
478
|
-
tmp = tmp_0.
|
|
477
|
+
var tmp_1 = it.y1u();
|
|
478
|
+
tmp = tmp_0.o1w($goal, tmp_1.r12(ProblogSolver$solveNonProbabilistically$lambda$lambda($anonVar)));
|
|
479
479
|
} else {
|
|
480
480
|
if (isInterface(it, Halt)) {
|
|
481
|
-
tmp = Companion_instance_1.halt($goal, it.
|
|
481
|
+
tmp = Companion_instance_1.halt($goal, it.f1w());
|
|
482
482
|
} else {
|
|
483
483
|
tmp = Companion_instance_1.no($goal);
|
|
484
484
|
}
|
|
@@ -493,16 +493,16 @@
|
|
|
493
493
|
}
|
|
494
494
|
function ProblogSolver$solveProbabilistically$lambda($probabilityVar, $bddVar, $goal, $options) {
|
|
495
495
|
return function (it) {
|
|
496
|
-
var probabilityTerm = it.
|
|
497
|
-
var bddTerm = it.
|
|
496
|
+
var probabilityTerm = it.y1u().x2($probabilityVar);
|
|
497
|
+
var bddTerm = it.y1u().x2($bddVar);
|
|
498
498
|
var tmp;
|
|
499
499
|
if (isInterface(it, Yes)) {
|
|
500
500
|
var tmp_0 = Companion_instance_1;
|
|
501
|
-
var tmp_1 = it.
|
|
502
|
-
tmp = tmp_0.
|
|
501
|
+
var tmp_1 = it.y1u();
|
|
502
|
+
tmp = tmp_0.o1w($goal, tmp_1.r12(ProblogSolver$solveProbabilistically$lambda$lambda($probabilityVar, $bddVar)));
|
|
503
503
|
} else {
|
|
504
504
|
if (isInterface(it, Halt)) {
|
|
505
|
-
tmp = Companion_instance_1.halt($goal, it.
|
|
505
|
+
tmp = Companion_instance_1.halt($goal, it.f1w());
|
|
506
506
|
} else {
|
|
507
507
|
tmp = Companion_instance_1.no($goal);
|
|
508
508
|
}
|
|
@@ -527,9 +527,9 @@
|
|
|
527
527
|
tmp_5 = false;
|
|
528
528
|
}
|
|
529
529
|
if (tmp_5) {
|
|
530
|
-
var explanation = bddTerm.
|
|
530
|
+
var explanation = bddTerm.x3b_1;
|
|
531
531
|
if (explanation instanceof BinaryDecisionDiagramExplanation) {
|
|
532
|
-
newSolution = setBinaryDecisionDiagram(newSolution, explanation.
|
|
532
|
+
newSolution = setBinaryDecisionDiagram(newSolution, explanation.z3b_1);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
tmp_2 = newSolution;
|
|
@@ -538,45 +538,45 @@
|
|
|
538
538
|
};
|
|
539
539
|
}
|
|
540
540
|
function ProblogSolver(solver) {
|
|
541
|
-
this.
|
|
541
|
+
this.j3b_1 = solver;
|
|
542
542
|
}
|
|
543
|
-
protoOf(ProblogSolver).
|
|
544
|
-
return this.
|
|
543
|
+
protoOf(ProblogSolver).f1v = function () {
|
|
544
|
+
return this.j3b_1.f1v();
|
|
545
545
|
};
|
|
546
|
-
protoOf(ProblogSolver).
|
|
547
|
-
return this.
|
|
546
|
+
protoOf(ProblogSolver).d1v = function () {
|
|
547
|
+
return this.j3b_1.d1v();
|
|
548
548
|
};
|
|
549
|
-
protoOf(ProblogSolver).
|
|
550
|
-
return this.
|
|
549
|
+
protoOf(ProblogSolver).g1v = function () {
|
|
550
|
+
return this.j3b_1.g1v();
|
|
551
551
|
};
|
|
552
|
-
protoOf(ProblogSolver).
|
|
553
|
-
return this.
|
|
552
|
+
protoOf(ProblogSolver).c1v = function () {
|
|
553
|
+
return this.j3b_1.c1v();
|
|
554
554
|
};
|
|
555
|
-
protoOf(ProblogSolver).
|
|
556
|
-
return this.
|
|
555
|
+
protoOf(ProblogSolver).l1v = function () {
|
|
556
|
+
return this.j3b_1.l1v();
|
|
557
557
|
};
|
|
558
|
-
protoOf(ProblogSolver).
|
|
559
|
-
return this.
|
|
558
|
+
protoOf(ProblogSolver).h1v = function () {
|
|
559
|
+
return this.j3b_1.h1v();
|
|
560
560
|
};
|
|
561
|
-
protoOf(ProblogSolver).
|
|
562
|
-
return this.
|
|
561
|
+
protoOf(ProblogSolver).o1v = function () {
|
|
562
|
+
return this.j3b_1.o1v();
|
|
563
563
|
};
|
|
564
|
-
protoOf(ProblogSolver).
|
|
565
|
-
return this.
|
|
564
|
+
protoOf(ProblogSolver).m1v = function () {
|
|
565
|
+
return this.j3b_1.m1v();
|
|
566
566
|
};
|
|
567
|
-
protoOf(ProblogSolver).
|
|
568
|
-
return this.
|
|
567
|
+
protoOf(ProblogSolver).n1v = function () {
|
|
568
|
+
return this.j3b_1.n1v();
|
|
569
569
|
};
|
|
570
|
-
protoOf(ProblogSolver).
|
|
571
|
-
return this.
|
|
570
|
+
protoOf(ProblogSolver).e1v = function () {
|
|
571
|
+
return this.j3b_1.e1v();
|
|
572
572
|
};
|
|
573
|
-
protoOf(ProblogSolver).
|
|
574
|
-
return this.
|
|
573
|
+
protoOf(ProblogSolver).f1l = function () {
|
|
574
|
+
return this.j3b_1.f1l();
|
|
575
575
|
};
|
|
576
|
-
protoOf(ProblogSolver).
|
|
577
|
-
return this.
|
|
576
|
+
protoOf(ProblogSolver).p1v = function () {
|
|
577
|
+
return this.j3b_1.p1v();
|
|
578
578
|
};
|
|
579
|
-
protoOf(ProblogSolver).
|
|
579
|
+
protoOf(ProblogSolver).p2b = function (goal, options) {
|
|
580
580
|
var tmp;
|
|
581
581
|
if (!get_isProbabilistic(options)) {
|
|
582
582
|
tmp = solveNonProbabilistically(this, goal, options);
|
|
@@ -586,64 +586,64 @@
|
|
|
586
586
|
return tmp;
|
|
587
587
|
};
|
|
588
588
|
protoOf(ProblogSolver).solveWithOptions = function (goal, options) {
|
|
589
|
-
return this.
|
|
589
|
+
return this.p2b(goal, options);
|
|
590
590
|
};
|
|
591
|
-
protoOf(ProblogSolver).
|
|
592
|
-
return this.
|
|
591
|
+
protoOf(ProblogSolver).k3b = function (goal, timeout) {
|
|
592
|
+
return this.p2b(goal, Companion_getInstance_2().allLazilyWithTimeout(timeout));
|
|
593
593
|
};
|
|
594
594
|
protoOf(ProblogSolver).solveWithTimeout = function (goal, timeout) {
|
|
595
|
-
return this.
|
|
595
|
+
return this.k3b(goal, timeout);
|
|
596
596
|
};
|
|
597
|
-
protoOf(ProblogSolver).
|
|
598
|
-
return this.
|
|
597
|
+
protoOf(ProblogSolver).l3b = function (goal) {
|
|
598
|
+
return this.p2b(goal, Companion_getInstance_2().DEFAULT);
|
|
599
599
|
};
|
|
600
600
|
protoOf(ProblogSolver).solve = function (goal) {
|
|
601
|
-
return this.
|
|
601
|
+
return this.l3b(goal);
|
|
602
602
|
};
|
|
603
|
-
protoOf(ProblogSolver).
|
|
604
|
-
return toList(this.
|
|
603
|
+
protoOf(ProblogSolver).m3b = function (goal, timeout) {
|
|
604
|
+
return toList(this.k3b(goal, timeout));
|
|
605
605
|
};
|
|
606
606
|
protoOf(ProblogSolver).solveListWithTimeout = function (goal, timeout) {
|
|
607
|
-
return this.
|
|
607
|
+
return this.m3b(goal, timeout);
|
|
608
608
|
};
|
|
609
|
-
protoOf(ProblogSolver).
|
|
610
|
-
return toList(this.
|
|
609
|
+
protoOf(ProblogSolver).n3b = function (goal) {
|
|
610
|
+
return toList(this.l3b(goal));
|
|
611
611
|
};
|
|
612
612
|
protoOf(ProblogSolver).solveList = function (goal) {
|
|
613
|
-
return this.
|
|
613
|
+
return this.n3b(goal);
|
|
614
614
|
};
|
|
615
|
-
protoOf(ProblogSolver).
|
|
616
|
-
return toList(this.
|
|
615
|
+
protoOf(ProblogSolver).o3b = function (goal, options) {
|
|
616
|
+
return toList(this.p2b(goal, options));
|
|
617
617
|
};
|
|
618
618
|
protoOf(ProblogSolver).solveListWithOptions = function (goal, options) {
|
|
619
|
-
return this.
|
|
619
|
+
return this.o3b(goal, options);
|
|
620
620
|
};
|
|
621
|
-
protoOf(ProblogSolver).
|
|
622
|
-
return first_0(this.
|
|
621
|
+
protoOf(ProblogSolver).p3b = function (goal, timeout) {
|
|
622
|
+
return first_0(this.p2b(goal, Companion_getInstance_2().someLazilyWithTimeout(1, timeout)));
|
|
623
623
|
};
|
|
624
624
|
protoOf(ProblogSolver).solveOnceWithTimeout = function (goal, timeout) {
|
|
625
|
-
return this.
|
|
625
|
+
return this.p3b(goal, timeout);
|
|
626
626
|
};
|
|
627
|
-
protoOf(ProblogSolver).
|
|
628
|
-
return first_0(this.
|
|
627
|
+
protoOf(ProblogSolver).q3b = function (goal) {
|
|
628
|
+
return first_0(this.p2b(goal, Companion_getInstance_2().someLazily(1)));
|
|
629
629
|
};
|
|
630
630
|
protoOf(ProblogSolver).solveOnce = function (goal) {
|
|
631
|
-
return this.
|
|
631
|
+
return this.q3b(goal);
|
|
632
632
|
};
|
|
633
|
-
protoOf(ProblogSolver).
|
|
634
|
-
return first_0(this.
|
|
633
|
+
protoOf(ProblogSolver).r3b = function (goal, options) {
|
|
634
|
+
return first_0(this.p2b(goal, options.setLimit(1)));
|
|
635
635
|
};
|
|
636
636
|
protoOf(ProblogSolver).solveOnceWithOptions = function (goal, options) {
|
|
637
|
-
return this.
|
|
637
|
+
return this.r3b(goal, options);
|
|
638
638
|
};
|
|
639
|
-
protoOf(ProblogSolver).
|
|
640
|
-
return new ProblogSolver(this.
|
|
639
|
+
protoOf(ProblogSolver).t1v = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
640
|
+
return new ProblogSolver(this.j3b_1.t1v(unificator, libraries, flags, Companion_instance_11.ofIterable(unificator, staticKb), Companion_instance_11.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
641
641
|
};
|
|
642
|
-
protoOf(ProblogSolver).
|
|
643
|
-
return new ProblogSolver(this.
|
|
642
|
+
protoOf(ProblogSolver).u1s = function () {
|
|
643
|
+
return new ProblogSolver(this.j3b_1.clone());
|
|
644
644
|
};
|
|
645
645
|
protoOf(ProblogSolver).clone = function () {
|
|
646
|
-
return this.
|
|
646
|
+
return this.u1s();
|
|
647
647
|
};
|
|
648
648
|
function ensureVariablesTracking($this, flags) {
|
|
649
649
|
var tmp = TrackVariables_getInstance();
|
|
@@ -653,7 +653,7 @@
|
|
|
653
653
|
var tmp;
|
|
654
654
|
// Inline function 'kotlin.collections.contains' call
|
|
655
655
|
// Inline function 'kotlin.collections.containsKey' call
|
|
656
|
-
var key = ProblogLib_getInstance().
|
|
656
|
+
var key = ProblogLib_getInstance().j2e();
|
|
657
657
|
if (!(isInterface(libraries, Map) ? libraries : THROW_CCE()).u2(key)) {
|
|
658
658
|
tmp = libraries.plusLibrary(MinimalBuiltins_getInstance());
|
|
659
659
|
} else {
|
|
@@ -662,27 +662,27 @@
|
|
|
662
662
|
return tmp;
|
|
663
663
|
}
|
|
664
664
|
function ProblogSolverFactory$ensureVariablesTracking$lambda($this$invoke) {
|
|
665
|
-
return $this$invoke.
|
|
665
|
+
return $this$invoke.h29_1;
|
|
666
666
|
}
|
|
667
667
|
function ProblogSolverFactory() {
|
|
668
668
|
}
|
|
669
|
-
protoOf(ProblogSolverFactory).
|
|
669
|
+
protoOf(ProblogSolverFactory).d1y = function () {
|
|
670
670
|
return DefaultBuiltins_getInstance_0();
|
|
671
671
|
};
|
|
672
|
-
protoOf(ProblogSolverFactory).
|
|
672
|
+
protoOf(ProblogSolverFactory).f1y = function () {
|
|
673
673
|
return ensureVariablesTracking(this, get_defaultFlags.call(this));
|
|
674
674
|
};
|
|
675
|
-
protoOf(ProblogSolverFactory).
|
|
676
|
-
return new ProblogSolver(ClassicSolverFactory_instance.
|
|
675
|
+
protoOf(ProblogSolverFactory).o1y = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
676
|
+
return new ProblogSolver(ClassicSolverFactory_instance.o1y(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_11.ofIterable(unificator, staticKb), Companion_instance_11.ofIterable(unificator, dynamicKb), inputs, outputs));
|
|
677
677
|
};
|
|
678
|
-
protoOf(ProblogSolverFactory).
|
|
679
|
-
return new ProblogSolver(ClassicSolverFactory_instance.
|
|
678
|
+
protoOf(ProblogSolverFactory).u1y = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
679
|
+
return new ProblogSolver(ClassicSolverFactory_instance.u1y(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_11.ofIterable(unificator, staticKb), Companion_instance_11.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
680
680
|
};
|
|
681
|
-
protoOf(ProblogSolverFactory).
|
|
682
|
-
return new MutableProblogSolver(ClassicSolverFactory_instance.
|
|
681
|
+
protoOf(ProblogSolverFactory).w1y = function (unificator, libraries, flags, staticKb, dynamicKb, stdIn, stdOut, stdErr, warnings) {
|
|
682
|
+
return new MutableProblogSolver(ClassicSolverFactory_instance.w1y(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_11.ofIterable(unificator, staticKb), Companion_instance_11.ofIterable(unificator, dynamicKb), stdIn, stdOut, stdErr, warnings));
|
|
683
683
|
};
|
|
684
|
-
protoOf(ProblogSolverFactory).
|
|
685
|
-
return new MutableProblogSolver(ClassicSolverFactory_instance.
|
|
684
|
+
protoOf(ProblogSolverFactory).y1y = function (unificator, libraries, flags, staticKb, dynamicKb, inputs, outputs) {
|
|
685
|
+
return new MutableProblogSolver(ClassicSolverFactory_instance.y1y(unificator, fixLibraries(this, libraries), ensureVariablesTracking(this, flags), Companion_instance_11.ofIterable(unificator, staticKb), Companion_instance_11.ofIterable(unificator, dynamicKb), inputs, outputs));
|
|
686
686
|
};
|
|
687
687
|
var ProblogSolverFactory_instance;
|
|
688
688
|
function ProblogSolverFactory_getInstance() {
|
|
@@ -692,17 +692,17 @@
|
|
|
692
692
|
DefaultBuiltins_instance = this;
|
|
693
693
|
ExtensionLibrary.call(this, DefaultBuiltins_getInstance());
|
|
694
694
|
}
|
|
695
|
-
protoOf(DefaultBuiltins).
|
|
696
|
-
return ProblogLib_getInstance().
|
|
695
|
+
protoOf(DefaultBuiltins).j2e = function () {
|
|
696
|
+
return ProblogLib_getInstance().j2e();
|
|
697
697
|
};
|
|
698
|
-
protoOf(DefaultBuiltins).
|
|
699
|
-
return ProblogLib_getInstance().
|
|
698
|
+
protoOf(DefaultBuiltins).u2e = function () {
|
|
699
|
+
return ProblogLib_getInstance().u2e();
|
|
700
700
|
};
|
|
701
|
-
protoOf(DefaultBuiltins).
|
|
702
|
-
return ProblogLib_getInstance().
|
|
701
|
+
protoOf(DefaultBuiltins).w2e = function () {
|
|
702
|
+
return ProblogLib_getInstance().w2e();
|
|
703
703
|
};
|
|
704
|
-
protoOf(DefaultBuiltins).
|
|
705
|
-
return ProblogLib_getInstance().
|
|
704
|
+
protoOf(DefaultBuiltins).v2e = function () {
|
|
705
|
+
return ProblogLib_getInstance().v2e();
|
|
706
706
|
};
|
|
707
707
|
var DefaultBuiltins_instance;
|
|
708
708
|
function DefaultBuiltins_getInstance_0() {
|
|
@@ -714,10 +714,10 @@
|
|
|
714
714
|
MinimalBuiltins_instance = this;
|
|
715
715
|
ExtensionLibrary.call(this, ProblogLib_getInstance());
|
|
716
716
|
}
|
|
717
|
-
protoOf(MinimalBuiltins).
|
|
717
|
+
protoOf(MinimalBuiltins).w2e = function () {
|
|
718
718
|
return listOf(EnsureExecutable_getInstance());
|
|
719
719
|
};
|
|
720
|
-
protoOf(MinimalBuiltins).
|
|
720
|
+
protoOf(MinimalBuiltins).v2e = function () {
|
|
721
721
|
return listOf(Call_getInstance());
|
|
722
722
|
};
|
|
723
723
|
var MinimalBuiltins_instance;
|
|
@@ -729,17 +729,17 @@
|
|
|
729
729
|
function ProblogLib() {
|
|
730
730
|
ProblogLib_instance = this;
|
|
731
731
|
ExtensionLibrary.call(this, Companion_getInstance_3().of('problog.lang'));
|
|
732
|
-
this.
|
|
733
|
-
this.
|
|
734
|
-
this.
|
|
732
|
+
this.q3c_1 = 'EXPL';
|
|
733
|
+
this.r3c_1 = 'evidence';
|
|
734
|
+
this.s3c_1 = 'prob';
|
|
735
735
|
}
|
|
736
|
-
protoOf(ProblogLib).
|
|
736
|
+
protoOf(ProblogLib).u2e = function () {
|
|
737
737
|
return get_PROBLOG_SPECIFIC_OPERATORS();
|
|
738
738
|
};
|
|
739
|
-
protoOf(ProblogLib).
|
|
739
|
+
protoOf(ProblogLib).v2e = function () {
|
|
740
740
|
return listOf(Prob_getInstance());
|
|
741
741
|
};
|
|
742
|
-
protoOf(ProblogLib).
|
|
742
|
+
protoOf(ProblogLib).w2e = function () {
|
|
743
743
|
return listOf_0([ProbHelper_getInstance(), ProbSolve_getInstance(), ProbExplAnd_getInstance(), ProbQuery_getInstance(), ProbSolveEvidence_getInstance(), ProbSolveWithEvidence_getInstance(), ProbNegationAsFailure_getInstance(), ProbSetConfig_getInstance()]);
|
|
744
744
|
};
|
|
745
745
|
var ProblogLib_instance;
|
|
@@ -752,10 +752,10 @@
|
|
|
752
752
|
cause = cause === VOID ? null : cause;
|
|
753
753
|
TuPrologException_init_$Init$(cause, this);
|
|
754
754
|
captureStack(this, ClauseMappingException);
|
|
755
|
-
this.
|
|
755
|
+
this.z3c_1 = message;
|
|
756
756
|
}
|
|
757
757
|
protoOf(ClauseMappingException).na = function () {
|
|
758
|
-
return this.
|
|
758
|
+
return this.z3c_1;
|
|
759
759
|
};
|
|
760
760
|
function Companion() {
|
|
761
761
|
}
|
|
@@ -792,11 +792,11 @@
|
|
|
792
792
|
}
|
|
793
793
|
function Companion_0() {
|
|
794
794
|
Companion_instance_10 = this;
|
|
795
|
-
this.
|
|
796
|
-
this.
|
|
795
|
+
this.a3d_1 = new BinaryDecisionDiagramExplanation(bddTerminalOf(false), Companion_getInstance_13().d3d_1);
|
|
796
|
+
this.b3d_1 = new BinaryDecisionDiagramExplanation(bddTerminalOf(true), Companion_getInstance_13().e3d_1);
|
|
797
797
|
}
|
|
798
|
-
protoOf(Companion_0).
|
|
799
|
-
return new BinaryDecisionDiagramExplanation(bddOf(term), new ComputedValue(term.
|
|
798
|
+
protoOf(Companion_0).f3d = function (term) {
|
|
799
|
+
return new BinaryDecisionDiagramExplanation(bddOf(term), new ComputedValue(term.h3d_1));
|
|
800
800
|
};
|
|
801
801
|
var Companion_instance_10;
|
|
802
802
|
function Companion_getInstance_11() {
|
|
@@ -820,284 +820,284 @@
|
|
|
820
820
|
};
|
|
821
821
|
}
|
|
822
822
|
function ProbExplanationTerm(explanation) {
|
|
823
|
-
this.
|
|
824
|
-
this.
|
|
823
|
+
this.x3b_1 = explanation;
|
|
824
|
+
this.y3b_1 = Companion_getInstance_4().of('<expl:' + explanation + '>');
|
|
825
825
|
}
|
|
826
826
|
protoOf(ProbExplanationTerm).rw = function () {
|
|
827
|
-
return this.
|
|
827
|
+
return this.y3b_1.rw();
|
|
828
828
|
};
|
|
829
829
|
protoOf(ProbExplanationTerm).jx = function () {
|
|
830
|
-
return this.
|
|
830
|
+
return this.y3b_1.jx();
|
|
831
831
|
};
|
|
832
832
|
protoOf(ProbExplanationTerm).kw = function () {
|
|
833
|
-
return this.
|
|
833
|
+
return this.y3b_1.kw();
|
|
834
834
|
};
|
|
835
835
|
protoOf(ProbExplanationTerm).qw = function () {
|
|
836
|
-
return this.
|
|
836
|
+
return this.y3b_1.qw();
|
|
837
837
|
};
|
|
838
838
|
protoOf(ProbExplanationTerm).ix = function () {
|
|
839
|
-
return this.
|
|
839
|
+
return this.y3b_1.ix();
|
|
840
840
|
};
|
|
841
841
|
protoOf(ProbExplanationTerm).lw = function () {
|
|
842
|
-
return this.
|
|
842
|
+
return this.y3b_1.lw();
|
|
843
843
|
};
|
|
844
844
|
protoOf(ProbExplanationTerm).xw = function () {
|
|
845
|
-
return this.
|
|
845
|
+
return this.y3b_1.xw();
|
|
846
846
|
};
|
|
847
847
|
protoOf(ProbExplanationTerm).dx = function () {
|
|
848
|
-
return this.
|
|
848
|
+
return this.y3b_1.dx();
|
|
849
849
|
};
|
|
850
850
|
protoOf(ProbExplanationTerm).mw = function () {
|
|
851
|
-
return this.
|
|
851
|
+
return this.y3b_1.mw();
|
|
852
852
|
};
|
|
853
853
|
protoOf(ProbExplanationTerm).nw = function () {
|
|
854
|
-
return this.
|
|
854
|
+
return this.y3b_1.nw();
|
|
855
855
|
};
|
|
856
856
|
protoOf(ProbExplanationTerm).hx = function () {
|
|
857
|
-
return this.
|
|
857
|
+
return this.y3b_1.hx();
|
|
858
858
|
};
|
|
859
859
|
protoOf(ProbExplanationTerm).fx = function () {
|
|
860
|
-
return this.
|
|
860
|
+
return this.y3b_1.fx();
|
|
861
861
|
};
|
|
862
862
|
protoOf(ProbExplanationTerm).rx = function () {
|
|
863
|
-
return this.
|
|
863
|
+
return this.y3b_1.rx();
|
|
864
864
|
};
|
|
865
865
|
protoOf(ProbExplanationTerm).cx = function () {
|
|
866
|
-
return this.
|
|
866
|
+
return this.y3b_1.cx();
|
|
867
867
|
};
|
|
868
868
|
protoOf(ProbExplanationTerm).qx = function () {
|
|
869
|
-
return this.
|
|
869
|
+
return this.y3b_1.qx();
|
|
870
870
|
};
|
|
871
871
|
protoOf(ProbExplanationTerm).sx = function () {
|
|
872
|
-
return this.
|
|
872
|
+
return this.y3b_1.sx();
|
|
873
873
|
};
|
|
874
874
|
protoOf(ProbExplanationTerm).ox = function () {
|
|
875
|
-
return this.
|
|
875
|
+
return this.y3b_1.ox();
|
|
876
876
|
};
|
|
877
877
|
protoOf(ProbExplanationTerm).yw = function () {
|
|
878
|
-
return this.
|
|
878
|
+
return this.y3b_1.yw();
|
|
879
879
|
};
|
|
880
880
|
protoOf(ProbExplanationTerm).ww = function () {
|
|
881
|
-
return this.
|
|
881
|
+
return this.y3b_1.ww();
|
|
882
882
|
};
|
|
883
883
|
protoOf(ProbExplanationTerm).ow = function () {
|
|
884
|
-
return this.
|
|
884
|
+
return this.y3b_1.ow();
|
|
885
885
|
};
|
|
886
886
|
protoOf(ProbExplanationTerm).nx = function () {
|
|
887
|
-
return this.
|
|
887
|
+
return this.y3b_1.nx();
|
|
888
888
|
};
|
|
889
889
|
protoOf(ProbExplanationTerm).bx = function () {
|
|
890
|
-
return this.
|
|
890
|
+
return this.y3b_1.bx();
|
|
891
891
|
};
|
|
892
892
|
protoOf(ProbExplanationTerm).mx = function () {
|
|
893
|
-
return this.
|
|
893
|
+
return this.y3b_1.mx();
|
|
894
894
|
};
|
|
895
895
|
protoOf(ProbExplanationTerm).vt = function () {
|
|
896
|
-
return this.
|
|
896
|
+
return this.y3b_1.vt();
|
|
897
897
|
};
|
|
898
898
|
protoOf(ProbExplanationTerm).r2 = function () {
|
|
899
|
-
return this.
|
|
899
|
+
return this.y3b_1.r2();
|
|
900
900
|
};
|
|
901
901
|
protoOf(ProbExplanationTerm).sw = function () {
|
|
902
|
-
return this.
|
|
902
|
+
return this.y3b_1.sw();
|
|
903
903
|
};
|
|
904
904
|
protoOf(ProbExplanationTerm).accept = function (visitor) {
|
|
905
|
-
return this.
|
|
905
|
+
return this.y3b_1.accept(visitor);
|
|
906
906
|
};
|
|
907
907
|
protoOf(ProbExplanationTerm).addFirst = function (argument) {
|
|
908
|
-
return this.
|
|
908
|
+
return this.y3b_1.addFirst(argument);
|
|
909
909
|
};
|
|
910
910
|
protoOf(ProbExplanationTerm).addLast = function (argument) {
|
|
911
|
-
return this.
|
|
911
|
+
return this.y3b_1.addLast(argument);
|
|
912
912
|
};
|
|
913
913
|
protoOf(ProbExplanationTerm).append = function (argument) {
|
|
914
|
-
return this.
|
|
914
|
+
return this.y3b_1.append(argument);
|
|
915
915
|
};
|
|
916
916
|
protoOf(ProbExplanationTerm).vw = function () {
|
|
917
|
-
return this.
|
|
917
|
+
return this.y3b_1.vw();
|
|
918
918
|
};
|
|
919
919
|
protoOf(ProbExplanationTerm).asAtom = function () {
|
|
920
920
|
return this.vw();
|
|
921
921
|
};
|
|
922
922
|
protoOf(ProbExplanationTerm).asBlock = function () {
|
|
923
|
-
return this.
|
|
923
|
+
return this.y3b_1.asBlock();
|
|
924
924
|
};
|
|
925
925
|
protoOf(ProbExplanationTerm).asClause = function () {
|
|
926
|
-
return this.
|
|
926
|
+
return this.y3b_1.asClause();
|
|
927
927
|
};
|
|
928
928
|
protoOf(ProbExplanationTerm).asCons = function () {
|
|
929
|
-
return this.
|
|
929
|
+
return this.y3b_1.asCons();
|
|
930
930
|
};
|
|
931
931
|
protoOf(ProbExplanationTerm).asDirective = function () {
|
|
932
|
-
return this.
|
|
932
|
+
return this.y3b_1.asDirective();
|
|
933
933
|
};
|
|
934
934
|
protoOf(ProbExplanationTerm).asEmptyBlock = function () {
|
|
935
|
-
return this.
|
|
935
|
+
return this.y3b_1.asEmptyBlock();
|
|
936
936
|
};
|
|
937
937
|
protoOf(ProbExplanationTerm).asEmptyList = function () {
|
|
938
|
-
return this.
|
|
938
|
+
return this.y3b_1.asEmptyList();
|
|
939
939
|
};
|
|
940
940
|
protoOf(ProbExplanationTerm).asFact = function () {
|
|
941
|
-
return this.
|
|
941
|
+
return this.y3b_1.asFact();
|
|
942
942
|
};
|
|
943
943
|
protoOf(ProbExplanationTerm).asIndicator = function () {
|
|
944
|
-
return this.
|
|
944
|
+
return this.y3b_1.asIndicator();
|
|
945
945
|
};
|
|
946
946
|
protoOf(ProbExplanationTerm).asInteger = function () {
|
|
947
|
-
return this.
|
|
947
|
+
return this.y3b_1.asInteger();
|
|
948
948
|
};
|
|
949
949
|
protoOf(ProbExplanationTerm).asList = function () {
|
|
950
|
-
return this.
|
|
950
|
+
return this.y3b_1.asList();
|
|
951
951
|
};
|
|
952
952
|
protoOf(ProbExplanationTerm).asNumeric = function () {
|
|
953
|
-
return this.
|
|
953
|
+
return this.y3b_1.asNumeric();
|
|
954
954
|
};
|
|
955
955
|
protoOf(ProbExplanationTerm).asReal = function () {
|
|
956
|
-
return this.
|
|
956
|
+
return this.y3b_1.asReal();
|
|
957
957
|
};
|
|
958
958
|
protoOf(ProbExplanationTerm).asRecursive = function () {
|
|
959
|
-
return this.
|
|
959
|
+
return this.y3b_1.asRecursive();
|
|
960
960
|
};
|
|
961
961
|
protoOf(ProbExplanationTerm).asRule = function () {
|
|
962
|
-
return this.
|
|
962
|
+
return this.y3b_1.asRule();
|
|
963
963
|
};
|
|
964
964
|
protoOf(ProbExplanationTerm).gx = function () {
|
|
965
|
-
return this.
|
|
965
|
+
return this.y3b_1.gx();
|
|
966
966
|
};
|
|
967
967
|
protoOf(ProbExplanationTerm).asStruct = function () {
|
|
968
968
|
return this.gx();
|
|
969
969
|
};
|
|
970
970
|
protoOf(ProbExplanationTerm).asTerm = function () {
|
|
971
|
-
return this.
|
|
971
|
+
return this.y3b_1.asTerm();
|
|
972
972
|
};
|
|
973
973
|
protoOf(ProbExplanationTerm).asTruth = function () {
|
|
974
|
-
return this.
|
|
974
|
+
return this.y3b_1.asTruth();
|
|
975
975
|
};
|
|
976
976
|
protoOf(ProbExplanationTerm).asTuple = function () {
|
|
977
|
-
return this.
|
|
977
|
+
return this.y3b_1.asTuple();
|
|
978
978
|
};
|
|
979
979
|
protoOf(ProbExplanationTerm).asVar = function () {
|
|
980
|
-
return this.
|
|
980
|
+
return this.y3b_1.asVar();
|
|
981
981
|
};
|
|
982
982
|
protoOf(ProbExplanationTerm).kx = function () {
|
|
983
|
-
return this.
|
|
983
|
+
return this.y3b_1.kx();
|
|
984
984
|
};
|
|
985
985
|
protoOf(ProbExplanationTerm).br = function () {
|
|
986
986
|
return this.kx();
|
|
987
987
|
};
|
|
988
988
|
protoOf(ProbExplanationTerm).castToAtom = function () {
|
|
989
|
-
return this.
|
|
989
|
+
return this.y3b_1.castToAtom();
|
|
990
990
|
};
|
|
991
991
|
protoOf(ProbExplanationTerm).castToBlock = function () {
|
|
992
|
-
return this.
|
|
992
|
+
return this.y3b_1.castToBlock();
|
|
993
993
|
};
|
|
994
994
|
protoOf(ProbExplanationTerm).castToClause = function () {
|
|
995
|
-
return this.
|
|
995
|
+
return this.y3b_1.castToClause();
|
|
996
996
|
};
|
|
997
997
|
protoOf(ProbExplanationTerm).castToCons = function () {
|
|
998
|
-
return this.
|
|
998
|
+
return this.y3b_1.castToCons();
|
|
999
999
|
};
|
|
1000
1000
|
protoOf(ProbExplanationTerm).castToConstant = function () {
|
|
1001
|
-
return this.
|
|
1001
|
+
return this.y3b_1.castToConstant();
|
|
1002
1002
|
};
|
|
1003
1003
|
protoOf(ProbExplanationTerm).castToDirective = function () {
|
|
1004
|
-
return this.
|
|
1004
|
+
return this.y3b_1.castToDirective();
|
|
1005
1005
|
};
|
|
1006
1006
|
protoOf(ProbExplanationTerm).castToEmptyBlock = function () {
|
|
1007
|
-
return this.
|
|
1007
|
+
return this.y3b_1.castToEmptyBlock();
|
|
1008
1008
|
};
|
|
1009
1009
|
protoOf(ProbExplanationTerm).castToEmptyList = function () {
|
|
1010
|
-
return this.
|
|
1010
|
+
return this.y3b_1.castToEmptyList();
|
|
1011
1011
|
};
|
|
1012
1012
|
protoOf(ProbExplanationTerm).castToFact = function () {
|
|
1013
|
-
return this.
|
|
1013
|
+
return this.y3b_1.castToFact();
|
|
1014
1014
|
};
|
|
1015
1015
|
protoOf(ProbExplanationTerm).castToIndicator = function () {
|
|
1016
|
-
return this.
|
|
1016
|
+
return this.y3b_1.castToIndicator();
|
|
1017
1017
|
};
|
|
1018
1018
|
protoOf(ProbExplanationTerm).castToInteger = function () {
|
|
1019
|
-
return this.
|
|
1019
|
+
return this.y3b_1.castToInteger();
|
|
1020
1020
|
};
|
|
1021
1021
|
protoOf(ProbExplanationTerm).castToList = function () {
|
|
1022
|
-
return this.
|
|
1022
|
+
return this.y3b_1.castToList();
|
|
1023
1023
|
};
|
|
1024
1024
|
protoOf(ProbExplanationTerm).castToNumeric = function () {
|
|
1025
|
-
return this.
|
|
1025
|
+
return this.y3b_1.castToNumeric();
|
|
1026
1026
|
};
|
|
1027
1027
|
protoOf(ProbExplanationTerm).castToReal = function () {
|
|
1028
|
-
return this.
|
|
1028
|
+
return this.y3b_1.castToReal();
|
|
1029
1029
|
};
|
|
1030
1030
|
protoOf(ProbExplanationTerm).castToRecursive = function () {
|
|
1031
|
-
return this.
|
|
1031
|
+
return this.y3b_1.castToRecursive();
|
|
1032
1032
|
};
|
|
1033
1033
|
protoOf(ProbExplanationTerm).castToRule = function () {
|
|
1034
|
-
return this.
|
|
1034
|
+
return this.y3b_1.castToRule();
|
|
1035
1035
|
};
|
|
1036
1036
|
protoOf(ProbExplanationTerm).castToStruct = function () {
|
|
1037
|
-
return this.
|
|
1037
|
+
return this.y3b_1.castToStruct();
|
|
1038
1038
|
};
|
|
1039
1039
|
protoOf(ProbExplanationTerm).castToTerm = function () {
|
|
1040
|
-
return this.
|
|
1040
|
+
return this.y3b_1.castToTerm();
|
|
1041
1041
|
};
|
|
1042
1042
|
protoOf(ProbExplanationTerm).castToTruth = function () {
|
|
1043
|
-
return this.
|
|
1043
|
+
return this.y3b_1.castToTruth();
|
|
1044
1044
|
};
|
|
1045
1045
|
protoOf(ProbExplanationTerm).castToTuple = function () {
|
|
1046
|
-
return this.
|
|
1046
|
+
return this.y3b_1.castToTuple();
|
|
1047
1047
|
};
|
|
1048
1048
|
protoOf(ProbExplanationTerm).castToVar = function () {
|
|
1049
|
-
return this.
|
|
1049
|
+
return this.y3b_1.castToVar();
|
|
1050
1050
|
};
|
|
1051
1051
|
protoOf(ProbExplanationTerm).lx = function (other) {
|
|
1052
|
-
return this.
|
|
1052
|
+
return this.y3b_1.lx(other);
|
|
1053
1053
|
};
|
|
1054
1054
|
protoOf(ProbExplanationTerm).d = function (other) {
|
|
1055
1055
|
return this.lx((!(other == null) ? isInterface(other, Term) : false) ? other : THROW_CCE());
|
|
1056
1056
|
};
|
|
1057
1057
|
protoOf(ProbExplanationTerm).containsTag = function (name) {
|
|
1058
|
-
return this.
|
|
1058
|
+
return this.y3b_1.containsTag(name);
|
|
1059
1059
|
};
|
|
1060
1060
|
protoOf(ProbExplanationTerm).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
1061
|
-
return this.
|
|
1061
|
+
return this.y3b_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
1062
1062
|
};
|
|
1063
1063
|
protoOf(ProbExplanationTerm).equals = function (other) {
|
|
1064
|
-
return this.
|
|
1064
|
+
return this.y3b_1.equals(other);
|
|
1065
1065
|
};
|
|
1066
1066
|
protoOf(ProbExplanationTerm).get = function (index) {
|
|
1067
|
-
return this.
|
|
1067
|
+
return this.y3b_1.get(index);
|
|
1068
1068
|
};
|
|
1069
1069
|
protoOf(ProbExplanationTerm).getArgAt = function (index) {
|
|
1070
|
-
return this.
|
|
1070
|
+
return this.y3b_1.getArgAt(index);
|
|
1071
1071
|
};
|
|
1072
1072
|
protoOf(ProbExplanationTerm).getTag = function (name) {
|
|
1073
|
-
return this.
|
|
1073
|
+
return this.y3b_1.getTag(name);
|
|
1074
1074
|
};
|
|
1075
1075
|
protoOf(ProbExplanationTerm).hashCode = function () {
|
|
1076
|
-
return this.
|
|
1076
|
+
return this.y3b_1.hashCode();
|
|
1077
1077
|
};
|
|
1078
1078
|
protoOf(ProbExplanationTerm).insertAt = function (index, argument) {
|
|
1079
|
-
return this.
|
|
1079
|
+
return this.y3b_1.insertAt(index, argument);
|
|
1080
1080
|
};
|
|
1081
1081
|
protoOf(ProbExplanationTerm).resetTags = function (tags) {
|
|
1082
|
-
return this.
|
|
1082
|
+
return this.y3b_1.resetTags(tags);
|
|
1083
1083
|
};
|
|
1084
1084
|
protoOf(ProbExplanationTerm).setArgs = function (args) {
|
|
1085
|
-
return this.
|
|
1085
|
+
return this.y3b_1.setArgs(args);
|
|
1086
1086
|
};
|
|
1087
1087
|
protoOf(ProbExplanationTerm).setArgsIterable = function (args) {
|
|
1088
|
-
return this.
|
|
1088
|
+
return this.y3b_1.setArgsIterable(args);
|
|
1089
1089
|
};
|
|
1090
1090
|
protoOf(ProbExplanationTerm).setArgsSequence = function (args) {
|
|
1091
|
-
return this.
|
|
1091
|
+
return this.y3b_1.setArgsSequence(args);
|
|
1092
1092
|
};
|
|
1093
1093
|
protoOf(ProbExplanationTerm).setFunctor = function (functor) {
|
|
1094
|
-
return this.
|
|
1094
|
+
return this.y3b_1.setFunctor(functor);
|
|
1095
1095
|
};
|
|
1096
1096
|
protoOf(ProbExplanationTerm).structurallyEquals = function (other) {
|
|
1097
|
-
return this.
|
|
1097
|
+
return this.y3b_1.structurallyEquals(other);
|
|
1098
1098
|
};
|
|
1099
1099
|
protoOf(ProbExplanationTerm).toString = function () {
|
|
1100
|
-
return this.
|
|
1100
|
+
return this.y3b_1.toString();
|
|
1101
1101
|
};
|
|
1102
1102
|
protoOf(ProbExplanationTerm).px = function () {
|
|
1103
1103
|
return false;
|
|
@@ -1109,35 +1109,35 @@
|
|
|
1109
1109
|
return this.tx();
|
|
1110
1110
|
};
|
|
1111
1111
|
protoOf(ProbExplanationTerm).tw = function () {
|
|
1112
|
-
return new ProbExplanationTerm(this.
|
|
1112
|
+
return new ProbExplanationTerm(this.x3b_1.applyTransformation(ProbExplanationTerm$freshCopy$lambda));
|
|
1113
1113
|
};
|
|
1114
1114
|
protoOf(ProbExplanationTerm).freshCopy = function () {
|
|
1115
1115
|
return this.tw();
|
|
1116
1116
|
};
|
|
1117
1117
|
protoOf(ProbExplanationTerm).uw = function (scope) {
|
|
1118
|
-
return new ProbExplanationTerm(this.
|
|
1118
|
+
return new ProbExplanationTerm(this.x3b_1.applyTransformation(ProbExplanationTerm$freshCopy$lambda_0(scope)));
|
|
1119
1119
|
};
|
|
1120
1120
|
protoOf(ProbExplanationTerm).freshCopyFromScope = function (scope) {
|
|
1121
1121
|
return this.uw(scope);
|
|
1122
1122
|
};
|
|
1123
|
-
protoOf(ProbExplanationTerm).
|
|
1124
|
-
return this.
|
|
1123
|
+
protoOf(ProbExplanationTerm).r2o = function (substitution, substitutions) {
|
|
1124
|
+
return this.s2o(substitution, substitutions.slice());
|
|
1125
1125
|
};
|
|
1126
1126
|
protoOf(ProbExplanationTerm).getSubstituted = function (substitution, substitutions) {
|
|
1127
|
-
return this.
|
|
1127
|
+
return this.r2o(substitution, substitutions);
|
|
1128
1128
|
};
|
|
1129
|
-
protoOf(ProbExplanationTerm).
|
|
1129
|
+
protoOf(ProbExplanationTerm).s2o = function (substitution, substitutions) {
|
|
1130
1130
|
return this.w16(Companion_getInstance_5().ofSubstitution(substitution, substitutions.slice()));
|
|
1131
1131
|
};
|
|
1132
1132
|
protoOf(ProbExplanationTerm).apply = function (substitution, substitutions) {
|
|
1133
|
-
return this.
|
|
1133
|
+
return this.s2o(substitution, substitutions);
|
|
1134
1134
|
};
|
|
1135
1135
|
protoOf(ProbExplanationTerm).w16 = function (substitution) {
|
|
1136
1136
|
var tmp;
|
|
1137
1137
|
if (substitution.y() ? true : this.ux()) {
|
|
1138
1138
|
tmp = this;
|
|
1139
1139
|
} else {
|
|
1140
|
-
tmp = new ProbExplanationTerm(this.
|
|
1140
|
+
tmp = new ProbExplanationTerm(this.x3b_1.applyTransformation(ProbExplanationTerm$apply$lambda(substitution)));
|
|
1141
1141
|
}
|
|
1142
1142
|
return tmp;
|
|
1143
1143
|
};
|
|
@@ -1145,22 +1145,22 @@
|
|
|
1145
1145
|
return this.w16(substitution);
|
|
1146
1146
|
};
|
|
1147
1147
|
protoOf(ProbExplanationTerm).ux = function () {
|
|
1148
|
-
return !this.
|
|
1148
|
+
return !this.x3b_1.p3d();
|
|
1149
1149
|
};
|
|
1150
1150
|
function _get_cachedHashCode__d7x0zy($this) {
|
|
1151
1151
|
// Inline function 'kotlin.getValue' call
|
|
1152
|
-
var this_0 = $this.
|
|
1152
|
+
var this_0 = $this.m3d_1;
|
|
1153
1153
|
cachedHashCode$factory();
|
|
1154
1154
|
return this_0.r2();
|
|
1155
1155
|
}
|
|
1156
1156
|
function ProbTerm$isGround$delegate$lambda(this$0) {
|
|
1157
1157
|
return function () {
|
|
1158
1158
|
var tmp;
|
|
1159
|
-
if (this$0.
|
|
1159
|
+
if (this$0.i3d_1.ux()) {
|
|
1160
1160
|
var tmp$ret$0;
|
|
1161
1161
|
$l$block_0: {
|
|
1162
1162
|
// Inline function 'kotlin.collections.any' call
|
|
1163
|
-
var this_0 = this$0.
|
|
1163
|
+
var this_0 = this$0.j3d_1;
|
|
1164
1164
|
var tmp_0;
|
|
1165
1165
|
if (isInterface(this_0, Collection)) {
|
|
1166
1166
|
tmp_0 = this_0.y();
|
|
@@ -1191,230 +1191,230 @@
|
|
|
1191
1191
|
}
|
|
1192
1192
|
function ProbTerm$cachedHashCode$delegate$lambda(this$0) {
|
|
1193
1193
|
return function () {
|
|
1194
|
-
var result = this$0.
|
|
1195
|
-
result = imul(31, result) + getNumberHashCode(this$0.
|
|
1196
|
-
result = imul(31, result) + this$0.
|
|
1197
|
-
result = imul(31, result) + hashCode(this$0.
|
|
1194
|
+
var result = this$0.g3d_1.hashCode();
|
|
1195
|
+
result = imul(31, result) + getNumberHashCode(this$0.h3d_1) | 0;
|
|
1196
|
+
result = imul(31, result) + this$0.i3d_1.hashCode() | 0;
|
|
1197
|
+
result = imul(31, result) + hashCode(this$0.j3d_1) | 0;
|
|
1198
1198
|
return result;
|
|
1199
1199
|
};
|
|
1200
1200
|
}
|
|
1201
1201
|
function ProbTerm(id, probability, term, extraVariables) {
|
|
1202
1202
|
extraVariables = extraVariables === VOID ? emptySet() : extraVariables;
|
|
1203
|
-
this.
|
|
1204
|
-
this.
|
|
1205
|
-
this.
|
|
1206
|
-
this.
|
|
1207
|
-
this.
|
|
1203
|
+
this.g3d_1 = id;
|
|
1204
|
+
this.h3d_1 = probability;
|
|
1205
|
+
this.i3d_1 = term;
|
|
1206
|
+
this.j3d_1 = extraVariables;
|
|
1207
|
+
this.k3d_1 = Companion_getInstance_1().of(get_ANNOTATION_FUNCTOR(), [Companion_getInstance_6().ofDouble(probability), term]);
|
|
1208
1208
|
var tmp = this;
|
|
1209
|
-
tmp.
|
|
1209
|
+
tmp.l3d_1 = lazy(ProbTerm$isGround$delegate$lambda(this));
|
|
1210
1210
|
var tmp_0 = this;
|
|
1211
|
-
tmp_0.
|
|
1211
|
+
tmp_0.m3d_1 = lazy(ProbTerm$cachedHashCode$delegate$lambda(this));
|
|
1212
1212
|
}
|
|
1213
1213
|
protoOf(ProbTerm).lw = function () {
|
|
1214
|
-
return this.
|
|
1214
|
+
return this.k3d_1.lw();
|
|
1215
1215
|
};
|
|
1216
1216
|
protoOf(ProbTerm).xw = function () {
|
|
1217
|
-
return this.
|
|
1217
|
+
return this.k3d_1.xw();
|
|
1218
1218
|
};
|
|
1219
1219
|
protoOf(ProbTerm).dx = function () {
|
|
1220
|
-
return this.
|
|
1220
|
+
return this.k3d_1.dx();
|
|
1221
1221
|
};
|
|
1222
1222
|
protoOf(ProbTerm).px = function () {
|
|
1223
|
-
return this.
|
|
1223
|
+
return this.k3d_1.px();
|
|
1224
1224
|
};
|
|
1225
1225
|
protoOf(ProbTerm).mw = function () {
|
|
1226
|
-
return this.
|
|
1226
|
+
return this.k3d_1.mw();
|
|
1227
1227
|
};
|
|
1228
1228
|
protoOf(ProbTerm).nw = function () {
|
|
1229
|
-
return this.
|
|
1229
|
+
return this.k3d_1.nw();
|
|
1230
1230
|
};
|
|
1231
1231
|
protoOf(ProbTerm).fx = function () {
|
|
1232
|
-
return this.
|
|
1232
|
+
return this.k3d_1.fx();
|
|
1233
1233
|
};
|
|
1234
1234
|
protoOf(ProbTerm).rx = function () {
|
|
1235
|
-
return this.
|
|
1235
|
+
return this.k3d_1.rx();
|
|
1236
1236
|
};
|
|
1237
1237
|
protoOf(ProbTerm).cx = function () {
|
|
1238
|
-
return this.
|
|
1238
|
+
return this.k3d_1.cx();
|
|
1239
1239
|
};
|
|
1240
1240
|
protoOf(ProbTerm).qx = function () {
|
|
1241
|
-
return this.
|
|
1241
|
+
return this.k3d_1.qx();
|
|
1242
1242
|
};
|
|
1243
1243
|
protoOf(ProbTerm).sx = function () {
|
|
1244
|
-
return this.
|
|
1244
|
+
return this.k3d_1.sx();
|
|
1245
1245
|
};
|
|
1246
1246
|
protoOf(ProbTerm).ww = function () {
|
|
1247
|
-
return this.
|
|
1247
|
+
return this.k3d_1.ww();
|
|
1248
1248
|
};
|
|
1249
1249
|
protoOf(ProbTerm).ow = function () {
|
|
1250
|
-
return this.
|
|
1250
|
+
return this.k3d_1.ow();
|
|
1251
1251
|
};
|
|
1252
1252
|
protoOf(ProbTerm).bx = function () {
|
|
1253
|
-
return this.
|
|
1253
|
+
return this.k3d_1.bx();
|
|
1254
1254
|
};
|
|
1255
1255
|
protoOf(ProbTerm).mx = function () {
|
|
1256
|
-
return this.
|
|
1256
|
+
return this.k3d_1.mx();
|
|
1257
1257
|
};
|
|
1258
1258
|
protoOf(ProbTerm).vt = function () {
|
|
1259
|
-
return this.
|
|
1259
|
+
return this.k3d_1.vt();
|
|
1260
1260
|
};
|
|
1261
1261
|
protoOf(ProbTerm).sw = function () {
|
|
1262
|
-
return this.
|
|
1262
|
+
return this.k3d_1.sw();
|
|
1263
1263
|
};
|
|
1264
1264
|
protoOf(ProbTerm).accept = function (visitor) {
|
|
1265
|
-
return this.
|
|
1265
|
+
return this.k3d_1.accept(visitor);
|
|
1266
1266
|
};
|
|
1267
1267
|
protoOf(ProbTerm).asAtom = function () {
|
|
1268
|
-
return this.
|
|
1268
|
+
return this.k3d_1.asAtom();
|
|
1269
1269
|
};
|
|
1270
1270
|
protoOf(ProbTerm).asBlock = function () {
|
|
1271
|
-
return this.
|
|
1271
|
+
return this.k3d_1.asBlock();
|
|
1272
1272
|
};
|
|
1273
1273
|
protoOf(ProbTerm).asClause = function () {
|
|
1274
|
-
return this.
|
|
1274
|
+
return this.k3d_1.asClause();
|
|
1275
1275
|
};
|
|
1276
1276
|
protoOf(ProbTerm).asCons = function () {
|
|
1277
|
-
return this.
|
|
1277
|
+
return this.k3d_1.asCons();
|
|
1278
1278
|
};
|
|
1279
1279
|
protoOf(ProbTerm).asConstant = function () {
|
|
1280
|
-
return this.
|
|
1280
|
+
return this.k3d_1.asConstant();
|
|
1281
1281
|
};
|
|
1282
1282
|
protoOf(ProbTerm).asDirective = function () {
|
|
1283
|
-
return this.
|
|
1283
|
+
return this.k3d_1.asDirective();
|
|
1284
1284
|
};
|
|
1285
1285
|
protoOf(ProbTerm).asEmptyBlock = function () {
|
|
1286
|
-
return this.
|
|
1286
|
+
return this.k3d_1.asEmptyBlock();
|
|
1287
1287
|
};
|
|
1288
1288
|
protoOf(ProbTerm).asEmptyList = function () {
|
|
1289
|
-
return this.
|
|
1289
|
+
return this.k3d_1.asEmptyList();
|
|
1290
1290
|
};
|
|
1291
1291
|
protoOf(ProbTerm).asFact = function () {
|
|
1292
|
-
return this.
|
|
1292
|
+
return this.k3d_1.asFact();
|
|
1293
1293
|
};
|
|
1294
1294
|
protoOf(ProbTerm).asIndicator = function () {
|
|
1295
|
-
return this.
|
|
1295
|
+
return this.k3d_1.asIndicator();
|
|
1296
1296
|
};
|
|
1297
1297
|
protoOf(ProbTerm).asInteger = function () {
|
|
1298
|
-
return this.
|
|
1298
|
+
return this.k3d_1.asInteger();
|
|
1299
1299
|
};
|
|
1300
1300
|
protoOf(ProbTerm).asList = function () {
|
|
1301
|
-
return this.
|
|
1301
|
+
return this.k3d_1.asList();
|
|
1302
1302
|
};
|
|
1303
1303
|
protoOf(ProbTerm).asNumeric = function () {
|
|
1304
|
-
return this.
|
|
1304
|
+
return this.k3d_1.asNumeric();
|
|
1305
1305
|
};
|
|
1306
1306
|
protoOf(ProbTerm).asReal = function () {
|
|
1307
|
-
return this.
|
|
1307
|
+
return this.k3d_1.asReal();
|
|
1308
1308
|
};
|
|
1309
1309
|
protoOf(ProbTerm).asRecursive = function () {
|
|
1310
|
-
return this.
|
|
1310
|
+
return this.k3d_1.asRecursive();
|
|
1311
1311
|
};
|
|
1312
1312
|
protoOf(ProbTerm).asRule = function () {
|
|
1313
|
-
return this.
|
|
1313
|
+
return this.k3d_1.asRule();
|
|
1314
1314
|
};
|
|
1315
1315
|
protoOf(ProbTerm).asStruct = function () {
|
|
1316
|
-
return this.
|
|
1316
|
+
return this.k3d_1.gx();
|
|
1317
1317
|
};
|
|
1318
1318
|
protoOf(ProbTerm).asTerm = function () {
|
|
1319
|
-
return this.
|
|
1319
|
+
return this.k3d_1.asTerm();
|
|
1320
1320
|
};
|
|
1321
1321
|
protoOf(ProbTerm).asTruth = function () {
|
|
1322
|
-
return this.
|
|
1322
|
+
return this.k3d_1.asTruth();
|
|
1323
1323
|
};
|
|
1324
1324
|
protoOf(ProbTerm).asTuple = function () {
|
|
1325
|
-
return this.
|
|
1325
|
+
return this.k3d_1.asTuple();
|
|
1326
1326
|
};
|
|
1327
1327
|
protoOf(ProbTerm).asVar = function () {
|
|
1328
|
-
return this.
|
|
1328
|
+
return this.k3d_1.asVar();
|
|
1329
1329
|
};
|
|
1330
1330
|
protoOf(ProbTerm).kx = function () {
|
|
1331
|
-
return this.
|
|
1331
|
+
return this.k3d_1.kx();
|
|
1332
1332
|
};
|
|
1333
1333
|
protoOf(ProbTerm).br = function () {
|
|
1334
1334
|
return this.kx();
|
|
1335
1335
|
};
|
|
1336
1336
|
protoOf(ProbTerm).castToAtom = function () {
|
|
1337
|
-
return this.
|
|
1337
|
+
return this.k3d_1.castToAtom();
|
|
1338
1338
|
};
|
|
1339
1339
|
protoOf(ProbTerm).castToBlock = function () {
|
|
1340
|
-
return this.
|
|
1340
|
+
return this.k3d_1.castToBlock();
|
|
1341
1341
|
};
|
|
1342
1342
|
protoOf(ProbTerm).castToClause = function () {
|
|
1343
|
-
return this.
|
|
1343
|
+
return this.k3d_1.castToClause();
|
|
1344
1344
|
};
|
|
1345
1345
|
protoOf(ProbTerm).castToCons = function () {
|
|
1346
|
-
return this.
|
|
1346
|
+
return this.k3d_1.castToCons();
|
|
1347
1347
|
};
|
|
1348
1348
|
protoOf(ProbTerm).castToConstant = function () {
|
|
1349
|
-
return this.
|
|
1349
|
+
return this.k3d_1.castToConstant();
|
|
1350
1350
|
};
|
|
1351
1351
|
protoOf(ProbTerm).castToDirective = function () {
|
|
1352
|
-
return this.
|
|
1352
|
+
return this.k3d_1.castToDirective();
|
|
1353
1353
|
};
|
|
1354
1354
|
protoOf(ProbTerm).castToEmptyBlock = function () {
|
|
1355
|
-
return this.
|
|
1355
|
+
return this.k3d_1.castToEmptyBlock();
|
|
1356
1356
|
};
|
|
1357
1357
|
protoOf(ProbTerm).castToEmptyList = function () {
|
|
1358
|
-
return this.
|
|
1358
|
+
return this.k3d_1.castToEmptyList();
|
|
1359
1359
|
};
|
|
1360
1360
|
protoOf(ProbTerm).castToFact = function () {
|
|
1361
|
-
return this.
|
|
1361
|
+
return this.k3d_1.castToFact();
|
|
1362
1362
|
};
|
|
1363
1363
|
protoOf(ProbTerm).castToIndicator = function () {
|
|
1364
|
-
return this.
|
|
1364
|
+
return this.k3d_1.castToIndicator();
|
|
1365
1365
|
};
|
|
1366
1366
|
protoOf(ProbTerm).castToInteger = function () {
|
|
1367
|
-
return this.
|
|
1367
|
+
return this.k3d_1.castToInteger();
|
|
1368
1368
|
};
|
|
1369
1369
|
protoOf(ProbTerm).castToList = function () {
|
|
1370
|
-
return this.
|
|
1370
|
+
return this.k3d_1.castToList();
|
|
1371
1371
|
};
|
|
1372
1372
|
protoOf(ProbTerm).castToNumeric = function () {
|
|
1373
|
-
return this.
|
|
1373
|
+
return this.k3d_1.castToNumeric();
|
|
1374
1374
|
};
|
|
1375
1375
|
protoOf(ProbTerm).castToReal = function () {
|
|
1376
|
-
return this.
|
|
1376
|
+
return this.k3d_1.castToReal();
|
|
1377
1377
|
};
|
|
1378
1378
|
protoOf(ProbTerm).castToRecursive = function () {
|
|
1379
|
-
return this.
|
|
1379
|
+
return this.k3d_1.castToRecursive();
|
|
1380
1380
|
};
|
|
1381
1381
|
protoOf(ProbTerm).castToRule = function () {
|
|
1382
|
-
return this.
|
|
1382
|
+
return this.k3d_1.castToRule();
|
|
1383
1383
|
};
|
|
1384
1384
|
protoOf(ProbTerm).castToStruct = function () {
|
|
1385
|
-
return this.
|
|
1385
|
+
return this.k3d_1.castToStruct();
|
|
1386
1386
|
};
|
|
1387
1387
|
protoOf(ProbTerm).castToTerm = function () {
|
|
1388
|
-
return this.
|
|
1388
|
+
return this.k3d_1.castToTerm();
|
|
1389
1389
|
};
|
|
1390
1390
|
protoOf(ProbTerm).castToTruth = function () {
|
|
1391
|
-
return this.
|
|
1391
|
+
return this.k3d_1.castToTruth();
|
|
1392
1392
|
};
|
|
1393
1393
|
protoOf(ProbTerm).castToTuple = function () {
|
|
1394
|
-
return this.
|
|
1394
|
+
return this.k3d_1.castToTuple();
|
|
1395
1395
|
};
|
|
1396
1396
|
protoOf(ProbTerm).castToVar = function () {
|
|
1397
|
-
return this.
|
|
1397
|
+
return this.k3d_1.castToVar();
|
|
1398
1398
|
};
|
|
1399
1399
|
protoOf(ProbTerm).containsTag = function (name) {
|
|
1400
|
-
return this.
|
|
1400
|
+
return this.k3d_1.containsTag(name);
|
|
1401
1401
|
};
|
|
1402
1402
|
protoOf(ProbTerm).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
1403
|
-
return this.
|
|
1403
|
+
return this.k3d_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
1404
1404
|
};
|
|
1405
1405
|
protoOf(ProbTerm).getTag = function (name) {
|
|
1406
|
-
return this.
|
|
1406
|
+
return this.k3d_1.getTag(name);
|
|
1407
1407
|
};
|
|
1408
1408
|
protoOf(ProbTerm).resetTags = function (tags) {
|
|
1409
|
-
return this.
|
|
1409
|
+
return this.k3d_1.resetTags(tags);
|
|
1410
1410
|
};
|
|
1411
1411
|
protoOf(ProbTerm).structurallyEquals = function (other) {
|
|
1412
|
-
return this.
|
|
1412
|
+
return this.k3d_1.structurallyEquals(other);
|
|
1413
1413
|
};
|
|
1414
1414
|
protoOf(ProbTerm).tw = function () {
|
|
1415
|
-
var termCopy = this.
|
|
1415
|
+
var termCopy = this.i3d_1.freshCopy();
|
|
1416
1416
|
// Inline function 'kotlin.collections.map' call
|
|
1417
|
-
var this_0 = this.
|
|
1417
|
+
var this_0 = this.j3d_1;
|
|
1418
1418
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1419
1419
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1420
1420
|
var tmp0_iterator = this_0.r();
|
|
@@ -1424,15 +1424,15 @@
|
|
|
1424
1424
|
var tmp$ret$0 = item.freshCopy();
|
|
1425
1425
|
destination.o(tmp$ret$0);
|
|
1426
1426
|
}
|
|
1427
|
-
return new ProbTerm(this.
|
|
1427
|
+
return new ProbTerm(this.g3d_1, this.h3d_1, termCopy, toSet(destination));
|
|
1428
1428
|
};
|
|
1429
1429
|
protoOf(ProbTerm).freshCopy = function () {
|
|
1430
1430
|
return this.tw();
|
|
1431
1431
|
};
|
|
1432
1432
|
protoOf(ProbTerm).uw = function (scope) {
|
|
1433
|
-
var termCopy = this.
|
|
1433
|
+
var termCopy = this.i3d_1.freshCopyFromScope(scope);
|
|
1434
1434
|
// Inline function 'kotlin.collections.map' call
|
|
1435
|
-
var this_0 = this.
|
|
1435
|
+
var this_0 = this.j3d_1;
|
|
1436
1436
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1437
1437
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1438
1438
|
var tmp0_iterator = this_0.r();
|
|
@@ -1442,22 +1442,22 @@
|
|
|
1442
1442
|
var tmp$ret$0 = item.freshCopyFromScope(scope);
|
|
1443
1443
|
destination.o(tmp$ret$0);
|
|
1444
1444
|
}
|
|
1445
|
-
return new ProbTerm(this.
|
|
1445
|
+
return new ProbTerm(this.g3d_1, this.h3d_1, termCopy, toSet(destination));
|
|
1446
1446
|
};
|
|
1447
1447
|
protoOf(ProbTerm).freshCopyFromScope = function (scope) {
|
|
1448
1448
|
return this.uw(scope);
|
|
1449
1449
|
};
|
|
1450
|
-
protoOf(ProbTerm).
|
|
1451
|
-
return this.
|
|
1450
|
+
protoOf(ProbTerm).r2o = function (substitution, substitutions) {
|
|
1451
|
+
return this.s2o(substitution, substitutions.slice());
|
|
1452
1452
|
};
|
|
1453
1453
|
protoOf(ProbTerm).getSubstituted = function (substitution, substitutions) {
|
|
1454
|
-
return this.
|
|
1454
|
+
return this.r2o(substitution, substitutions);
|
|
1455
1455
|
};
|
|
1456
|
-
protoOf(ProbTerm).
|
|
1456
|
+
protoOf(ProbTerm).s2o = function (substitution, substitutions) {
|
|
1457
1457
|
return this.w16(Companion_getInstance_5().ofSubstitution(substitution, substitutions.slice()));
|
|
1458
1458
|
};
|
|
1459
1459
|
protoOf(ProbTerm).apply = function (substitution, substitutions) {
|
|
1460
|
-
return this.
|
|
1460
|
+
return this.s2o(substitution, substitutions);
|
|
1461
1461
|
};
|
|
1462
1462
|
protoOf(ProbTerm).w16 = function (substitution) {
|
|
1463
1463
|
var tmp;
|
|
@@ -1468,7 +1468,7 @@
|
|
|
1468
1468
|
var tmp$ret$0;
|
|
1469
1469
|
$l$block_0: {
|
|
1470
1470
|
// Inline function 'kotlin.collections.any' call
|
|
1471
|
-
var this_0 = this.
|
|
1471
|
+
var this_0 = this.j3d_1;
|
|
1472
1472
|
var tmp_1;
|
|
1473
1473
|
if (isInterface(this_0, Collection)) {
|
|
1474
1474
|
tmp_1 = this_0.y();
|
|
@@ -1491,11 +1491,11 @@
|
|
|
1491
1491
|
tmp$ret$0 = false;
|
|
1492
1492
|
}
|
|
1493
1493
|
if (!tmp$ret$0) {
|
|
1494
|
-
tmp_0 = this.
|
|
1494
|
+
tmp_0 = this.j3d_1;
|
|
1495
1495
|
} else {
|
|
1496
1496
|
// Inline function 'kotlin.collections.mapNotNull' call
|
|
1497
1497
|
// Inline function 'kotlin.collections.mapNotNullTo' call
|
|
1498
|
-
var this_1 = this.
|
|
1498
|
+
var this_1 = this.j3d_1;
|
|
1499
1499
|
var destination = ArrayList_init_$Create$_0();
|
|
1500
1500
|
// Inline function 'kotlin.collections.forEach' call
|
|
1501
1501
|
var tmp0_iterator_0 = this_1.r();
|
|
@@ -1515,7 +1515,7 @@
|
|
|
1515
1515
|
tmp_0 = toSet(destination);
|
|
1516
1516
|
}
|
|
1517
1517
|
var newExtraVars = tmp_0;
|
|
1518
|
-
tmp = new ProbTerm(this.
|
|
1518
|
+
tmp = new ProbTerm(this.g3d_1, this.h3d_1, this.i3d_1.applySubstitution(substitution), newExtraVars);
|
|
1519
1519
|
}
|
|
1520
1520
|
return tmp;
|
|
1521
1521
|
};
|
|
@@ -1524,7 +1524,7 @@
|
|
|
1524
1524
|
};
|
|
1525
1525
|
protoOf(ProbTerm).ux = function () {
|
|
1526
1526
|
// Inline function 'kotlin.getValue' call
|
|
1527
|
-
var this_0 = this.
|
|
1527
|
+
var this_0 = this.l3d_1;
|
|
1528
1528
|
isGround$factory();
|
|
1529
1529
|
return this_0.r2();
|
|
1530
1530
|
};
|
|
@@ -1532,16 +1532,16 @@
|
|
|
1532
1532
|
if (!(other instanceof ProbTerm)) {
|
|
1533
1533
|
return compareTo.call(this, other);
|
|
1534
1534
|
}
|
|
1535
|
-
var res = this.
|
|
1535
|
+
var res = this.g3d_1.q6(other.g3d_1);
|
|
1536
1536
|
if (!(res === 0))
|
|
1537
1537
|
return res;
|
|
1538
|
-
res = this.
|
|
1538
|
+
res = this.i3d_1.lx(other.i3d_1);
|
|
1539
1539
|
if (!(res === 0))
|
|
1540
1540
|
return res;
|
|
1541
|
-
res = equals(this.
|
|
1541
|
+
res = equals(this.j3d_1, other.j3d_1) ? 0 : -1;
|
|
1542
1542
|
if (!(res === 0))
|
|
1543
1543
|
return res;
|
|
1544
|
-
res = compareTo_0(this.
|
|
1544
|
+
res = compareTo_0(this.h3d_1, other.h3d_1);
|
|
1545
1545
|
return res;
|
|
1546
1546
|
};
|
|
1547
1547
|
protoOf(ProbTerm).d = function (other) {
|
|
@@ -1560,7 +1560,7 @@
|
|
|
1560
1560
|
return _get_cachedHashCode__d7x0zy(this);
|
|
1561
1561
|
};
|
|
1562
1562
|
protoOf(ProbTerm).toString = function () {
|
|
1563
|
-
return '' + round(this.
|
|
1563
|
+
return '' + round(this.h3d_1 * 100) / 100.0 + '::' + this.i3d_1;
|
|
1564
1564
|
};
|
|
1565
1565
|
function isGround$factory() {
|
|
1566
1566
|
return getPropertyCallableRef('isGround', 1, KProperty1, function (receiver) {
|
|
@@ -1669,7 +1669,7 @@
|
|
|
1669
1669
|
}
|
|
1670
1670
|
function AnnotatedDisjunctionClauseMapper() {
|
|
1671
1671
|
}
|
|
1672
|
-
protoOf(AnnotatedDisjunctionClauseMapper).
|
|
1672
|
+
protoOf(AnnotatedDisjunctionClauseMapper).q3d = function (clause) {
|
|
1673
1673
|
var tmp;
|
|
1674
1674
|
if (isInterface(clause, Rule)) {
|
|
1675
1675
|
var tmp_0 = clause.wy().qw();
|
|
@@ -1679,7 +1679,7 @@
|
|
|
1679
1679
|
}
|
|
1680
1680
|
return tmp;
|
|
1681
1681
|
};
|
|
1682
|
-
protoOf(AnnotatedDisjunctionClauseMapper).
|
|
1682
|
+
protoOf(AnnotatedDisjunctionClauseMapper).r3d = function (clause) {
|
|
1683
1683
|
if (!isInterface(clause, Rule)) {
|
|
1684
1684
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause);
|
|
1685
1685
|
}
|
|
@@ -1707,11 +1707,11 @@
|
|
|
1707
1707
|
}
|
|
1708
1708
|
var curRuleHead = tmp_0;
|
|
1709
1709
|
probSum = probSum + curProb;
|
|
1710
|
-
var tmp$ret$1 = ProbabilisticClauseMapper_instance.
|
|
1710
|
+
var tmp$ret$1 = ProbabilisticClauseMapper_instance.s3d(Companion_instance_4.of(Companion_getInstance_1().of(get_ANNOTATION_FUNCTOR(), [Companion_getInstance_6().ofDouble(curProb / (1.0 - (probSum - curProb))), curRuleHead]), [body]));
|
|
1711
1711
|
destination.o(tmp$ret$1);
|
|
1712
1712
|
}
|
|
1713
1713
|
var mappedRules = toList_0(destination);
|
|
1714
|
-
var explanation = Companion_getInstance_11().
|
|
1714
|
+
var explanation = Companion_getInstance_11().b3d_1;
|
|
1715
1715
|
// Inline function 'kotlin.collections.map' call
|
|
1716
1716
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1717
1717
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(mappedRules, 10));
|
|
@@ -1719,10 +1719,10 @@
|
|
|
1719
1719
|
while (tmp0_iterator_0.s()) {
|
|
1720
1720
|
var item_0 = tmp0_iterator_0.u();
|
|
1721
1721
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.AnnotatedDisjunctionClauseMapper.apply.<anonymous>' call
|
|
1722
|
-
var thisExplanation = Companion_getInstance_11().
|
|
1722
|
+
var thisExplanation = Companion_getInstance_11().f3d(item_0.ze_1);
|
|
1723
1723
|
var resultExplanation = thisExplanation.and(explanation);
|
|
1724
1724
|
explanation = explanation.and(thisExplanation.not());
|
|
1725
|
-
var tmp$ret$4 = ProbabilisticClauseMapper_instance.
|
|
1725
|
+
var tmp$ret$4 = ProbabilisticClauseMapper_instance.t3d(item_0.ye_1, resultExplanation);
|
|
1726
1726
|
destination_0.o(tmp$ret$4);
|
|
1727
1727
|
}
|
|
1728
1728
|
return destination_0;
|
|
@@ -1732,13 +1732,13 @@
|
|
|
1732
1732
|
return AnnotatedDisjunctionClauseMapper_instance;
|
|
1733
1733
|
}
|
|
1734
1734
|
function ComputedValue(probability) {
|
|
1735
|
-
this.
|
|
1735
|
+
this.u3d_1 = probability;
|
|
1736
1736
|
}
|
|
1737
1737
|
protoOf(ComputedValue).toString = function () {
|
|
1738
|
-
return 'ComputedValue(probability=' + this.
|
|
1738
|
+
return 'ComputedValue(probability=' + this.u3d_1 + ')';
|
|
1739
1739
|
};
|
|
1740
1740
|
protoOf(ComputedValue).hashCode = function () {
|
|
1741
|
-
return this.
|
|
1741
|
+
return this.u3d_1 == null ? 0 : getNumberHashCode(this.u3d_1);
|
|
1742
1742
|
};
|
|
1743
1743
|
protoOf(ComputedValue).equals = function (other) {
|
|
1744
1744
|
if (this === other)
|
|
@@ -1746,15 +1746,15 @@
|
|
|
1746
1746
|
if (!(other instanceof ComputedValue))
|
|
1747
1747
|
return false;
|
|
1748
1748
|
var tmp0_other_with_cast = other instanceof ComputedValue ? other : THROW_CCE();
|
|
1749
|
-
if (!equals(this.
|
|
1749
|
+
if (!equals(this.u3d_1, tmp0_other_with_cast.u3d_1))
|
|
1750
1750
|
return false;
|
|
1751
1751
|
return true;
|
|
1752
1752
|
};
|
|
1753
1753
|
function Companion_2() {
|
|
1754
1754
|
Companion_instance_12 = this;
|
|
1755
|
-
this.
|
|
1756
|
-
this.
|
|
1757
|
-
this.
|
|
1755
|
+
this.c3d_1 = new ComputedValue(null);
|
|
1756
|
+
this.d3d_1 = new ComputedValue(0.0);
|
|
1757
|
+
this.e3d_1 = new ComputedValue(1.0);
|
|
1758
1758
|
}
|
|
1759
1759
|
var Companion_instance_12;
|
|
1760
1760
|
function Companion_getInstance_13() {
|
|
@@ -1770,8 +1770,8 @@
|
|
|
1770
1770
|
}
|
|
1771
1771
|
function computeExpansion($this, value, low, high) {
|
|
1772
1772
|
var tmp;
|
|
1773
|
-
if (!(low.
|
|
1774
|
-
tmp = value.
|
|
1773
|
+
if (!(low.u3d_1 == null) ? !(high.u3d_1 == null) : false) {
|
|
1774
|
+
tmp = value.h3d_1 * high.u3d_1 + (1.0 - value.h3d_1) * low.u3d_1;
|
|
1775
1775
|
} else {
|
|
1776
1776
|
tmp = null;
|
|
1777
1777
|
}
|
|
@@ -1779,7 +1779,7 @@
|
|
|
1779
1779
|
}
|
|
1780
1780
|
function _get_cachedNot__l38068($this) {
|
|
1781
1781
|
// Inline function 'kotlin.getValue' call
|
|
1782
|
-
var this_0 = $this.
|
|
1782
|
+
var this_0 = $this.b3c_1;
|
|
1783
1783
|
cachedNot$factory();
|
|
1784
1784
|
return this_0.r2();
|
|
1785
1785
|
}
|
|
@@ -1790,9 +1790,9 @@
|
|
|
1790
1790
|
}
|
|
1791
1791
|
function BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda(this$0) {
|
|
1792
1792
|
return function () {
|
|
1793
|
-
var tmp = Companion_getInstance_13().
|
|
1794
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1795
|
-
var result = notThenExpansion(this$0.
|
|
1793
|
+
var tmp = Companion_getInstance_13().d3d_1;
|
|
1794
|
+
var tmp_0 = Companion_getInstance_13().e3d_1;
|
|
1795
|
+
var result = notThenExpansion(this$0.z3b_1, tmp, tmp_0, BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda$lambda(this$0));
|
|
1796
1796
|
return new BinaryDecisionDiagramExplanation(result.ye_1, result.ze_1);
|
|
1797
1797
|
};
|
|
1798
1798
|
}
|
|
@@ -1807,14 +1807,14 @@
|
|
|
1807
1807
|
};
|
|
1808
1808
|
}
|
|
1809
1809
|
function BinaryDecisionDiagramExplanation$probability$delegate$lambda$lambda(node, low, high) {
|
|
1810
|
-
return node.
|
|
1810
|
+
return node.h3d_1 * high + (1.0 - node.h3d_1) * low;
|
|
1811
1811
|
}
|
|
1812
1812
|
function BinaryDecisionDiagramExplanation$probability$delegate$lambda(this$0) {
|
|
1813
1813
|
return function () {
|
|
1814
|
-
var tmp0_elvis_lhs = this$0.
|
|
1814
|
+
var tmp0_elvis_lhs = this$0.a3c_1.u3d_1;
|
|
1815
1815
|
var tmp;
|
|
1816
1816
|
if (tmp0_elvis_lhs == null) {
|
|
1817
|
-
tmp = expansion(this$0.
|
|
1817
|
+
tmp = expansion(this$0.z3b_1, 0.0, 1.0, BinaryDecisionDiagramExplanation$probability$delegate$lambda$lambda);
|
|
1818
1818
|
} else {
|
|
1819
1819
|
tmp = tmp0_elvis_lhs;
|
|
1820
1820
|
}
|
|
@@ -1826,7 +1826,7 @@
|
|
|
1826
1826
|
}
|
|
1827
1827
|
function BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda(this$0) {
|
|
1828
1828
|
return function () {
|
|
1829
|
-
return anyWhere(this$0.
|
|
1829
|
+
return anyWhere(this$0.z3b_1, BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda$lambda);
|
|
1830
1830
|
};
|
|
1831
1831
|
}
|
|
1832
1832
|
function BinaryDecisionDiagramExplanation$apply$lambda($transformation) {
|
|
@@ -1836,62 +1836,62 @@
|
|
|
1836
1836
|
}
|
|
1837
1837
|
function BinaryDecisionDiagramExplanation(diagram, computedValue) {
|
|
1838
1838
|
Companion_getInstance_13();
|
|
1839
|
-
computedValue = computedValue === VOID ? Companion_getInstance_13().
|
|
1840
|
-
this.
|
|
1841
|
-
this.
|
|
1839
|
+
computedValue = computedValue === VOID ? Companion_getInstance_13().c3d_1 : computedValue;
|
|
1840
|
+
this.z3b_1 = diagram;
|
|
1841
|
+
this.a3c_1 = computedValue;
|
|
1842
1842
|
var tmp = this;
|
|
1843
|
-
tmp.
|
|
1843
|
+
tmp.b3c_1 = lazy(BinaryDecisionDiagramExplanation$cachedNot$delegate$lambda(this));
|
|
1844
1844
|
var tmp_0 = this;
|
|
1845
|
-
tmp_0.
|
|
1845
|
+
tmp_0.c3c_1 = lazy(BinaryDecisionDiagramExplanation$probability$delegate$lambda(this));
|
|
1846
1846
|
var tmp_1 = this;
|
|
1847
|
-
tmp_1.
|
|
1847
|
+
tmp_1.d3c_1 = lazy(BinaryDecisionDiagramExplanation$containsAnyNotGroundTerm$delegate$lambda(this));
|
|
1848
1848
|
}
|
|
1849
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1849
|
+
protoOf(BinaryDecisionDiagramExplanation).v3d = function () {
|
|
1850
1850
|
return _get_cachedNot__l38068(this);
|
|
1851
1851
|
};
|
|
1852
1852
|
protoOf(BinaryDecisionDiagramExplanation).not = function () {
|
|
1853
|
-
return this.
|
|
1853
|
+
return this.v3d();
|
|
1854
1854
|
};
|
|
1855
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1856
|
-
var tmp = getAsInternal(this, that).
|
|
1857
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1858
|
-
var tmp_1 = Companion_getInstance_13().
|
|
1859
|
-
var result = andThenExpansion(this.
|
|
1855
|
+
protoOf(BinaryDecisionDiagramExplanation).w3d = function (that) {
|
|
1856
|
+
var tmp = getAsInternal(this, that).z3b_1;
|
|
1857
|
+
var tmp_0 = Companion_getInstance_13().d3d_1;
|
|
1858
|
+
var tmp_1 = Companion_getInstance_13().e3d_1;
|
|
1859
|
+
var result = andThenExpansion(this.z3b_1, tmp, tmp_0, tmp_1, BinaryDecisionDiagramExplanation$and$lambda(this));
|
|
1860
1860
|
return new BinaryDecisionDiagramExplanation(result.ye_1, result.ze_1);
|
|
1861
1861
|
};
|
|
1862
1862
|
protoOf(BinaryDecisionDiagramExplanation).and = function (that) {
|
|
1863
|
-
return this.
|
|
1863
|
+
return this.w3d(that);
|
|
1864
1864
|
};
|
|
1865
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1866
|
-
var tmp = getAsInternal(this, that).
|
|
1867
|
-
var tmp_0 = Companion_getInstance_13().
|
|
1868
|
-
var tmp_1 = Companion_getInstance_13().
|
|
1869
|
-
var result = orThenExpansion(this.
|
|
1865
|
+
protoOf(BinaryDecisionDiagramExplanation).x3d = function (that) {
|
|
1866
|
+
var tmp = getAsInternal(this, that).z3b_1;
|
|
1867
|
+
var tmp_0 = Companion_getInstance_13().d3d_1;
|
|
1868
|
+
var tmp_1 = Companion_getInstance_13().e3d_1;
|
|
1869
|
+
var result = orThenExpansion(this.z3b_1, tmp, tmp_0, tmp_1, BinaryDecisionDiagramExplanation$or$lambda(this));
|
|
1870
1870
|
return new BinaryDecisionDiagramExplanation(result.ye_1, result.ze_1);
|
|
1871
1871
|
};
|
|
1872
1872
|
protoOf(BinaryDecisionDiagramExplanation).or = function (that) {
|
|
1873
|
-
return this.
|
|
1873
|
+
return this.x3d(that);
|
|
1874
1874
|
};
|
|
1875
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1875
|
+
protoOf(BinaryDecisionDiagramExplanation).n3d = function () {
|
|
1876
1876
|
// Inline function 'kotlin.getValue' call
|
|
1877
|
-
var this_0 = this.
|
|
1877
|
+
var this_0 = this.c3c_1;
|
|
1878
1878
|
probability$factory();
|
|
1879
1879
|
return this_0.r2();
|
|
1880
1880
|
};
|
|
1881
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1881
|
+
protoOf(BinaryDecisionDiagramExplanation).p3d = function () {
|
|
1882
1882
|
// Inline function 'kotlin.getValue' call
|
|
1883
|
-
var this_0 = this.
|
|
1883
|
+
var this_0 = this.d3c_1;
|
|
1884
1884
|
containsAnyNotGroundTerm$factory();
|
|
1885
1885
|
return this_0.r2();
|
|
1886
1886
|
};
|
|
1887
1887
|
protoOf(BinaryDecisionDiagramExplanation).toString = function () {
|
|
1888
|
-
return 'bdd:' + hashCode(this.
|
|
1888
|
+
return 'bdd:' + hashCode(this.z3b_1);
|
|
1889
1889
|
};
|
|
1890
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
1891
|
-
return new BinaryDecisionDiagramExplanation(map_0(this.
|
|
1890
|
+
protoOf(BinaryDecisionDiagramExplanation).y3d = function (transformation) {
|
|
1891
|
+
return new BinaryDecisionDiagramExplanation(map_0(this.z3b_1, BinaryDecisionDiagramExplanation$apply$lambda(transformation)));
|
|
1892
1892
|
};
|
|
1893
1893
|
protoOf(BinaryDecisionDiagramExplanation).applyTransformation = function (transformation) {
|
|
1894
|
-
return this.
|
|
1894
|
+
return this.y3d(transformation);
|
|
1895
1895
|
};
|
|
1896
1896
|
function cachedNot$factory() {
|
|
1897
1897
|
return getPropertyCallableRef('cachedNot', 1, KProperty1, function (receiver) {
|
|
@@ -1900,12 +1900,12 @@
|
|
|
1900
1900
|
}
|
|
1901
1901
|
function probability$factory() {
|
|
1902
1902
|
return getPropertyCallableRef('probability', 1, KProperty1, function (receiver) {
|
|
1903
|
-
return receiver.
|
|
1903
|
+
return receiver.n3d();
|
|
1904
1904
|
}, null);
|
|
1905
1905
|
}
|
|
1906
1906
|
function containsAnyNotGroundTerm$factory() {
|
|
1907
1907
|
return getPropertyCallableRef('containsAnyNotGroundTerm', 1, KProperty1, function (receiver) {
|
|
1908
|
-
return receiver.
|
|
1908
|
+
return receiver.p3d();
|
|
1909
1909
|
}, null);
|
|
1910
1910
|
}
|
|
1911
1911
|
function get_nonWrappableFunctors() {
|
|
@@ -1915,15 +1915,15 @@
|
|
|
1915
1915
|
var nonWrappableFunctors;
|
|
1916
1916
|
function ClauseMappingUtils() {
|
|
1917
1917
|
ClauseMappingUtils_instance = this;
|
|
1918
|
-
this.
|
|
1919
|
-
this.
|
|
1918
|
+
this.z3d_1 = new Long(1, 0);
|
|
1919
|
+
this.a3e_1 = listOf_0([DirectiveClauseMapper_instance, AnnotatedDisjunctionClauseMapper_instance, ProbabilisticClauseMapper_instance, EvidenceClauseMapper_instance, PrologClauseMapper_instance, NothingClauseMapper_instance]);
|
|
1920
1920
|
}
|
|
1921
|
-
protoOf(ClauseMappingUtils).
|
|
1922
|
-
var tmp1 = this.
|
|
1923
|
-
this.
|
|
1921
|
+
protoOf(ClauseMappingUtils).b3e = function () {
|
|
1922
|
+
var tmp1 = this.z3d_1;
|
|
1923
|
+
this.z3d_1 = tmp1.tb();
|
|
1924
1924
|
return tmp1;
|
|
1925
1925
|
};
|
|
1926
|
-
protoOf(ClauseMappingUtils).
|
|
1926
|
+
protoOf(ClauseMappingUtils).c3e = function (clause) {
|
|
1927
1927
|
var tmp;
|
|
1928
1928
|
if (get_isMappedAsProblog(clause)) {
|
|
1929
1929
|
tmp = listOf(clause);
|
|
@@ -1932,18 +1932,18 @@
|
|
|
1932
1932
|
var tmp$ret$1;
|
|
1933
1933
|
$l$block: {
|
|
1934
1934
|
// Inline function 'kotlin.collections.first' call
|
|
1935
|
-
var tmp0_iterator = this.
|
|
1935
|
+
var tmp0_iterator = this.a3e_1.r();
|
|
1936
1936
|
while (tmp0_iterator.s()) {
|
|
1937
1937
|
var element = tmp0_iterator.u();
|
|
1938
1938
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.ClauseMappingUtils.map.<anonymous>' call
|
|
1939
|
-
if (element.
|
|
1939
|
+
if (element.q3d(clause)) {
|
|
1940
1940
|
tmp$ret$1 = element;
|
|
1941
1941
|
break $l$block;
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
1944
|
throw NoSuchElementException_init_$Create$('Collection contains no element matching the predicate.');
|
|
1945
1945
|
}
|
|
1946
|
-
var this_0 = tmp$ret$1.
|
|
1946
|
+
var this_0 = tmp$ret$1.r3d(clause);
|
|
1947
1947
|
// Inline function 'kotlin.collections.mapTo' call
|
|
1948
1948
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
1949
1949
|
var tmp0_iterator_0 = this_0.r();
|
|
@@ -1957,7 +1957,7 @@
|
|
|
1957
1957
|
}
|
|
1958
1958
|
return tmp;
|
|
1959
1959
|
};
|
|
1960
|
-
protoOf(ClauseMappingUtils).
|
|
1960
|
+
protoOf(ClauseMappingUtils).d3e = function (indicator) {
|
|
1961
1961
|
var arityTerm = indicator.x10();
|
|
1962
1962
|
var tmp = Companion_instance_5;
|
|
1963
1963
|
var tmp_0 = indicator.w10();
|
|
@@ -2065,7 +2065,7 @@
|
|
|
2065
2065
|
}
|
|
2066
2066
|
function withExplanationNonWrappable(_this__u8e3s4, explanation) {
|
|
2067
2067
|
_init_properties_ClauseMappingUtils_kt__go80e();
|
|
2068
|
-
return Companion_instance_0.of(_this__u8e3s4, Companion_getInstance_1().of('=', [explanation, toTerm(Companion_getInstance_11().
|
|
2068
|
+
return Companion_instance_0.of(_this__u8e3s4, Companion_getInstance_1().of('=', [explanation, toTerm(Companion_getInstance_11().b3d_1)]));
|
|
2069
2069
|
}
|
|
2070
2070
|
function wrapInPredicate(_this__u8e3s4, functor, explanation) {
|
|
2071
2071
|
_init_properties_ClauseMappingUtils_kt__go80e();
|
|
@@ -2162,10 +2162,10 @@
|
|
|
2162
2162
|
}
|
|
2163
2163
|
function DirectiveClauseMapper() {
|
|
2164
2164
|
}
|
|
2165
|
-
protoOf(DirectiveClauseMapper).
|
|
2165
|
+
protoOf(DirectiveClauseMapper).q3d = function (clause) {
|
|
2166
2166
|
return clause.zw();
|
|
2167
2167
|
};
|
|
2168
|
-
protoOf(DirectiveClauseMapper).
|
|
2168
|
+
protoOf(DirectiveClauseMapper).r3d = function (clause) {
|
|
2169
2169
|
var body = clause.xy();
|
|
2170
2170
|
if (!isInterface(clause, Directive)) {
|
|
2171
2171
|
throw new ClauseMappingException('Clause is not an instance of Directive: ' + clause);
|
|
@@ -2205,7 +2205,7 @@
|
|
|
2205
2205
|
}
|
|
2206
2206
|
function EvidenceClauseMapper() {
|
|
2207
2207
|
}
|
|
2208
|
-
protoOf(EvidenceClauseMapper).
|
|
2208
|
+
protoOf(EvidenceClauseMapper).q3d = function (clause) {
|
|
2209
2209
|
var tmp;
|
|
2210
2210
|
if (isInterface(clause, Rule)) {
|
|
2211
2211
|
var tmp_0 = clause.wy().qw();
|
|
@@ -2216,7 +2216,7 @@
|
|
|
2216
2216
|
}
|
|
2217
2217
|
return tmp;
|
|
2218
2218
|
};
|
|
2219
|
-
protoOf(EvidenceClauseMapper).
|
|
2219
|
+
protoOf(EvidenceClauseMapper).r3d = function (clause) {
|
|
2220
2220
|
if (!isInterface(clause, Rule)) {
|
|
2221
2221
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause);
|
|
2222
2222
|
}
|
|
@@ -2251,7 +2251,7 @@
|
|
|
2251
2251
|
return EvidenceClauseMapper_instance;
|
|
2252
2252
|
}
|
|
2253
2253
|
function MappedMutableProblogTheory(clauses, unificator, theory) {
|
|
2254
|
-
unificator = unificator === VOID ? Companion_getInstance_8().
|
|
2254
|
+
unificator = unificator === VOID ? Companion_getInstance_8().c1l() : unificator;
|
|
2255
2255
|
var tmp;
|
|
2256
2256
|
if (theory === VOID) {
|
|
2257
2257
|
var tmp_0 = Companion_instance_7;
|
|
@@ -2266,7 +2266,7 @@
|
|
|
2266
2266
|
while (tmp0_iterator.s()) {
|
|
2267
2267
|
var element = tmp0_iterator.u();
|
|
2268
2268
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedMutableProblogTheory.<init>.<anonymous>' call
|
|
2269
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2269
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2270
2270
|
addAll(destination, list);
|
|
2271
2271
|
}
|
|
2272
2272
|
tmp_1 = destination;
|
|
@@ -2277,118 +2277,118 @@
|
|
|
2277
2277
|
tmp = theory;
|
|
2278
2278
|
}
|
|
2279
2279
|
theory = tmp;
|
|
2280
|
-
this.
|
|
2280
|
+
this.e3e_1 = theory;
|
|
2281
2281
|
}
|
|
2282
|
-
protoOf(MappedMutableProblogTheory).
|
|
2283
|
-
return this.
|
|
2282
|
+
protoOf(MappedMutableProblogTheory).p1l = function () {
|
|
2283
|
+
return this.e3e_1.p1l();
|
|
2284
2284
|
};
|
|
2285
|
-
protoOf(MappedMutableProblogTheory).
|
|
2286
|
-
return this.
|
|
2285
|
+
protoOf(MappedMutableProblogTheory).i1l = function () {
|
|
2286
|
+
return this.e3e_1.i1l();
|
|
2287
2287
|
};
|
|
2288
|
-
protoOf(MappedMutableProblogTheory).
|
|
2289
|
-
return this.
|
|
2288
|
+
protoOf(MappedMutableProblogTheory).k1l = function () {
|
|
2289
|
+
return this.e3e_1.k1l();
|
|
2290
2290
|
};
|
|
2291
|
-
protoOf(MappedMutableProblogTheory).
|
|
2292
|
-
return this.
|
|
2291
|
+
protoOf(MappedMutableProblogTheory).f1s = function () {
|
|
2292
|
+
return this.e3e_1.f1s();
|
|
2293
2293
|
};
|
|
2294
2294
|
protoOf(MappedMutableProblogTheory).l = function () {
|
|
2295
|
-
return this.
|
|
2295
|
+
return this.e3e_1.l();
|
|
2296
2296
|
};
|
|
2297
2297
|
protoOf(MappedMutableProblogTheory).vt = function () {
|
|
2298
|
-
return this.
|
|
2298
|
+
return this.e3e_1.vt();
|
|
2299
2299
|
};
|
|
2300
|
-
protoOf(MappedMutableProblogTheory).
|
|
2301
|
-
return this.
|
|
2300
|
+
protoOf(MappedMutableProblogTheory).f1l = function () {
|
|
2301
|
+
return this.e3e_1.f1l();
|
|
2302
2302
|
};
|
|
2303
|
-
protoOf(MappedMutableProblogTheory).
|
|
2304
|
-
return this.
|
|
2303
|
+
protoOf(MappedMutableProblogTheory).u1s = function () {
|
|
2304
|
+
return this.e3e_1.u1s();
|
|
2305
2305
|
};
|
|
2306
2306
|
protoOf(MappedMutableProblogTheory).clone = function () {
|
|
2307
|
-
return this.
|
|
2307
|
+
return this.u1s();
|
|
2308
2308
|
};
|
|
2309
2309
|
protoOf(MappedMutableProblogTheory).contains = function (clause) {
|
|
2310
|
-
return this.
|
|
2310
|
+
return this.e3e_1.contains(clause);
|
|
2311
2311
|
};
|
|
2312
2312
|
protoOf(MappedMutableProblogTheory).containsIndicator = function (indicator) {
|
|
2313
|
-
return this.
|
|
2313
|
+
return this.e3e_1.containsIndicator(indicator);
|
|
2314
2314
|
};
|
|
2315
2315
|
protoOf(MappedMutableProblogTheory).containsHead = function (head) {
|
|
2316
|
-
return this.
|
|
2316
|
+
return this.e3e_1.containsHead(head);
|
|
2317
2317
|
};
|
|
2318
2318
|
protoOf(MappedMutableProblogTheory).containsTag = function (name) {
|
|
2319
|
-
return this.
|
|
2319
|
+
return this.e3e_1.containsTag(name);
|
|
2320
2320
|
};
|
|
2321
2321
|
protoOf(MappedMutableProblogTheory).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
2322
|
-
return this.
|
|
2322
|
+
return this.e3e_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
2323
2323
|
};
|
|
2324
2324
|
protoOf(MappedMutableProblogTheory).get = function (clause) {
|
|
2325
|
-
return this.
|
|
2325
|
+
return this.e3e_1.get(clause);
|
|
2326
2326
|
};
|
|
2327
2327
|
protoOf(MappedMutableProblogTheory).getByIndicator = function (indicator) {
|
|
2328
|
-
return this.
|
|
2328
|
+
return this.e3e_1.getByIndicator(indicator);
|
|
2329
2329
|
};
|
|
2330
2330
|
protoOf(MappedMutableProblogTheory).getByHead = function (head) {
|
|
2331
|
-
return this.
|
|
2331
|
+
return this.e3e_1.getByHead(head);
|
|
2332
2332
|
};
|
|
2333
2333
|
protoOf(MappedMutableProblogTheory).getTag = function (name) {
|
|
2334
|
-
return this.
|
|
2334
|
+
return this.e3e_1.getTag(name);
|
|
2335
2335
|
};
|
|
2336
2336
|
protoOf(MappedMutableProblogTheory).r = function () {
|
|
2337
|
-
return this.
|
|
2337
|
+
return this.e3e_1.r();
|
|
2338
2338
|
};
|
|
2339
2339
|
protoOf(MappedMutableProblogTheory).u12 = function (tags) {
|
|
2340
|
-
return this.
|
|
2340
|
+
return this.e3e_1.u12(tags);
|
|
2341
2341
|
};
|
|
2342
2342
|
protoOf(MappedMutableProblogTheory).resetTags = function (tags) {
|
|
2343
2343
|
return this.u12(tags);
|
|
2344
2344
|
};
|
|
2345
|
-
protoOf(MappedMutableProblogTheory).
|
|
2346
|
-
return this.
|
|
2345
|
+
protoOf(MappedMutableProblogTheory).g1s = function (unificator) {
|
|
2346
|
+
return this.e3e_1.g1s(unificator);
|
|
2347
2347
|
};
|
|
2348
2348
|
protoOf(MappedMutableProblogTheory).setUnificator = function (unificator) {
|
|
2349
|
-
return this.
|
|
2349
|
+
return this.g1s(unificator);
|
|
2350
2350
|
};
|
|
2351
2351
|
protoOf(MappedMutableProblogTheory).toStringAsProlog = function (asPrologText) {
|
|
2352
|
-
return this.
|
|
2352
|
+
return this.e3e_1.toStringAsProlog(asPrologText);
|
|
2353
2353
|
};
|
|
2354
|
-
protoOf(MappedMutableProblogTheory).
|
|
2354
|
+
protoOf(MappedMutableProblogTheory).v1s = function () {
|
|
2355
2355
|
return false;
|
|
2356
2356
|
};
|
|
2357
|
-
protoOf(MappedMutableProblogTheory).
|
|
2358
|
-
return Companion_instance_9.ofIterable(this.
|
|
2357
|
+
protoOf(MappedMutableProblogTheory).i1t = function () {
|
|
2358
|
+
return Companion_instance_9.ofIterable(this.f1l(), this);
|
|
2359
2359
|
};
|
|
2360
2360
|
protoOf(MappedMutableProblogTheory).toMutableTheory = function () {
|
|
2361
|
-
return this.
|
|
2361
|
+
return this.i1t();
|
|
2362
2362
|
};
|
|
2363
|
-
protoOf(MappedMutableProblogTheory).
|
|
2363
|
+
protoOf(MappedMutableProblogTheory).v1r = function () {
|
|
2364
2364
|
return this;
|
|
2365
2365
|
};
|
|
2366
2366
|
protoOf(MappedMutableProblogTheory).toImmutableTheory = function () {
|
|
2367
|
-
return this.
|
|
2367
|
+
return this.v1r();
|
|
2368
2368
|
};
|
|
2369
|
-
protoOf(MappedMutableProblogTheory).
|
|
2370
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2369
|
+
protoOf(MappedMutableProblogTheory).f3e = function (theory) {
|
|
2370
|
+
return new MappedMutableProblogTheory(null, this.f1l(), this.e3e_1.i1s(theory));
|
|
2371
2371
|
};
|
|
2372
|
-
protoOf(MappedMutableProblogTheory).
|
|
2372
|
+
protoOf(MappedMutableProblogTheory).i1s = function (theory) {
|
|
2373
2373
|
var tmp;
|
|
2374
2374
|
if (isInterface(theory, ProblogTheory)) {
|
|
2375
|
-
tmp = this.
|
|
2375
|
+
tmp = this.f3e(theory);
|
|
2376
2376
|
} else {
|
|
2377
|
-
tmp = this.
|
|
2377
|
+
tmp = this.f3e(new MappedMutableProblogTheory(theory, this.f1l()));
|
|
2378
2378
|
}
|
|
2379
2379
|
return tmp;
|
|
2380
2380
|
};
|
|
2381
2381
|
protoOf(MappedMutableProblogTheory).plusTheory = function (theory) {
|
|
2382
|
-
return this.
|
|
2382
|
+
return this.i1s(theory);
|
|
2383
2383
|
};
|
|
2384
|
-
protoOf(MappedMutableProblogTheory).
|
|
2385
|
-
var mapped = ClauseMappingUtils_getInstance().
|
|
2386
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2384
|
+
protoOf(MappedMutableProblogTheory).w1r = function (clause) {
|
|
2385
|
+
var mapped = ClauseMappingUtils_getInstance().c3e(clause);
|
|
2386
|
+
return new MappedMutableProblogTheory(null, this.f1l(), this.e3e_1.i1s(Companion_instance_8.indexedOfIterable(this.f1l(), mapped)));
|
|
2387
2387
|
};
|
|
2388
2388
|
protoOf(MappedMutableProblogTheory).plus = function (clause) {
|
|
2389
|
-
return this.
|
|
2389
|
+
return this.w1r(clause);
|
|
2390
2390
|
};
|
|
2391
|
-
protoOf(MappedMutableProblogTheory).
|
|
2391
|
+
protoOf(MappedMutableProblogTheory).m1s = function (clauses) {
|
|
2392
2392
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2393
2393
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2394
2394
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2396,16 +2396,16 @@
|
|
|
2396
2396
|
while (tmp0_iterator.s()) {
|
|
2397
2397
|
var element = tmp0_iterator.u();
|
|
2398
2398
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedMutableProblogTheory.assertA.<anonymous>' call
|
|
2399
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2399
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2400
2400
|
addAll(destination, list);
|
|
2401
2401
|
}
|
|
2402
2402
|
var mapped = destination;
|
|
2403
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2403
|
+
return new MappedMutableProblogTheory(null, this.f1l(), this.e3e_1.m1s(mapped));
|
|
2404
2404
|
};
|
|
2405
2405
|
protoOf(MappedMutableProblogTheory).assertAIterable = function (clauses) {
|
|
2406
|
-
return this.
|
|
2406
|
+
return this.m1s(clauses);
|
|
2407
2407
|
};
|
|
2408
|
-
protoOf(MappedMutableProblogTheory).
|
|
2408
|
+
protoOf(MappedMutableProblogTheory).p1s = function (clauses) {
|
|
2409
2409
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2410
2410
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2411
2411
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2413,16 +2413,16 @@
|
|
|
2413
2413
|
while (tmp0_iterator.s()) {
|
|
2414
2414
|
var element = tmp0_iterator.u();
|
|
2415
2415
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedMutableProblogTheory.assertZ.<anonymous>' call
|
|
2416
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2416
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2417
2417
|
addAll(destination, list);
|
|
2418
2418
|
}
|
|
2419
2419
|
var mapped = destination;
|
|
2420
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2420
|
+
return new MappedMutableProblogTheory(null, this.f1l(), this.e3e_1.p1s(mapped));
|
|
2421
2421
|
};
|
|
2422
2422
|
protoOf(MappedMutableProblogTheory).assertZIterable = function (clauses) {
|
|
2423
|
-
return this.
|
|
2423
|
+
return this.p1s(clauses);
|
|
2424
2424
|
};
|
|
2425
|
-
protoOf(MappedMutableProblogTheory).
|
|
2425
|
+
protoOf(MappedMutableProblogTheory).t1s = function (clauses) {
|
|
2426
2426
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2427
2427
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2428
2428
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2430,24 +2430,24 @@
|
|
|
2430
2430
|
while (tmp0_iterator.s()) {
|
|
2431
2431
|
var element = tmp0_iterator.u();
|
|
2432
2432
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedMutableProblogTheory.retract.<anonymous>' call
|
|
2433
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2433
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2434
2434
|
addAll(destination, list);
|
|
2435
2435
|
}
|
|
2436
2436
|
var mapped = destination;
|
|
2437
|
-
var result = this.
|
|
2437
|
+
var result = this.e3e_1.t1s(mapped);
|
|
2438
2438
|
var tmp;
|
|
2439
2439
|
if (result instanceof Success) {
|
|
2440
|
-
tmp = new Success(new MappedMutableProblogTheory(null, this.
|
|
2440
|
+
tmp = new Success(new MappedMutableProblogTheory(null, this.f1l(), result.c1s()), result.p1t_1);
|
|
2441
2441
|
} else {
|
|
2442
|
-
tmp = new Failure(new MappedMutableProblogTheory(null, this.
|
|
2442
|
+
tmp = new Failure(new MappedMutableProblogTheory(null, this.f1l(), result.c1s()));
|
|
2443
2443
|
}
|
|
2444
2444
|
return tmp;
|
|
2445
2445
|
};
|
|
2446
2446
|
protoOf(MappedMutableProblogTheory).retractIterable = function (clauses) {
|
|
2447
|
-
return this.
|
|
2447
|
+
return this.t1s(clauses);
|
|
2448
2448
|
};
|
|
2449
|
-
protoOf(MappedMutableProblogTheory).
|
|
2450
|
-
var mappedClauses = ClauseMappingUtils_getInstance().
|
|
2449
|
+
protoOf(MappedMutableProblogTheory).x1l = function (clause) {
|
|
2450
|
+
var mappedClauses = ClauseMappingUtils_getInstance().c3e(clause);
|
|
2451
2451
|
var result = null;
|
|
2452
2452
|
var tmp0_iterator = mappedClauses.r();
|
|
2453
2453
|
while (tmp0_iterator.s()) {
|
|
@@ -2459,16 +2459,16 @@
|
|
|
2459
2459
|
tmp = !(result instanceof Failure);
|
|
2460
2460
|
}
|
|
2461
2461
|
if (tmp) {
|
|
2462
|
-
result = this.
|
|
2462
|
+
result = this.e3e_1.x1l(c);
|
|
2463
2463
|
}
|
|
2464
2464
|
}
|
|
2465
2465
|
var tmp1_subject = result;
|
|
2466
2466
|
var tmp_0;
|
|
2467
2467
|
if (tmp1_subject instanceof Success) {
|
|
2468
|
-
tmp_0 = new Success(new MappedMutableProblogTheory(null, this.
|
|
2468
|
+
tmp_0 = new Success(new MappedMutableProblogTheory(null, this.f1l(), result.c1s()), result.p1t_1);
|
|
2469
2469
|
} else {
|
|
2470
2470
|
if (tmp1_subject instanceof Failure) {
|
|
2471
|
-
tmp_0 = new Failure(new MappedMutableProblogTheory(null, this.
|
|
2471
|
+
tmp_0 = new Failure(new MappedMutableProblogTheory(null, this.f1l(), result.c1s()));
|
|
2472
2472
|
} else {
|
|
2473
2473
|
tmp_0 = new Failure(this);
|
|
2474
2474
|
}
|
|
@@ -2476,76 +2476,76 @@
|
|
|
2476
2476
|
return tmp_0;
|
|
2477
2477
|
};
|
|
2478
2478
|
protoOf(MappedMutableProblogTheory).retractAll = function (clause) {
|
|
2479
|
-
return this.
|
|
2479
|
+
return this.x1l(clause);
|
|
2480
2480
|
};
|
|
2481
|
-
protoOf(MappedMutableProblogTheory).
|
|
2482
|
-
return new MappedMutableProblogTheory(null, this.
|
|
2481
|
+
protoOf(MappedMutableProblogTheory).b1s = function (indicator) {
|
|
2482
|
+
return new MappedMutableProblogTheory(null, this.f1l(), this.e3e_1.b1s(ClauseMappingUtils_getInstance().d3e(indicator)));
|
|
2483
2483
|
};
|
|
2484
2484
|
protoOf(MappedMutableProblogTheory).abolish = function (indicator) {
|
|
2485
|
-
return this.
|
|
2485
|
+
return this.b1s(indicator);
|
|
2486
2486
|
};
|
|
2487
|
-
protoOf(MappedMutableProblogTheory).
|
|
2488
|
-
return this.
|
|
2487
|
+
protoOf(MappedMutableProblogTheory).j1t = function (struct) {
|
|
2488
|
+
return this.k1s(Companion_instance.of(struct));
|
|
2489
2489
|
};
|
|
2490
2490
|
protoOf(MappedMutableProblogTheory).assertAFact = function (struct) {
|
|
2491
|
-
return this.
|
|
2491
|
+
return this.j1t(struct);
|
|
2492
2492
|
};
|
|
2493
|
-
protoOf(MappedMutableProblogTheory).
|
|
2494
|
-
return this.
|
|
2493
|
+
protoOf(MappedMutableProblogTheory).k1t = function (struct) {
|
|
2494
|
+
return this.o1s(Companion_instance.of(struct));
|
|
2495
2495
|
};
|
|
2496
2496
|
protoOf(MappedMutableProblogTheory).assertZFact = function (struct) {
|
|
2497
|
-
return this.
|
|
2497
|
+
return this.k1t(struct);
|
|
2498
2498
|
};
|
|
2499
|
-
protoOf(MappedMutableProblogTheory).
|
|
2500
|
-
return this.
|
|
2499
|
+
protoOf(MappedMutableProblogTheory).k1s = function (clause) {
|
|
2500
|
+
return this.m1s(listOf(clause));
|
|
2501
2501
|
};
|
|
2502
2502
|
protoOf(MappedMutableProblogTheory).assertA = function (clause) {
|
|
2503
|
-
return this.
|
|
2503
|
+
return this.k1s(clause);
|
|
2504
2504
|
};
|
|
2505
|
-
protoOf(MappedMutableProblogTheory).
|
|
2506
|
-
return this.
|
|
2505
|
+
protoOf(MappedMutableProblogTheory).n1s = function (clauses) {
|
|
2506
|
+
return this.m1s(asIterable_0(clauses));
|
|
2507
2507
|
};
|
|
2508
2508
|
protoOf(MappedMutableProblogTheory).assertASequence = function (clauses) {
|
|
2509
|
-
return this.
|
|
2509
|
+
return this.n1s(clauses);
|
|
2510
2510
|
};
|
|
2511
|
-
protoOf(MappedMutableProblogTheory).
|
|
2512
|
-
return this.
|
|
2511
|
+
protoOf(MappedMutableProblogTheory).o1s = function (clause) {
|
|
2512
|
+
return this.p1s(listOf(clause));
|
|
2513
2513
|
};
|
|
2514
2514
|
protoOf(MappedMutableProblogTheory).assertZ = function (clause) {
|
|
2515
|
-
return this.
|
|
2515
|
+
return this.o1s(clause);
|
|
2516
2516
|
};
|
|
2517
|
-
protoOf(MappedMutableProblogTheory).
|
|
2518
|
-
return this.
|
|
2517
|
+
protoOf(MappedMutableProblogTheory).q1s = function (clauses) {
|
|
2518
|
+
return this.p1s(asIterable_0(clauses));
|
|
2519
2519
|
};
|
|
2520
2520
|
protoOf(MappedMutableProblogTheory).assertZSequence = function (clauses) {
|
|
2521
|
-
return this.
|
|
2521
|
+
return this.q1s(clauses);
|
|
2522
2522
|
};
|
|
2523
|
-
protoOf(MappedMutableProblogTheory).
|
|
2524
|
-
return this.
|
|
2523
|
+
protoOf(MappedMutableProblogTheory).m1t = function (head) {
|
|
2524
|
+
return this.l1t(Companion_instance_4.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2525
2525
|
};
|
|
2526
2526
|
protoOf(MappedMutableProblogTheory).retractByHead = function (head) {
|
|
2527
|
-
return this.
|
|
2527
|
+
return this.m1t(head);
|
|
2528
2528
|
};
|
|
2529
|
-
protoOf(MappedMutableProblogTheory).
|
|
2530
|
-
return this.
|
|
2529
|
+
protoOf(MappedMutableProblogTheory).l1t = function (clause) {
|
|
2530
|
+
return this.t1s(listOf(clause));
|
|
2531
2531
|
};
|
|
2532
2532
|
protoOf(MappedMutableProblogTheory).retract = function (clause) {
|
|
2533
|
-
return this.
|
|
2533
|
+
return this.l1t(clause);
|
|
2534
2534
|
};
|
|
2535
|
-
protoOf(MappedMutableProblogTheory).
|
|
2536
|
-
return this.
|
|
2535
|
+
protoOf(MappedMutableProblogTheory).s1s = function (clauses) {
|
|
2536
|
+
return this.t1s(asIterable_0(clauses));
|
|
2537
2537
|
};
|
|
2538
2538
|
protoOf(MappedMutableProblogTheory).retractSequence = function (clauses) {
|
|
2539
|
-
return this.
|
|
2539
|
+
return this.s1s(clauses);
|
|
2540
2540
|
};
|
|
2541
|
-
protoOf(MappedMutableProblogTheory).
|
|
2542
|
-
return this.
|
|
2541
|
+
protoOf(MappedMutableProblogTheory).n1t = function (head) {
|
|
2542
|
+
return this.x1l(Companion_instance_4.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2543
2543
|
};
|
|
2544
2544
|
protoOf(MappedMutableProblogTheory).retractAllByHead = function (head) {
|
|
2545
|
-
return this.
|
|
2545
|
+
return this.n1t(head);
|
|
2546
2546
|
};
|
|
2547
2547
|
function MappedProblogTheory(clauses, unificator, theory) {
|
|
2548
|
-
unificator = unificator === VOID ? Companion_getInstance_8().
|
|
2548
|
+
unificator = unificator === VOID ? Companion_getInstance_8().c1l() : unificator;
|
|
2549
2549
|
var tmp;
|
|
2550
2550
|
if (theory === VOID) {
|
|
2551
2551
|
var tmp_0 = Companion_instance_8;
|
|
@@ -2560,7 +2560,7 @@
|
|
|
2560
2560
|
while (tmp0_iterator.s()) {
|
|
2561
2561
|
var element = tmp0_iterator.u();
|
|
2562
2562
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedProblogTheory.<init>.<anonymous>' call
|
|
2563
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2563
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2564
2564
|
addAll(destination, list);
|
|
2565
2565
|
}
|
|
2566
2566
|
tmp_1 = destination;
|
|
@@ -2571,109 +2571,109 @@
|
|
|
2571
2571
|
tmp = theory;
|
|
2572
2572
|
}
|
|
2573
2573
|
theory = tmp;
|
|
2574
|
-
this.
|
|
2574
|
+
this.g3e_1 = theory;
|
|
2575
2575
|
}
|
|
2576
|
-
protoOf(MappedProblogTheory).
|
|
2577
|
-
return this.
|
|
2576
|
+
protoOf(MappedProblogTheory).p1l = function () {
|
|
2577
|
+
return this.g3e_1.p1l();
|
|
2578
2578
|
};
|
|
2579
|
-
protoOf(MappedProblogTheory).
|
|
2580
|
-
return this.
|
|
2579
|
+
protoOf(MappedProblogTheory).i1l = function () {
|
|
2580
|
+
return this.g3e_1.i1l();
|
|
2581
2581
|
};
|
|
2582
|
-
protoOf(MappedProblogTheory).
|
|
2583
|
-
return this.
|
|
2582
|
+
protoOf(MappedProblogTheory).k1l = function () {
|
|
2583
|
+
return this.g3e_1.k1l();
|
|
2584
2584
|
};
|
|
2585
|
-
protoOf(MappedProblogTheory).
|
|
2586
|
-
return this.
|
|
2585
|
+
protoOf(MappedProblogTheory).f1s = function () {
|
|
2586
|
+
return this.g3e_1.f1s();
|
|
2587
2587
|
};
|
|
2588
2588
|
protoOf(MappedProblogTheory).l = function () {
|
|
2589
|
-
return this.
|
|
2589
|
+
return this.g3e_1.l();
|
|
2590
2590
|
};
|
|
2591
2591
|
protoOf(MappedProblogTheory).vt = function () {
|
|
2592
|
-
return this.
|
|
2592
|
+
return this.g3e_1.vt();
|
|
2593
2593
|
};
|
|
2594
|
-
protoOf(MappedProblogTheory).
|
|
2595
|
-
return this.
|
|
2594
|
+
protoOf(MappedProblogTheory).f1l = function () {
|
|
2595
|
+
return this.g3e_1.f1l();
|
|
2596
2596
|
};
|
|
2597
2597
|
protoOf(MappedProblogTheory).clone = function () {
|
|
2598
|
-
return this.
|
|
2598
|
+
return this.g3e_1.clone();
|
|
2599
2599
|
};
|
|
2600
2600
|
protoOf(MappedProblogTheory).contains = function (clause) {
|
|
2601
|
-
return this.
|
|
2601
|
+
return this.g3e_1.contains(clause);
|
|
2602
2602
|
};
|
|
2603
2603
|
protoOf(MappedProblogTheory).containsIndicator = function (indicator) {
|
|
2604
|
-
return this.
|
|
2604
|
+
return this.g3e_1.containsIndicator(indicator);
|
|
2605
2605
|
};
|
|
2606
2606
|
protoOf(MappedProblogTheory).containsHead = function (head) {
|
|
2607
|
-
return this.
|
|
2607
|
+
return this.g3e_1.containsHead(head);
|
|
2608
2608
|
};
|
|
2609
2609
|
protoOf(MappedProblogTheory).containsTag = function (name) {
|
|
2610
|
-
return this.
|
|
2610
|
+
return this.g3e_1.containsTag(name);
|
|
2611
2611
|
};
|
|
2612
2612
|
protoOf(MappedProblogTheory).equalsUsingVarCompleteNames = function (other, useVarCompleteName) {
|
|
2613
|
-
return this.
|
|
2613
|
+
return this.g3e_1.equalsUsingVarCompleteNames(other, useVarCompleteName);
|
|
2614
2614
|
};
|
|
2615
2615
|
protoOf(MappedProblogTheory).get = function (clause) {
|
|
2616
|
-
return this.
|
|
2616
|
+
return this.g3e_1.get(clause);
|
|
2617
2617
|
};
|
|
2618
2618
|
protoOf(MappedProblogTheory).getByIndicator = function (indicator) {
|
|
2619
|
-
return this.
|
|
2619
|
+
return this.g3e_1.getByIndicator(indicator);
|
|
2620
2620
|
};
|
|
2621
2621
|
protoOf(MappedProblogTheory).getByHead = function (head) {
|
|
2622
|
-
return this.
|
|
2622
|
+
return this.g3e_1.getByHead(head);
|
|
2623
2623
|
};
|
|
2624
2624
|
protoOf(MappedProblogTheory).getTag = function (name) {
|
|
2625
|
-
return this.
|
|
2625
|
+
return this.g3e_1.getTag(name);
|
|
2626
2626
|
};
|
|
2627
2627
|
protoOf(MappedProblogTheory).r = function () {
|
|
2628
|
-
return this.
|
|
2628
|
+
return this.g3e_1.r();
|
|
2629
2629
|
};
|
|
2630
2630
|
protoOf(MappedProblogTheory).resetTags = function (tags) {
|
|
2631
|
-
return this.
|
|
2631
|
+
return this.g3e_1.resetTags(tags);
|
|
2632
2632
|
};
|
|
2633
2633
|
protoOf(MappedProblogTheory).setUnificator = function (unificator) {
|
|
2634
|
-
return this.
|
|
2634
|
+
return this.g3e_1.setUnificator(unificator);
|
|
2635
2635
|
};
|
|
2636
2636
|
protoOf(MappedProblogTheory).toStringAsProlog = function (asPrologText) {
|
|
2637
|
-
return this.
|
|
2637
|
+
return this.g3e_1.toStringAsProlog(asPrologText);
|
|
2638
2638
|
};
|
|
2639
|
-
protoOf(MappedProblogTheory).
|
|
2639
|
+
protoOf(MappedProblogTheory).v1s = function () {
|
|
2640
2640
|
return false;
|
|
2641
2641
|
};
|
|
2642
|
-
protoOf(MappedProblogTheory).
|
|
2643
|
-
return Companion_instance_9.ofIterable(this.
|
|
2642
|
+
protoOf(MappedProblogTheory).i1t = function () {
|
|
2643
|
+
return Companion_instance_9.ofIterable(this.f1l(), this);
|
|
2644
2644
|
};
|
|
2645
2645
|
protoOf(MappedProblogTheory).toMutableTheory = function () {
|
|
2646
|
-
return this.
|
|
2646
|
+
return this.i1t();
|
|
2647
2647
|
};
|
|
2648
|
-
protoOf(MappedProblogTheory).
|
|
2648
|
+
protoOf(MappedProblogTheory).v1r = function () {
|
|
2649
2649
|
return this;
|
|
2650
2650
|
};
|
|
2651
2651
|
protoOf(MappedProblogTheory).toImmutableTheory = function () {
|
|
2652
|
-
return this.
|
|
2652
|
+
return this.v1r();
|
|
2653
2653
|
};
|
|
2654
|
-
protoOf(MappedProblogTheory).
|
|
2655
|
-
return new MappedProblogTheory(null, this.
|
|
2654
|
+
protoOf(MappedProblogTheory).f3e = function (theory) {
|
|
2655
|
+
return new MappedProblogTheory(null, this.f1l(), this.g3e_1.plusTheory(theory));
|
|
2656
2656
|
};
|
|
2657
|
-
protoOf(MappedProblogTheory).
|
|
2657
|
+
protoOf(MappedProblogTheory).i1s = function (theory) {
|
|
2658
2658
|
var tmp;
|
|
2659
2659
|
if (isInterface(theory, ProblogTheory)) {
|
|
2660
|
-
tmp = this.
|
|
2660
|
+
tmp = this.f3e(theory);
|
|
2661
2661
|
} else {
|
|
2662
|
-
tmp = this.
|
|
2662
|
+
tmp = this.f3e(new MappedProblogTheory(theory, this.f1l()));
|
|
2663
2663
|
}
|
|
2664
2664
|
return tmp;
|
|
2665
2665
|
};
|
|
2666
2666
|
protoOf(MappedProblogTheory).plusTheory = function (theory) {
|
|
2667
|
-
return this.
|
|
2667
|
+
return this.i1s(theory);
|
|
2668
2668
|
};
|
|
2669
|
-
protoOf(MappedProblogTheory).
|
|
2670
|
-
var mapped = ClauseMappingUtils_getInstance().
|
|
2671
|
-
return new MappedProblogTheory(null, this.
|
|
2669
|
+
protoOf(MappedProblogTheory).w1r = function (clause) {
|
|
2670
|
+
var mapped = ClauseMappingUtils_getInstance().c3e(clause);
|
|
2671
|
+
return new MappedProblogTheory(null, this.f1l(), this.g3e_1.plusTheory(Companion_instance_8.indexedOfIterable(this.f1l(), mapped)));
|
|
2672
2672
|
};
|
|
2673
2673
|
protoOf(MappedProblogTheory).plus = function (clause) {
|
|
2674
|
-
return this.
|
|
2674
|
+
return this.w1r(clause);
|
|
2675
2675
|
};
|
|
2676
|
-
protoOf(MappedProblogTheory).
|
|
2676
|
+
protoOf(MappedProblogTheory).m1s = function (clauses) {
|
|
2677
2677
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2678
2678
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2679
2679
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2681,16 +2681,16 @@
|
|
|
2681
2681
|
while (tmp0_iterator.s()) {
|
|
2682
2682
|
var element = tmp0_iterator.u();
|
|
2683
2683
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedProblogTheory.assertA.<anonymous>' call
|
|
2684
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2684
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2685
2685
|
addAll(destination, list);
|
|
2686
2686
|
}
|
|
2687
2687
|
var mapped = destination;
|
|
2688
|
-
return new MappedProblogTheory(null, this.
|
|
2688
|
+
return new MappedProblogTheory(null, this.f1l(), this.g3e_1.assertAIterable(mapped));
|
|
2689
2689
|
};
|
|
2690
2690
|
protoOf(MappedProblogTheory).assertAIterable = function (clauses) {
|
|
2691
|
-
return this.
|
|
2691
|
+
return this.m1s(clauses);
|
|
2692
2692
|
};
|
|
2693
|
-
protoOf(MappedProblogTheory).
|
|
2693
|
+
protoOf(MappedProblogTheory).p1s = function (clauses) {
|
|
2694
2694
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2695
2695
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2696
2696
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2698,16 +2698,16 @@
|
|
|
2698
2698
|
while (tmp0_iterator.s()) {
|
|
2699
2699
|
var element = tmp0_iterator.u();
|
|
2700
2700
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedProblogTheory.assertZ.<anonymous>' call
|
|
2701
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2701
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2702
2702
|
addAll(destination, list);
|
|
2703
2703
|
}
|
|
2704
2704
|
var mapped = destination;
|
|
2705
|
-
return new MappedProblogTheory(null, this.
|
|
2705
|
+
return new MappedProblogTheory(null, this.f1l(), this.g3e_1.assertZIterable(mapped));
|
|
2706
2706
|
};
|
|
2707
2707
|
protoOf(MappedProblogTheory).assertZIterable = function (clauses) {
|
|
2708
|
-
return this.
|
|
2708
|
+
return this.p1s(clauses);
|
|
2709
2709
|
};
|
|
2710
|
-
protoOf(MappedProblogTheory).
|
|
2710
|
+
protoOf(MappedProblogTheory).t1s = function (clauses) {
|
|
2711
2711
|
// Inline function 'kotlin.collections.flatMap' call
|
|
2712
2712
|
// Inline function 'kotlin.collections.flatMapTo' call
|
|
2713
2713
|
var destination = ArrayList_init_$Create$_0();
|
|
@@ -2715,24 +2715,24 @@
|
|
|
2715
2715
|
while (tmp0_iterator.s()) {
|
|
2716
2716
|
var element = tmp0_iterator.u();
|
|
2717
2717
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.knowledge.impl.MappedProblogTheory.retract.<anonymous>' call
|
|
2718
|
-
var list = ClauseMappingUtils_getInstance().
|
|
2718
|
+
var list = ClauseMappingUtils_getInstance().c3e(element);
|
|
2719
2719
|
addAll(destination, list);
|
|
2720
2720
|
}
|
|
2721
2721
|
var mapped = destination;
|
|
2722
|
-
var result = this.
|
|
2722
|
+
var result = this.g3e_1.retractIterable(mapped);
|
|
2723
2723
|
var tmp;
|
|
2724
2724
|
if (result instanceof Success) {
|
|
2725
|
-
tmp = new Success(new MappedProblogTheory(null, this.
|
|
2725
|
+
tmp = new Success(new MappedProblogTheory(null, this.f1l(), result.c1s()), result.p1t_1);
|
|
2726
2726
|
} else {
|
|
2727
|
-
tmp = new Failure(new MappedProblogTheory(null, this.
|
|
2727
|
+
tmp = new Failure(new MappedProblogTheory(null, this.f1l(), result.c1s()));
|
|
2728
2728
|
}
|
|
2729
2729
|
return tmp;
|
|
2730
2730
|
};
|
|
2731
2731
|
protoOf(MappedProblogTheory).retractIterable = function (clauses) {
|
|
2732
|
-
return this.
|
|
2732
|
+
return this.t1s(clauses);
|
|
2733
2733
|
};
|
|
2734
|
-
protoOf(MappedProblogTheory).
|
|
2735
|
-
var mappedClauses = ClauseMappingUtils_getInstance().
|
|
2734
|
+
protoOf(MappedProblogTheory).x1l = function (clause) {
|
|
2735
|
+
var mappedClauses = ClauseMappingUtils_getInstance().c3e(clause);
|
|
2736
2736
|
var result = null;
|
|
2737
2737
|
var tmp0_iterator = mappedClauses.r();
|
|
2738
2738
|
while (tmp0_iterator.s()) {
|
|
@@ -2744,92 +2744,92 @@
|
|
|
2744
2744
|
tmp = !(result instanceof Failure);
|
|
2745
2745
|
}
|
|
2746
2746
|
if (tmp) {
|
|
2747
|
-
result = this.
|
|
2747
|
+
result = this.g3e_1.retractAll(c);
|
|
2748
2748
|
}
|
|
2749
2749
|
}
|
|
2750
2750
|
var tmp_0;
|
|
2751
2751
|
if (result instanceof Success) {
|
|
2752
|
-
tmp_0 = new Success(new MappedProblogTheory(null, this.
|
|
2752
|
+
tmp_0 = new Success(new MappedProblogTheory(null, this.f1l(), result.c1s()), result.p1t_1);
|
|
2753
2753
|
} else {
|
|
2754
2754
|
tmp_0 = new Failure(this);
|
|
2755
2755
|
}
|
|
2756
2756
|
return tmp_0;
|
|
2757
2757
|
};
|
|
2758
2758
|
protoOf(MappedProblogTheory).retractAll = function (clause) {
|
|
2759
|
-
return this.
|
|
2759
|
+
return this.x1l(clause);
|
|
2760
2760
|
};
|
|
2761
|
-
protoOf(MappedProblogTheory).
|
|
2762
|
-
return new MappedProblogTheory(null, this.
|
|
2761
|
+
protoOf(MappedProblogTheory).b1s = function (indicator) {
|
|
2762
|
+
return new MappedProblogTheory(null, this.f1l(), this.g3e_1.abolish(ClauseMappingUtils_getInstance().d3e(indicator)));
|
|
2763
2763
|
};
|
|
2764
2764
|
protoOf(MappedProblogTheory).abolish = function (indicator) {
|
|
2765
|
-
return this.
|
|
2765
|
+
return this.b1s(indicator);
|
|
2766
2766
|
};
|
|
2767
|
-
protoOf(MappedProblogTheory).
|
|
2768
|
-
return this.
|
|
2767
|
+
protoOf(MappedProblogTheory).j1t = function (struct) {
|
|
2768
|
+
return this.k1s(Companion_instance.of(struct));
|
|
2769
2769
|
};
|
|
2770
2770
|
protoOf(MappedProblogTheory).assertAFact = function (struct) {
|
|
2771
|
-
return this.
|
|
2771
|
+
return this.j1t(struct);
|
|
2772
2772
|
};
|
|
2773
|
-
protoOf(MappedProblogTheory).
|
|
2774
|
-
return this.
|
|
2773
|
+
protoOf(MappedProblogTheory).k1t = function (struct) {
|
|
2774
|
+
return this.o1s(Companion_instance.of(struct));
|
|
2775
2775
|
};
|
|
2776
2776
|
protoOf(MappedProblogTheory).assertZFact = function (struct) {
|
|
2777
|
-
return this.
|
|
2777
|
+
return this.k1t(struct);
|
|
2778
2778
|
};
|
|
2779
|
-
protoOf(MappedProblogTheory).
|
|
2780
|
-
return this.
|
|
2779
|
+
protoOf(MappedProblogTheory).k1s = function (clause) {
|
|
2780
|
+
return this.m1s(listOf(clause));
|
|
2781
2781
|
};
|
|
2782
2782
|
protoOf(MappedProblogTheory).assertA = function (clause) {
|
|
2783
|
-
return this.
|
|
2783
|
+
return this.k1s(clause);
|
|
2784
2784
|
};
|
|
2785
|
-
protoOf(MappedProblogTheory).
|
|
2786
|
-
return this.
|
|
2785
|
+
protoOf(MappedProblogTheory).n1s = function (clauses) {
|
|
2786
|
+
return this.m1s(asIterable_0(clauses));
|
|
2787
2787
|
};
|
|
2788
2788
|
protoOf(MappedProblogTheory).assertASequence = function (clauses) {
|
|
2789
|
-
return this.
|
|
2789
|
+
return this.n1s(clauses);
|
|
2790
2790
|
};
|
|
2791
|
-
protoOf(MappedProblogTheory).
|
|
2792
|
-
return this.
|
|
2791
|
+
protoOf(MappedProblogTheory).o1s = function (clause) {
|
|
2792
|
+
return this.p1s(listOf(clause));
|
|
2793
2793
|
};
|
|
2794
2794
|
protoOf(MappedProblogTheory).assertZ = function (clause) {
|
|
2795
|
-
return this.
|
|
2795
|
+
return this.o1s(clause);
|
|
2796
2796
|
};
|
|
2797
|
-
protoOf(MappedProblogTheory).
|
|
2798
|
-
return this.
|
|
2797
|
+
protoOf(MappedProblogTheory).q1s = function (clauses) {
|
|
2798
|
+
return this.p1s(asIterable_0(clauses));
|
|
2799
2799
|
};
|
|
2800
2800
|
protoOf(MappedProblogTheory).assertZSequence = function (clauses) {
|
|
2801
|
-
return this.
|
|
2801
|
+
return this.q1s(clauses);
|
|
2802
2802
|
};
|
|
2803
|
-
protoOf(MappedProblogTheory).
|
|
2804
|
-
return this.
|
|
2803
|
+
protoOf(MappedProblogTheory).m1t = function (head) {
|
|
2804
|
+
return this.l1t(Companion_instance_4.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2805
2805
|
};
|
|
2806
2806
|
protoOf(MappedProblogTheory).retractByHead = function (head) {
|
|
2807
|
-
return this.
|
|
2807
|
+
return this.m1t(head);
|
|
2808
2808
|
};
|
|
2809
|
-
protoOf(MappedProblogTheory).
|
|
2810
|
-
return this.
|
|
2809
|
+
protoOf(MappedProblogTheory).l1t = function (clause) {
|
|
2810
|
+
return this.t1s(listOf(clause));
|
|
2811
2811
|
};
|
|
2812
2812
|
protoOf(MappedProblogTheory).retract = function (clause) {
|
|
2813
|
-
return this.
|
|
2813
|
+
return this.l1t(clause);
|
|
2814
2814
|
};
|
|
2815
|
-
protoOf(MappedProblogTheory).
|
|
2816
|
-
return this.
|
|
2815
|
+
protoOf(MappedProblogTheory).s1s = function (clauses) {
|
|
2816
|
+
return this.t1s(asIterable_0(clauses));
|
|
2817
2817
|
};
|
|
2818
2818
|
protoOf(MappedProblogTheory).retractSequence = function (clauses) {
|
|
2819
|
-
return this.
|
|
2819
|
+
return this.s1s(clauses);
|
|
2820
2820
|
};
|
|
2821
|
-
protoOf(MappedProblogTheory).
|
|
2822
|
-
return this.
|
|
2821
|
+
protoOf(MappedProblogTheory).n1t = function (head) {
|
|
2822
|
+
return this.x1l(Companion_instance_4.of(head, [Companion_getInstance_0().anonymous()]));
|
|
2823
2823
|
};
|
|
2824
2824
|
protoOf(MappedProblogTheory).retractAllByHead = function (head) {
|
|
2825
|
-
return this.
|
|
2825
|
+
return this.n1t(head);
|
|
2826
2826
|
};
|
|
2827
2827
|
function NothingClauseMapper() {
|
|
2828
2828
|
}
|
|
2829
|
-
protoOf(NothingClauseMapper).
|
|
2829
|
+
protoOf(NothingClauseMapper).q3d = function (clause) {
|
|
2830
2830
|
return true;
|
|
2831
2831
|
};
|
|
2832
|
-
protoOf(NothingClauseMapper).
|
|
2832
|
+
protoOf(NothingClauseMapper).r3d = function (clause) {
|
|
2833
2833
|
return listOf(clause);
|
|
2834
2834
|
};
|
|
2835
2835
|
var NothingClauseMapper_instance;
|
|
@@ -2838,7 +2838,7 @@
|
|
|
2838
2838
|
}
|
|
2839
2839
|
function ProbabilisticClauseMapper() {
|
|
2840
2840
|
}
|
|
2841
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2841
|
+
protoOf(ProbabilisticClauseMapper).q3d = function (clause) {
|
|
2842
2842
|
var tmp;
|
|
2843
2843
|
if (isInterface(clause, Rule)) {
|
|
2844
2844
|
tmp = clause.wy().qw() === get_ANNOTATION_FUNCTOR();
|
|
@@ -2847,14 +2847,14 @@
|
|
|
2847
2847
|
}
|
|
2848
2848
|
return tmp;
|
|
2849
2849
|
};
|
|
2850
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2850
|
+
protoOf(ProbabilisticClauseMapper).r3d = function (clause) {
|
|
2851
2851
|
if (!isInterface(clause, Rule)) {
|
|
2852
2852
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause);
|
|
2853
2853
|
}
|
|
2854
|
-
var mapped = this.
|
|
2855
|
-
return listOf(this.
|
|
2854
|
+
var mapped = this.s3d(clause);
|
|
2855
|
+
return listOf(this.t3d(mapped.ye_1, Companion_getInstance_11().f3d(mapped.ze_1)));
|
|
2856
2856
|
};
|
|
2857
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2857
|
+
protoOf(ProbabilisticClauseMapper).s3d = function (rule) {
|
|
2858
2858
|
if (!(rule.wy().kw() === 2)) {
|
|
2859
2859
|
throw TuPrologException_init_$Create$('Invalid probabilistic rule: ' + rule.wy());
|
|
2860
2860
|
}
|
|
@@ -2884,10 +2884,10 @@
|
|
|
2884
2884
|
headTerm = anonVariablesFix.wy();
|
|
2885
2885
|
bodyTerm = anonVariablesFix.xy();
|
|
2886
2886
|
var extraVariables = get_extraVariables(Companion_instance_4.of(headTerm, [bodyTerm]));
|
|
2887
|
-
var probTerm_0 = new ProbTerm(ClauseMappingUtils_getInstance().
|
|
2887
|
+
var probTerm_0 = new ProbTerm(ClauseMappingUtils_getInstance().b3e(), probability, headTerm, extraVariables);
|
|
2888
2888
|
return new Pair(Companion_instance_4.of(headTerm, [bodyTerm]), probTerm_0);
|
|
2889
2889
|
};
|
|
2890
|
-
protoOf(ProbabilisticClauseMapper).
|
|
2890
|
+
protoOf(ProbabilisticClauseMapper).t3d = function (rule, explanation) {
|
|
2891
2891
|
var tmp = rule.xy();
|
|
2892
2892
|
if (isInterface(tmp, Truth)) {
|
|
2893
2893
|
return Companion_instance_4.of(withExplanation(rule.wy(), toTerm(explanation)), [rule.xy()]);
|
|
@@ -2913,16 +2913,16 @@
|
|
|
2913
2913
|
}
|
|
2914
2914
|
function PrologClauseMapper() {
|
|
2915
2915
|
}
|
|
2916
|
-
protoOf(PrologClauseMapper).
|
|
2916
|
+
protoOf(PrologClauseMapper).q3d = function (clause) {
|
|
2917
2917
|
return isInterface(clause, Rule);
|
|
2918
2918
|
};
|
|
2919
|
-
protoOf(PrologClauseMapper).
|
|
2919
|
+
protoOf(PrologClauseMapper).r3d = function (clause) {
|
|
2920
2920
|
if (!isInterface(clause, Rule)) {
|
|
2921
2921
|
throw new ClauseMappingException('Clause is not an instance of Rule: ' + clause);
|
|
2922
2922
|
}
|
|
2923
2923
|
var tmp = clause.xy();
|
|
2924
2924
|
if (isInterface(tmp, Truth)) {
|
|
2925
|
-
return listOf(Companion_instance_4.of(withExplanation(clause.wy(), toTerm(Companion_getInstance_11().
|
|
2925
|
+
return listOf(Companion_instance_4.of(withExplanation(clause.wy(), toTerm(Companion_getInstance_11().b3d_1)), [clause.xy()]));
|
|
2926
2926
|
}
|
|
2927
2927
|
var tmp_0 = Companion_getInstance_0();
|
|
2928
2928
|
ProblogLib_getInstance();
|
|
@@ -2934,18 +2934,18 @@
|
|
|
2934
2934
|
return PrologClauseMapper_instance;
|
|
2935
2935
|
}
|
|
2936
2936
|
function _get_prob__dc6m52(_this__u8e3s4, $this) {
|
|
2937
|
-
return _this__u8e3s4.
|
|
2937
|
+
return _this__u8e3s4.x3b_1.n3d();
|
|
2938
2938
|
}
|
|
2939
2939
|
function ProbExplAnd() {
|
|
2940
2940
|
ProbExplAnd_instance = this;
|
|
2941
2941
|
ProblogLib_getInstance();
|
|
2942
2942
|
NonBacktrackable.call(this, 'prob' + '_expl_and');
|
|
2943
2943
|
}
|
|
2944
|
-
protoOf(ProbExplAnd).
|
|
2945
|
-
Companion_getInstance_9().
|
|
2946
|
-
Companion_getInstance_9().
|
|
2947
|
-
if (ProbSetConfig_getInstance().
|
|
2948
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
2944
|
+
protoOf(ProbExplAnd).p2r = function (_this__u8e3s4, first, second, third) {
|
|
2945
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 1);
|
|
2946
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 1);
|
|
2947
|
+
if (ProbSetConfig_getInstance().i3e(_this__u8e3s4.context)) {
|
|
2948
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().w2g(_this__u8e3s4, first, toTerm(Companion_getInstance_11().b3d_1)), VOID, []);
|
|
2949
2949
|
}
|
|
2950
2950
|
var tmp;
|
|
2951
2951
|
var tmp_0;
|
|
@@ -2961,12 +2961,12 @@
|
|
|
2961
2961
|
tmp_0 = false;
|
|
2962
2962
|
}
|
|
2963
2963
|
if (tmp_0) {
|
|
2964
|
-
var explanation = (_get_prob__dc6m52(second, this) === 0.0 ? true : _get_prob__dc6m52(third, this) === 0.0) ? Companion_getInstance_11().
|
|
2964
|
+
var explanation = (_get_prob__dc6m52(second, this) === 0.0 ? true : _get_prob__dc6m52(third, this) === 0.0) ? Companion_getInstance_11().a3d_1 : (_get_prob__dc6m52(second, this) === 1.0 ? _get_prob__dc6m52(third, this) === 1.0 : false) ? Companion_getInstance_11().b3d_1 : _get_prob__dc6m52(second, this) === 1.0 ? third.x3b_1 : _get_prob__dc6m52(third, this) === 1.0 ? second.x3b_1 : second.x3b_1.and(third.x3b_1);
|
|
2965
2965
|
var tmp_2;
|
|
2966
|
-
if (explanation.
|
|
2966
|
+
if (explanation.n3d() === 0.0) {
|
|
2967
2967
|
tmp_2 = _this__u8e3s4.replyWithCondition(false, VOID, []);
|
|
2968
2968
|
} else {
|
|
2969
|
-
tmp_2 = _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
2969
|
+
tmp_2 = _this__u8e3s4.replyWith(Companion_getInstance_9().w2g(_this__u8e3s4, first, new ProbExplanationTerm(explanation)), VOID, []);
|
|
2970
2970
|
}
|
|
2971
2971
|
tmp = tmp_2;
|
|
2972
2972
|
} else {
|
|
@@ -2976,8 +2976,8 @@
|
|
|
2976
2976
|
}
|
|
2977
2977
|
return tmp;
|
|
2978
2978
|
};
|
|
2979
|
-
protoOf(ProbExplAnd).
|
|
2980
|
-
return this.
|
|
2979
|
+
protoOf(ProbExplAnd).h2j = function (_this__u8e3s4, first, second, third) {
|
|
2980
|
+
return this.p2r(_this__u8e3s4, first, second, third);
|
|
2981
2981
|
};
|
|
2982
2982
|
var ProbExplAnd_instance;
|
|
2983
2983
|
function ProbExplAnd_getInstance() {
|
|
@@ -2986,22 +2986,22 @@
|
|
|
2986
2986
|
return ProbExplAnd_instance;
|
|
2987
2987
|
}
|
|
2988
2988
|
function ProbHelper$computeAllSubstitutions$slambda($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation) {
|
|
2989
|
-
this.
|
|
2990
|
-
this.
|
|
2991
|
-
this.
|
|
2992
|
-
this.
|
|
2993
|
-
this.
|
|
2994
|
-
this.
|
|
2989
|
+
this.r3e_1 = $goal;
|
|
2990
|
+
this.s3e_1 = $this_computeAllSubstitutions;
|
|
2991
|
+
this.t3e_1 = $third;
|
|
2992
|
+
this.u3e_1 = $first;
|
|
2993
|
+
this.v3e_1 = $second;
|
|
2994
|
+
this.w3e_1 = $goalSignature;
|
|
2995
2995
|
CoroutineImpl.call(this, resultContinuation);
|
|
2996
2996
|
}
|
|
2997
|
-
protoOf(ProbHelper$computeAllSubstitutions$slambda).
|
|
2998
|
-
var tmp = this.
|
|
2997
|
+
protoOf(ProbHelper$computeAllSubstitutions$slambda).k2t = function ($this$sequence, $completion) {
|
|
2998
|
+
var tmp = this.l2t($this$sequence, $completion);
|
|
2999
2999
|
tmp.pc_1 = Unit_instance;
|
|
3000
3000
|
tmp.qc_1 = null;
|
|
3001
3001
|
return tmp.yc();
|
|
3002
3002
|
};
|
|
3003
3003
|
protoOf(ProbHelper$computeAllSubstitutions$slambda).ld = function (p1, $completion) {
|
|
3004
|
-
return this.
|
|
3004
|
+
return this.k2t(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3005
3005
|
};
|
|
3006
3006
|
protoOf(ProbHelper$computeAllSubstitutions$slambda).yc = function () {
|
|
3007
3007
|
var suspendResult = this.pc_1;
|
|
@@ -3011,91 +3011,91 @@
|
|
|
3011
3011
|
switch (tmp) {
|
|
3012
3012
|
case 0:
|
|
3013
3013
|
this.oc_1 = 18;
|
|
3014
|
-
this.
|
|
3015
|
-
if (this.
|
|
3014
|
+
this.y3e_1 = this.r3e_1.qw();
|
|
3015
|
+
if (this.y3e_1 === '\\+' ? true : this.y3e_1 === 'not') {
|
|
3016
3016
|
this.nc_1 = 16;
|
|
3017
3017
|
var tmp_0;
|
|
3018
|
-
if (ProbSetConfig_getInstance().
|
|
3018
|
+
if (ProbSetConfig_getInstance().i3e(this.s3e_1.context)) {
|
|
3019
3019
|
var tmp_1 = Companion_getInstance_9();
|
|
3020
3020
|
var tmp_2 = Companion_getInstance_1();
|
|
3021
|
-
var tmp_3 = this.
|
|
3021
|
+
var tmp_3 = this.r3e_1.qw();
|
|
3022
3022
|
var tmp_4 = Companion_getInstance_1();
|
|
3023
3023
|
var this_0 = Prob_getInstance();
|
|
3024
|
-
tmp_0 = tmp_1.
|
|
3024
|
+
tmp_0 = tmp_1.w2g(this.s3e_1, this.t3e_1, tmp_2.of(tmp_3, [tmp_4.of(this_0.signature.name, [Companion_getInstance_0().anonymous(), this.r3e_1.get(0)])])).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1)));
|
|
3025
3025
|
} else {
|
|
3026
3026
|
var tmp_5 = Companion_getInstance_9();
|
|
3027
3027
|
var tmp_6 = Companion_getInstance_1();
|
|
3028
3028
|
var this_1 = ProbNegationAsFailure_getInstance();
|
|
3029
|
-
tmp_0 = tmp_5.
|
|
3029
|
+
tmp_0 = tmp_5.w2g(this.s3e_1, this.t3e_1, tmp_6.of(this_1.signature.name, [this.u3e_1, this.r3e_1.get(0)]));
|
|
3030
3030
|
}
|
|
3031
|
-
suspendResult = this.
|
|
3031
|
+
suspendResult = this.x3e_1.ef(tmp_0, this);
|
|
3032
3032
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3033
3033
|
return suspendResult;
|
|
3034
3034
|
}
|
|
3035
3035
|
continue $sm;
|
|
3036
3036
|
} else {
|
|
3037
|
-
if ((this.
|
|
3037
|
+
if ((this.y3e_1 === ',' ? true : this.y3e_1 === ';') ? true : this.y3e_1 === '->') {
|
|
3038
3038
|
this.nc_1 = 15;
|
|
3039
3039
|
var tmp_7;
|
|
3040
|
-
if (ProbSetConfig_getInstance().
|
|
3041
|
-
tmp_7 = Companion_getInstance_9().
|
|
3040
|
+
if (ProbSetConfig_getInstance().i3e(this.s3e_1.context)) {
|
|
3041
|
+
tmp_7 = Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, withBodyExplanation(this.r3e_1, Companion_getInstance_0().anonymous())).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1)));
|
|
3042
3042
|
} else {
|
|
3043
|
-
tmp_7 = Companion_getInstance_9().
|
|
3043
|
+
tmp_7 = Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, withBodyExplanation(this.r3e_1, this.u3e_1));
|
|
3044
3044
|
}
|
|
3045
|
-
suspendResult = this.
|
|
3045
|
+
suspendResult = this.x3e_1.ef(tmp_7, this);
|
|
3046
3046
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3047
3047
|
return suspendResult;
|
|
3048
3048
|
}
|
|
3049
3049
|
continue $sm;
|
|
3050
3050
|
} else {
|
|
3051
|
-
if (this.
|
|
3052
|
-
this.
|
|
3051
|
+
if (this.y3e_1 === 'call') {
|
|
3052
|
+
this.z3e_1 = this.r3e_1.get(0);
|
|
3053
3053
|
this.nc_1 = 14;
|
|
3054
|
-
suspendResult = this.
|
|
3054
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, Companion_instance_0.of(Companion_getInstance_1().of('ensure_executable', [this.z3e_1]), Companion_getInstance_1().of(this.r3e_1.qw(), [withBodyExplanation(this.z3e_1, this.u3e_1)]))), this);
|
|
3055
3055
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3056
3056
|
return suspendResult;
|
|
3057
3057
|
}
|
|
3058
3058
|
continue $sm;
|
|
3059
3059
|
} else {
|
|
3060
|
-
if (this.
|
|
3060
|
+
if (this.y3e_1 === 'catch') {
|
|
3061
3061
|
this.nc_1 = 13;
|
|
3062
|
-
suspendResult = this.
|
|
3062
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, Companion_getInstance_1().of(this.r3e_1.qw(), [withBodyExplanation(this.r3e_1.get(0), this.u3e_1), this.r3e_1.get(1), withBodyExplanation(this.r3e_1.get(2), this.u3e_1)])), this);
|
|
3063
3063
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3064
3064
|
return suspendResult;
|
|
3065
3065
|
}
|
|
3066
3066
|
continue $sm;
|
|
3067
3067
|
} else {
|
|
3068
|
-
if (this.
|
|
3068
|
+
if (this.y3e_1 === 'findall') {
|
|
3069
3069
|
var tmp_8 = this;
|
|
3070
|
-
var this_2 = this.
|
|
3071
|
-
tmp_8.
|
|
3072
|
-
this.
|
|
3070
|
+
var this_2 = this.r3e_1.rw();
|
|
3071
|
+
tmp_8.a3f_1 = copyToArray(this_2);
|
|
3072
|
+
this.a3f_1[1] = withBodyExplanation(this.a3f_1[1], Companion_getInstance_0().anonymous());
|
|
3073
3073
|
this.nc_1 = 12;
|
|
3074
|
-
suspendResult = this.
|
|
3074
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, Companion_getInstance_1().of(this.r3e_1.qw(), this.a3f_1.slice())).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1))), this);
|
|
3075
3075
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3076
3076
|
return suspendResult;
|
|
3077
3077
|
}
|
|
3078
3078
|
continue $sm;
|
|
3079
3079
|
} else {
|
|
3080
|
-
if ((this.
|
|
3081
|
-
this.
|
|
3080
|
+
if ((this.y3e_1 === 'assert' ? true : this.y3e_1 === 'asserta') ? true : this.y3e_1 === 'assertz') {
|
|
3081
|
+
this.b3f_1 = this.r3e_1.get(0);
|
|
3082
3082
|
var tmp_9 = this;
|
|
3083
|
-
var tmp1_subject = this.
|
|
3083
|
+
var tmp1_subject = this.b3f_1;
|
|
3084
3084
|
var tmp_10;
|
|
3085
3085
|
if (isInterface(tmp1_subject, Clause)) {
|
|
3086
|
-
tmp_10 = extractSignature(ensureNotNull(this.
|
|
3086
|
+
tmp_10 = extractSignature(ensureNotNull(this.b3f_1.wy()));
|
|
3087
3087
|
} else {
|
|
3088
|
-
tmp_10 = extractSignature(safeToStruct(this.
|
|
3088
|
+
tmp_10 = extractSignature(safeToStruct(this.b3f_1));
|
|
3089
3089
|
}
|
|
3090
|
-
tmp_9.
|
|
3090
|
+
tmp_9.c3f_1 = tmp_10;
|
|
3091
3091
|
var tmp_11;
|
|
3092
|
-
if (this.
|
|
3092
|
+
if (this.s3e_1.context.c1v().containsSignature(this.c3f_1)) {
|
|
3093
3093
|
tmp_11 = true;
|
|
3094
3094
|
} else {
|
|
3095
3095
|
var tmp_12;
|
|
3096
|
-
var tmp_13 = this.
|
|
3096
|
+
var tmp_13 = this.b3f_1;
|
|
3097
3097
|
if (isInterface(tmp_13, Clause)) {
|
|
3098
|
-
tmp_12 = !this.
|
|
3098
|
+
tmp_12 = !this.b3f_1.gz();
|
|
3099
3099
|
} else {
|
|
3100
3100
|
tmp_12 = false;
|
|
3101
3101
|
}
|
|
@@ -3103,20 +3103,20 @@
|
|
|
3103
3103
|
}
|
|
3104
3104
|
if (tmp_11) {
|
|
3105
3105
|
this.nc_1 = 10;
|
|
3106
|
-
suspendResult = this.
|
|
3106
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, this.r3e_1).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1))), this);
|
|
3107
3107
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3108
3108
|
return suspendResult;
|
|
3109
3109
|
}
|
|
3110
3110
|
continue $sm;
|
|
3111
3111
|
} else {
|
|
3112
3112
|
var tmp_14 = this;
|
|
3113
|
-
var tmp2_subject = this.
|
|
3113
|
+
var tmp2_subject = this.b3f_1;
|
|
3114
3114
|
var tmp_15;
|
|
3115
3115
|
if (isInterface(tmp2_subject, Clause)) {
|
|
3116
|
-
tmp_15 = ClauseMappingUtils_getInstance().
|
|
3116
|
+
tmp_15 = ClauseMappingUtils_getInstance().c3e(this.b3f_1);
|
|
3117
3117
|
} else {
|
|
3118
3118
|
if (isInterface(tmp2_subject, Struct)) {
|
|
3119
|
-
var this_3 = ClauseMappingUtils_getInstance().
|
|
3119
|
+
var this_3 = ClauseMappingUtils_getInstance().c3e(Companion_instance.of(this.b3f_1));
|
|
3120
3120
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_3, 10));
|
|
3121
3121
|
var tmp0_iterator = this_3.r();
|
|
3122
3122
|
while (tmp0_iterator.s()) {
|
|
@@ -3125,41 +3125,41 @@
|
|
|
3125
3125
|
}
|
|
3126
3126
|
tmp_15 = destination;
|
|
3127
3127
|
} else {
|
|
3128
|
-
tmp_15 = listOf(this.
|
|
3128
|
+
tmp_15 = listOf(this.b3f_1);
|
|
3129
3129
|
}
|
|
3130
3130
|
}
|
|
3131
|
-
tmp_14.
|
|
3131
|
+
tmp_14.d3f_1 = tmp_15;
|
|
3132
3132
|
this.nc_1 = 9;
|
|
3133
|
-
var this_4 = this.
|
|
3133
|
+
var this_4 = this.d3f_1;
|
|
3134
3134
|
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
|
|
3135
3135
|
var tmp0_iterator_0 = this_4.r();
|
|
3136
3136
|
while (tmp0_iterator_0.s()) {
|
|
3137
3137
|
var item_0 = tmp0_iterator_0.u();
|
|
3138
|
-
destination_0.o(Companion_getInstance_9().
|
|
3138
|
+
destination_0.o(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, Companion_getInstance_1().of(this.r3e_1.qw(), [item_0])).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1))));
|
|
3139
3139
|
}
|
|
3140
|
-
suspendResult = this.
|
|
3140
|
+
suspendResult = this.x3e_1.gf(destination_0, this);
|
|
3141
3141
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3142
3142
|
return suspendResult;
|
|
3143
3143
|
}
|
|
3144
3144
|
continue $sm;
|
|
3145
3145
|
}
|
|
3146
3146
|
} else {
|
|
3147
|
-
if (this.
|
|
3148
|
-
this.
|
|
3147
|
+
if (this.y3e_1 === 'retract' ? true : this.y3e_1 === 'retractall') {
|
|
3148
|
+
this.e3f_1 = this.r3e_1.get(0);
|
|
3149
3149
|
this.nc_1 = 8;
|
|
3150
3150
|
var tmp_16 = Companion_getInstance_9();
|
|
3151
3151
|
var tmp_17 = Companion_getInstance_1();
|
|
3152
|
-
var tmp_18 = this.
|
|
3152
|
+
var tmp_18 = this.r3e_1.qw();
|
|
3153
3153
|
var tmp_19;
|
|
3154
3154
|
var tmp_20;
|
|
3155
3155
|
var tmp_21;
|
|
3156
|
-
if (this.
|
|
3156
|
+
if (this.e3f_1.xw()) {
|
|
3157
3157
|
tmp_21 = true;
|
|
3158
3158
|
} else {
|
|
3159
3159
|
var tmp_22;
|
|
3160
|
-
var tmp_23 = this.
|
|
3160
|
+
var tmp_23 = this.e3f_1;
|
|
3161
3161
|
if (isInterface(tmp_23, Struct)) {
|
|
3162
|
-
tmp_22 = this.
|
|
3162
|
+
tmp_22 = this.e3f_1.qw() === ':-';
|
|
3163
3163
|
} else {
|
|
3164
3164
|
tmp_22 = false;
|
|
3165
3165
|
}
|
|
@@ -3168,38 +3168,38 @@
|
|
|
3168
3168
|
if (tmp_21) {
|
|
3169
3169
|
tmp_20 = true;
|
|
3170
3170
|
} else {
|
|
3171
|
-
tmp_20 = this.
|
|
3171
|
+
tmp_20 = this.s3e_1.context.c1v().containsSignature(extractSignature(safeToStruct(this.e3f_1)));
|
|
3172
3172
|
}
|
|
3173
3173
|
if (tmp_20) {
|
|
3174
|
-
tmp_19 = this.
|
|
3174
|
+
tmp_19 = this.e3f_1;
|
|
3175
3175
|
} else {
|
|
3176
|
-
tmp_19 = withExplanation(this.
|
|
3176
|
+
tmp_19 = withExplanation(this.e3f_1, this.u3e_1);
|
|
3177
3177
|
}
|
|
3178
|
-
suspendResult = this.
|
|
3178
|
+
suspendResult = this.x3e_1.ef(tmp_16.w2g(this.s3e_1, this.t3e_1, tmp_17.of(tmp_18, [tmp_19])), this);
|
|
3179
3179
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3180
3180
|
return suspendResult;
|
|
3181
3181
|
}
|
|
3182
3182
|
continue $sm;
|
|
3183
3183
|
} else {
|
|
3184
|
-
if (this.
|
|
3185
|
-
this.
|
|
3184
|
+
if (this.y3e_1 === 'clause') {
|
|
3185
|
+
this.f3f_1 = this.r3e_1.get(0);
|
|
3186
3186
|
var tmp_24;
|
|
3187
|
-
var tmp_25 = this.
|
|
3187
|
+
var tmp_25 = this.f3f_1;
|
|
3188
3188
|
if (!isInterface(tmp_25, Struct)) {
|
|
3189
3189
|
tmp_24 = true;
|
|
3190
3190
|
} else {
|
|
3191
|
-
tmp_24 = this.
|
|
3191
|
+
tmp_24 = this.s3e_1.context.c1v().hasProtected(extractSignature(this.f3f_1));
|
|
3192
3192
|
}
|
|
3193
3193
|
if (tmp_24) {
|
|
3194
3194
|
this.nc_1 = 6;
|
|
3195
|
-
suspendResult = this.
|
|
3195
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, this.r3e_1).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1))), this);
|
|
3196
3196
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3197
3197
|
return suspendResult;
|
|
3198
3198
|
}
|
|
3199
3199
|
continue $sm;
|
|
3200
3200
|
} else {
|
|
3201
3201
|
this.nc_1 = 5;
|
|
3202
|
-
suspendResult = this.
|
|
3202
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, Companion_getInstance_1().of(this.r3e_1.qw(), [withExplanation(this.r3e_1.get(0), this.u3e_1), this.r3e_1.get(1)])), this);
|
|
3203
3203
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3204
3204
|
return suspendResult;
|
|
3205
3205
|
}
|
|
@@ -3208,16 +3208,16 @@
|
|
|
3208
3208
|
} else {
|
|
3209
3209
|
var tmp_26 = this;
|
|
3210
3210
|
var tmp_27;
|
|
3211
|
-
var tmp_28 = this.
|
|
3211
|
+
var tmp_28 = this.v3e_1;
|
|
3212
3212
|
if (isInterface(tmp_28, Truth)) {
|
|
3213
3213
|
tmp_27 = true;
|
|
3214
3214
|
} else {
|
|
3215
|
-
tmp_27 = this.
|
|
3215
|
+
tmp_27 = this.s3e_1.context.c1v().containsSignature(this.w3e_1);
|
|
3216
3216
|
}
|
|
3217
|
-
tmp_26.
|
|
3218
|
-
if ((this.
|
|
3217
|
+
tmp_26.g3f_1 = tmp_27;
|
|
3218
|
+
if ((this.g3f_1 ? true : this.s3e_1.context.e1v().containsIndicator(this.w3e_1.toIndicator())) ? true : this.s3e_1.context.f1v().containsIndicator(this.w3e_1.toIndicator())) {
|
|
3219
3219
|
this.nc_1 = 1;
|
|
3220
|
-
suspendResult = this.
|
|
3220
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, this.r3e_1).plus(Companion_getInstance_9().w2g(this.s3e_1, this.u3e_1, toTerm(Companion_getInstance_11().b3d_1))), this);
|
|
3221
3221
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3222
3222
|
return suspendResult;
|
|
3223
3223
|
}
|
|
@@ -3239,9 +3239,9 @@
|
|
|
3239
3239
|
this.nc_1 = 2;
|
|
3240
3240
|
continue $sm;
|
|
3241
3241
|
case 2:
|
|
3242
|
-
if (!this.
|
|
3242
|
+
if (!this.g3f_1) {
|
|
3243
3243
|
this.nc_1 = 3;
|
|
3244
|
-
suspendResult = this.
|
|
3244
|
+
suspendResult = this.x3e_1.ef(Companion_getInstance_9().w2g(this.s3e_1, this.t3e_1, withExplanation(this.r3e_1, this.u3e_1)), this);
|
|
3245
3245
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3246
3246
|
return suspendResult;
|
|
3247
3247
|
}
|
|
@@ -3309,15 +3309,15 @@
|
|
|
3309
3309
|
}
|
|
3310
3310
|
while (true);
|
|
3311
3311
|
};
|
|
3312
|
-
protoOf(ProbHelper$computeAllSubstitutions$slambda).
|
|
3313
|
-
var i = new ProbHelper$computeAllSubstitutions$slambda(this.
|
|
3314
|
-
i.
|
|
3312
|
+
protoOf(ProbHelper$computeAllSubstitutions$slambda).l2t = function ($this$sequence, completion) {
|
|
3313
|
+
var i = new ProbHelper$computeAllSubstitutions$slambda(this.r3e_1, this.s3e_1, this.t3e_1, this.u3e_1, this.v3e_1, this.w3e_1, completion);
|
|
3314
|
+
i.x3e_1 = $this$sequence;
|
|
3315
3315
|
return i;
|
|
3316
3316
|
};
|
|
3317
3317
|
function ProbHelper$computeAllSubstitutions$slambda_0($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation) {
|
|
3318
3318
|
var i = new ProbHelper$computeAllSubstitutions$slambda($goal, $this_computeAllSubstitutions, $third, $first, $second, $goalSignature, resultContinuation);
|
|
3319
3319
|
var l = function ($this$sequence, $completion) {
|
|
3320
|
-
return i.
|
|
3320
|
+
return i.k2t($this$sequence, $completion);
|
|
3321
3321
|
};
|
|
3322
3322
|
l.$arity = 1;
|
|
3323
3323
|
return l;
|
|
@@ -3327,15 +3327,15 @@
|
|
|
3327
3327
|
ProblogLib_getInstance();
|
|
3328
3328
|
WithoutSideEffects.call(this, 'prob' + '_helper');
|
|
3329
3329
|
}
|
|
3330
|
-
protoOf(ProbHelper).
|
|
3331
|
-
Companion_getInstance_9().
|
|
3332
|
-
Companion_getInstance_9().
|
|
3330
|
+
protoOf(ProbHelper).h2p = function (_this__u8e3s4, first, second, third) {
|
|
3331
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 1);
|
|
3332
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 1);
|
|
3333
3333
|
var goal = safeToStruct(second);
|
|
3334
3334
|
var goalSignature = extractSignature(goal);
|
|
3335
3335
|
return sequence(ProbHelper$computeAllSubstitutions$slambda_0(goal, _this__u8e3s4, third, first, second, goalSignature, null));
|
|
3336
3336
|
};
|
|
3337
|
-
protoOf(ProbHelper).
|
|
3338
|
-
return this.
|
|
3337
|
+
protoOf(ProbHelper).d2j = function (_this__u8e3s4, first, second, third) {
|
|
3338
|
+
return this.h2p(_this__u8e3s4, first, second, third);
|
|
3339
3339
|
};
|
|
3340
3340
|
var ProbHelper_instance;
|
|
3341
3341
|
function ProbHelper_getInstance() {
|
|
@@ -3348,9 +3348,9 @@
|
|
|
3348
3348
|
ProblogLib_getInstance();
|
|
3349
3349
|
NonBacktrackable_0.call(this, 'prob' + '_negation_as_failure');
|
|
3350
3350
|
}
|
|
3351
|
-
protoOf(ProbNegationAsFailure).
|
|
3352
|
-
Companion_getInstance_9().
|
|
3353
|
-
Companion_getInstance_9().
|
|
3351
|
+
protoOf(ProbNegationAsFailure).n2p = function (_this__u8e3s4, first, second) {
|
|
3352
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 1);
|
|
3353
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 1);
|
|
3354
3354
|
var tmp;
|
|
3355
3355
|
if (!second.ux()) {
|
|
3356
3356
|
tmp = _this__u8e3s4.replyException(ResolutionException_init_$Create$('Probabilistic negation does not support non-ground goals: ' + second, VOID, _this__u8e3s4.context, []), VOID, []);
|
|
@@ -3365,7 +3365,7 @@
|
|
|
3365
3365
|
if (solution == null) {
|
|
3366
3366
|
tmp_2 = _this__u8e3s4.replyFail(VOID, []);
|
|
3367
3367
|
} else {
|
|
3368
|
-
var explanationTerm = solution.
|
|
3368
|
+
var explanationTerm = solution.y1u().x2(explanationTermVar);
|
|
3369
3369
|
var tmp_3;
|
|
3370
3370
|
var tmp_4;
|
|
3371
3371
|
if (explanationTerm == null) {
|
|
@@ -3376,7 +3376,7 @@
|
|
|
3376
3376
|
if (tmp_4) {
|
|
3377
3377
|
tmp_3 = _this__u8e3s4.replyException(ResolutionException_init_$Create$('No valid explanation has been solved for goal: ' + second, VOID, _this__u8e3s4.context, []), VOID, []);
|
|
3378
3378
|
} else {
|
|
3379
|
-
tmp_3 = _this__u8e3s4.replyWith(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().
|
|
3379
|
+
tmp_3 = _this__u8e3s4.replyWith(Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().w2g(_this__u8e3s4, first, new ProbExplanationTerm(explanationTerm.x3b_1.not())), []), VOID, []);
|
|
3380
3380
|
}
|
|
3381
3381
|
tmp_2 = tmp_3;
|
|
3382
3382
|
}
|
|
@@ -3384,8 +3384,8 @@
|
|
|
3384
3384
|
}
|
|
3385
3385
|
return tmp;
|
|
3386
3386
|
};
|
|
3387
|
-
protoOf(ProbNegationAsFailure).
|
|
3388
|
-
return this.
|
|
3387
|
+
protoOf(ProbNegationAsFailure).y2f = function (_this__u8e3s4, first, second) {
|
|
3388
|
+
return this.n2p(_this__u8e3s4, first, second);
|
|
3389
3389
|
};
|
|
3390
3390
|
var ProbNegationAsFailure_instance;
|
|
3391
3391
|
function ProbNegationAsFailure_getInstance() {
|
|
@@ -3399,22 +3399,22 @@
|
|
|
3399
3399
|
};
|
|
3400
3400
|
}
|
|
3401
3401
|
function ProbQuery$computeAllSubstitutions$slambda($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation) {
|
|
3402
|
-
this.
|
|
3403
|
-
this.
|
|
3404
|
-
this.
|
|
3405
|
-
this.
|
|
3406
|
-
this.
|
|
3407
|
-
this.
|
|
3402
|
+
this.r3f_1 = $solutions;
|
|
3403
|
+
this.s3f_1 = $queryWithEvidenceExplanation;
|
|
3404
|
+
this.t3f_1 = $evidenceExplanation;
|
|
3405
|
+
this.u3f_1 = $this_computeAllSubstitutions;
|
|
3406
|
+
this.v3f_1 = $first;
|
|
3407
|
+
this.w3f_1 = $fourth;
|
|
3408
3408
|
CoroutineImpl.call(this, resultContinuation);
|
|
3409
3409
|
}
|
|
3410
|
-
protoOf(ProbQuery$computeAllSubstitutions$slambda).
|
|
3411
|
-
var tmp = this.
|
|
3410
|
+
protoOf(ProbQuery$computeAllSubstitutions$slambda).k2t = function ($this$sequence, $completion) {
|
|
3411
|
+
var tmp = this.l2t($this$sequence, $completion);
|
|
3412
3412
|
tmp.pc_1 = Unit_instance;
|
|
3413
3413
|
tmp.qc_1 = null;
|
|
3414
3414
|
return tmp.yc();
|
|
3415
3415
|
};
|
|
3416
3416
|
protoOf(ProbQuery$computeAllSubstitutions$slambda).ld = function (p1, $completion) {
|
|
3417
|
-
return this.
|
|
3417
|
+
return this.k2t(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3418
3418
|
};
|
|
3419
3419
|
protoOf(ProbQuery$computeAllSubstitutions$slambda).yc = function () {
|
|
3420
3420
|
var suspendResult = this.pc_1;
|
|
@@ -3424,67 +3424,67 @@
|
|
|
3424
3424
|
switch (tmp) {
|
|
3425
3425
|
case 0:
|
|
3426
3426
|
this.oc_1 = 8;
|
|
3427
|
-
this.
|
|
3427
|
+
this.y3f_1 = this.r3f_1.r();
|
|
3428
3428
|
this.nc_1 = 1;
|
|
3429
3429
|
continue $sm;
|
|
3430
3430
|
case 1:
|
|
3431
|
-
if (!this.
|
|
3431
|
+
if (!this.y3f_1.s()) {
|
|
3432
3432
|
this.nc_1 = 7;
|
|
3433
3433
|
continue $sm;
|
|
3434
3434
|
}
|
|
3435
3435
|
|
|
3436
|
-
this.
|
|
3437
|
-
if (this.
|
|
3438
|
-
throw ensureNotNull(this.
|
|
3439
|
-
this.
|
|
3440
|
-
this.
|
|
3436
|
+
this.z3f_1 = this.y3f_1.u();
|
|
3437
|
+
if (this.z3f_1.i1w())
|
|
3438
|
+
throw ensureNotNull(this.z3f_1.f1w());
|
|
3439
|
+
this.a3g_1 = this.z3f_1.y1u().x2(this.s3f_1);
|
|
3440
|
+
this.b3g_1 = this.z3f_1.y1u().x2(this.t3f_1);
|
|
3441
3441
|
var tmp_0;
|
|
3442
3442
|
var tmp_1;
|
|
3443
3443
|
var tmp_2;
|
|
3444
|
-
if (this.
|
|
3444
|
+
if (this.a3g_1 == null) {
|
|
3445
3445
|
tmp_2 = true;
|
|
3446
3446
|
} else {
|
|
3447
|
-
var tmp_3 = this.
|
|
3447
|
+
var tmp_3 = this.a3g_1;
|
|
3448
3448
|
tmp_2 = !(tmp_3 instanceof ProbExplanationTerm);
|
|
3449
3449
|
}
|
|
3450
3450
|
|
|
3451
3451
|
if (tmp_2) {
|
|
3452
3452
|
tmp_1 = true;
|
|
3453
3453
|
} else {
|
|
3454
|
-
tmp_1 = this.
|
|
3454
|
+
tmp_1 = this.b3g_1 == null;
|
|
3455
3455
|
}
|
|
3456
3456
|
|
|
3457
3457
|
if (tmp_1) {
|
|
3458
3458
|
tmp_0 = true;
|
|
3459
3459
|
} else {
|
|
3460
|
-
var tmp_4 = this.
|
|
3460
|
+
var tmp_4 = this.b3g_1;
|
|
3461
3461
|
tmp_0 = !(tmp_4 instanceof ProbExplanationTerm);
|
|
3462
3462
|
}
|
|
3463
3463
|
|
|
3464
3464
|
if (tmp_0) {
|
|
3465
3465
|
this.nc_1 = 5;
|
|
3466
|
-
suspendResult = this.
|
|
3466
|
+
suspendResult = this.x3f_1.ef(Companion_getInstance_5().failed(), this);
|
|
3467
3467
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3468
3468
|
return suspendResult;
|
|
3469
3469
|
}
|
|
3470
3470
|
continue $sm;
|
|
3471
3471
|
} else {
|
|
3472
|
-
this.
|
|
3473
|
-
this.
|
|
3474
|
-
if (this.
|
|
3472
|
+
this.c3g_1 = this.a3g_1.x3b_1.o3d();
|
|
3473
|
+
this.d3g_1 = this.b3g_1.x3b_1.o3d();
|
|
3474
|
+
if (this.c3g_1 == null ? true : this.d3g_1 == null) {
|
|
3475
3475
|
this.nc_1 = 3;
|
|
3476
|
-
suspendResult = this.
|
|
3476
|
+
suspendResult = this.x3f_1.ef(Companion_getInstance_5().failed(), this);
|
|
3477
3477
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3478
3478
|
return suspendResult;
|
|
3479
3479
|
}
|
|
3480
3480
|
continue $sm;
|
|
3481
3481
|
} else {
|
|
3482
3482
|
var tmp_5 = this;
|
|
3483
|
-
var tmp_6 = this.
|
|
3484
|
-
tmp_5.
|
|
3485
|
-
this.
|
|
3483
|
+
var tmp_6 = this.z3f_1.y1u();
|
|
3484
|
+
tmp_5.e3g_1 = tmp_6.filter(ProbQuery$computeAllSubstitutions$slambda$lambda(this.t3f_1, this.s3f_1));
|
|
3485
|
+
this.f3g_1 = Companion_getInstance_6().ofDouble(this.c3g_1 / this.d3g_1);
|
|
3486
3486
|
this.nc_1 = 2;
|
|
3487
|
-
suspendResult = this.
|
|
3487
|
+
suspendResult = this.x3f_1.ef(Companion_getInstance_5().ofSubstitution(this.e3g_1, [Companion_getInstance_9().w2g(this.u3f_1, this.v3f_1, this.f3g_1), Companion_getInstance_9().w2g(this.u3f_1, this.w3f_1, this.a3g_1)]), this);
|
|
3488
3488
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3489
3489
|
return suspendResult;
|
|
3490
3490
|
}
|
|
@@ -3523,15 +3523,15 @@
|
|
|
3523
3523
|
}
|
|
3524
3524
|
while (true);
|
|
3525
3525
|
};
|
|
3526
|
-
protoOf(ProbQuery$computeAllSubstitutions$slambda).
|
|
3527
|
-
var i = new ProbQuery$computeAllSubstitutions$slambda(this.
|
|
3528
|
-
i.
|
|
3526
|
+
protoOf(ProbQuery$computeAllSubstitutions$slambda).l2t = function ($this$sequence, completion) {
|
|
3527
|
+
var i = new ProbQuery$computeAllSubstitutions$slambda(this.r3f_1, this.s3f_1, this.t3f_1, this.u3f_1, this.v3f_1, this.w3f_1, completion);
|
|
3528
|
+
i.x3f_1 = $this$sequence;
|
|
3529
3529
|
return i;
|
|
3530
3530
|
};
|
|
3531
3531
|
function ProbQuery$computeAllSubstitutions$slambda_0($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation) {
|
|
3532
3532
|
var i = new ProbQuery$computeAllSubstitutions$slambda($solutions, $queryWithEvidenceExplanation, $evidenceExplanation, $this_computeAllSubstitutions, $first, $fourth, resultContinuation);
|
|
3533
3533
|
var l = function ($this$sequence, $completion) {
|
|
3534
|
-
return i.
|
|
3534
|
+
return i.k2t($this$sequence, $completion);
|
|
3535
3535
|
};
|
|
3536
3536
|
l.$arity = 1;
|
|
3537
3537
|
return l;
|
|
@@ -3541,11 +3541,11 @@
|
|
|
3541
3541
|
ProblogLib_getInstance();
|
|
3542
3542
|
WithoutSideEffects_0.call(this, 'prob' + '_query');
|
|
3543
3543
|
}
|
|
3544
|
-
protoOf(ProbQuery).
|
|
3545
|
-
Companion_getInstance_9().
|
|
3546
|
-
Companion_getInstance_9().
|
|
3547
|
-
Companion_getInstance_9().
|
|
3548
|
-
Companion_getInstance_9().
|
|
3544
|
+
protoOf(ProbQuery).h3g = function (_this__u8e3s4, first, second, third, fourth) {
|
|
3545
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 1);
|
|
3546
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 1);
|
|
3547
|
+
Companion_getInstance_9().g2h(_this__u8e3s4, 1);
|
|
3548
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 2);
|
|
3549
3549
|
var queryWithEvidenceExplanation = Companion_getInstance_0().of('QueryWithEvidenceExplanation');
|
|
3550
3550
|
var evidenceExplanation = Companion_getInstance_0().of('EvidenceExplanation');
|
|
3551
3551
|
var tmp = _this__u8e3s4.subSolver();
|
|
@@ -3557,11 +3557,11 @@
|
|
|
3557
3557
|
var tmp_3 = Companion_getInstance_1();
|
|
3558
3558
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3559
3559
|
var tmp$ret$1 = ProbSolveWithEvidence_getInstance().signature.name;
|
|
3560
|
-
var solutions = tmp.solveWithOptions(tmp_0.of(tmp_2, tmp_3.of(tmp$ret$1, [queryWithEvidenceExplanation, evidenceExplanation, second])), ProbSetConfig_getInstance().
|
|
3560
|
+
var solutions = tmp.solveWithOptions(tmp_0.of(tmp_2, tmp_3.of(tmp$ret$1, [queryWithEvidenceExplanation, evidenceExplanation, second])), ProbSetConfig_getInstance().i3g(third));
|
|
3561
3561
|
return sequence(ProbQuery$computeAllSubstitutions$slambda_0(solutions, queryWithEvidenceExplanation, evidenceExplanation, _this__u8e3s4, first, fourth, null));
|
|
3562
3562
|
};
|
|
3563
|
-
protoOf(ProbQuery).
|
|
3564
|
-
return this.
|
|
3563
|
+
protoOf(ProbQuery).y2h = function (_this__u8e3s4, first, second, third, fourth) {
|
|
3564
|
+
return this.h3g(_this__u8e3s4, first, second, third, fourth);
|
|
3565
3565
|
};
|
|
3566
3566
|
var ProbQuery_instance;
|
|
3567
3567
|
function ProbQuery_getInstance() {
|
|
@@ -3575,40 +3575,40 @@
|
|
|
3575
3575
|
NonBacktrackable_1.call(this, 'prob' + '_set_config');
|
|
3576
3576
|
var tmp = this;
|
|
3577
3577
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3578
|
-
tmp.
|
|
3578
|
+
tmp.t3b_1 = this.signature.name + '_flag';
|
|
3579
3579
|
var tmp_0 = this;
|
|
3580
3580
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3581
|
-
tmp_0.
|
|
3581
|
+
tmp_0.u3b_1 = this.signature.name + '_term';
|
|
3582
3582
|
var tmp_1 = this;
|
|
3583
3583
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3584
|
-
tmp_1.
|
|
3584
|
+
tmp_1.v3b_1 = 'it.unibo.tuprolog.solve.probability' + this.signature.name + '_tag';
|
|
3585
3585
|
}
|
|
3586
|
-
protoOf(ProbSetConfig).
|
|
3587
|
-
Companion_getInstance_9().
|
|
3588
|
-
Companion_getInstance_9().
|
|
3586
|
+
protoOf(ProbSetConfig).w2o = function (_this__u8e3s4, first) {
|
|
3587
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 0);
|
|
3588
|
+
Companion_getInstance_9().l2h(_this__u8e3s4, 0);
|
|
3589
3589
|
// Inline function 'kotlin.arrayOf' call
|
|
3590
3590
|
// Inline function 'kotlin.js.unsafeCast' call
|
|
3591
3591
|
// Inline function 'kotlin.js.asDynamic' call
|
|
3592
|
-
var tmp$ret$2 = [SetFlags_init_$Create$([new Pair(this.
|
|
3592
|
+
var tmp$ret$2 = [SetFlags_init_$Create$([new Pair(this.t3b_1, first)])];
|
|
3593
3593
|
return _this__u8e3s4.replySuccess(VOID, VOID, tmp$ret$2.slice());
|
|
3594
3594
|
};
|
|
3595
|
-
protoOf(ProbSetConfig).
|
|
3596
|
-
return this.
|
|
3595
|
+
protoOf(ProbSetConfig).q2j = function (_this__u8e3s4, first) {
|
|
3596
|
+
return this.w2o(_this__u8e3s4, first);
|
|
3597
3597
|
};
|
|
3598
|
-
protoOf(ProbSetConfig).
|
|
3599
|
-
var tmp0_elvis_lhs = _this__u8e3s4.getTag(this.
|
|
3598
|
+
protoOf(ProbSetConfig).i3g = function (_this__u8e3s4) {
|
|
3599
|
+
var tmp0_elvis_lhs = _this__u8e3s4.getTag(this.v3b_1);
|
|
3600
3600
|
return tmp0_elvis_lhs == null ? Companion_getInstance_2().DEFAULT : tmp0_elvis_lhs;
|
|
3601
3601
|
};
|
|
3602
|
-
protoOf(ProbSetConfig).
|
|
3603
|
-
return setTag(Companion_getInstance_4().of(this.
|
|
3602
|
+
protoOf(ProbSetConfig).w3b = function (_this__u8e3s4) {
|
|
3603
|
+
return setTag(Companion_getInstance_4().of(this.u3b_1), this.v3b_1, _this__u8e3s4);
|
|
3604
3604
|
};
|
|
3605
|
-
protoOf(ProbSetConfig).
|
|
3606
|
-
var tmp0_safe_receiver = _this__u8e3s4.
|
|
3607
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.
|
|
3605
|
+
protoOf(ProbSetConfig).j3g = function (_this__u8e3s4) {
|
|
3606
|
+
var tmp0_safe_receiver = _this__u8e3s4.d1v().l9(this.t3b_1);
|
|
3607
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : this.i3g(tmp0_safe_receiver);
|
|
3608
3608
|
return tmp1_elvis_lhs == null ? Companion_getInstance_2().DEFAULT : tmp1_elvis_lhs;
|
|
3609
3609
|
};
|
|
3610
|
-
protoOf(ProbSetConfig).
|
|
3611
|
-
return !get_isProbabilistic(this.
|
|
3610
|
+
protoOf(ProbSetConfig).i3e = function (_this__u8e3s4) {
|
|
3611
|
+
return !get_isProbabilistic(this.j3g(_this__u8e3s4));
|
|
3612
3612
|
};
|
|
3613
3613
|
var ProbSetConfig_instance;
|
|
3614
3614
|
function ProbSetConfig_getInstance() {
|
|
@@ -3617,9 +3617,9 @@
|
|
|
3617
3617
|
return ProbSetConfig_instance;
|
|
3618
3618
|
}
|
|
3619
3619
|
function ProbSolve$computeAllSubstitutions$lambda(it) {
|
|
3620
|
-
if (it.
|
|
3621
|
-
throw ensureNotNull(it.
|
|
3622
|
-
return it.
|
|
3620
|
+
if (it.i1w())
|
|
3621
|
+
throw ensureNotNull(it.f1w());
|
|
3622
|
+
return it.y1u();
|
|
3623
3623
|
}
|
|
3624
3624
|
function ProbSolve$computeAllSubstitutions$lambda_0(it) {
|
|
3625
3625
|
return !(it == null) ? isInterface(it, Halt) : false;
|
|
@@ -3630,20 +3630,20 @@
|
|
|
3630
3630
|
};
|
|
3631
3631
|
}
|
|
3632
3632
|
function ProbSolve$computeAllSubstitutions$slambda($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation) {
|
|
3633
|
-
this.
|
|
3634
|
-
this.
|
|
3635
|
-
this.
|
|
3636
|
-
this.
|
|
3633
|
+
this.s3g_1 = $solutionGroups;
|
|
3634
|
+
this.t3g_1 = $explanationVar;
|
|
3635
|
+
this.u3g_1 = $this_computeAllSubstitutions;
|
|
3636
|
+
this.v3g_1 = $first;
|
|
3637
3637
|
CoroutineImpl.call(this, resultContinuation);
|
|
3638
3638
|
}
|
|
3639
|
-
protoOf(ProbSolve$computeAllSubstitutions$slambda).
|
|
3640
|
-
var tmp = this.
|
|
3639
|
+
protoOf(ProbSolve$computeAllSubstitutions$slambda).k2t = function ($this$sequence, $completion) {
|
|
3640
|
+
var tmp = this.l2t($this$sequence, $completion);
|
|
3641
3641
|
tmp.pc_1 = Unit_instance;
|
|
3642
3642
|
tmp.qc_1 = null;
|
|
3643
3643
|
return tmp.yc();
|
|
3644
3644
|
};
|
|
3645
3645
|
protoOf(ProbSolve$computeAllSubstitutions$slambda).ld = function (p1, $completion) {
|
|
3646
|
-
return this.
|
|
3646
|
+
return this.k2t(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3647
3647
|
};
|
|
3648
3648
|
protoOf(ProbSolve$computeAllSubstitutions$slambda).yc = function () {
|
|
3649
3649
|
var suspendResult = this.pc_1;
|
|
@@ -3654,23 +3654,23 @@
|
|
|
3654
3654
|
case 0:
|
|
3655
3655
|
this.oc_1 = 4;
|
|
3656
3656
|
var tmp_0 = this;
|
|
3657
|
-
tmp_0.
|
|
3657
|
+
tmp_0.x3g_1 = this.s3g_1.p2().r();
|
|
3658
3658
|
this.nc_1 = 1;
|
|
3659
3659
|
continue $sm;
|
|
3660
3660
|
case 1:
|
|
3661
|
-
if (!this.
|
|
3661
|
+
if (!this.x3g_1.s()) {
|
|
3662
3662
|
this.nc_1 = 3;
|
|
3663
3663
|
continue $sm;
|
|
3664
3664
|
}
|
|
3665
3665
|
|
|
3666
|
-
this.
|
|
3666
|
+
this.y3g_1 = this.x3g_1.u();
|
|
3667
3667
|
var tmp_1 = this;
|
|
3668
|
-
var this_0 = this.
|
|
3668
|
+
var this_0 = this.y3g_1.r2();
|
|
3669
3669
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
3670
3670
|
var tmp0_iterator = this_0.r();
|
|
3671
3671
|
while (tmp0_iterator.s()) {
|
|
3672
3672
|
var item = tmp0_iterator.u();
|
|
3673
|
-
destination.o(item.
|
|
3673
|
+
destination.o(item.y1u().x2(this.t3g_1));
|
|
3674
3674
|
}
|
|
3675
3675
|
|
|
3676
3676
|
var destination_0 = ArrayList_init_$Create$_0();
|
|
@@ -3686,7 +3686,7 @@
|
|
|
3686
3686
|
var tmp0_iterator_1 = destination_0.r();
|
|
3687
3687
|
while (tmp0_iterator_1.s()) {
|
|
3688
3688
|
var item_0 = tmp0_iterator_1.u();
|
|
3689
|
-
destination_1.o(item_0.
|
|
3689
|
+
destination_1.o(item_0.x3b_1);
|
|
3690
3690
|
}
|
|
3691
3691
|
|
|
3692
3692
|
var iterator = destination_1.r();
|
|
@@ -3696,13 +3696,13 @@
|
|
|
3696
3696
|
while (iterator.s()) {
|
|
3697
3697
|
var acc = accumulator;
|
|
3698
3698
|
var expl = iterator.u();
|
|
3699
|
-
accumulator = expl.
|
|
3699
|
+
accumulator = expl.n3d() === 1.0 ? acc : acc.n3d() === 1.0 ? expl : acc.or(expl);
|
|
3700
3700
|
}
|
|
3701
3701
|
|
|
3702
|
-
tmp_1.
|
|
3703
|
-
this.
|
|
3702
|
+
tmp_1.z3g_1 = accumulator;
|
|
3703
|
+
this.a3h_1 = Companion_getInstance_5().ofSubstitution(this.y3g_1.q2(), [Companion_getInstance_9().w2g(this.u3g_1, this.v3g_1, new ProbExplanationTerm(this.z3g_1))]);
|
|
3704
3704
|
this.nc_1 = 2;
|
|
3705
|
-
suspendResult = this.
|
|
3705
|
+
suspendResult = this.w3g_1.ef(this.a3h_1, this);
|
|
3706
3706
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
3707
3707
|
return suspendResult;
|
|
3708
3708
|
}
|
|
@@ -3727,15 +3727,15 @@
|
|
|
3727
3727
|
}
|
|
3728
3728
|
while (true);
|
|
3729
3729
|
};
|
|
3730
|
-
protoOf(ProbSolve$computeAllSubstitutions$slambda).
|
|
3731
|
-
var i = new ProbSolve$computeAllSubstitutions$slambda(this.
|
|
3732
|
-
i.
|
|
3730
|
+
protoOf(ProbSolve$computeAllSubstitutions$slambda).l2t = function ($this$sequence, completion) {
|
|
3731
|
+
var i = new ProbSolve$computeAllSubstitutions$slambda(this.s3g_1, this.t3g_1, this.u3g_1, this.v3g_1, completion);
|
|
3732
|
+
i.w3g_1 = $this$sequence;
|
|
3733
3733
|
return i;
|
|
3734
3734
|
};
|
|
3735
3735
|
function ProbSolve$computeAllSubstitutions$slambda_0($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation) {
|
|
3736
3736
|
var i = new ProbSolve$computeAllSubstitutions$slambda($solutionGroups, $explanationVar, $this_computeAllSubstitutions, $first, resultContinuation);
|
|
3737
3737
|
var l = function ($this$sequence, $completion) {
|
|
3738
|
-
return i.
|
|
3738
|
+
return i.k2t($this$sequence, $completion);
|
|
3739
3739
|
};
|
|
3740
3740
|
l.$arity = 1;
|
|
3741
3741
|
return l;
|
|
@@ -3745,15 +3745,15 @@
|
|
|
3745
3745
|
ProblogLib_getInstance();
|
|
3746
3746
|
WithoutSideEffects_1.call(this, 'prob' + '_solve');
|
|
3747
3747
|
}
|
|
3748
|
-
protoOf(ProbSolve).
|
|
3749
|
-
Companion_getInstance_9().
|
|
3750
|
-
Companion_getInstance_9().
|
|
3751
|
-
if (ProbSetConfig_getInstance().
|
|
3748
|
+
protoOf(ProbSolve).m2q = function (_this__u8e3s4, first, second) {
|
|
3749
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 1);
|
|
3750
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 1);
|
|
3751
|
+
if (ProbSetConfig_getInstance().i3e(_this__u8e3s4.context)) {
|
|
3752
3752
|
var tmp = _this__u8e3s4.subSolver();
|
|
3753
3753
|
var tmp_0 = Companion_getInstance_1();
|
|
3754
3754
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3755
3755
|
var tmp$ret$0 = Prob_getInstance().signature.name;
|
|
3756
|
-
var tmp_1 = tmp.solveWithOptions(tmp_0.of(tmp$ret$0, [first, second]), ProbSetConfig_getInstance().
|
|
3756
|
+
var tmp_1 = tmp.solveWithOptions(tmp_0.of(tmp$ret$0, [first, second]), ProbSetConfig_getInstance().j3g(_this__u8e3s4.context));
|
|
3757
3757
|
return map(tmp_1, ProbSolve$computeAllSubstitutions$lambda);
|
|
3758
3758
|
}
|
|
3759
3759
|
var tmp_2 = Companion_getInstance_0();
|
|
@@ -3763,14 +3763,14 @@
|
|
|
3763
3763
|
var tmp_4 = Companion_getInstance_1();
|
|
3764
3764
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
3765
3765
|
var tmp$ret$1 = Prob_getInstance().signature.name;
|
|
3766
|
-
var solutions = toList(tmp_3.solveWithOptions(tmp_4.of(tmp$ret$1, [explanationVar, second]), ProbSetConfig_getInstance().
|
|
3766
|
+
var solutions = toList(tmp_3.solveWithOptions(tmp_4.of(tmp$ret$1, [explanationVar, second]), ProbSetConfig_getInstance().j3g(_this__u8e3s4.context)));
|
|
3767
3767
|
// Inline function 'kotlin.sequences.filterIsInstance' call
|
|
3768
3768
|
var this_0 = asSequence(solutions);
|
|
3769
3769
|
var tmp_5 = filter(this_0, ProbSolve$computeAllSubstitutions$lambda_0);
|
|
3770
3770
|
var tmp$ret$2 = isInterface(tmp_5, Sequence) ? tmp_5 : THROW_CCE();
|
|
3771
3771
|
var error = firstOrNull(tmp$ret$2);
|
|
3772
3772
|
if (!(error == null))
|
|
3773
|
-
throw error.
|
|
3773
|
+
throw error.f1w();
|
|
3774
3774
|
var tmp_6;
|
|
3775
3775
|
var tmp$ret$3;
|
|
3776
3776
|
$l$block_0: {
|
|
@@ -3797,7 +3797,7 @@
|
|
|
3797
3797
|
tmp$ret$3 = false;
|
|
3798
3798
|
}
|
|
3799
3799
|
if (!tmp$ret$3) {
|
|
3800
|
-
tmp_6 = sequenceOf([Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().
|
|
3800
|
+
tmp_6 = sequenceOf([Companion_getInstance_5().ofSubstitution(Companion_getInstance_9().w2g(_this__u8e3s4, first, new ProbExplanationTerm(Companion_getInstance_11().a3d_1)), [])]);
|
|
3801
3801
|
} else {
|
|
3802
3802
|
// Inline function 'kotlin.collections.groupBy' call
|
|
3803
3803
|
// Inline function 'kotlin.collections.filterIsInstance' call
|
|
@@ -3816,7 +3816,7 @@
|
|
|
3816
3816
|
while (tmp0_iterator_1.s()) {
|
|
3817
3817
|
var element_1 = tmp0_iterator_1.u();
|
|
3818
3818
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.primitive.ProbSolve.computeAllSubstitutions.<anonymous>' call
|
|
3819
|
-
var tmp_8 = element_1.
|
|
3819
|
+
var tmp_8 = element_1.y1u();
|
|
3820
3820
|
var key = tmp_8.r12(ProbSolve$computeAllSubstitutions$lambda_1(explanationVar));
|
|
3821
3821
|
// Inline function 'kotlin.collections.getOrPut' call
|
|
3822
3822
|
var value = destination_0.x2(key);
|
|
@@ -3837,8 +3837,8 @@
|
|
|
3837
3837
|
}
|
|
3838
3838
|
return tmp_6;
|
|
3839
3839
|
};
|
|
3840
|
-
protoOf(ProbSolve).
|
|
3841
|
-
return this.
|
|
3840
|
+
protoOf(ProbSolve).f2g = function (_this__u8e3s4, first, second) {
|
|
3841
|
+
return this.m2q(_this__u8e3s4, first, second);
|
|
3842
3842
|
};
|
|
3843
3843
|
var ProbSolve_instance;
|
|
3844
3844
|
function ProbSolve_getInstance() {
|
|
@@ -3851,33 +3851,33 @@
|
|
|
3851
3851
|
}
|
|
3852
3852
|
function ProbSolveEvidence$computeOne$lambda_0($explanationVar) {
|
|
3853
3853
|
return function (s) {
|
|
3854
|
-
return s.
|
|
3854
|
+
return s.y1u().x2($explanationVar);
|
|
3855
3855
|
};
|
|
3856
3856
|
}
|
|
3857
3857
|
function ProbSolveEvidence$computeOne$lambda_1(it) {
|
|
3858
3858
|
return it instanceof ProbExplanationTerm;
|
|
3859
3859
|
}
|
|
3860
3860
|
function ProbSolveEvidence$computeOne$lambda_2(t) {
|
|
3861
|
-
return t.
|
|
3861
|
+
return t.x3b_1;
|
|
3862
3862
|
}
|
|
3863
3863
|
function ProbSolveEvidence() {
|
|
3864
3864
|
ProbSolveEvidence_instance = this;
|
|
3865
3865
|
ProblogLib_getInstance();
|
|
3866
3866
|
NonBacktrackable_1.call(this, 'prob' + '_solve_evidence');
|
|
3867
3867
|
}
|
|
3868
|
-
protoOf(ProbSolveEvidence).
|
|
3868
|
+
protoOf(ProbSolveEvidence).w2o = function (_this__u8e3s4, first) {
|
|
3869
3869
|
var tmp = Companion_instance_5;
|
|
3870
3870
|
ProblogLib_getInstance();
|
|
3871
3871
|
var evidenceIndicator = tmp.ofString('evidence', 2);
|
|
3872
|
-
if (!_this__u8e3s4.context.
|
|
3873
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
3872
|
+
if (!_this__u8e3s4.context.e1v().containsIndicator(evidenceIndicator) ? !_this__u8e3s4.context.f1v().containsIndicator(evidenceIndicator) : false) {
|
|
3873
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().w2g(_this__u8e3s4, first, new ProbExplanationTerm(Companion_getInstance_11().b3d_1)), VOID, []);
|
|
3874
3874
|
}
|
|
3875
3875
|
var evidenceTermVar = Companion_getInstance_0().of('TermVar');
|
|
3876
3876
|
var evidenceTruthVar = Companion_getInstance_0().of('TruthVar');
|
|
3877
3877
|
var tmp_0 = Companion_getInstance_1();
|
|
3878
3878
|
ProblogLib_getInstance();
|
|
3879
3879
|
var subQuery = tmp_0.of('evidence', [evidenceTermVar, evidenceTruthVar]);
|
|
3880
|
-
var tmp_1 = ProbSetConfig_getInstance().
|
|
3880
|
+
var tmp_1 = ProbSetConfig_getInstance().j3g(_this__u8e3s4.context);
|
|
3881
3881
|
Companion_getInstance_2();
|
|
3882
3882
|
var subOptions = tmp_1.setLimit(-1).setLazy(false);
|
|
3883
3883
|
// Inline function 'kotlin.collections.filter' call
|
|
@@ -3893,8 +3893,8 @@
|
|
|
3893
3893
|
while (tmp0_iterator.s()) {
|
|
3894
3894
|
var item = tmp0_iterator.u();
|
|
3895
3895
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.primitive.ProbSolveEvidence.computeOne.<anonymous>' call
|
|
3896
|
-
var truth = item.
|
|
3897
|
-
var term = item.
|
|
3896
|
+
var truth = item.y1u().x2(evidenceTruthVar);
|
|
3897
|
+
var term = item.y1u().x2(evidenceTermVar);
|
|
3898
3898
|
var tmp_3;
|
|
3899
3899
|
var tmp_4;
|
|
3900
3900
|
if ((term == null ? true : term.mx()) ? true : truth == null) {
|
|
@@ -3903,7 +3903,7 @@
|
|
|
3903
3903
|
tmp_4 = !(!(truth == null) ? isInterface(truth, Truth) : false);
|
|
3904
3904
|
}
|
|
3905
3905
|
if (tmp_4) {
|
|
3906
|
-
tmp_3 = Companion_getInstance_11().
|
|
3906
|
+
tmp_3 = Companion_getInstance_11().a3d_1;
|
|
3907
3907
|
} else {
|
|
3908
3908
|
var tmp_5 = Companion_getInstance_0();
|
|
3909
3909
|
ProblogLib_getInstance();
|
|
@@ -3925,7 +3925,7 @@
|
|
|
3925
3925
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.primitive.ProbSolveEvidence.computeOne.<anonymous>.<anonymous>' call
|
|
3926
3926
|
var acc = accumulator;
|
|
3927
3927
|
var t = iterator.u();
|
|
3928
|
-
accumulator = t.
|
|
3928
|
+
accumulator = t.n3d() === 1.0 ? acc : acc.n3d() === 1.0 ? t : t.or(acc);
|
|
3929
3929
|
}
|
|
3930
3930
|
var totalExplanation = accumulator;
|
|
3931
3931
|
tmp_3 = truth.ow() ? totalExplanation : totalExplanation.not();
|
|
@@ -3939,14 +3939,14 @@
|
|
|
3939
3939
|
while (tmp0_iterator_0.s()) {
|
|
3940
3940
|
var element = tmp0_iterator_0.u();
|
|
3941
3941
|
// Inline function 'it.unibo.tuprolog.solve.problog.lib.primitive.ProbSolveEvidence.computeOne.<anonymous>' call
|
|
3942
|
-
if (!equals(element, Companion_getInstance_11().
|
|
3942
|
+
if (!equals(element, Companion_getInstance_11().a3d_1)) {
|
|
3943
3943
|
destination_0.o(element);
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
3946
|
var result = destination_0;
|
|
3947
3947
|
var tmp_10;
|
|
3948
3948
|
if (result.y()) {
|
|
3949
|
-
tmp_10 = Companion_getInstance_11().
|
|
3949
|
+
tmp_10 = Companion_getInstance_11().b3d_1;
|
|
3950
3950
|
} else {
|
|
3951
3951
|
// Inline function 'kotlin.collections.reduce' call
|
|
3952
3952
|
var iterator_0 = result.r();
|
|
@@ -3961,10 +3961,10 @@
|
|
|
3961
3961
|
tmp_10 = accumulator_0;
|
|
3962
3962
|
}
|
|
3963
3963
|
var resultExplanation = tmp_10;
|
|
3964
|
-
return _this__u8e3s4.replyWith(Companion_getInstance_9().
|
|
3964
|
+
return _this__u8e3s4.replyWith(Companion_getInstance_9().w2g(_this__u8e3s4, first, new ProbExplanationTerm(resultExplanation)), VOID, []);
|
|
3965
3965
|
};
|
|
3966
|
-
protoOf(ProbSolveEvidence).
|
|
3967
|
-
return this.
|
|
3966
|
+
protoOf(ProbSolveEvidence).q2j = function (_this__u8e3s4, first) {
|
|
3967
|
+
return this.w2o(_this__u8e3s4, first);
|
|
3968
3968
|
};
|
|
3969
3969
|
var ProbSolveEvidence_instance;
|
|
3970
3970
|
function ProbSolveEvidence_getInstance() {
|
|
@@ -3978,22 +3978,22 @@
|
|
|
3978
3978
|
};
|
|
3979
3979
|
}
|
|
3980
3980
|
function ProbSolveWithEvidence$computeAllSubstitutions$slambda($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation) {
|
|
3981
|
-
this.
|
|
3982
|
-
this.
|
|
3983
|
-
this.
|
|
3984
|
-
this.
|
|
3985
|
-
this.
|
|
3986
|
-
this.
|
|
3981
|
+
this.l3h_1 = $solutions;
|
|
3982
|
+
this.m3h_1 = $goalExplanationVar;
|
|
3983
|
+
this.n3h_1 = $evidenceExplanationTerm;
|
|
3984
|
+
this.o3h_1 = $this_computeAllSubstitutions;
|
|
3985
|
+
this.p3h_1 = $first;
|
|
3986
|
+
this.q3h_1 = $second;
|
|
3987
3987
|
CoroutineImpl.call(this, resultContinuation);
|
|
3988
3988
|
}
|
|
3989
|
-
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).
|
|
3990
|
-
var tmp = this.
|
|
3989
|
+
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).k2t = function ($this$sequence, $completion) {
|
|
3990
|
+
var tmp = this.l2t($this$sequence, $completion);
|
|
3991
3991
|
tmp.pc_1 = Unit_instance;
|
|
3992
3992
|
tmp.qc_1 = null;
|
|
3993
3993
|
return tmp.yc();
|
|
3994
3994
|
};
|
|
3995
3995
|
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).ld = function (p1, $completion) {
|
|
3996
|
-
return this.
|
|
3996
|
+
return this.k2t(p1 instanceof SequenceScope ? p1 : THROW_CCE(), $completion);
|
|
3997
3997
|
};
|
|
3998
3998
|
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).yc = function () {
|
|
3999
3999
|
var suspendResult = this.pc_1;
|
|
@@ -4003,57 +4003,57 @@
|
|
|
4003
4003
|
switch (tmp) {
|
|
4004
4004
|
case 0:
|
|
4005
4005
|
this.oc_1 = 6;
|
|
4006
|
-
this.
|
|
4006
|
+
this.s3h_1 = this.l3h_1.r();
|
|
4007
4007
|
this.nc_1 = 1;
|
|
4008
4008
|
continue $sm;
|
|
4009
4009
|
case 1:
|
|
4010
|
-
if (!this.
|
|
4010
|
+
if (!this.s3h_1.s()) {
|
|
4011
4011
|
this.nc_1 = 5;
|
|
4012
4012
|
continue $sm;
|
|
4013
4013
|
}
|
|
4014
4014
|
|
|
4015
|
-
this.
|
|
4016
|
-
if (this.
|
|
4017
|
-
throw ensureNotNull(this.
|
|
4018
|
-
this.
|
|
4015
|
+
this.t3h_1 = this.s3h_1.u();
|
|
4016
|
+
if (this.t3h_1.i1w())
|
|
4017
|
+
throw ensureNotNull(this.t3h_1.f1w());
|
|
4018
|
+
this.u3h_1 = this.t3h_1.y1u().x2(this.m3h_1);
|
|
4019
4019
|
var tmp_0;
|
|
4020
4020
|
var tmp_1;
|
|
4021
4021
|
var tmp_2;
|
|
4022
|
-
if (this.
|
|
4022
|
+
if (this.n3h_1 == null) {
|
|
4023
4023
|
tmp_2 = true;
|
|
4024
4024
|
} else {
|
|
4025
|
-
var tmp_3 = this.
|
|
4025
|
+
var tmp_3 = this.n3h_1;
|
|
4026
4026
|
tmp_2 = !(tmp_3 instanceof ProbExplanationTerm);
|
|
4027
4027
|
}
|
|
4028
4028
|
|
|
4029
4029
|
if (tmp_2) {
|
|
4030
4030
|
tmp_1 = true;
|
|
4031
4031
|
} else {
|
|
4032
|
-
tmp_1 = this.
|
|
4032
|
+
tmp_1 = this.u3h_1 == null;
|
|
4033
4033
|
}
|
|
4034
4034
|
|
|
4035
4035
|
if (tmp_1) {
|
|
4036
4036
|
tmp_0 = true;
|
|
4037
4037
|
} else {
|
|
4038
|
-
var tmp_4 = this.
|
|
4038
|
+
var tmp_4 = this.u3h_1;
|
|
4039
4039
|
tmp_0 = !(tmp_4 instanceof ProbExplanationTerm);
|
|
4040
4040
|
}
|
|
4041
4041
|
|
|
4042
4042
|
if (tmp_0) {
|
|
4043
4043
|
this.nc_1 = 3;
|
|
4044
|
-
suspendResult = this.
|
|
4044
|
+
suspendResult = this.r3h_1.ef(Companion_getInstance_5().failed(), this);
|
|
4045
4045
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4046
4046
|
return suspendResult;
|
|
4047
4047
|
}
|
|
4048
4048
|
continue $sm;
|
|
4049
4049
|
} else {
|
|
4050
|
-
this.
|
|
4050
|
+
this.v3h_1 = new ProbExplanationTerm(this.u3h_1.x3b_1.and(this.n3h_1.x3b_1));
|
|
4051
4051
|
this.nc_1 = 2;
|
|
4052
4052
|
var tmp_5 = Companion_getInstance_5();
|
|
4053
|
-
var tmp_6 = Companion_getInstance_9().
|
|
4054
|
-
var tmp_7 = Companion_getInstance_9().
|
|
4055
|
-
var tmp_8 = this.
|
|
4056
|
-
suspendResult = this.
|
|
4053
|
+
var tmp_6 = Companion_getInstance_9().w2g(this.o3h_1, this.p3h_1, this.v3h_1);
|
|
4054
|
+
var tmp_7 = Companion_getInstance_9().w2g(this.o3h_1, this.q3h_1, this.n3h_1);
|
|
4055
|
+
var tmp_8 = this.t3h_1.y1u();
|
|
4056
|
+
suspendResult = this.r3h_1.ef(tmp_5.ofSubstitution(tmp_6, [tmp_7, tmp_8.filter(ProbSolveWithEvidence$computeAllSubstitutions$slambda$lambda(this.m3h_1))]), this);
|
|
4057
4057
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
4058
4058
|
return suspendResult;
|
|
4059
4059
|
}
|
|
@@ -4085,15 +4085,15 @@
|
|
|
4085
4085
|
}
|
|
4086
4086
|
while (true);
|
|
4087
4087
|
};
|
|
4088
|
-
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).
|
|
4089
|
-
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda(this.
|
|
4090
|
-
i.
|
|
4088
|
+
protoOf(ProbSolveWithEvidence$computeAllSubstitutions$slambda).l2t = function ($this$sequence, completion) {
|
|
4089
|
+
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda(this.l3h_1, this.m3h_1, this.n3h_1, this.o3h_1, this.p3h_1, this.q3h_1, completion);
|
|
4090
|
+
i.r3h_1 = $this$sequence;
|
|
4091
4091
|
return i;
|
|
4092
4092
|
};
|
|
4093
4093
|
function ProbSolveWithEvidence$computeAllSubstitutions$slambda_0($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation) {
|
|
4094
4094
|
var i = new ProbSolveWithEvidence$computeAllSubstitutions$slambda($solutions, $goalExplanationVar, $evidenceExplanationTerm, $this_computeAllSubstitutions, $first, $second, resultContinuation);
|
|
4095
4095
|
var l = function ($this$sequence, $completion) {
|
|
4096
|
-
return i.
|
|
4096
|
+
return i.k2t($this$sequence, $completion);
|
|
4097
4097
|
};
|
|
4098
4098
|
l.$arity = 1;
|
|
4099
4099
|
return l;
|
|
@@ -4103,20 +4103,20 @@
|
|
|
4103
4103
|
ProblogLib_getInstance();
|
|
4104
4104
|
WithoutSideEffects.call(this, 'prob' + '_solve_with_evidence');
|
|
4105
4105
|
}
|
|
4106
|
-
protoOf(ProbSolveWithEvidence).
|
|
4107
|
-
Companion_getInstance_9().
|
|
4108
|
-
Companion_getInstance_9().
|
|
4106
|
+
protoOf(ProbSolveWithEvidence).h2p = function (_this__u8e3s4, first, second, third) {
|
|
4107
|
+
Companion_getInstance_9().c2h(_this__u8e3s4, 2);
|
|
4108
|
+
Companion_getInstance_9().i2h(_this__u8e3s4, 2);
|
|
4109
4109
|
var evidenceExplanationVar = Companion_getInstance_0().of('EvidenceExplanation');
|
|
4110
4110
|
var tmp;
|
|
4111
|
-
if (ProbSetConfig_getInstance().
|
|
4112
|
-
tmp = toTerm(Companion_getInstance_11().
|
|
4111
|
+
if (ProbSetConfig_getInstance().i3e(_this__u8e3s4.context)) {
|
|
4112
|
+
tmp = toTerm(Companion_getInstance_11().b3d_1);
|
|
4113
4113
|
} else {
|
|
4114
4114
|
var tmp_0 = Companion_getInstance_1();
|
|
4115
4115
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
4116
4116
|
var tmp$ret$0 = ProbSolveEvidence_getInstance().signature.name;
|
|
4117
4117
|
var subQuery = tmp_0.of(tmp$ret$0, [evidenceExplanationVar]);
|
|
4118
|
-
var solution = _this__u8e3s4.subSolver().solveOnceWithOptions(subQuery, ProbSetConfig_getInstance().
|
|
4119
|
-
tmp = solution.
|
|
4118
|
+
var solution = _this__u8e3s4.subSolver().solveOnceWithOptions(subQuery, ProbSetConfig_getInstance().j3g(_this__u8e3s4.context));
|
|
4119
|
+
tmp = solution.y1u().x2(evidenceExplanationVar);
|
|
4120
4120
|
}
|
|
4121
4121
|
var evidenceExplanationTerm = tmp;
|
|
4122
4122
|
var goalExplanationVar = Companion_getInstance_0().of('GoalExplanation');
|
|
@@ -4124,11 +4124,11 @@
|
|
|
4124
4124
|
var tmp_2 = Companion_getInstance_1();
|
|
4125
4125
|
// Inline function 'it.unibo.tuprolog.solve.AbstractWrapper.functor' call
|
|
4126
4126
|
var tmp$ret$1 = ProbSolve_getInstance().signature.name;
|
|
4127
|
-
var solutions = tmp_1.solveWithOptions(tmp_2.of(tmp$ret$1, [goalExplanationVar, third]), ProbSetConfig_getInstance().
|
|
4127
|
+
var solutions = tmp_1.solveWithOptions(tmp_2.of(tmp$ret$1, [goalExplanationVar, third]), ProbSetConfig_getInstance().j3g(_this__u8e3s4.context));
|
|
4128
4128
|
return sequence(ProbSolveWithEvidence$computeAllSubstitutions$slambda_0(solutions, goalExplanationVar, evidenceExplanationTerm, _this__u8e3s4, first, second, null));
|
|
4129
4129
|
};
|
|
4130
|
-
protoOf(ProbSolveWithEvidence).
|
|
4131
|
-
return this.
|
|
4130
|
+
protoOf(ProbSolveWithEvidence).d2j = function (_this__u8e3s4, first, second, third) {
|
|
4131
|
+
return this.h2p(_this__u8e3s4, first, second, third);
|
|
4132
4132
|
};
|
|
4133
4133
|
var ProbSolveWithEvidence_instance;
|
|
4134
4134
|
function ProbSolveWithEvidence_getInstance() {
|
|
@@ -4141,10 +4141,10 @@
|
|
|
4141
4141
|
ProblogLib_getInstance();
|
|
4142
4142
|
RuleWrapper_init_$Init$('prob', 2, VOID, this);
|
|
4143
4143
|
}
|
|
4144
|
-
protoOf(Prob).
|
|
4145
|
-
return
|
|
4144
|
+
protoOf(Prob).w2j = function (_this__u8e3s4) {
|
|
4145
|
+
return listOf_0([_this__u8e3s4.varOf('EXPL'), _this__u8e3s4.varOf('GOAL')]);
|
|
4146
4146
|
};
|
|
4147
|
-
protoOf(Prob).
|
|
4147
|
+
protoOf(Prob).x2j = function (_this__u8e3s4) {
|
|
4148
4148
|
var expl = _this__u8e3s4.varOf('EXPL');
|
|
4149
4149
|
var goal = _this__u8e3s4.varOf('GOAL');
|
|
4150
4150
|
var newGoal = _this__u8e3s4.varOf('NEW_GOAL');
|
|
@@ -4173,22 +4173,22 @@
|
|
|
4173
4173
|
protoOf(ProblogSolverFactory).mutableSolverOf = mutableSolverOf;
|
|
4174
4174
|
protoOf(ProblogSolverFactory).rawMutableSolverOf = rawMutableSolverOf;
|
|
4175
4175
|
protoOf(ProblogSolverFactory).newBuilder = newBuilder;
|
|
4176
|
-
protoOf(ProblogSolverFactory).
|
|
4177
|
-
protoOf(ProblogSolverFactory).
|
|
4178
|
-
protoOf(ProblogSolverFactory).
|
|
4179
|
-
protoOf(ProblogSolverFactory).
|
|
4180
|
-
protoOf(ProblogSolverFactory).
|
|
4181
|
-
protoOf(ProblogSolverFactory).
|
|
4182
|
-
protoOf(ProblogSolverFactory).
|
|
4183
|
-
protoOf(ProblogSolverFactory).
|
|
4184
|
-
protoOf(ProblogSolverFactory).
|
|
4176
|
+
protoOf(ProblogSolverFactory).c1y = get_defaultRuntime;
|
|
4177
|
+
protoOf(ProblogSolverFactory).e1y = get_defaultUnificator;
|
|
4178
|
+
protoOf(ProblogSolverFactory).i1y = get_defaultStaticKb;
|
|
4179
|
+
protoOf(ProblogSolverFactory).j1y = get_defaultDynamicKb;
|
|
4180
|
+
protoOf(ProblogSolverFactory).k1y = get_defaultInputChannel;
|
|
4181
|
+
protoOf(ProblogSolverFactory).l1y = get_defaultOutputChannel;
|
|
4182
|
+
protoOf(ProblogSolverFactory).m1y = get_defaultErrorChannel;
|
|
4183
|
+
protoOf(ProblogSolverFactory).n1y = get_defaultWarningsChannel;
|
|
4184
|
+
protoOf(ProblogSolverFactory).v1y = solverWithDefaultBuiltins;
|
|
4185
4185
|
protoOf(ProblogSolverFactory).solverWithDefaultBuiltinsAnd = solverWithDefaultBuiltinsAnd;
|
|
4186
|
-
protoOf(ProblogSolverFactory).
|
|
4186
|
+
protoOf(ProblogSolverFactory).x1y = mutableSolverWithDefaultBuiltins;
|
|
4187
4187
|
protoOf(ProblogSolverFactory).mutableSolverWithDefaultBuiltinsAnd = mutableSolverWithDefaultBuiltinsAnd;
|
|
4188
4188
|
defineProp(protoOf(ClauseMappingException), 'message', function () {
|
|
4189
4189
|
return this.na();
|
|
4190
4190
|
});
|
|
4191
|
-
protoOf(BinaryDecisionDiagramExplanation).
|
|
4191
|
+
protoOf(BinaryDecisionDiagramExplanation).o3d = get_probabilityOrNull;
|
|
4192
4192
|
//endregion
|
|
4193
4193
|
//region block: init
|
|
4194
4194
|
ANNOTATION_FUNCTOR = '::';
|