PLP - Final Project

A Monte Carlo System for Probabilistic Logic Programming

Sampling of probablistic logic programs for SWI-Prolog, similar to Fabrizio Riguzzi's MCINTYRE (2013): http://mcs.unife.it/~friguzzi/Papers/Rig13-FI-IJ.pdf

For information regarding approximate inference via Gibbs sampling / Markov Chain Monte Carlo (MCMC) sampling, see An Analysis of Gibbs Sampling for Probabilistic Logic Programs or A Comparison of MCMC Sampling for Probabilistic Logic Programming (p. 19-29).

Running the sampler

  1. Start a SWI-Prolog session at the command line via swipl
  2. Load the montecarlo module, e. g. via [montecarlo].
  3. Invoke montecarlo('input.pl', Query, P)., where the first parameter denotes the path to a PLP object program and the second denotes the query to be sampled. After successful sampling, P will contain the sampled probability of Query being true under the given input.

Sub directories

[dir] examples

Prolog files

montecarlo.pl
montecarlo/3Alias of montecarlo/3 with empty options.
montecarlo/4Start a Monte Carlo sampling process.
sampler.pl
load_program/1Load the PLP under the given File source and transform it's content for future sampling.
sample_goal/1Assuming a suitable object program has already been transformed via load_program, take a sample of the given Query.
sample_goal_gibbs/2Assuming a suitable object program has already been transformed via load_program, take a sample of the given Query via Gibbs-Sampling as detailed in https://ceur-ws.org/Vol-2678/paper12.pdf.
unload_program/0Cleanup environment state (usually after running a sampling process to completion).
test.pl
mc_test/3Alias of mc_test/4 with empty options.
mc_test/4Run a single test.
mc_tests/0Run manual tests.
mc_tests/1Run manual tests, specifying the directory test files are contained in.