description of the new programs

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2016 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
rzf 2007-11-15 12:35:29 +00:00
parent 011632500d
commit 83b4c2cdac
3 changed files with 609 additions and 422 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,21 +1,20 @@
% preamble for double compilation HTML/PDF
%%\ifx\pdfoutput\undefined % htlatex compilation
%\documentclass{article}
%\usepackage{graphicx}
%\DeclareGraphicsExtensions{.png, .gif, .jpg}
%\newcommand{\href}[2]{\Link[#1]{}{} #2 \EndLink}
%\newcommand{\hypertarget}[2]{\Link[]{}{#1} #2 \EndLink}
%\newcommand{\hyperlink}[2]{\Link[]{#1}{} #2 \EndLink}
%%\else % pdflatex compilation
\documentclass[a4paper,12pt]{article}
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\RequirePackage[hyperindex]{hyperref}
%\fi
%% uncomment the following for htlatex compilation
\documentclass{article}
\usepackage{graphicx}
\DeclareGraphicsExtensions{.png, .gif, .jpg}
\newcommand{\href}[2]{\Link[#1]{}{} #2 \EndLink}
\newcommand{\hypertarget}[2]{\Link[]{}{#1} #2 \EndLink}
\newcommand{\hyperlink}[2]{\Link[]{#1}{} #2 \EndLink}
%% uncomment the following for pdflatex compilation
%\documentclass[a4paper,12pt]{article}
%\usepackage[pdftex]{graphicx}
%\DeclareGraphicsExtensions{.pdf,.png,.jpg}
%\RequirePackage[hyperindex]{hyperref}
\begin{document}
\title{\texttt{cplint} Version 1.0 Manual}
\title{\texttt{cplint} Version beta2.0 Manual}
\author{Fabrizio Riguzzi\\
@ -27,22 +26,40 @@ fabrizio.riguzzi@unife.it}
\section{Introduction}
\texttt{cplint} is an interpreter for LPADs \cite{VenVer03-TR,VenVer04-ICLP04-IC} and CP-logic programs \cite{VenDenBru-JELIA06,CP-logic-unp}. It is described in \cite{Rig-AIIA07-IC} and \cite{Rig-RCRA07-IC}. It is an adaptation of the interpreter for ProbLog \cite{DBLP:conf/ijcai/RaedtKT07}.
\texttt{cplint} is a suite of programs for reasoning with LPADs \cite{VenVer03-TR,VenVer04-ICLP04-IC} and CP-logic programs \cite{VenDenBru-JELIA06,CP-logic-unp}.
It was proved correct \cite{Rig-RCRA07-IC} for range restricted acyclic programs \cite{DBLP:journals/ngc/AptB91} without function symbols.
It consists of three Prolog modules for answering queries using goal-oriented procedures plus
three
Prolog modules for answering queries using the definition of the semantics of LPADs and CP-logic.
The modules for answering queries using using goal-oriented procedures are \texttt{lpadsld.pl}, \texttt{lpad.pl} and
\texttt{cpl.pl}:
\begin{itemize}
\item \texttt{lpadsld.pl}: computes the probability of a query using the top-down procedure described in
in \cite{Rig-AIIA07-IC} and \cite{Rig-RCRA07-IC}. It is based on SLDNF resolution and is an adaptation of the interpreter for ProbLog \cite{DBLP:conf/ijcai/RaedtKT07}.
It was proved correct \cite{Rig-RCRA07-IC} with respect to the semantics of LPADs for range restricted acyclic programs \cite{DBLP:journals/ngc/AptB91} without function symbols.
It is also able to deal with extensions of LPADs and CP-logic: the clause bodies can contain \texttt{setof} and \texttt{bagof}, the probabilities in the head may be depend on variables in the body and it is possible to specify a uniform distribution in the head with reference to a \texttt{setof} or \texttt{bagof} operator. These extended features have been introduced in order to represent CLP(BN) \cite{SanPagQaz03-UAI-IC} programs and PRM models \cite{Getoor+al:JMLR02}:
\texttt{setof} and \texttt{bagof} allow to express dependency of an attribute from an aggregate function of another attribute, as in CLP(BN) and PRM, while the possibility of specifying a uniform distribution allows the use of the reference uncertainty feature of PRM.
\item \texttt{lpad.pl}: computes the probability of a query using a top-down procedure based on SLG resolution \cite{DBLP:journals/jacm/ChenW96}. As a consequence, it works for any sound LPADs, i.e., any LPAD such that each of its instances has a two valued well founded model.
\item \texttt{cpl.pl}: computes the probability of a query using a top-down procedure based on SLG resolution and moreover checks that the CP-logic program is valid, i.e., that it has at least an execution model.
\end{itemize}
These extensions are work in progress: they have been implemented but there is no paper yet that describes the semantics of the extended language.
The modules for answering queries using the definition of the semantics of LPADs and CP-logic are \texttt{semlpadsld.pl}, \texttt{semlpad.pl} and
\texttt{semcpl.pl}:
\begin{itemize}
\item semlpadsld.pl: given an LPAD $P$, it generates all the instances of $P$. The probability of a query $Q$ is computed by identifying all the instances where $Q$ is derivable by SLDNF resolution.
\item semlpad.pl: given an LPAD $P$, it generates all the instances of $P$. The probability of a query $Q$ is computed by identifying all the instances where $Q$ is derivable by SLG resolution.
\item semlcpl.pl: given an LPAD $P$, it builds an execution model of $P$, i.e., a probabilistic process that satisfy the principles of universal causation, sufficient causation, independent causation, no deus ex machina events and temporal precedence. It uses the definition of the semantics given in \cite{CP-logic-unp}.
\end{itemize}
%For program with function symbols, the semantics of LPADs and CP-logic are not defined. However, the interpreter accepts programs with function symbols and, if it does not go into a loop, it returns an answer. What is the meaning of this answer is subject of current study.
\section{Installation}
\texttt{cplint} is distributed in source code in the CVS version of Yap. Download it by following the instruction in \href{http://www.ncc.up.pt/\%7Evsc/Yap/downloads.html}{http://www.ncc.up.pt/\%7Evsc/Yap/downloads.html}.
\texttt{cplint} is distributed in source code in the CVS version of Yap. It includes Prolog and C files. Download it by following the instruction in \href{http://www.ncc.up.pt/~vsc/Yap/downloads.html}{http://www.ncc.up.pt/$\sim$vsc/Yap/downloads.html}.
\texttt{cplint} requires glu (a subpackage of vis) and glib.
You can download glu from \href{http://vlsi.colorado.edu/\%7Evis/getting_VIS_2.1.html}{http://vlsi.colorado.edu/\%7Evis/getting\_VIS\_2.1.html}
You can download glu from \href{http://vlsi.colorado.edu/~vis/getting_VIS_2.1.html}{http://vlsi.colorado.edu/$\sim$vis/getting\_VIS\_2.1.html}
You can download glib from \href{http://www.gtk.org/}{http://www.gtk.org/}. This is a standard GNU package
so it is easy to install it using the package management software of your Linux or Cygwin
distribution.
@ -73,7 +90,7 @@ configure --enable-cplint --enable-cygwin
\end{verbatim}
If you installed glu in \texttt{DIR}, use \texttt{--enable-cplint=DIR}
After having performed \texttt{make install} you can do \texttt{make installcheck} that will execute a test of \texttt{cplint}. If no error is reported you have a working installation of \texttt{cplint}.
After having performed \texttt{make install} you can do \texttt{make installcheck} that will execute a suite of tests of the various programs. If no error is reported you have a working installation of \texttt{cplint}.
\section{Syntax}
@ -85,8 +102,7 @@ is represented by
\begin{verbatim}
h1:p1 ; ... ; hn:pn :- b1,...,bm,\+ c1,....,\+ cl
\end{verbatim}
No parentheses are necessary. The \texttt{pi} are numeric expressions that can involve
variables appearing in the body. It is up to the user to ensure that the numeric expressions are legal, i.e. that they sum up to less than one for every instantiation of the clause for which the body is true in an instance.
No parentheses are necessary. The \texttt{pi} are numeric expressions. It is up to the user to ensure that the numeric expressions are legal, i.e. that they sum up to less than one.
If the clause has an empty body, it can be represented like this
\begin{verbatim}
@ -94,11 +110,11 @@ h1:p1 ; ... ;hn:pn.
\end{verbatim}
If the clause has a single head with probability 1, the annotation can be omitted and the clause takes the form of a normal prolog clause, i.e.
\begin{verbatim}
h1:- b1,...,bm,\+ c1,...,cl.
h1:- b1,...,bm,\+ c1,...,\+ cl.
\end{verbatim}
stands for
\begin{verbatim}
h1:1 :- b1,...,bm,\+ c1,...,cl.
h1:1 :- b1,...,bm,\+ c1,...,\+ cl.
\end{verbatim}
The coin example of \cite{VenVer04-ICLP04-IC} is represented as (see file \texttt{coin.cpl})
@ -113,16 +129,17 @@ fair(Coin):0.9 ; biased(Coin):0.1.
toss(coin).
\end{verbatim}
The first clause states that if we toss a coin that is not biased it has equal probability of landing heads and tails. The second states that if the coin is biased it is slightly more probable that it lands heads. The third states that the coin is fair with probability 0.9 and biased with probability 0.1 and the last clause states that we toss a coin with certainty.
The first clause states that if we toss a coin that is not biased it has equal probability of landing heads and tails. The second states that if the coin is biased it has a slightly higher probability of landing heads. The third states that the coin is fair with probability 0.9 and biased with probability 0.1 and the last clause states that we toss a coin with certainty.
\section{Commands}
The program must be stored in a text file with extension \texttt{.cpl}. Suppose you have stored the example above in file \texttt{coin.cpl}.
In order to answer queries from this program, you have to run \texttt{yap},
load \texttt{cplint} by issuing the command
All six modules accept the same commands for reading in files and answering queries.
The LPAD or CP-logic program must be stored in a text file with extension \texttt{.cpl}. Suppose you have stored the example above in file \texttt{coin.cpl}.
In order to answer queries from this program, you have to run Yap,
load one of the modules (such as for example \texttt{lpad.pl}) by issuing the command
\begin{verbatim}
use_module(library(cplint)).
use_module(library(lpad)).
\end{verbatim}
at the command prompt.
Then you must parse the source file \texttt{coin.cpl} with the command
@ -134,24 +151,80 @@ if \texttt{coin.cpl} is in the current directory, or
p('path_to_coin/coin').
\end{verbatim}
if \texttt{coin.cpl} is in a different directory.
At this point you can pose query to the program. You have to use the predicate \texttt{s/2} (for solve) that takes as its first argument a conjunction of goals in the form of a list and returns the computed probability as its second argument. For example, the probability of the conjunction \texttt{head(coin), biased(coin)} can be asked with the query
At this point you can pose query to the program by using the predicate \texttt{s/2} (for solve) that takes as its first argument a conjunction of goals in the form of a list and returns the computed probability as its second argument. For example, the probability of the conjunction \texttt{head(coin),biased(coin)} can be asked with the query
\begin{verbatim}
s([head(coin),biased(coin)],P).
\end{verbatim}
For computing the probability of a conjunction given another conjunction you have to use the predicate \texttt{sc/3} (for solve conditional) that take takes as input the query conjunction as its first argument, the evidence conjunction as its second argument and returns the probability in its third argument.
For computing the probability of a conjunction given another conjunction you can use the predicate \texttt{sc/3} (for solve conditional) that take takes as input the query conjunction as its first argument, the evidence conjunction as its second argument and returns the probability in its third argument.
For example, the probability of the query \texttt{heads(coin)} given the evidence \texttt{biased(coin)} can be asked with the query
\begin{verbatim}
sc([heads(coin)],[biased(coin)],P).
\end{verbatim}
The package contains also a program \texttt{semantics.pl} that computes the probability of queries by using directly the semantics of LPADs (i.e. by generating all the ground instances and then testing the query with each of them). This is provided for testing purposes only. After having compiled the program, you can use the same commands of \texttt{cplint.pl}. \texttt{semantics.pl} requires an extra file in the directory where \texttt{coin.cpl} is: a file with extension \texttt{.uni} (for universe) that contains, for each variable, the list of constants to which the variable can be instantiated. For example, in our case the current directory will contain a file \texttt{coin.uni} that is a Prolog file containing facts of the form
\begin{verbatim}
universe(VarList,ConstList).
\end{verbatim}
where \texttt{VarList} is a list of variables names (each must be included in single quotes) and \texttt{ConstList} is a list of constants. \texttt{semantics.pl} generates the grounding by instantiating in all possible ways the variables of \texttt{VarList} with the constants of \texttt{ConstList}. Note that the variables are identified by name, so a variable with the same name in two different clauses will be instantiated with the same constants.
After having parsed a program, in order to read in a new program you must restart Yap when using
\texttt{semlpadsld.pl} and \texttt{semlpad.pl}. With the other modules, you can directly parse a new program.
When using \texttt{lpad.pl}, the system can print the message ``Uunsound program'' in the case in which an instance with a three valued well founded model is found. Moreover, it can print the message ``It requires the choice of a head atom from a non ground head'': in this case, in order to answer the query, all the groundings of the culprit clause must be generated, which may be impossible for programs with function symbols.
When using \texttt{cpl.pl}, the system can print the above messages plus ``Invalid program'' in the case in which no execution process exists. The same message can be returned by \texttt{semcpl.pl}.
The modules make use of a number of parameters in order to control their behavior. They that can be set with the command
\begin{verbatim}
set(parameter,value).
\end{verbatim}
from the Yap prompt after having loaded the module.
The current value can be read with
\begin{verbatim}
setting(parameter,Value).
\end{verbatim}
from the Yap prompt.
The available parameters are:
\begin{itemize}
\item
\verb|epsilon_parsing| (valid for all six modules): if (1 - the sum of the probabilities of all the head atoms) is smaller than
\verb|epsilon_parsing|
then \texttt{cplint} adds the null events to the head. Default value 0.00001
\item \verb|save_dot| (valid for all goal-oriented modules): if \texttt{true} a graph representing the BDD is saved in the file \texttt{cpl.dot} in the current directory in dot format.
The variables names are of the form \verb|Xn_m| where \texttt{n} is the number of the multivalued
variable and \texttt{m} is the number of the binary variable. The correspondence between variables and
clauses can be evinced from the message printed on the screen, such as
\begin{verbatim}
Variables: [(2,[X=2,X1=1]),(2,[X=1,X1=0]),(1,[])]
\end{verbatim}
where the first element of each couple is the clause number of the input file (starting from 1).
In the example above variable \texttt{X0} corresponds to clause \texttt{2} with the substitutions \texttt{X=2,X1=1},
variable \texttt{X1} corresponds to clause \texttt{2} with the substitutions \texttt{X=1,X1=0} and
variable \texttt{X2} corresponds to clause \texttt{1} with the empty substitution.
You can view the graph with \texttt{graphviz} (\href{www.graphviz.org}{www.graphviz.org}) using the
command
\begin{verbatim}
dotty cpl.dot &
\end{verbatim}
\item \verb|ground_body| (valid for \texttt{lpadsld.pl} and all semantic modules): determines how non ground clauses are treated: if \texttt{true}, ground clauses are obtained from a non ground clause by replacing each variable with a constant, if \texttt{false}, ground clauses are obtained by replacing only variables in the head with a constant. In the case where the body contains variables not in the head, setting it to false means that the body represents an existential event.
\end{itemize}
\section{Semantic Modules}
The three semantic modules need to produce a grounding of the program in order to compute the semantics.
They require an extra file with extension \texttt{.uni} (for universe) in the same directory where the \texttt{.cpl} file is.
There are two ways to specify how to ground a program. The first consists in providing the list of constants to which each variable can be instantiated. For example, in our case the current directory will contain a file \texttt{coin.uni} that is a Prolog file containing facts of the form
\begin{verbatim}
universe(var_list,const_list).
\end{verbatim}
where \verb|var_list| is a list of variables names (each must be included in single quotes) and \verb|const_list| is a list of constants. The semantic modules generate the grounding by instantiating in all possible ways the variables of \verb|var_list| with the constants of \verb|const_list|. Note that the variables are identified by name, so a variable with the same name in two different clauses will be instantiated with the same constants.
The other way to specify how to ground a program consists in using mode and type information. For each predicate, the file \texttt{.uni} must contain a fact of the form
\begin{verbatim}
mode(predicate(t1,...,tn)).
\end{verbatim}
that specifies the number and types of each argument of the predicate. Then, the list of constants that
are in the domain of each type \texttt{ti} must be specified with a fact of the form
\begin{verbatim}
type(ti,list_of_constants).
\end{verbatim}
The file \texttt{.uni} can contain both universe and mode declaration, the ones to be used depend on the value of the parameter \texttt{grounding}: with value \texttt{variables}, the universe declarations are used, with value \texttt{modes} the mode declarations are used.
With \texttt{semcpl.pl} only mode declarations can be used.
You can test your installation of \texttt{cplint} by using the program \texttt{test.pl}:
compile \texttt{cplint.pl}, compile \texttt{test.pl} and exectue the query \texttt{t}.
A number of queries are executed against the example programs and the returned probabilities are checked: if \texttt{t.} succeeds, then \texttt{cplint} is working.
\section{Extensions}
@ -190,7 +263,7 @@ average/2
\end{verbatim}
that, given a list of numbers, computes its arithmetic mean.
Moreover, the bodies can contain the predicates \texttt{setof/3} and \texttt{bagof/3} with the same meaning as in Prolog. Existential quantifiers are allowed in both, so for example the query
When using \texttt{lpadsld.pl}, the bodies can contain the predicates \texttt{setof/3} and \texttt{bagof/3} with the same meaning as in Prolog. Existential quantifiers are allowed in both, so for example the query
\begin{verbatim}
setof(Z, (term(X,Y))^foo(X,Y,Z), L).
\end{verbatim}
@ -236,7 +309,7 @@ student_rank(S,h):0.4 ; student_rank(S,l):0.6:-
\end{verbatim}
where \verb|registr_stu(R,S)| expresses that registration \texttt{R} refers to student \texttt{S} and \verb|registr_gr(R,G)| expresses that registration \texttt{R} reports grade \texttt{G} which is a natural number. The two clauses express a dependency of the rank of the student from the average of her grades.
Another extension has been introduced in order to be able to represent reference uncertainty of PRMs. Reference uncertainty means that the link structure of a relational model is not fixed but is uncertain: this is represented by having the instance referenced in a relationship be chosen uniformly from a set. For example, consider a domain modeling scientific papers: you have a single entity, paper, and a relationship, cites, between paper and itself that connects the citing paper to the cited paper. To represent the fact that the cited paper and the citing paper are selected uniformly from certain sets, the following clauses can be used (see file \verb|paper_ref_simple.cpl|):
Another extension can be used with \texttt{lpadsld.pl} in order to be able to represent reference uncertainty of PRMs. Reference uncertainty means that the link structure of a relational model is not fixed but is uncertain: this is represented by having the instance referenced in a relationship be chosen uniformly from a set. For example, consider a domain modeling scientific papers: you have a single entity, paper, and a relationship, cites, between paper and itself that connects the citing paper to the cited paper. To represent the fact that the cited paper and the citing paper are selected uniformly from certain sets, the following clauses can be used (see file \verb|paper_ref_simple.cpl|):
\begin{verbatim}
uniform(cites_cited(C,P),P,L):-
bagof(Pap,paper_topic(Pap,theory),L).
@ -285,52 +358,14 @@ cites(X,Y):0.003 :-
cites(X,Y):0.008 :-
paper_topic(X,ai),paper_topic(Y,ai).
\end{verbatim}
This is an example of a CP-logic program, because the probabilities in the head do not sum up to one.
This is an example where the probabilities in the head do not sum up to one so the null event is automatically added to the head.
The first clause states that, if the topic of a paper \texttt{X} is theory and of paper \texttt{Y} is theory, there is a probability of 0.005 that there is a citation from \texttt{X} to \texttt{Y}. The other clauses consider the remaining cases for the topics.
\section{Parameters}
The proof procedure has two parameters that can be set with the command
\begin{verbatim}
set(parameter,value).
\end{verbatim}
from the Yap prompt after having compiled \texttt{cplint.pl}.
The current value can be read with
\begin{verbatim}
setting(parameter,Value).
\end{verbatim}
from the Yap prompt.
Available parameters:
\begin{itemize}
\item
\verb|epsilon_parsing|: if (1 - the sum of the probabilities of all the head atoms) is smaller than
\verb|epsilon_parsing|
then the clause is considered as an LPAD clause, otherwise it is considered as a CP-logic
clause. Default value 0.00001
\item \texttt{savedot}: if true a graph representing the BDD is saved in the file \texttt{cpl.dot} in the current directory in dot format.
The variables names are of the form \verb|Xn_m| where \texttt{n} is the number of the multivalued
variable and \texttt{m} is the number of the binary variable. The correspondence of variables to
clauses can be evinced from the list printed on the screen of the form
\begin{verbatim}
Variables: [(2,[X=2,X1=1]),(2,[X=1,X1=0]),(1,[])]
\end{verbatim}
where the first element of each couple is the clause number of the input file (starting from 1).
In the example above variable \texttt{X0} corresponds to clause \texttt{2} with the substitutions \texttt{X=2,X1=1},
variable \texttt{X1} corresponds to clause \texttt{2} with the substitutions \texttt{X=1,X1=0} and
variable \texttt{X2} corresponds to clause \texttt{1} with the empty substitution.
You can view the graph with \texttt{graphviz} (\href{www.graphviz.org}{www.graphviz.org}) using the
command
\begin{verbatim}
dotty cpl.dot &
\end{verbatim}
\end{itemize}
\section{Additional Files}
In the directory where Yap keeps the library files (usually \texttt{/usr/local/share/Yap}) you can find the directory \texttt{cplint} that contains additional files.
\texttt{cplint} contains
In the directory where Yap keeps the library files (usually \texttt{/usr/local/share/ Yap}) you can find the directory \texttt{cplint} that contains the files:
\begin{itemize}
\item \texttt{semantics.pl}: Prolog program for computing the probability according to the semantics.
\item \texttt{test.pl}: Prolog program for testing the system.
\item \verb|testlpadsld_gbtrue.pl, testlpadsld_gbfalse.pl, testlpad.pl,| \verb|testcpl.pl, testsemcpl.pl|: Prolog programs for testing the modules. They are executed when issuing the command \texttt{make installcheck} during the installation. To execute them afterwords, load the file and issue the command \texttt{t.}
\item Subdirectory \texttt{examples}:
\begin{itemize}
\item \texttt{alarm.cpl}: representation of the Bayesian network in Figure 2 of
@ -338,20 +373,21 @@ In the directory where Yap keeps the library files (usually \texttt{/usr/local/s
\item \texttt{coin.cpl}: coin example from \cite{VenVer04-ICLP04-IC}.
\item \texttt{coin2.cpl}: coin example with two coins.
\item \texttt{dice.cpl}: dice example from \cite{VenVer04-ICLP04-IC}.
\item \verb|twosideddice.cpl,threesideddice.cpl| game with idealized dice with two or three sides. Used in the experiments in \cite{Rig-RCRA07-IC}.
\item \texttt{es.cpl}: first example in \cite{Rig-RCRA07-IC}.
\item \texttt{esapprox.cpl}: example showing the problems of approximate inference (see \cite{Rig-RCRA07-IC}).
\item \texttt{esrange.cpl}: example showing the problems with non range restricted programs (see \cite{Rig-RCRA07-IC}).
\item \verb|twosideddice.cpl, threesideddice.cpl| game with idealized dice with two or three sides. Used in the experiments in \cite{Rig-RCRA07-IC}.
\item \texttt{ex.cpl}: first example in \cite{Rig-RCRA07-IC}.
\item \texttt{exapprox.cpl}: example showing the problems of approximate inference (see \cite{Rig-RCRA07-IC}).
\item \texttt{exrange.cpl}: example showing the problems with non range restricted programs (see \cite{Rig-RCRA07-IC}).
\item \texttt{female.cpl}: example showing the dependence of probabilities in the head from variables in the body (from \cite{VenVer04-ICLP04-IC}).
\item \texttt{mendel.cpl}: program describing the Mendelian rules of inheritance, taken from \cite{Blo04-ILP04WIP-IC}.
\item \verb|paper_ref.cpl,paper_ref_simple.cpl|: paper citations examples, showing reference uncertainty, inspired by \cite{Getoor+al:JMLR02}.
\item \texttt{mendel.cpl, mendels.cpl}: programs describing the Mendelian rules of inheritance, taken from \cite{Blo04-ILP04WIP-IC}.
\item \verb|paper_ref.cpl, paper_ref_simple.cpl|: paper citations examples, showing reference uncertainty, inspired by \cite{Getoor+al:JMLR02}.
\item \verb|paper_ref_not.cpl|: paper citations example showing that negation can be used also for predicates defined by clauses with \texttt{uniform} in the head.
\item \texttt{school.cpl}: example inspired by the example \verb|school_32.yap| from the
source distribution of Yap in the \texttt{CLPBN} directory.
\item \verb|school_simple.cpl|: simplified version of \texttt{school.cpl}.
\item \verb|student.cpl|: student example from Figure 1.3 of \cite{GetFri01-BC}.
\item \texttt{win.cpl, light.cpl, trigger.cpl, throws.cpl, hiv.cpl,}\\ \texttt{ invalid.cpl}: programs taken from \cite{CP-logic-unp}. \texttt{invalid.cpl} is an example of a program that is invalid but sound.
\end{itemize}
The files \texttt{*.uni} that are present for some of the examples are used by \texttt{semantics.pl}. Some of the example files contain in an initial comment some queries together with their result.
The files \texttt{*.uni} that are present for some of the examples are used by the semantical modules. Some of the example files contain in an initial comment some queries together with their result.
\item Subdirectory \texttt{doc}: contains this manual in latex, html and pdf.
\end{itemize}
\section{License}
@ -364,7 +400,7 @@ The files \texttt{*.uni} that are present for some of the examples are used by
\vspace{3mm}
The program uses the library \href{http://vlsi.colorado.edu/\%7Efabio/}{CUDD} for manipulating BDDs that is included in glu.
The program uses the library \href{http://vlsi.colorado.edu/~fabio/}{CUDD} for manipulating BDDs that is included in glu.
For the use of CUDD, the following license must be accepted:
\vspace{3mm}
@ -390,7 +426,7 @@ Neither the name of the University of Colorado nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
\end{itemize}
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \\ AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@ -398,13 +434,31 @@ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
CAU-SED
\\ AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
\texttt{lpad.pl}, \texttt{semlpad.pl} and \texttt{cpl.pl} are based on the SLG system
by \href{http://engr.smu.edu/~wchen/}{Weidong Chen} and \href{http://www.cs.sunysb.edu/~warren/}{David Scott Warren},
Copyright (C) 1993 Southern Methodist University, 1993 SUNY at Stony Brook, see the file COYPRIGHT\_SLG for detailed information on this copyright.
\bibliographystyle{plain}
\bibliography{bib}
\end{document}
% preamble for double compilation HTML/PDF
%%\ifx\pdfoutput\undefined % htlatex compilation
%\documentclass{article}
%\usepackage{graphicx}
%\DeclareGraphicsExtensions{.png, .gif, .jpg}
%\newcommand{\href}[2]{\Link[#1]{}{} #2 \EndLink}
%\newcommand{\hypertarget}[2]{\Link[]{}{#1} #2 \EndLink}
%\newcommand{\hyperlink}[2]{\Link[]{#1}{} #2 \EndLink}
%%\else % pdflatex compilation
%\documentclass[a4paper,12pt]{article}
%\usepackage[pdftex]{graphicx}
%\DeclareGraphicsExtensions{.pdf,.png,.jpg}
%\RequirePackage[hyperindex]{hyperref}
%\fi