Did you know ... Search Documentation:
Pack cplint -- prolog/pita.pl
PublicShow source

This module performs reasoning over Logic Programs with Annotated Disjunctions and CP-Logic programs. It reads probabilistic program and computes the probability of queries.

See http://friguzzi.github.io/cplint/_build/html/index.html for details.

author
- Fabrizio Riguzzi
license
- Artistic License 2.0 https://opensource.org/licenses/Artistic-2.0
 load(++File:atom) is det
Loads File.lpad if it exists, otherwise loads File.cpl if it exists.
 load_file(++FileWithExtension:atom) is det
Loads FileWithExtension.
 prob_meta(:Query:atom, -Probability:float) is nondet
To be used in place of prob/2 for meta calls (doesn't abolish tables)
 abd_prob(:Query:atom, -Probability:float, -Delta:list) is nondet
The predicate computes the most probable abductive explanation of the ground query Query. It returns the explanation in Delta together with its Probability
 bdd_dot_file(:Query:atom, +FileName:string, -LV:list) is det
The predicate builds the BDD for Query and writes its dot representation to file FileName and a list in LV with the association of variables to rules. LV is a list of list, each sublist has three elements: the multivalued variable number, the rule number and the grounding substitution.
 bdd_dot_string(:Query:atom, -DotString:string, -LV:list) is det
The predicate builds the BDD for Query and returns its dot representation in DotString and a list in LV with the association of variables to rules. LV is a list of list, each sublist has three elements: the multivalued variable number, the rule number and the grounding substitution.
 abd_bdd_dot_string(:Query:atom, -DotString:string, -LV:list, -LAV:list) is det
The predicate builds the BDD for the abductive explanations for Query and returns its dot representation in DotString and lists LV and LAV, the association of variables to rules and to abductive variables to rules respectively. LV and LAV are lists of list, each sublist has three elements: the multivalued variable number, the rule number and the grounding substitution.
 abd_bdd_dot_string(:Query:atom, -DotString:string, -LV:list, -LAV:list, -Probability:float, -Delta:list) is det
The predicate builds the BDD for the abductive explanations for Query It returns the explanation in Delta together with its Probability. The predicate builds the BDD for Query and returns its dot representation in DotString and lists LV and LAV, the association of variables to rules and to abductive variables to rules respectively. LV and LAV are lists of list, each sublist has three elements: the multivalued variable number, the rule number and the grounding substitution.
 map(:Query:atom, -Probability:float, -Delta:list) is nondet
The predicate computes the explanation of the ground query Query with Maximum A Posteriori (MAP) probability. It returns the explanation in Delta together with its Probability
 map_bdd_dot_string(:Query:atom, -DotString:string, -LV:list, -LAV:list, -Probability:float, -Delta:list) is nondet
The predicate computes the explanation of the ground query Query with Maximum A Posteriori (MAP) probability. It returns the explanation in Delta together with its Probability The predicate builds the BDD for Query and returns its dot representation in DotString and lists LV and LAV, the association of variables to rules and of query variables to rules respectively. LV and LAV are lists of list, each sublist has three elements: the multivalued variable number, the rule number and the grounding substitution.
 prob(:Query:atom, -Probability:float) is nondet
The predicate computes the probability of Query If Query is not ground, it returns in backtracking all ground instantiations of Query together with their probabilities
 prob(:Query:atom, :Evidence:atom, -Probability:float) is nondet
Equivalent to prob/4 with an empty option list.
 prob_meta(:Query:atom, :Evidence:atom, -Probability:float) is nondet
To be used in place of prob/3 for meta calls (doesn't abolish tables)
 get_var_n(++M:atomic, ++Environment:int, ++Rule:int, ++Substitution:term, ++Probabilities:list, -Variable:int) is det
Returns the index Variable of the random variable associated to rule with index Rule, grounding substitution Substitution and head distribution Probabilities in environment Environment.
 get_dec_var_n(++M:atomic, ++Environment:int, ++Rule:int, ++Substitution:term, -Variable:int) is det
Returns the index Variable of the random variable associated to rule with index Rule in environment Environment.
 get_abd_var_n(++M:atomic, ++Environment:int, ++Rule:int, ++Substitution:term, ++Probabilities:list, -Variable:int) is det
Returns the index Variable of the random variable associated to rule with index Rule, grounding substitution Substitution and head distribution Probabilities in environment Environment.
 msw(:Var:term, ?Value:term, ++Environment:int, --BDD:int) is det
Returns a BDD representing Var=Value. This is a predicate for programs in the PRISM syntax
 msw(:Var:term, ?Value:term, ++Environment:int, --BDD:int, ?DB:int) is det
Returns a BDD representing Var=Value when there is a depth bound on derivations. This is a predicate for programs in the PRISM syntax
 set_pita(:Parameter:atom, +Value:term) is det
The predicate sets the value of a parameter For a list of parameters see https://github.com/friguzzi/cplint/blob/master/doc/manual.pdf or http://ds.ing.unife.it/~friguzzi/software/cplint-swi/manual.html
 setting_pita(:Parameter:atom, ?Value:term) is det
The predicate returns the value of a parameter For a list of parameters see https://github.com/friguzzi/cplint/blob/master/doc/manual.pdf or http://ds.ing.unife.it/~friguzzi/software/cplint-swi/manual.html

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

 key(+Dict, ?Key) is nondet
True when Key is a key in Dict. Backtracking enumerates all known keys.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 dt_solve(Arg1, Arg2)
 bar(Arg1, Arg2)
 bar(Arg1, Arg2, Arg3)
 bar1(Arg1, Arg2)
 argbar(Arg1, Arg2)
 histogram(Arg1, Arg2)
 histogram(Arg1, Arg2, Arg3)
 densities(Arg1, Arg2, Arg3)
 densities(Arg1, Arg2, Arg3, Arg4)
 density(Arg1, Arg2)
 density(Arg1, Arg2, Arg3)
 density2d(Arg1, Arg2)
 density2d(Arg1, Arg2, Arg3)
 to_pair(Arg1, Arg2)
 value(Arg1, Arg2)
 bin(Arg1, Arg2, Arg3, Arg4, Arg5)
 beta(Arg1, Arg2)
 to_atom(Arg1, Arg2)
 average(Arg1, Arg2)
 variance(Arg1, Arg2)
 variance(Arg1, Arg2, Arg3)
 std_dev(Arg1, Arg2)
 std_dev(Arg1, Arg2, Arg3)
 agg_val(Arg1, Arg2, Arg3)
 swi_builtin(Arg1)