Pfds meta-interpreter syntax
variable definitions
Basic formulation is:
Method is of the form, function(Domain,ListOfArgs).
ListOfArgs provides a means for parametrising probability
ascribing functions.
In addition to ``~'' ~~, ~-, and ~~- are also supported.
``~~'' declares the variable to also be a finite domain variable.
~- and ~~- allow to the variable to lose probabilistic mass.
conditionals
The more general form of which is:
D1 :: P1 ++ |
D2 :: P2 ++ |
... ++ |
Dn :: Pn |
\\ Q |
Each Di is a goal sharing a single probabilistic variable.
Q is a goal which doesnt contain the same variable.
Special cases of the conditional include
Short form | | Corresponds |
D1 \\ Q | | D1 :: 1 \\ Q |
D1 \\ p1 :: Q | | D1 :: p1 ++ (\+ D1 ) :: (1 - p1) |
V1 \# P1 :: V2 | | V1 \= W :: P1 ++ V1 == W :: (1 - P1) \\ V2 = W |
V1 \# V2 | | V1 \# 1 :: V2 |
| | |
| | |
| | |
static_distribution/2
Use static_distribution( Var, Distro ) to find the
distribution of variable Var.
labelling
label( Var, Order, Prb, Curr ) | |
A variable is labelled to all its remaining possible values.
(This is a backtrackable predicate.) The probabilistic
order is dictated by Order. Prb is the probability
corresponding to the current value to which Var is
instantiated. Curr holds the sum of all Prbs seen so far.
label( Vars, Order, Prbs, Curr ) | |
This version allows for the simultanius labelling of
a number of vars. The way a number of variables may be instantiated
according to Order is different than the same order applied
to each individual variable.
Labelling is used extensively in the caesar/ example.
Last update 2003-02-18
Nicos Angelopoulos (nicos@doc.ic.ac.uk).