-- An implementation of the FAM algorithm.

Pepl is an implemention of the failure adjusted (FAM) algorithm which does parameter estimation (PE) of the probability labels of stochastic logic programs (SLPs).

See documentation fam/1 for details on how to run parameter estimation on SLPs.

Example stochastic programs are in directory slp and example run scripts are in examples.


This software is distributed under the MIT licence.

Installation and testing ...

Pepl runs on current versions of SWI (7) and Yap (6.3).

... on SWI


... on Yap

Download latest sources from <br> or

gunzip pepl-*tgz
tar xf pepl-*tar
cd pepl-*
cd examples

Package information

- Nicos Angelopoulos
- 2.1, 2017/2/25
- 2.0.6, 2014/01/28
See also
- the user guide at pack('pepl/doc/pepl-user_guide.pdf').
- James Cussens. Parameter estimation in stochastic logic programs. Machine Learning, 44(3):245-271, 2001.
- Nicos Angelopoulos, Notes on the implementation of FAM, 3rd Probabilistic Logic Programming workshop (a ILP 2016 workshop), 03/09/2016,
- pepl website
- This software is distributed under the MIT licence
Run the failure adjusted maximisation (FAM) parameter estimation algorithm.

For SLP source file jc_ml_S1.slp

0.5:: s(X,p) :- p(X), p(X).
0.5:: s(X,q) :- q(X).
0.5:: p(a).
0.5:: p(b).
0.5:: q(a).
0.5:: q(b).

and data file


the call

   fam( [goal(s(_A,_B)),slp(jc_ml_S1),datafile(''),final_pps(PPs)] ).

succeeds with

   PPs = [0.6602,0.3398,0.5858,0.4142,0.5,0.5]


pepl_citation(-Atom, -Bibterm)
This predicate succeeds once for each publication related to this library. Atom is the atom representation suitable for printing while Bibterm is a bibtex(Type,Key,Pairs) term of the same publication. Produces all related publications on backtracking.
pepl_version(-Version, Date)
Pepl's current Version (Maj:Min:Fix) and publication date (date(Year,Month,Day)).

pepl_version( 2:0:6, date(2014,1,28) ).

Save the stochastic program currently in memory to a file.
Listiing of the stochastic program currently in memory.
sload_pe(Files, Options)
Load an SLP to memory. If the source file has an slp extension the extension may be omitted. Pepl looks in the following directories and order for the source file(s). ., and ./slp/ while on SWI it also looks in, pack(’pepl/slp/’).
Sample Goal.
?- sload_pe( [pack(pepl/slp/coin] ).
scall(Goal, Eps, Meth, Path, Succ, Prb)
This predicate is for people interested in the iternals of pepl. Use at your own peril.

The predicate arguments are as follows.

See predicate main_gen/1, in examples/ for example usage.

Switch debugging of fam/1 to either on or off.
Call Goal iff in (pepl) debugging.