ProblogSolverFactory
The SolverFactory for :solve-problog, a ProbLog-style probabilistic logic programming engine built on top of ClassicSolverFactory's SLD-NF resolution.
ProbLog extends plain Prolog with annotated disjunctions -- clauses and facts whose head is prefixed by a probability, using the :: operator declared in ANNOTATION_OPERATOR (e.g. 0.3::burglary., read as "burglary holds with probability 0.3"), and with evidence/1/evidence/2 clauses stating facts known for certain. Every Solver produced by this factory rewrites such a theory into a plain, Prolog-compliant one (see the internal it.unibo.tuprolog.solve.problog.lib.knowledge.impl clause mappers) in which each probabilistic clause carries along a Boolean "explanation" term; when a query is solved with it.unibo.tuprolog.solve.isProbabilistic turned on (see it.unibo.tuprolog.solve.SolveOptions), those per-solution explanations are compiled into a :bdd BinaryDecisionDiagram and weighted-model-counted to compute the solution's overall probability -- exposed on each it.unibo.tuprolog.solve.Solution via it.unibo.tuprolog.solve.probability and, when requested, the diagram itself via it.unibo.tuprolog.solve.binaryDecisionDiagram. With probabilistic mode turned off, resolution behaves like plain Prolog and annotations are ignored (every solution is treated as certain, i.e. probability 1.0).
Solvers built by this factory always load ProblogLib (adding it to libraries if not already present) and force the TrackVariables flag ON, because variable tracking is required to compute explanations correctly.
See also
Properties
The standard library of this factory: ProblogLib's builtins, contributing the :: operator, the probabilistic resolution primitives and rules, and (transitively) the classic Prolog builtins.
Same as SolverFactory.defaultFlags, but with TrackVariables forced ON, since ProbLog resolution relies on variable substitutions being tracked to build correct explanations.
Functions
Same as SolverFactory.mutableSolverOf, but ensures ProblogLib is loaded (see fixLibraries), forces TrackVariables ON, and rewrites staticKb/dynamicKb into a it.unibo.tuprolog.solve.problog.lib.knowledge.ProblogTheory before handing everything to ClassicSolverFactory.
Same as mutableSolverOf (the InputStore/OutputStore overload), but takes individual channels.
Same as SolverFactory.solverOf, but ensures ProblogLib is loaded (see fixLibraries), forces TrackVariables ON, and rewrites staticKb/dynamicKb into a it.unibo.tuprolog.solve.problog.lib.knowledge.ProblogTheory before handing everything to ClassicSolverFactory.
Same as solverOf (the InputStore/OutputStore overload), but takes individual channels.