added dual compilation html/pdf to manual.tex
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2026 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
48b6818654
commit
f7ea80dec3
@ -1,6 +1,3 @@
|
|||||||
# in order to produce pdf or html from manual.tex you have
|
|
||||||
# to manually edit manual.tex following the instructions at the beginning of
|
|
||||||
# it
|
|
||||||
|
|
||||||
manual.pdf: manual.tex manual.bbl
|
manual.pdf: manual.tex manual.bbl
|
||||||
pdflatex manual
|
pdflatex manual
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
|
<meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)">
|
||||||
<!-- html -->
|
<!-- html -->
|
||||||
<meta name="src" content="manual.tex">
|
<meta name="src" content="manual.tex">
|
||||||
<meta name="date" content="2007-11-16 16:20:00">
|
<meta name="date" content="2007-11-17 19:44:00">
|
||||||
<link rel="stylesheet" type="text/css" href="manual.css">
|
<link rel="stylesheet" type="text/css" href="manual.css">
|
||||||
</head><body
|
</head><body
|
||||||
>
|
>
|
||||||
@ -22,21 +22,21 @@ class="cmr-12">Fabrizio Riguzzi</span>
|
|||||||
class="cmr-12">fabrizio.riguzzi@unife.it</span></div>
|
class="cmr-12">fabrizio.riguzzi@unife.it</span></div>
|
||||||
<br />
|
<br />
|
||||||
<div class="date" ><span
|
<div class="date" ><span
|
||||||
class="cmr-12">November 16, 2007</span></div>
|
class="cmr-12">November 17, 2007</span></div>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="sectionHead"><span class="titlemark">1 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">1 </span> <a
|
||||||
id="x1-10001"></a>Introduction</h3>
|
id="x1-10001"></a>Introduction</h3>
|
||||||
<!--l. 29--><p class="noindent" ><span
|
<!--l. 30--><p class="noindent" ><span
|
||||||
class="cmtt-10">cplint </span>is a suite of programs for reasoning with LPADs <span class="cite">[<a
|
class="cmtt-10">cplint </span>is a suite of programs for reasoning with LPADs <span class="cite">[<a
|
||||||
href="#XVenVer03-TR">11</a>, <a
|
href="#XVenVer03-TR">11</a>, <a
|
||||||
href="#XVenVer04-ICLP04-IC">12</a>]</span> and CP-logic
|
href="#XVenVer04-ICLP04-IC">12</a>]</span> and CP-logic
|
||||||
programs <span class="cite">[<a
|
programs <span class="cite">[<a
|
||||||
href="#XVenDenBru-JELIA06">10</a>, <a
|
href="#XVenDenBru-JELIA06">10</a>, <a
|
||||||
href="#XCP-logic-unp">13</a>]</span>.
|
href="#XCP-logic-unp">13</a>]</span>.
|
||||||
<!--l. 31--><p class="indent" > It consists of three Prolog modules for answering queries using goal-oriented
|
<!--l. 32--><p class="indent" > 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
|
procedures plus three Prolog modules for answering queries using the definition of the
|
||||||
semantics of LPADs and CP-logic.
|
semantics of LPADs and CP-logic.
|
||||||
<!--l. 35--><p class="indent" > The modules for answering queries using using goal-oriented procedures are
|
<!--l. 36--><p class="indent" > The modules for answering queries using using goal-oriented procedures are
|
||||||
<span
|
<span
|
||||||
class="cmtt-10">lpadsld.pl</span>, <span
|
class="cmtt-10">lpadsld.pl</span>, <span
|
||||||
class="cmtt-10">lpad.pl </span>and <span
|
class="cmtt-10">lpad.pl </span>and <span
|
||||||
@ -49,11 +49,11 @@ href="#XRig-AIIA07-IC">7</a>]</span> and <span class="cite">[<a
|
|||||||
href="#XRig-RCRA07-IC">8</a>]</span>. It is based on SLDNF resolution and
|
href="#XRig-RCRA07-IC">8</a>]</span>. It is based on SLDNF resolution and
|
||||||
is an adaptation of the interpreter for ProbLog <span class="cite">[<a
|
is an adaptation of the interpreter for ProbLog <span class="cite">[<a
|
||||||
href="#XDBLP:conf/ijcai/RaedtKT07">4</a>]</span>.
|
href="#XDBLP:conf/ijcai/RaedtKT07">4</a>]</span>.
|
||||||
<!--l. 41--><p class="noindent" >It was proved correct <span class="cite">[<a
|
<!--l. 42--><p class="noindent" >It was proved correct <span class="cite">[<a
|
||||||
href="#XRig-RCRA07-IC">8</a>]</span> with respect to the semantics of LPADs for range
|
href="#XRig-RCRA07-IC">8</a>]</span> with respect to the semantics of LPADs for range
|
||||||
restricted acyclic programs <span class="cite">[<a
|
restricted acyclic programs <span class="cite">[<a
|
||||||
href="#XDBLP:journals/ngc/AptB91">1</a>]</span> without function symbols.
|
href="#XDBLP:journals/ngc/AptB91">1</a>]</span> without function symbols.
|
||||||
<!--l. 43--><p class="noindent" >It is also able to deal with extensions of LPADs and CP-logic: the clause
|
<!--l. 44--><p class="noindent" >It is also able to deal with extensions of LPADs and CP-logic: the clause
|
||||||
bodies can contain <span
|
bodies can contain <span
|
||||||
class="cmtt-10">setof </span>and <span
|
class="cmtt-10">setof </span>and <span
|
||||||
class="cmtt-10">bagof</span>, the probabilities in the head may
|
class="cmtt-10">bagof</span>, the probabilities in the head may
|
||||||
@ -84,7 +84,7 @@ href="#XDBLP:journals/jacm/ChenW96">3</a>]</span>. As a consequence, it works fo
|
|||||||
class="cmtt-10">cpl.pl</span>: computes the probability of a query using a top-down procedure
|
class="cmtt-10">cpl.pl</span>: computes the probability of a query using a top-down procedure
|
||||||
based on SLG resolution and moreover checks that the CP-logic program
|
based on SLG resolution and moreover checks that the CP-logic program
|
||||||
is valid, i.e., that it has at least an execution model.</li></ul>
|
is valid, i.e., that it has at least an execution model.</li></ul>
|
||||||
<!--l. 49--><p class="indent" > The modules for answering queries using the definition of the semantics of LPADs
|
<!--l. 50--><p class="indent" > The modules for answering queries using the definition of the semantics of LPADs
|
||||||
and CP-logic are <span
|
and CP-logic are <span
|
||||||
class="cmtt-10">semlpadsld.pl</span>, <span
|
class="cmtt-10">semlpadsld.pl</span>, <span
|
||||||
class="cmtt-10">semlpad.pl </span>and <span
|
class="cmtt-10">semlpad.pl </span>and <span
|
||||||
@ -117,16 +117,16 @@ class="cmmi-10">P</span>, i.e.,
|
|||||||
and temporal precedence. It uses the definition of the semantics given in
|
and temporal precedence. It uses the definition of the semantics given in
|
||||||
<span class="cite">[<a
|
<span class="cite">[<a
|
||||||
href="#XCP-logic-unp">13</a>]</span>.</li></ul>
|
href="#XCP-logic-unp">13</a>]</span>.</li></ul>
|
||||||
<!--l. 58--><p class="noindent" >
|
<!--l. 59--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">2 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">2 </span> <a
|
||||||
id="x1-20002"></a>Installation</h3>
|
id="x1-20002"></a>Installation</h3>
|
||||||
<!--l. 59--><p class="noindent" ><span
|
<!--l. 60--><p class="noindent" ><span
|
||||||
class="cmtt-10">cplint </span>is distributed in source code in the CVS version of Yap. It
|
class="cmtt-10">cplint </span>is distributed in source code in the CVS version of Yap. It
|
||||||
includes Prolog and C files. Download it by following the instruction in <a
|
includes Prolog and C files. Download it by following the instruction in <a
|
||||||
href="http://www.ncc.up.pt/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}vsc/Yap/downloads.html" >
|
href="http://www.ncc.up.pt/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}vsc/Yap/downloads.html" >
|
||||||
http://www.ncc.up.pt/<span
|
http://www.ncc.up.pt/<span
|
||||||
class="cmsy-10">~</span>vsc/Yap/downloads.html </a>.
|
class="cmsy-10">~</span>vsc/Yap/downloads.html </a>.
|
||||||
<!--l. 61--><p class="indent" > <span
|
<!--l. 62--><p class="indent" > <span
|
||||||
class="cmtt-10">cplint </span>requires glu (a subpackage of vis) and glib. You can download glu from <a
|
class="cmtt-10">cplint </span>requires glu (a subpackage of vis) and glib. You can download glu from <a
|
||||||
href="http://vlsi.colorado.edu/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}vis/getting_VIS_2.1.html" >
|
href="http://vlsi.colorado.edu/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}vis/getting_VIS_2.1.html" >
|
||||||
http://vlsi.colorado.edu/<span
|
http://vlsi.colorado.edu/<span
|
||||||
@ -135,7 +135,7 @@ class="cmsy-10">~</span>vis/getting_VIS_2.1.html </a> You can download glib from
|
|||||||
href="http://www.gtk.org/" > http://www.gtk.org/ </a>. This is a standard GNU package so it is easy to
|
href="http://www.gtk.org/" > http://www.gtk.org/ </a>. This is a standard GNU package so it is easy to
|
||||||
install it using the package management software of your Linux or Cygwin
|
install it using the package management software of your Linux or Cygwin
|
||||||
distribution.
|
distribution.
|
||||||
<!--l. 67--><p class="indent" > Install glu:
|
<!--l. 68--><p class="indent" > Install glu:
|
||||||
<ol class="enumerate1" >
|
<ol class="enumerate1" >
|
||||||
<li
|
<li
|
||||||
class="enumerate" id="x1-2002x1">downlad <span
|
class="enumerate" id="x1-2002x1">downlad <span
|
||||||
@ -172,12 +172,12 @@ class="cmtt-10">su</span>
|
|||||||
<li
|
<li
|
||||||
class="enumerate" id="x1-2018x9"><span
|
class="enumerate" id="x1-2018x9"><span
|
||||||
class="cmtt-10">make install</span></li></ol>
|
class="cmtt-10">make install</span></li></ol>
|
||||||
<!--l. 79--><p class="noindent" >This will install glu into <span
|
<!--l. 80--><p class="noindent" >This will install glu into <span
|
||||||
class="cmtt-10">/usr/local</span>, if you want to install to a different <span
|
class="cmtt-10">/usr/local</span>, if you want to install to a different <span
|
||||||
class="cmtt-10">DIR </span>use
|
class="cmtt-10">DIR </span>use
|
||||||
<span
|
<span
|
||||||
class="cmtt-10">../configure --prefix DIR</span>
|
class="cmtt-10">../configure --prefix DIR</span>
|
||||||
<!--l. 82--><p class="indent" > Install Yap together with <span
|
<!--l. 83--><p class="indent" > Install Yap together with <span
|
||||||
class="cmtt-10">cplint</span>: when compiling Yap following the instuction of
|
class="cmtt-10">cplint</span>: when compiling Yap following the instuction of
|
||||||
the <span
|
the <span
|
||||||
class="cmtt-10">INSTALL </span>file in the root of the Yap folder, use
|
class="cmtt-10">INSTALL </span>file in the root of the Yap folder, use
|
||||||
@ -188,7 +188,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
configure --enable-cplint
|
configure --enable-cplint
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 86--><p class="nopar" > Under Windows, you have to use Cygwin (glu does not compile under MinGW),
|
<!--l. 87--><p class="nopar" > Under Windows, you have to use Cygwin (glu does not compile under MinGW),
|
||||||
so
|
so
|
||||||
<br class="newline" />
|
<br class="newline" />
|
||||||
|
|
||||||
@ -198,19 +198,19 @@ class="verbatim"><div class="verbatim">
|
|||||||
configure --enable-cplint --enable-cygwin
|
configure --enable-cplint --enable-cygwin
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 90--><p class="nopar" > If you installed glu in <span
|
<!--l. 91--><p class="nopar" > If you installed glu in <span
|
||||||
class="cmtt-10">DIR</span>, use <span
|
class="cmtt-10">DIR</span>, use <span
|
||||||
class="cmtt-10">--enable-cplint=DIR</span>
|
class="cmtt-10">--enable-cplint=DIR</span>
|
||||||
<!--l. 93--><p class="indent" > After having performed <span
|
<!--l. 94--><p class="indent" > After having performed <span
|
||||||
class="cmtt-10">make install </span>you can do <span
|
class="cmtt-10">make install </span>you can do <span
|
||||||
class="cmtt-10">make installcheck </span>that will
|
class="cmtt-10">make installcheck </span>that will
|
||||||
execute a suite of tests of the various programs. If no error is reported you have a
|
execute a suite of tests of the various programs. If no error is reported you have a
|
||||||
working installation of <span
|
working installation of <span
|
||||||
class="cmtt-10">cplint</span>.
|
class="cmtt-10">cplint</span>.
|
||||||
<!--l. 96--><p class="noindent" >
|
<!--l. 97--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">3 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">3 </span> <a
|
||||||
id="x1-30003"></a>Syntax</h3>
|
id="x1-30003"></a>Syntax</h3>
|
||||||
<!--l. 98--><p class="noindent" >Disjunction in the head is represented with a semicolon and atoms in the head are
|
<!--l. 99--><p class="noindent" >Disjunction in the head is represented with a semicolon and atoms in the head are
|
||||||
separated from probabilities by a colon. For the rest, the usual syntax of Prolog is
|
separated from probabilities by a colon. For the rest, the usual syntax of Prolog is
|
||||||
used. For example, the CP-logic clause
|
used. For example, the CP-logic clause
|
||||||
<center class="math-display" >
|
<center class="math-display" >
|
||||||
@ -224,11 +224,11 @@ class="verbatim"><div class="verbatim">
|
|||||||
h1:p1 ; ... ; hn:pn :- b1,...,bm,\+ c1,....,\+ cl
|
h1:p1 ; ... ; hn:pn :- b1,...,bm,\+ c1,....,\+ cl
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 104--><p class="nopar" > No parentheses are necessary. The <span
|
<!--l. 105--><p class="nopar" > No parentheses are necessary. The <span
|
||||||
class="cmtt-10">pi </span>are numeric expressions. It is up to the user to
|
class="cmtt-10">pi </span>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
|
ensure that the numeric expressions are legal, i.e. that they sum up to less than
|
||||||
one.
|
one.
|
||||||
<!--l. 107--><p class="indent" > If the clause has an empty body, it can be represented like this
|
<!--l. 108--><p class="indent" > If the clause has an empty body, it can be represented like this
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="verbatim"><tr class="verbatim"><td
|
class="verbatim"><tr class="verbatim"><td
|
||||||
@ -236,7 +236,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
h1:p1 ; ... ;hn:pn.
|
h1:p1 ; ... ;hn:pn.
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 110--><p class="nopar" > If the clause has a single head with probability 1, the annotation can be omitted and
|
<!--l. 111--><p class="nopar" > 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.
|
the clause takes the form of a normal prolog clause, i.e.
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -245,7 +245,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
h1:- b1,...,bm,\+ c1,...,\+ cl.
|
h1:- b1,...,bm,\+ c1,...,\+ cl.
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 114--><p class="nopar" > stands for
|
<!--l. 115--><p class="nopar" > stands for
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="verbatim"><tr class="verbatim"><td
|
class="verbatim"><tr class="verbatim"><td
|
||||||
@ -253,8 +253,8 @@ class="verbatim"><div class="verbatim">
|
|||||||
h1:1 :- b1,...,bm,\+ c1,...,\+ cl.
|
h1:1 :- b1,...,bm,\+ c1,...,\+ cl.
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 118--><p class="nopar" >
|
<!--l. 119--><p class="nopar" >
|
||||||
<!--l. 120--><p class="indent" > The coin example of <span class="cite">[<a
|
<!--l. 121--><p class="indent" > The coin example of <span class="cite">[<a
|
||||||
href="#XVenVer04-ICLP04-IC">12</a>]</span> is represented as (see file <span
|
href="#XVenVer04-ICLP04-IC">12</a>]</span> is represented as (see file <span
|
||||||
class="cmtt-10">coin.cpl</span>)
|
class="cmtt-10">coin.cpl</span>)
|
||||||
|
|
||||||
@ -272,15 +272,15 @@ heads(Coin):1/2 ; tails(Coin):1/2:-
|
|||||||
 <br />toss(coin).
|
 <br />toss(coin).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 131--><p class="nopar" > The first clause states that if we toss a coin that is not biased it has equal
|
<!--l. 132--><p class="nopar" > 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
|
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
|
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
|
fair with probability 0.9 and biased with probability 0.1 and the last clause states
|
||||||
that we toss a coin with certainty.
|
that we toss a coin with certainty.
|
||||||
<!--l. 136--><p class="noindent" >
|
<!--l. 137--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">4 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">4 </span> <a
|
||||||
id="x1-40004"></a>Commands</h3>
|
id="x1-40004"></a>Commands</h3>
|
||||||
<!--l. 137--><p class="noindent" >All six modules accept the same commands for reading in files and answering queries.
|
<!--l. 138--><p class="noindent" >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 <span
|
The LPAD or CP-logic program must be stored in a text file with extension <span
|
||||||
class="cmtt-10">.cpl</span>.
|
class="cmtt-10">.cpl</span>.
|
||||||
Suppose you have stored the example above in file <span
|
Suppose you have stored the example above in file <span
|
||||||
@ -295,7 +295,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
use_module(library(lpad)).
|
use_module(library(lpad)).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 143--><p class="nopar" > at the command prompt. Then you must parse the source file <span
|
<!--l. 144--><p class="nopar" > at the command prompt. Then you must parse the source file <span
|
||||||
class="cmtt-10">coin.cpl </span>with the
|
class="cmtt-10">coin.cpl </span>with the
|
||||||
command
|
command
|
||||||
|
|
||||||
@ -305,7 +305,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
p(coin).
|
p(coin).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 148--><p class="nopar" > if <span
|
<!--l. 149--><p class="nopar" > if <span
|
||||||
class="cmtt-10">coin.cpl </span>is in the current directory, or
|
class="cmtt-10">coin.cpl </span>is in the current directory, or
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -314,7 +314,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
p(’path_to_coin/coin’).
|
p(’path_to_coin/coin’).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 152--><p class="nopar" > if <span
|
<!--l. 153--><p class="nopar" > if <span
|
||||||
class="cmtt-10">coin.cpl </span>is in a different directory. At this point you can pose query to the
|
class="cmtt-10">coin.cpl </span>is in a different directory. At this point you can pose query to the
|
||||||
program by using the predicate <span
|
program by using the predicate <span
|
||||||
class="cmtt-10">s/2 </span>(for solve) that takes as its first argument a
|
class="cmtt-10">s/2 </span>(for solve) that takes as its first argument a
|
||||||
@ -329,7 +329,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
s([head(coin),biased(coin)],P).
|
s([head(coin),biased(coin)],P).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 157--><p class="nopar" > For computing the probability of a conjunction given another conjunction you can
|
<!--l. 158--><p class="nopar" > For computing the probability of a conjunction given another conjunction you can
|
||||||
use the predicate <span
|
use the predicate <span
|
||||||
class="cmtt-10">sc/3 </span>(for solve conditional) that take takes as input the query
|
class="cmtt-10">sc/3 </span>(for solve conditional) that take takes as input the query
|
||||||
conjunction as its first argument, the evidence conjunction as its second argument
|
conjunction as its first argument, the evidence conjunction as its second argument
|
||||||
@ -345,19 +345,19 @@ class="verbatim"><div class="verbatim">
|
|||||||
sc([heads(coin)],[biased(coin)],P).
|
sc([heads(coin)],[biased(coin)],P).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 162--><p class="nopar" > After having parsed a program, in order to read in a new program you must restart
|
<!--l. 163--><p class="nopar" > After having parsed a program, in order to read in a new program you must restart
|
||||||
Yap when using <span
|
Yap when using <span
|
||||||
class="cmtt-10">semlpadsld.pl </span>and <span
|
class="cmtt-10">semlpadsld.pl </span>and <span
|
||||||
class="cmtt-10">semlpad.pl</span>. With the other modules, you can
|
class="cmtt-10">semlpad.pl</span>. With the other modules, you can
|
||||||
directly parse a new program.
|
directly parse a new program.
|
||||||
<!--l. 166--><p class="indent" > When using <span
|
<!--l. 167--><p class="indent" > When using <span
|
||||||
class="cmtt-10">lpad.pl</span>, the system can print the message “Uunsound program” in
|
class="cmtt-10">lpad.pl</span>, the system can print the message “Uunsound program” in
|
||||||
the case in which an instance with a three valued well founded model is found.
|
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
|
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
|
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
|
culprit clause must be generated, which may be impossible for programs with
|
||||||
function symbols.
|
function symbols.
|
||||||
<!--l. 168--><p class="indent" > When using <span
|
<!--l. 169--><p class="indent" > When using <span
|
||||||
class="cmtt-10">semcpl.pl</span>, you can print the execution process by using the
|
class="cmtt-10">semcpl.pl</span>, you can print the execution process by using the
|
||||||
command <span
|
command <span
|
||||||
class="cmtt-10">print. </span>after <span
|
class="cmtt-10">print. </span>after <span
|
||||||
@ -370,13 +370,13 @@ class="cmtt-10">context </span>is a list of atoms that are true in the context.
|
|||||||
<span
|
<span
|
||||||
class="cmtt-10">semcpl.pl </span>can print “Invalid program” in the case in which no execution process
|
class="cmtt-10">semcpl.pl </span>can print “Invalid program” in the case in which no execution process
|
||||||
exists.
|
exists.
|
||||||
<!--l. 173--><p class="indent" > When using <span
|
<!--l. 174--><p class="indent" > When using <span
|
||||||
class="cmtt-10">cpl.pl </span>you can print a partial execution model including all the
|
class="cmtt-10">cpl.pl </span>you can print a partial execution model including all the
|
||||||
clauses involved in the query issued with <span
|
clauses involved in the query issued with <span
|
||||||
class="cmtt-10">print. cpl.pl </span>can print the messages
|
class="cmtt-10">print. cpl.pl </span>can print the messages
|
||||||
“Uunsound program”, “It requires the choice of a head atom from a non ground
|
“Uunsound program”, “It requires the choice of a head atom from a non ground
|
||||||
head” and “Invalid program”.
|
head” and “Invalid program”.
|
||||||
<!--l. 176--><p class="indent" > The modules make use of a number of parameters in order to control their
|
<!--l. 177--><p class="indent" > The modules make use of a number of parameters in order to control their
|
||||||
behavior. They that can be set with the command
|
behavior. They that can be set with the command
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -385,7 +385,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
set(parameter,value).
|
set(parameter,value).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 179--><p class="nopar" > from the Yap prompt after having loaded the module. The current value can be read
|
<!--l. 180--><p class="nopar" > from the Yap prompt after having loaded the module. The current value can be read
|
||||||
with
|
with
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -394,7 +394,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
setting(parameter,Value).
|
setting(parameter,Value).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 184--><p class="nopar" > from the Yap prompt. The available parameters are:
|
<!--l. 185--><p class="nopar" > from the Yap prompt. The available parameters are:
|
||||||
<ul class="itemize1">
|
<ul class="itemize1">
|
||||||
<li class="itemize"><span class="obeylines-h"><span class="verb"><span
|
<li class="itemize"><span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">epsilon_parsing</span></span></span> (valid for all six modules): if (1 - the sum of the
|
class="cmtt-10">epsilon_parsing</span></span></span> (valid for all six modules): if (1 - the sum of the
|
||||||
@ -422,7 +422,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
Variables: [(2,[X=2,X1=1]),(2,[X=1,X1=0]),(1,[])]
|
Variables: [(2,[X=2,X1=1]),(2,[X=1,X1=0]),(1,[])]
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 198--><p class="nopar" > where the first element of each couple is the clause number of the input file
|
<!--l. 199--><p class="nopar" > where the first element of each couple is the clause number of the input file
|
||||||
(starting from 1). In the example above variable <span
|
(starting from 1). In the example above variable <span
|
||||||
class="cmtt-10">X0 </span>corresponds to clause <span
|
class="cmtt-10">X0 </span>corresponds to clause <span
|
||||||
class="cmtt-10">2</span>
|
class="cmtt-10">2</span>
|
||||||
@ -445,7 +445,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
dotty cpl.dot &
|
dotty cpl.dot &
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 207--><p class="nopar" >
|
<!--l. 208--><p class="nopar" >
|
||||||
</li>
|
</li>
|
||||||
<li class="itemize"><span class="obeylines-h"><span class="verb"><span
|
<li class="itemize"><span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">ground_body</span></span></span> (valid for <span
|
class="cmtt-10">ground_body</span></span></span> (valid for <span
|
||||||
@ -458,15 +458,15 @@ class="cmtt-10">false</span>, ground
|
|||||||
constant. In the case where the body contains variables not in the
|
constant. In the case where the body contains variables not in the
|
||||||
head, setting it to false means that the body represents an existential
|
head, setting it to false means that the body represents an existential
|
||||||
event.</li></ul>
|
event.</li></ul>
|
||||||
<!--l. 211--><p class="noindent" >
|
<!--l. 212--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">5 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">5 </span> <a
|
||||||
id="x1-50005"></a>Semantic Modules</h3>
|
id="x1-50005"></a>Semantic Modules</h3>
|
||||||
<!--l. 212--><p class="noindent" >The three semantic modules need to produce a grounding of the program in order to
|
<!--l. 213--><p class="noindent" >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 <span
|
compute the semantics. They require an extra file with extension <span
|
||||||
class="cmtt-10">.uni </span>(for universe)
|
class="cmtt-10">.uni </span>(for universe)
|
||||||
in the same directory where the <span
|
in the same directory where the <span
|
||||||
class="cmtt-10">.cpl </span>file is.
|
class="cmtt-10">.cpl </span>file is.
|
||||||
<!--l. 215--><p class="indent" > There are two ways to specify how to ground a program. The first consists in
|
<!--l. 216--><p class="indent" > 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
|
providing the list of constants to which each variable can be instantiated. For
|
||||||
example, in our case the current directory will contain a file <span
|
example, in our case the current directory will contain a file <span
|
||||||
class="cmtt-10">coin.uni </span>that is a
|
class="cmtt-10">coin.uni </span>that is a
|
||||||
@ -478,7 +478,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
universe(var_list,const_list).
|
universe(var_list,const_list).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 218--><p class="nopar" > where <span class="obeylines-h"><span class="verb"><span
|
<!--l. 219--><p class="nopar" > where <span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">var_list</span></span></span> is a list of variables names (each must be included in single quotes)
|
class="cmtt-10">var_list</span></span></span> is a list of variables names (each must be included in single quotes)
|
||||||
and <span class="obeylines-h"><span class="verb"><span
|
and <span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">const_list</span></span></span> is a list of constants. The semantic modules generate the grounding
|
class="cmtt-10">const_list</span></span></span> is a list of constants. The semantic modules generate the grounding
|
||||||
@ -488,7 +488,7 @@ class="cmtt-10">var_list</span></span></span> with the constants of
|
|||||||
class="cmtt-10">const_list</span></span></span>. Note that the variables are identified by name, so a variable with
|
class="cmtt-10">const_list</span></span></span>. 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
|
the same name in two different clauses will be instantiated with the same
|
||||||
constants.
|
constants.
|
||||||
<!--l. 221--><p class="indent" > The other way to specify how to ground a program consists in using mode and
|
<!--l. 222--><p class="indent" > The other way to specify how to ground a program consists in using mode and
|
||||||
type information. For each predicate, the file <span
|
type information. For each predicate, the file <span
|
||||||
class="cmtt-10">.uni </span>must contain a fact of the
|
class="cmtt-10">.uni </span>must contain a fact of the
|
||||||
form
|
form
|
||||||
@ -499,7 +499,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
mode(predicate(t1,...,tn)).
|
mode(predicate(t1,...,tn)).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 224--><p class="nopar" > that specifies the number and types of each argument of the predicate. Then, the list
|
<!--l. 225--><p class="nopar" > 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 <span
|
of constants that are in the domain of each type <span
|
||||||
class="cmtt-10">ti </span>must be specified with a fact of
|
class="cmtt-10">ti </span>must be specified with a fact of
|
||||||
the form
|
the form
|
||||||
@ -510,7 +510,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
type(ti,list_of_constants).
|
type(ti,list_of_constants).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 229--><p class="nopar" > The file <span
|
<!--l. 230--><p class="nopar" > The file <span
|
||||||
class="cmtt-10">.uni </span>can contain both universe and mode declaration, the ones to be used
|
class="cmtt-10">.uni </span>can contain both universe and mode declaration, the ones to be used
|
||||||
depend on the value of the parameter <span
|
depend on the value of the parameter <span
|
||||||
class="cmtt-10">grounding</span>: with value <span
|
class="cmtt-10">grounding</span>: with value <span
|
||||||
@ -518,15 +518,15 @@ class="cmtt-10">variables</span>, the
|
|||||||
universe declarations are used, with value <span
|
universe declarations are used, with value <span
|
||||||
class="cmtt-10">modes </span>the mode declarations are
|
class="cmtt-10">modes </span>the mode declarations are
|
||||||
used.
|
used.
|
||||||
<!--l. 232--><p class="indent" > With <span
|
<!--l. 233--><p class="indent" > With <span
|
||||||
class="cmtt-10">semcpl.pl </span>only mode declarations can be used.
|
class="cmtt-10">semcpl.pl </span>only mode declarations can be used.
|
||||||
<!--l. 236--><p class="noindent" >
|
<!--l. 237--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">6 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">6 </span> <a
|
||||||
id="x1-60006"></a>Extensions</h3>
|
id="x1-60006"></a>Extensions</h3>
|
||||||
<!--l. 237--><p class="noindent" >In this section we will present the extensions to the syntax of LPADs and CP-logic
|
<!--l. 238--><p class="noindent" >In this section we will present the extensions to the syntax of LPADs and CP-logic
|
||||||
programs that <span
|
programs that <span
|
||||||
class="cmtt-10">cplint </span>can handle.
|
class="cmtt-10">cplint </span>can handle.
|
||||||
<!--l. 239--><p class="indent" > The first is the use of some standard Prolog predicates. The bodies can contain
|
<!--l. 240--><p class="indent" > The first is the use of some standard Prolog predicates. The bodies can contain
|
||||||
the built-in predicates:
|
the built-in predicates:
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -548,7 +548,7 @@ is/2
|
|||||||
 <br />length/2
|
 <br />length/2
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 256--><p class="nopar" > The bodies can also contain the following library predicates:
|
<!--l. 257--><p class="nopar" > The bodies can also contain the following library predicates:
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="verbatim"><tr class="verbatim"><td
|
class="verbatim"><tr class="verbatim"><td
|
||||||
@ -560,7 +560,7 @@ member/2
|
|||||||
 <br />nth/3
|
 <br />nth/3
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 265--><p class="nopar" > plus the predicate
|
<!--l. 266--><p class="nopar" > plus the predicate
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="verbatim"><tr class="verbatim"><td
|
class="verbatim"><tr class="verbatim"><td
|
||||||
@ -568,8 +568,8 @@ class="verbatim"><div class="verbatim">
|
|||||||
average/2
|
average/2
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 269--><p class="nopar" > that, given a list of numbers, computes its arithmetic mean.
|
<!--l. 270--><p class="nopar" > that, given a list of numbers, computes its arithmetic mean.
|
||||||
<!--l. 272--><p class="indent" > When using <span
|
<!--l. 273--><p class="indent" > When using <span
|
||||||
class="cmtt-10">lpadsld.pl</span>, the bodies can contain the predicates <span
|
class="cmtt-10">lpadsld.pl</span>, the bodies can contain the predicates <span
|
||||||
class="cmtt-10">setof/3 </span>and
|
class="cmtt-10">setof/3 </span>and
|
||||||
<span
|
<span
|
||||||
@ -582,13 +582,13 @@ class="verbatim"><div class="verbatim">
|
|||||||
setof(Z, (term(X,Y))^foo(X,Y,Z), L).
|
setof(Z, (term(X,Y))^foo(X,Y,Z), L).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 275--><p class="nopar" > returns all the instantiations of <span
|
<!--l. 276--><p class="nopar" > returns all the instantiations of <span
|
||||||
class="cmtt-10">Z </span>such that there exists an instantiation of <span
|
class="cmtt-10">Z </span>such that there exists an instantiation of <span
|
||||||
class="cmtt-10">X </span>and <span
|
class="cmtt-10">X </span>and <span
|
||||||
class="cmtt-10">Y</span>
|
class="cmtt-10">Y</span>
|
||||||
for which <span
|
for which <span
|
||||||
class="cmtt-10">foo(X,Y,Z) </span>is true.
|
class="cmtt-10">foo(X,Y,Z) </span>is true.
|
||||||
<!--l. 278--><p class="indent" > An example of the use of <span
|
<!--l. 279--><p class="indent" > An example of the use of <span
|
||||||
class="cmtt-10">setof </span>and <span
|
class="cmtt-10">setof </span>and <span
|
||||||
class="cmtt-10">bagof </span>is in the file <span
|
class="cmtt-10">bagof </span>is in the file <span
|
||||||
class="cmtt-10">female.cpl</span>:
|
class="cmtt-10">female.cpl</span>:
|
||||||
@ -617,18 +617,18 @@ male(C):M/P ; female(C):F/P:-
|
|||||||
 <br />known_male(e).
|
 <br />known_male(e).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 299--><p class="nopar" > The disjunctive rule expresses the probability of a person of unknown sex of being
|
<!--l. 300--><p class="nopar" > The disjunctive rule expresses the probability of a person of unknown sex of being
|
||||||
male or female depending on the number of males and females that are known. This
|
male or female depending on the number of males and females that are known. This
|
||||||
is an example of the use of expressions in the probabilities in the head that depend
|
is an example of the use of expressions in the probabilities in the head that depend
|
||||||
on variables in the body. The probabilities are well defined because they always sum
|
on variables in the body. The probabilities are well defined because they always sum
|
||||||
to 1 (unless <span
|
to 1 (unless <span
|
||||||
class="cmtt-10">P </span>is 0).
|
class="cmtt-10">P </span>is 0).
|
||||||
<!--l. 303--><p class="indent" > Another use of <span
|
<!--l. 304--><p class="indent" > Another use of <span
|
||||||
class="cmtt-10">setof </span>and <span
|
class="cmtt-10">setof </span>and <span
|
||||||
class="cmtt-10">bagof </span>is to have an attribute depend on an
|
class="cmtt-10">bagof </span>is to have an attribute depend on an
|
||||||
aggregate function of another attribute, similarly to what is done in PRM and
|
aggregate function of another attribute, similarly to what is done in PRM and
|
||||||
CLP(BN).
|
CLP(BN).
|
||||||
<!--l. 305--><p class="indent" > So, in the classical school example (available in <span
|
<!--l. 306--><p class="indent" > So, in the classical school example (available in <span
|
||||||
class="cmtt-10">student.cpl</span>) you can find the
|
class="cmtt-10">student.cpl</span>) you can find the
|
||||||
following clauses:
|
following clauses:
|
||||||
|
|
||||||
@ -644,7 +644,7 @@ student_rank(S,h):0.6 ; student_rank(S,l):0.4:-
|
|||||||
 <br />    average(L,Av),Av =< 1.5.
|
 <br />    average(L,Av),Av =< 1.5.
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 315--><p class="nopar" > where <span class="obeylines-h"><span class="verb"><span
|
<!--l. 316--><p class="nopar" > where <span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">registr_stu(R,S)</span></span></span> expresses that registration <span
|
class="cmtt-10">registr_stu(R,S)</span></span></span> expresses that registration <span
|
||||||
class="cmtt-10">R </span>refers to student <span
|
class="cmtt-10">R </span>refers to student <span
|
||||||
class="cmtt-10">S </span>and
|
class="cmtt-10">S </span>and
|
||||||
@ -654,7 +654,7 @@ class="cmtt-10">R </span>reports grade <span
|
|||||||
class="cmtt-10">G </span>which is a natural
|
class="cmtt-10">G </span>which is a natural
|
||||||
number. The two clauses express a dependency of the rank of the student from the
|
number. The two clauses express a dependency of the rank of the student from the
|
||||||
average of her grades.
|
average of her grades.
|
||||||
<!--l. 318--><p class="indent" > Another extension can be used with <span
|
<!--l. 319--><p class="indent" > Another extension can be used with <span
|
||||||
class="cmtt-10">lpadsld.pl </span>in order to be able to represent
|
class="cmtt-10">lpadsld.pl </span>in order to be able to represent
|
||||||
reference uncertainty of PRMs. Reference uncertainty means that the link structure
|
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
|
of a relational model is not fixed but is uncertain: this is represented by having the
|
||||||
@ -676,13 +676,13 @@ uniform(cites_cited(C,P),P,L):-
|
|||||||
 <br />    bagof(Pap,paper_topic(Pap,ai),L).
|
 <br />    bagof(Pap,paper_topic(Pap,ai),L).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 325--><p class="nopar" > The first clauses states that the paper <span
|
<!--l. 326--><p class="nopar" > The first clauses states that the paper <span
|
||||||
class="cmtt-10">P </span>cited in a citation <span
|
class="cmtt-10">P </span>cited in a citation <span
|
||||||
class="cmtt-10">C </span>is selected
|
class="cmtt-10">C </span>is selected
|
||||||
uniformly from the set of all papers with topic theory. The second clauses
|
uniformly from the set of all papers with topic theory. The second clauses
|
||||||
expresses that the citing paper is selected uniformly from the papers with topic
|
expresses that the citing paper is selected uniformly from the papers with topic
|
||||||
ai.
|
ai.
|
||||||
<!--l. 330--><p class="indent" > These clauses make use of the predicate
|
<!--l. 331--><p class="indent" > These clauses make use of the predicate
|
||||||
|
|
||||||
<table
|
<table
|
||||||
class="verbatim"><tr class="verbatim"><td
|
class="verbatim"><tr class="verbatim"><td
|
||||||
@ -690,7 +690,7 @@ class="verbatim"><div class="verbatim">
|
|||||||
uniform(Atom,Variable,List)
|
uniform(Atom,Variable,List)
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 333--><p class="nopar" > in the head, where <span
|
<!--l. 334--><p class="nopar" > in the head, where <span
|
||||||
class="cmtt-10">Atom </span>must contain <span
|
class="cmtt-10">Atom </span>must contain <span
|
||||||
class="cmtt-10">Variable</span>. The meaning is the following:
|
class="cmtt-10">Variable</span>. The meaning is the following:
|
||||||
the set of all the atoms obtained by instantiating <span
|
the set of all the atoms obtained by instantiating <span
|
||||||
@ -703,7 +703,7 @@ class="cmmi-10">∕N </span>where <span
|
|||||||
class="cmmi-10">N </span>is the length of
|
class="cmmi-10">N </span>is the length of
|
||||||
<span
|
<span
|
||||||
class="cmtt-10">List</span>.
|
class="cmtt-10">List</span>.
|
||||||
<!--l. 337--><p class="indent" > A more elaborate example is present in file <span class="obeylines-h"><span class="verb"><span
|
<!--l. 338--><p class="indent" > A more elaborate example is present in file <span class="obeylines-h"><span class="verb"><span
|
||||||
class="cmtt-10">paper_ref.cpl</span></span></span>:
|
class="cmtt-10">paper_ref.cpl</span></span></span>:
|
||||||
|
|
||||||
<table
|
<table
|
||||||
@ -722,13 +722,13 @@ uniform(cites_citing(C,P),P,L):-
|
|||||||
 <br />    cites_cited_group(C,T),bagof(Pap,paper_topic(Pap,T),L).
|
 <br />    cites_cited_group(C,T),bagof(Pap,paper_topic(Pap,T),L).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 350--><p class="nopar" > where the cited paper depends on the topic of the citing paper. In particular, if the
|
<!--l. 351--><p class="nopar" > where the cited paper depends on the topic of the citing paper. In particular, if the
|
||||||
topic is theory, the cited paper is selected uniformly from the papers about theory
|
topic is theory, the cited paper is selected uniformly from the papers about theory
|
||||||
with probability 0.9 and from the papers about ai with probability 0.1. if
|
with probability 0.9 and from the papers about ai with probability 0.1. if
|
||||||
the topic is ai, the cited paper is selected uniformly from the papers about
|
the topic is ai, the cited paper is selected uniformly from the papers about
|
||||||
theory with probability 0.01 and from the papers about ai with probability
|
theory with probability 0.01 and from the papers about ai with probability
|
||||||
0.99.
|
0.99.
|
||||||
<!--l. 353--><p class="indent" > PRMs take into account as well existence uncertainty, where the existence of
|
<!--l. 354--><p class="indent" > PRMs take into account as well existence uncertainty, where the existence of
|
||||||
instances is also probabilistic. For example, in the paper domain, the total number of
|
instances is also probabilistic. For example, in the paper domain, the total number of
|
||||||
citations may be unknown and a citation between any two paper may have a
|
citations may be unknown and a citation between any two paper may have a
|
||||||
probability of existing. For example, a citation between two paper may be more
|
probability of existing. For example, a citation between two paper may be more
|
||||||
@ -750,7 +750,7 @@ cites(X,Y):0.005 :-
|
|||||||
 <br />    paper_topic(X,ai),paper_topic(Y,ai).
|
 <br />    paper_topic(X,ai),paper_topic(Y,ai).
|
||||||
</div>
|
</div>
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
<!--l. 366--><p class="nopar" > This is an example where the probabilities in the head do not sum up to one so the
|
<!--l. 367--><p class="nopar" > 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
|
null event is automatically added to the head. The first clause states that, if the topic
|
||||||
of a paper <span
|
of a paper <span
|
||||||
class="cmtt-10">X </span>is theory and of paper <span
|
class="cmtt-10">X </span>is theory and of paper <span
|
||||||
@ -759,10 +759,10 @@ there is a citation from <span
|
|||||||
class="cmtt-10">X </span>to <span
|
class="cmtt-10">X </span>to <span
|
||||||
class="cmtt-10">Y</span>. The other clauses consider the remaining cases for the
|
class="cmtt-10">Y</span>. The other clauses consider the remaining cases for the
|
||||||
topics.
|
topics.
|
||||||
<!--l. 371--><p class="noindent" >
|
<!--l. 372--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">7 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">7 </span> <a
|
||||||
id="x1-70007"></a>Additional Files</h3>
|
id="x1-70007"></a>Additional Files</h3>
|
||||||
<!--l. 372--><p class="noindent" >In the directory where Yap keeps the library files (usually <span
|
<!--l. 373--><p class="noindent" >In the directory where Yap keeps the library files (usually <span
|
||||||
class="cmtt-10">/usr/local/share/ Yap</span>)
|
class="cmtt-10">/usr/local/share/ Yap</span>)
|
||||||
you can find the directory <span
|
you can find the directory <span
|
||||||
class="cmtt-10">cplint </span>that contains the files:
|
class="cmtt-10">cplint </span>that contains the files:
|
||||||
@ -863,7 +863,7 @@ class="cmtt-10">invalid.cpl</span>: programs taken from <span class="cite">[<a
|
|||||||
href="#XCP-logic-unp">13</a>]</span>. <span
|
href="#XCP-logic-unp">13</a>]</span>. <span
|
||||||
class="cmtt-10">invalid.cpl </span>is an example
|
class="cmtt-10">invalid.cpl </span>is an example
|
||||||
of a program that is invalid but sound.</li></ul>
|
of a program that is invalid but sound.</li></ul>
|
||||||
<!--l. 396--><p class="noindent" >The files <span
|
<!--l. 397--><p class="noindent" >The files <span
|
||||||
class="cmtt-10">*.uni </span>that are present for some of the examples are used by the
|
class="cmtt-10">*.uni </span>that are present for some of the examples are used by the
|
||||||
semantical modules. Some of the example files contain in an initial comment
|
semantical modules. Some of the example files contain in an initial comment
|
||||||
some queries together with their result.
|
some queries together with their result.
|
||||||
@ -871,18 +871,18 @@ class="cmtt-10">*.uni </span>that are present for some of the examples are used
|
|||||||
<li class="itemize">Subdirectory <span
|
<li class="itemize">Subdirectory <span
|
||||||
class="cmtt-10">doc</span>: contains this manual in latex, html and pdf.</li></ul>
|
class="cmtt-10">doc</span>: contains this manual in latex, html and pdf.</li></ul>
|
||||||
|
|
||||||
<!--l. 399--><p class="noindent" >
|
<!--l. 400--><p class="noindent" >
|
||||||
<h3 class="sectionHead"><span class="titlemark">8 </span> <a
|
<h3 class="sectionHead"><span class="titlemark">8 </span> <a
|
||||||
id="x1-80008"></a>License</h3>
|
id="x1-80008"></a>License</h3>
|
||||||
<!--l. 404--><p class="noindent" ><span
|
<!--l. 405--><p class="noindent" ><span
|
||||||
class="cmtt-10">cplint</span>, as Yap, follows the Artistic License 2.0 that you can find in Yap CVS root
|
class="cmtt-10">cplint</span>, as Yap, follows the Artistic License 2.0 that you can find in Yap CVS root
|
||||||
dir. The copyright is by Fabrizio Riguzzi.
|
dir. The copyright is by Fabrizio Riguzzi.
|
||||||
<!--l. 409--><p class="indent" > The program uses the library <a
|
<!--l. 410--><p class="indent" > The program uses the library <a
|
||||||
href="http://vlsi.colorado.edu/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}fabio/" > CUDD </a> for manipulating BDDs that is included in
|
href="http://vlsi.colorado.edu/\protect \unhbox \voidb@x \penalty \@M \relax \unhbox \voidb@x \special {t4ht@+&{35}x00A0{59}}x{}fabio/" > CUDD </a> for manipulating BDDs that is included in
|
||||||
glu. For the use of CUDD, the following license must be accepted:
|
glu. For the use of CUDD, the following license must be accepted:
|
||||||
<!--l. 414--><p class="indent" > Copyright (c) 1995-2004, Regents of the University of Colorado
|
<!--l. 415--><p class="indent" > Copyright (c) 1995-2004, Regents of the University of Colorado
|
||||||
<!--l. 416--><p class="indent" > All rights reserved.
|
<!--l. 417--><p class="indent" > All rights reserved.
|
||||||
<!--l. 418--><p class="indent" > Redistribution and use in source and binary forms, with or without modification,
|
<!--l. 419--><p class="indent" > Redistribution and use in source and binary forms, with or without modification,
|
||||||
are permitted provided that the following conditions are met:
|
are permitted provided that the following conditions are met:
|
||||||
<ul class="itemize1">
|
<ul class="itemize1">
|
||||||
<li class="itemize">Redistributions of source code must retain the above copyright notice, this
|
<li class="itemize">Redistributions of source code must retain the above copyright notice, this
|
||||||
@ -895,7 +895,7 @@ are permitted provided that the following conditions are met:
|
|||||||
<li class="itemize">Neither the name of the University of Colorado nor the names of its
|
<li class="itemize">Neither the name of the University of Colorado nor the names of its
|
||||||
contributors may be used to endorse or promote products derived from
|
contributors may be used to endorse or promote products derived from
|
||||||
this software without specific prior written permission.</li></ul>
|
this software without specific prior written permission.</li></ul>
|
||||||
<!--l. 435--><p class="noindent" >THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
<!--l. 436--><p class="noindent" >THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
|
||||||
<br class="newline" />AND CONTRIBUTORS ”AS IS” AND ANY EXPRESS OR IMPLIED
|
<br class="newline" />AND CONTRIBUTORS ”AS IS” AND ANY EXPRESS OR IMPLIED
|
||||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
@ -909,7 +909,7 @@ INTERRUPTION) HOWEVER CAU-SED
|
|||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
<!--l. 449--><p class="indent" > <span
|
<!--l. 450--><p class="indent" > <span
|
||||||
class="cmtt-10">lpad.pl</span>, <span
|
class="cmtt-10">lpad.pl</span>, <span
|
||||||
class="cmtt-10">semlpad.pl </span>and <span
|
class="cmtt-10">semlpad.pl </span>and <span
|
||||||
class="cmtt-10">cpl.pl </span>are based on the SLG system by <a
|
class="cmtt-10">cpl.pl </span>are based on the SLG system by <a
|
||||||
|
Binary file not shown.
@ -1,15 +1,16 @@
|
|||||||
%% uncomment the following for htlatex compilation
|
\ifnum\pdfoutput>0 % pdflatex 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}
|
\documentclass[a4paper,12pt]{article}
|
||||||
\usepackage[pdftex]{graphicx}
|
\usepackage[pdftex]{graphicx}
|
||||||
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
|
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
|
||||||
\RequirePackage[hyperindex]{hyperref}
|
\RequirePackage[hyperindex]{hyperref}
|
||||||
|
\else % 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}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user