- Load xform.pl (in XSB this is
?- [xform].
) - Run:
?- transform_file('inputfile', 'outputfile')
- The
type/2
facts should precedeoutcome/2
facts which inturn precedset_sw/2
facts in theinputfile
.
- Load syminfer.pl, and transformed file 'outputfile' (in XSB this is
?- [syminfer, 'outputfile'].
) - Run:
?- compute_osdd(q(v1,....,vn), O).
- It is assumed that
q(v2,...,vn)
is a ground query andv1,...,vn
are constants from thevalues/2
declarations. O
will unify with the computed OSDD
- Compute OSDD
O
as described above. - If
O
doesn't satisfy conditions for measurability use?- probability(O, P).
- If
O
satisfies conditions for measurability use?- probability_m(O, P).
- Generate OSDD
O
and use:?- writeDot(O, 'dotfile.dot').
- Install and use
dot
tool to generate PNG/PDF or other format file - Use:
$ dot -Tpdf dotfile.dot -o dotfile.pdf
to transform to PDF
- Implementation of OSDD exact inference algorithms described in Constraint-Based Inference in Probabilistic Logic Programs