- Load xform.pl (in XSB this is
?- [xform].) - Run:
?- transform_file('inputfile', 'outputfile') - The
type/2facts should precedeoutcome/2facts which inturn precedset_sw/2facts 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,...,vnare constants from thevalues/2declarations. Owill unify with the computed OSDD
- Compute OSDD
Oas described above. - If
Odoesn't satisfy conditions for measurability use?- probability(O, P). - If
Osatisfies conditions for measurability use?- probability_m(O, P).
- Generate OSDD
Oand use:?- writeDot(O, 'dotfile.dot'). - Install and use
dottool to generate PNG/PDF or other format file - Use:
$ dot -Tpdf dotfile.dot -o dotfile.pdfto transform to PDF
- Implementation of OSDD exact inference algorithms described in Constraint-Based Inference in Probabilistic Logic Programs