You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(72) |
Jul
(30) |
Aug
(31) |
Sep
(41) |
Oct
(22) |
Nov
(70) |
Dec
(98) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(194) |
Feb
(127) |
Mar
(47) |
Apr
(83) |
May
(154) |
Jun
(149) |
Jul
(49) |
Aug
(64) |
Sep
(98) |
Oct
(104) |
Nov
(99) |
Dec
(109) |
| 2003 |
Jan
(72) |
Feb
(105) |
Mar
(76) |
Apr
(66) |
May
(20) |
Jun
(51) |
Jul
(67) |
Aug
(16) |
Sep
(24) |
Oct
(52) |
Nov
(43) |
Dec
(92) |
| 2004 |
Jan
(16) |
Feb
(145) |
Mar
(137) |
Apr
(140) |
May
(29) |
Jun
(214) |
Jul
(167) |
Aug
(202) |
Sep
(188) |
Oct
(228) |
Nov
(283) |
Dec
(250) |
| 2005 |
Jan
(107) |
Feb
(162) |
Mar
(100) |
Apr
(110) |
May
(144) |
Jun
(19) |
Jul
(23) |
Aug
(127) |
Sep
(20) |
Oct
(76) |
Nov
(85) |
Dec
(171) |
| 2006 |
Jan
(86) |
Feb
(134) |
Mar
(213) |
Apr
(70) |
May
(81) |
Jun
(25) |
Jul
(6) |
Aug
(36) |
Sep
(20) |
Oct
(21) |
Nov
(368) |
Dec
(164) |
| 2007 |
Jan
(239) |
Feb
(126) |
Mar
(148) |
Apr
(24) |
May
(48) |
Jun
(238) |
Jul
(18) |
Aug
(13) |
Sep
(59) |
Oct
(73) |
Nov
(224) |
Dec
(39) |
| 2008 |
Jan
(53) |
Feb
(92) |
Mar
(134) |
Apr
(81) |
May
(53) |
Jun
(210) |
Jul
(31) |
Aug
(38) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2009 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Vitor S. C. <vs...@us...> - 2008-06-26 13:09:14
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv14577 Modified Files: Makefile.in changes-5.1.html Log Message: improve graphs a bit. Index: changes-5.1.html =================================================================== RCS file: /cvsroot/yap/changes-5.1.html,v retrieving revision 1.212 retrieving revision 1.213 diff -u -r1.212 -r1.213 --- changes-5.1.html 18 Jun 2008 10:02:24 -0000 1.212 +++ changes-5.1.html 26 Jun 2008 13:09:15 -0000 1.213 @@ -15,8 +15,9 @@ <h1>Changes in YAP-5.1</h1> -<h2>Yap-5.1.3:</h2> +<h2>Yap-5.1.4:</h2> <ul> +<li> NEW: dgraph_reachable/3 and friends.</li> </ul> |
|
From: Fabrizio R. <rz...@us...> - 2008-06-19 21:28:30
|
Update of /cvsroot/yap/cplint/doc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21916 Modified Files: manual.css manual.html manual.pdf Log Message: support for glib-2.0 Index: manual.css =================================================================== RCS file: /cvsroot/yap/cplint/doc/manual.css,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- manual.css 8 Nov 2007 12:47:24 -0000 1.1 +++ manual.css 19 Jun 2008 21:28:33 -0000 1.2 @@ -11,7 +11,6 @@ .cmtt-10{font-family: monospace;} .cmti-10{ font-style: italic;} p.noindent { text-indent: 0em } -td p.noindent { text-indent: 0em; margin-top:0em; } p.nopar { text-indent: 0em; } p.indent{ text-indent: 1.5em } @media print {div.crosslinks {visibility:hidden;}} Index: manual.html =================================================================== RCS file: /cvsroot/yap/cplint/doc/manual.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- manual.html 17 Nov 2007 19:09:05 -0000 1.5 +++ manual.html 19 Jun 2008 21:28:33 -0000 1.6 @@ -7,7 +7,7 @@ <meta name="originator" content="TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)"> <!-- html --> <meta name="src" content="manual.tex"> -<meta name="date" content="2007-11-17 19:44:00"> +<meta name="date" content="2008-06-19 23:25:00"> <link rel="stylesheet" type="text/css" href="manual.css"> </head><body > @@ -22,21 +22,21 @@ class="cmr-12">fab...@un...</span></div> <br /> <div class="date" ><span -class="cmr-12">November 17, 2007</span></div> +class="cmr-12">June 19, 2008</span></div> </div> <h3 class="sectionHead"><span class="titlemark">1 </span> <a id="x1-10001"></a>Introduction</h3> -<!--l. 30--><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 href="#XVenVer03-TR">11</a>, <a href="#XVenVer04-ICLP04-IC">12</a>]</span> and CP-logic programs <span class="cite">[<a href="#XVenDenBru-JELIA06">10</a>, <a href="#XCP-logic-unp">13</a>]</span>. -<!--l. 32--><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 semantics of LPADs and CP-logic. -<!--l. 36--><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 class="cmtt-10">lpadsld.pl</span>, <span class="cmtt-10">lpad.pl </span>and <span @@ -49,11 +49,11 @@ 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 href="#XDBLP:conf/ijcai/RaedtKT07">4</a>]</span>. - <!--l. 42--><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 restricted acyclic programs <span class="cite">[<a href="#XDBLP:journals/ngc/AptB91">1</a>]</span> without function symbols. - <!--l. 44--><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 class="cmtt-10">setof </span>and <span class="cmtt-10">bagof</span>, the probabilities in the head may @@ -84,7 +84,7 @@ 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 is valid, i.e., that it has at least an execution model.</li></ul> -<!--l. 50--><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 class="cmtt-10">semlpadsld.pl</span>, <span class="cmtt-10">semlpad.pl </span>and <span @@ -117,67 +117,69 @@ and temporal precedence. It uses the definition of the semantics given in <span class="cite">[<a href="#XCP-logic-unp">13</a>]</span>.</li></ul> -<!--l. 59--><p class="noindent" > +<!--l. 59--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">2 </span> <a id="x1-20002"></a>Installation</h3> -<!--l. 60--><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 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" > http://www.ncc.up.pt/<span class="cmsy-10">~</span>vsc/Yap/downloads.html </a>. -<!--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 -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 -class="cmsy-10">~</span>vis/getting_VIS_2.1.html </a> You can download glib from -<a -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 -distribution. -<!--l. 68--><p class="indent" > Install glu: +<!--l. 62--><p class="indent"> <span +class="cmtt-10">cplint </span>requires glu (a subpackage of vis) and glib-2.0. 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" > http://vlsi.colorado.edu/<span +class="cmsy-10">~</span>vis/getting_VIS_2.1.html </a> You can download +glib-2.0 (version <span +class="cmsy-10">≥ </span>2<span +class="cmmi-10">.</span>0) from <a +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 distribution. +<!--l. 68--><p class="indent"> Install glu: <ol class="enumerate1" > - <li - class="enumerate" id="x1-2002x1">downlad <span + <li class="enumerate"><a + id="x1-2002x1"></a>downlad <span class="cmtt-10">glu-2.1.tar.gz</span> </li> - <li - class="enumerate" id="x1-2004x2">decompress it + <li class="enumerate"><a + id="x1-2004x2"></a>decompress it </li> - <li - class="enumerate" id="x1-2006x3"><span + <li class="enumerate"><a + id="x1-2006x3"></a><span class="cmtt-10">cd glu-2.1</span> </li> - <li - class="enumerate" id="x1-2008x4"><span + <li class="enumerate"><a + id="x1-2008x4"></a><span class="cmtt-10">mkdir arch</span> </li> - <li - class="enumerate" id="x1-2010x5"><span + <li class="enumerate"><a + id="x1-2010x5"></a><span class="cmtt-10">cd arch</span> </li> - <li - class="enumerate" id="x1-2012x6"><span + <li class="enumerate"><a + id="x1-2012x6"></a><span class="cmtt-10">../configure</span> </li> - <li - class="enumerate" id="x1-2014x7"><span + <li class="enumerate"><a + id="x1-2014x7"></a><span class="cmtt-10">make</span> </li> - <li - class="enumerate" id="x1-2016x8"><span + <li class="enumerate"><a + id="x1-2016x8"></a><span class="cmtt-10">su</span> </li> - <li - class="enumerate" id="x1-2018x9"><span + <li class="enumerate"><a + id="x1-2018x9"></a><span class="cmtt-10">make install</span></li></ol> -<!--l. 80--><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">DIR </span>use <span class="cmtt-10">../configure --prefix DIR</span> -<!--l. 83--><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 the <span class="cmtt-10">INSTALL </span>file in the root of the Yap folder, use @@ -188,7 +190,7 @@ configure --enable-cplint </div> </td></tr></table> -<!--l. 87--><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 <br class="newline" /> @@ -198,19 +200,19 @@ configure --enable-cplint --enable-cygwin </div> </td></tr></table> -<!--l. 91--><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">--enable-cplint=DIR</span> -<!--l. 94--><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 installcheck </span>that will execute a suite of tests of the various programs. If no error is reported you have a working installation of <span class="cmtt-10">cplint</span>. -<!--l. 97--><p class="noindent" > +<!--l. 97--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">3 </span> <a id="x1-30003"></a>Syntax</h3> -<!--l. 99--><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 used. For example, the CP-logic clause <center class="math-display" > @@ -224,11 +226,11 @@ h1:p1 ; ... ; hn:pn :- b1,...,bm,\+ c1,....,\+ cl </div> </td></tr></table> -<!--l. 105--><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 ensure that the numeric expressions are legal, i.e. that they sum up to less than one. -<!--l. 108--><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 class="verbatim"><tr class="verbatim"><td @@ -236,7 +238,7 @@ h1:p1 ; ... ;hn:pn. </div> </td></tr></table> -<!--l. 111--><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. <table @@ -245,7 +247,7 @@ h1:- b1,...,bm,\+ c1,...,\+ cl. </div> </td></tr></table> -<!--l. 115--><p class="nopar" > stands for +<!--l. 115--><p class="nopar"> stands for <table class="verbatim"><tr class="verbatim"><td @@ -253,8 +255,8 @@ h1:1 :- b1,...,bm,\+ c1,...,\+ cl. </div> </td></tr></table> -<!--l. 119--><p class="nopar" > -<!--l. 121--><p class="indent" > The coin example of <span class="cite">[<a +<!--l. 119--><p class="nopar"> +<!--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 class="cmtt-10">coin.cpl</span>) @@ -272,15 +274,15 @@  <br />toss(coin). </div> </td></tr></table> -<!--l. 132--><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 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. -<!--l. 137--><p class="noindent" > +<!--l. 137--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">4 </span> <a id="x1-40004"></a>Commands</h3> -<!--l. 138--><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 class="cmtt-10">.cpl</span>. Suppose you have stored the example above in file <span @@ -295,7 +297,7 @@ use_module(library(lpad)). </div> </td></tr></table> -<!--l. 144--><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 command @@ -305,7 +307,7 @@ p(coin). </div> </td></tr></table> -<!--l. 149--><p class="nopar" > if <span +<!--l. 149--><p class="nopar"> if <span class="cmtt-10">coin.cpl </span>is in the current directory, or <table @@ -314,7 +316,7 @@ p(’path_to_coin/coin’). </div> </td></tr></table> -<!--l. 153--><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 program by using the predicate <span class="cmtt-10">s/2 </span>(for solve) that takes as its first argument a @@ -329,7 +331,7 @@ s([head(coin),biased(coin)],P). </div> </td></tr></table> -<!--l. 158--><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 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 @@ -345,19 +347,19 @@ sc([heads(coin)],[biased(coin)],P). </div> </td></tr></table> -<!--l. 163--><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 class="cmtt-10">semlpadsld.pl </span>and <span class="cmtt-10">semlpad.pl</span>. With the other modules, you can directly parse a new program. -<!--l. 167--><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 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. -<!--l. 169--><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 command <span class="cmtt-10">print. </span>after <span @@ -370,13 +372,13 @@ <span class="cmtt-10">semcpl.pl </span>can print “Invalid program” in the case in which no execution process exists. -<!--l. 174--><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 clauses involved in the query issued with <span 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 head” and “Invalid program”. -<!--l. 177--><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 <table @@ -385,7 +387,7 @@ set(parameter,value). </div> </td></tr></table> -<!--l. 180--><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 <table @@ -394,7 +396,7 @@ setting(parameter,Value). </div> </td></tr></table> -<!--l. 185--><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"> <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 @@ -422,7 +424,7 @@ Variables: [(2,[X=2,X1=1]),(2,[X=1,X1=0]),(1,[])] </div> </td></tr></table> - <!--l. 199--><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 class="cmtt-10">X0 </span>corresponds to clause <span class="cmtt-10">2</span> @@ -445,7 +447,7 @@ dotty cpl.dot & </div> </td></tr></table> - <!--l. 208--><p class="nopar" > + <!--l. 208--><p class="nopar"> </li> <li class="itemize"><span class="obeylines-h"><span class="verb"><span class="cmtt-10">ground_body</span></span></span> (valid for <span @@ -458,15 +460,15 @@ 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.</li></ul> -<!--l. 212--><p class="noindent" > +<!--l. 212--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">5 </span> <a id="x1-50005"></a>Semantic Modules</h3> -<!--l. 213--><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 class="cmtt-10">.uni </span>(for universe) in the same directory where the <span class="cmtt-10">.cpl </span>file is. -<!--l. 216--><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 example, in our case the current directory will contain a file <span class="cmtt-10">coin.uni </span>that is a @@ -478,7 +480,7 @@ universe(var_list,const_list). </div> </td></tr></table> -<!--l. 219--><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) 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 @@ -488,7 +490,7 @@ 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 constants. -<!--l. 222--><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 class="cmtt-10">.uni </span>must contain a fact of the form @@ -499,7 +501,7 @@ mode(predicate(t1,...,tn)). </div> </td></tr></table> -<!--l. 225--><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 class="cmtt-10">ti </span>must be specified with a fact of the form @@ -510,7 +512,7 @@ type(ti,list_of_constants). </div> </td></tr></table> -<!--l. 230--><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 depend on the value of the parameter <span class="cmtt-10">grounding</span>: with value <span @@ -518,15 +520,15 @@ universe declarations are used, with value <span class="cmtt-10">modes </span>the mode declarations are used. -<!--l. 233--><p class="indent" > With <span +<!--l. 233--><p class="indent"> With <span class="cmtt-10">semcpl.pl </span>only mode declarations can be used. -<!--l. 237--><p class="noindent" > +<!--l. 237--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">6 </span> <a id="x1-60006"></a>Extensions</h3> -<!--l. 238--><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 class="cmtt-10">cplint </span>can handle. -<!--l. 240--><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: <table @@ -548,7 +550,7 @@  <br />length/2 </div> </td></tr></table> -<!--l. 257--><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 class="verbatim"><tr class="verbatim"><td @@ -560,7 +562,7 @@  <br />nth/3 </div> </td></tr></table> -<!--l. 266--><p class="nopar" > plus the predicate +<!--l. 266--><p class="nopar"> plus the predicate <table class="verbatim"><tr class="verbatim"><td @@ -568,8 +570,8 @@ average/2 </div> </td></tr></table> -<!--l. 270--><p class="nopar" > that, given a list of numbers, computes its arithmetic mean. -<!--l. 273--><p class="indent" > When using <span +<!--l. 270--><p class="nopar"> that, given a list of numbers, computes its arithmetic mean. +<!--l. 273--><p class="indent"> When using <span class="cmtt-10">lpadsld.pl</span>, the bodies can contain the predicates <span class="cmtt-10">setof/3 </span>and <span @@ -582,13 +584,13 @@ setof(Z, (term(X,Y))^foo(X,Y,Z), L). </div> </td></tr></table> -<!--l. 276--><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">X </span>and <span class="cmtt-10">Y</span> for which <span class="cmtt-10">foo(X,Y,Z) </span>is true. -<!--l. 279--><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">bagof </span>is in the file <span class="cmtt-10">female.cpl</span>: @@ -617,18 +619,18 @@  <br />known_male(e). </div> </td></tr></table> -<!--l. 300--><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 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 to 1 (unless <span class="cmtt-10">P </span>is 0). -<!--l. 304--><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">bagof </span>is to have an attribute depend on an aggregate function of another attribute, similarly to what is done in PRM and CLP(BN). -<!--l. 306--><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 following clauses: @@ -644,7 +646,7 @@  <br />    average(L,Av),Av =< 1.5. </div> </td></tr></table> -<!--l. 316--><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">R </span>refers to student <span class="cmtt-10">S </span>and @@ -654,7 +656,7 @@ class="cmtt-10">G </span>which is a natural number. The two clauses express a dependency of the rank of the student from the average of her grades. -<!--l. 319--><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 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 @@ -676,13 +678,13 @@  <br />    bagof(Pap,paper_topic(Pap,ai),L). </div> </td></tr></table> -<!--l. 326--><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">C </span>is selected 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 ai. -<!--l. 331--><p class="indent" > These clauses make use of the predicate +<!--l. 331--><p class="indent"> These clauses make use of the predicate <table class="verbatim"><tr class="verbatim"><td @@ -690,7 +692,7 @@ uniform(Atom,Variable,List) </div> </td></tr></table> -<!--l. 334--><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">Variable</span>. The meaning is the following: the set of all the atoms obtained by instantiating <span @@ -703,7 +705,7 @@ class="cmmi-10">N </span>is the length of <span class="cmtt-10">List</span>. -<!--l. 338--><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>: <table @@ -722,13 +724,13 @@  <br />    cites_cited_group(C,T),bagof(Pap,paper_topic(Pap,T),L). </div> </td></tr></table> -<!--l. 351--><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 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 theory with probability 0.01 and from the papers about ai with probability 0.99. -<!--l. 354--><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 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 @@ -750,7 +752,7 @@  <br />    paper_topic(X,ai),paper_topic(Y,ai). </div> </td></tr></table> -<!--l. 367--><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 of a paper <span class="cmtt-10">X </span>is theory and of paper <span @@ -759,10 +761,10 @@ class="cmtt-10">X </span>to <span class="cmtt-10">Y</span>. The other clauses consider the remaining cases for the topics. -<!--l. 372--><p class="noindent" > +<!--l. 372--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">7 </span> <a id="x1-70007"></a>Additional Files</h3> -<!--l. 373--><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>) you can find the directory <span class="cmtt-10">cplint </span>that contains the files: @@ -773,11 +775,13 @@ class="cmtt-10"> testlpad.pl,</span></span></span> <span class="obeylines-h"><span class="verb"><span class="cmtt-10">testcpl.pl,</span><span -class="cmtt-10"> testsemcpl.pl</span></span></span>: Prolog programs for testing the modules. - They are executed when issuing the command <span -class="cmtt-10">make installcheck </span>during - the installation. To execute them afterwords, load the file and issue the - command <span +class="cmtt-10"> testsemlpadsld.pl,</span><span +class="cmtt-10"> testsemlpad.pl</span><span +class="cmtt-10"> testsemcpl.pl</span></span></span>: + Prolog programs for testing the modules. They are executed when issuing + the command <span +class="cmtt-10">make installcheck </span>during the installation. To execute + them afterwords, load the file and issue the command <span class="cmtt-10">t.</span> </li> <li class="itemize">Subdirectory <span @@ -863,7 +867,7 @@ href="#XCP-logic-unp">13</a>]</span>. <span class="cmtt-10">invalid.cpl </span>is an example of a program that is invalid but sound.</li></ul> - <!--l. 397--><p class="noindent" >The files <span + <!--l. 398--><p class="noindent">The files <span 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 some queries together with their result. @@ -871,18 +875,18 @@ <li class="itemize">Subdirectory <span class="cmtt-10">doc</span>: contains this manual in latex, html and pdf.</li></ul> -<!--l. 400--><p class="noindent" > +<!--l. 401--><p class="noindent"> <h3 class="sectionHead"><span class="titlemark">8 </span> <a id="x1-80008"></a>License</h3> -<!--l. 405--><p class="noindent" ><span +<!--l. 406--><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 dir. The copyright is by Fabrizio Riguzzi. -<!--l. 410--><p class="indent" > The program uses the library <a +<!--l. 411--><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 glu. For the use of CUDD, the following license must be accepted: -<!--l. 415--><p class="indent" > Copyright (c) 1995-2004, Regents of the University of Colorado -<!--l. 417--><p class="indent" > All rights reserved. -<!--l. 419--><p class="indent" > Redistribution and use in source and binary forms, with or without modification, +<!--l. 416--><p class="indent"> Copyright (c) 1995-2004, Regents of the University of Colorado +<!--l. 418--><p class="indent"> All rights reserved. +<!--l. 420--><p class="indent"> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: <ul class="itemize1"> <li class="itemize">Redistributions of source code must retain the above copyright notice, this @@ -895,7 +899,7 @@ <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 this software without specific prior written permission.</li></ul> -<!--l. 436--><p class="noindent" >THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS +<!--l. 437--><p class="noindent">THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS <br class="newline" />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 @@ -909,7 +913,7 @@ 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. -<!--l. 450--><p class="indent" > <span +<!--l. 451--><p class="indent"> <span class="cmtt-10">lpad.pl</span>, <span class="cmtt-10">semlpad.pl </span>and <span class="cmtt-10">cpl.pl </span>are based on the SLG system by <a @@ -919,19 +923,19 @@ 1993 SUNY at Stony Brook, see the file COYPRIGHT_SLG for detailed information on this copyright. -<!--l. 1--><p class="noindent" > +<!--l. 1--><p class="noindent"> <h3 class="likesectionHead"><a id="x1-90008"></a>References</h3> -<!--l. 1--><p class="noindent" > +<!--l. 1--><p class="noindent"> <div class="thebibliography"> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [1]<span class="bibsp">   </span></span><a id="XDBLP:journals/ngc/AptB91"></a>K. R. Apt and M. Bezem. Acyclic programs. <span class="cmti-10">New Generation</span> <span class="cmti-10">Comput.</span>, 9(3/4):335–364, 1991. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [2]<span class="bibsp">   </span></span><a id="XBlo04-ILP04WIP-IC"></a>H. Blockeel. Probabilistic logical models for mendel’s experiments: An exercise. In <span @@ -939,13 +943,13 @@ <span class="cmti-10">Track</span>, 2004. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [3]<span class="bibsp">   </span></span><a id="XDBLP:journals/jacm/ChenW96"></a>Weidong Chen and David Scott Warren. Tabled evaluation with delaying for general logic programs. <span class="cmti-10">J. ACM</span>, 43(1):20–74, 1996. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [4]<span class="bibsp">   </span></span><a id="XDBLP:conf/ijcai/RaedtKT07"></a>L. De Raedt, A. Kimmig, and H. Toivonen. Problog: A probabilistic prolog and its application in link discovery. In <span @@ -954,14 +958,14 @@ class="cmti-10">International Joint Conference on Artificial Intelligence</span>, pages 2462–2467, 2007. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [5]<span class="bibsp">   </span></span><a id="XGetFri01-BC"></a>L. Getoor, N. Friedman, D. Koller, and A. Pfeffer. Learning probabilistic relational models. In Saso Dzeroski and Nada Lavrac, editors, <span class="cmti-10">Relational Data Mining</span>. Springer-Verlag, Berlin, 2001. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [6]<span class="bibsp">   </span></span><a id="XGetoor+al:JMLR02"></a>L. Getoor, N. Friedman, D. Koller, and B. Taskar. Learning probabilistic models of relational structure. <span @@ -969,7 +973,7 @@ <span class="cmti-10">Research</span>, 3:679–707, December 2002. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [7]<span class="bibsp">   </span></span><a id="XRig-AIIA07-IC"></a>Fabrizio Riguzzi. A top down interpreter for lpad and cp-logic. In <span @@ -980,7 +984,7 @@ </a>. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [8]<span class="bibsp">   </span></span><a id="XRig-RCRA07-IC"></a>Fabrizio Riguzzi. A top down interpreter for lpad and cp-logic. In <span @@ -990,7 +994,7 @@ href="http://pst.istc.cnr.it/RCRA07/articoli/P19-riguzzi-RCRA07.pdf" > http://pst.istc.cnr.it/RCRA07/articoli/P19-riguzzi-RCRA07.pdf </a>. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [9]<span class="bibsp">   </span></span><a id="XSanPagQaz03-UAI-IC"></a>V. Santos Costa, D. Page, M. Qazi, and J. Cussens. CLP(BN): Constraint logic programming for probabilistic knowledge. In <span @@ -998,7 +1002,7 @@ <span class="cmti-10">in Artificial Intelligence (UAI 2003)</span>, 2003. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [10]<span class="bibsp">   </span></span><a id="XVenDenBru-JELIA06"></a>J. Vennekens, M. Denecker, and M. Bruynooghe. Representing causal information about a probabilistic process. In <span @@ -1007,7 +1011,7 @@ class="cmti-10">Logics in Artificial Intelligence, JELIA 2006</span>, LNAI. Springer, September 2006. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [11]<span class="bibsp">   </span></span><a id="XVenVer03-TR"></a>J. Vennekens and S. Verbaeten. Logic programs with annotated disjunctions. Technical Report CW386, K. U. Leuven, 2003. <a @@ -1015,7 +1019,7 @@ http://www.cs.kuleuven.ac.be/<span class="cmsy-10">~</span>joost/techrep.ps </a>. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [12]<span class="bibsp">   </span></span><a id="XVenVer04-ICLP04-IC"></a>J. Vennekens, S. Verbaeten, and M. Bruynooghe. Logic programs with annotated disjunctions. In <span @@ -1026,7 +1030,7 @@ class="cmsy-10">~</span>joost/ </a>. </p> - <p class="bibitem" ><span class="biblabel"> + <p class="bibitem"><span class="biblabel"> [13]<span class="bibsp">   </span></span><a id="XCP-logic-unp"></a>Joost Vennekens, Marc Denecker, and Maurice Bruynooge. Extending the role of causality in Index: manual.pdf =================================================================== RCS file: /cvsroot/yap/cplint/doc/manual.pdf,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 Binary files /tmp/cvsQpr6JY and /tmp/cvs5FociE differ |
|
From: Fabrizio R. <rz...@us...> - 2008-06-19 21:09:55
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13219 Modified Files: configure Log Message: support for glib-2.0 |
|
From: Fabrizio R. <rz...@us...> - 2008-06-19 21:09:23
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv13191 Modified Files: configure.in Log Message: support for glib-2.0 |
|
From: Fabrizio R. <rz...@us...> - 2008-06-19 21:08:31
|
Update of /cvsroot/yap/cplint/doc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12757 Modified Files: manual.tex Log Message: support for glib-2.0 Index: manual.tex =================================================================== RCS file: /cvsroot/yap/cplint/doc/manual.tex,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- manual.tex 4 Dec 2007 18:30:35 -0000 1.10 +++ manual.tex 19 Jun 2008 21:08:31 -0000 1.11 @@ -59,9 +59,9 @@ \section{Installation} \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. +\texttt{cplint} requires glu (a subpackage of vis) and glib-2.0. 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 +You can download glib-2.0 (version $\geq 2.0$) 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. |
|
From: Vitor S. C. <vs...@us...> - 2008-06-18 10:02:32
|
Update of /cvsroot/yap/H In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12914/H Modified Files: Yap.h Log Message: upgrade to 5.1.4 Index: Yap.h =================================================================== RCS file: /cvsroot/yap/H/Yap.h,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- Yap.h 23 May 2008 10:02:13 -0000 1.37 +++ Yap.h 18 Jun 2008 10:02:27 -0000 1.38 @@ -82,7 +82,7 @@ #undef USE_THREADED_CODE #endif #define inline __inline -#define YAP_VERSION "Yap-5.1.3" +#define YAP_VERSION "Yap-5.1.4" #define BIN_DIR "c:\\Yap\\bin" #define LIB_DIR "c:\\Yap\\lib\\Yap" #define SHARE_DIR "c:\\Yap\\share\\Yap" |
|
From: Vitor S. C. <vs...@us...> - 2008-06-18 10:02:31
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12914 Modified Files: Makefile.in TO_DO changes-5.1.html distribute Log Message: upgrade to 5.1.4 Index: TO_DO =================================================================== RCS file: /cvsroot/yap/TO_DO,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- TO_DO 1 Jul 2007 00:14:35 -0000 1.27 +++ TO_DO 18 Jun 2008 10:02:24 -0000 1.28 @@ -1,22 +1,15 @@ -For 6.0 +6.0 o Rogério Salvini's report -o Fix many modules o Fix meta-commas -o Fix CLPBN/matlab o Document CLPBN o Fix meta-call conjunction o exo-emulation. o EMACS interface. -o Upgrade JPL -o Upgrade ciao packages -o install SWIPL xml processing o talk to Fabrizio o upgrade save/restore -o exec_c o R Interface -5.1.3 -o document MATLAB interface +5.1.4 Index: changes-5.1.html =================================================================== RCS file: /cvsroot/yap/changes-5.1.html,v retrieving revision 1.211 retrieving revision 1.212 diff -u -r1.211 -r1.212 --- changes-5.1.html 17 Jun 2008 13:37:48 -0000 1.211 +++ changes-5.1.html 18 Jun 2008 10:02:24 -0000 1.212 @@ -17,6 +17,11 @@ <h2>Yap-5.1.3:</h2> <ul> +</ul> + + +<h2>Yap-5.1.3:</h2> +<ul> <li> FIXED: try,retry,trust_logical should handle 0 arguments correctly.</li> <li> FIXED: RecoverSlots should check if there are slots to recover.</li> <li> FIXED: syntax errors should know they are in an included file.</li> Index: distribute =================================================================== RCS file: /cvsroot/yap/distribute,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- distribute 8 Jun 2008 09:55:34 -0000 1.22 +++ distribute 18 Jun 2008 10:02:24 -0000 1.23 @@ -1,7 +1,7 @@ #/bin/bash # Guess what: this code works for me! -version="Yap-5.1.3" +version="Yap-5.1.4" splat cd C splat |
|
From: Vitor S. C. <vs...@us...> - 2008-06-18 10:02:30
|
Update of /cvsroot/yap/docs In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12914/docs Modified Files: yap.tex Log Message: upgrade to 5.1.4 Index: yap.tex =================================================================== RCS file: /cvsroot/yap/docs/yap.tex,v retrieving revision 1.255 retrieving revision 1.256 diff -u -r1.255 -r1.256 --- yap.tex 17 Jun 2008 13:37:50 -0000 1.255 +++ yap.tex 18 Jun 2008 10:02:27 -0000 1.256 @@ -8,9 +8,9 @@ @c @setchapternewpage odd @c %**end of header -@set VERSION 5.1.3 +@set VERSION 5.1.4 @set EDITION 4.2.5 -@set UPDATED June 2007 +@set UPDATED June 2008 @c Index for C-Prolog compatible predicate @defindex cy |
|
From: Vitor S. C. <vs...@us...> - 2008-06-18 10:02:30
|
Update of /cvsroot/yap/misc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12914/misc Modified Files: Yap.spec yap.nsi Log Message: upgrade to 5.1.4 Index: Yap.spec =================================================================== RCS file: /cvsroot/yap/misc/Yap.spec,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Yap.spec 29 Jun 2007 01:33:35 -0000 1.23 +++ Yap.spec 18 Jun 2008 10:02:27 -0000 1.24 @@ -3,7 +3,7 @@ Name: Yap Summary: Prolog Compiler -Version: 5.1.3 +Version: 5.1.4 Packager: Vitor Santos Costa <vi...@co...> Release: 1 Source: http://www.ncc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz Index: yap.nsi =================================================================== RCS file: /cvsroot/yap/misc/yap.nsi,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- yap.nsi 1 Apr 2008 09:47:11 -0000 1.2 +++ yap.nsi 18 Jun 2008 10:02:27 -0000 1.3 @@ -277,4 +277,4 @@ installer, please contact yap...@sf..." FunctionEnd -outfile "yap-5.1.3-installer.exe" +outfile "yap-5.1.4-installer.exe" |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 21:21:29
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20233 Modified Files: README Log Message: make DOS compatible |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 21:04:20
|
Update of /cvsroot/yap/misc In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv12602/misc Modified Files: yap.def Log Message: fix missing decl Index: yap.def =================================================================== RCS file: /cvsroot/yap/misc/yap.def,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- yap.def 13 Dec 2006 16:10:25 -0000 1.16 +++ yap.def 17 Jun 2008 21:04:27 -0000 1.17 @@ -49,6 +49,7 @@ YAP_BufferToAtomList YAP_Error YAP_RunGoal +YAP_RunGoalOnce YAP_RestartGoal YAP_GoalHasException YAP_ClearExceptions |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 13:38:24
|
Update of /cvsroot/yap/docs In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22579/docs Modified Files: yap.tex Log Message: fix c_interface not to crash when people try to recover slots that are not there. fix try_logical and friends to handle case where predicate has arity 0. Index: yap.tex =================================================================== RCS file: /cvsroot/yap/docs/yap.tex,v retrieving revision 1.254 retrieving revision 1.255 diff -u -r1.254 -r1.255 --- yap.tex 16 Jun 2008 21:22:14 -0000 1.254 +++ yap.tex 17 Jun 2008 13:37:50 -0000 1.255 @@ -14150,10 +14150,10 @@ @findex YAP_PutInSlot (C-Interface function) Set the contents of slot @var{slot} to @var{t}. -@item void YAP_RecoverSlots(int @var{HowMany}) +@item int YAP_RecoverSlots(int @var{HowMany}) @findex YAP_RecoverSlots (C-Interface function) Recover the space for @var{HowMany} slots: these will include the -current default slot. +current default slot. Fails if no such slots exist. @end table The following functions complement @var{YAP_RunGoal}: |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 13:38:13
|
Update of /cvsroot/yap/H In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22579/H Modified Files: Yapproto.h Log Message: fix c_interface not to crash when people try to recover slots that are not there. fix try_logical and friends to handle case where predicate has arity 0. Index: Yapproto.h =================================================================== RCS file: /cvsroot/yap/H/Yapproto.h,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- Yapproto.h 4 Jun 2008 14:47:18 -0000 1.86 +++ Yapproto.h 17 Jun 2008 13:37:49 -0000 1.87 @@ -52,7 +52,7 @@ long STD_PROTO(Yap_InitSlot,(Term)); long STD_PROTO(Yap_NewSlots,(int)); Term STD_PROTO(Yap_GetFromSlot,(long)); -void STD_PROTO(Yap_RecoverSlots,(int)); +int STD_PROTO(Yap_RecoverSlots,(int)); Term STD_PROTO(Yap_GetFromSlot,(long)); Term *STD_PROTO(Yap_AddressFromSlot,(long)); void STD_PROTO(Yap_PutInSlot,(long, Term)); |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 13:38:13
|
Update of /cvsroot/yap/C In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22579/C Modified Files: absmi.c adtdefs.c c_interface.c heapgc.c Log Message: fix c_interface not to crash when people try to recover slots that are not there. fix try_logical and friends to handle case where predicate has arity 0. Index: absmi.c =================================================================== RCS file: /cvsroot/yap/C/absmi.c,v retrieving revision 1.241 retrieving revision 1.242 diff -u -r1.241 -r1.242 --- absmi.c 4 Jun 2008 14:47:18 -0000 1.241 +++ absmi.c 17 Jun 2008 13:37:48 -0000 1.242 @@ -12,6 +12,11 @@ * comments: Portable abstract machine interpreter * * Last rev: $Date$,$Author$ * * $Log$ +* Revision 1.242 2008/06/17 13:37:48 vsc +* fix c_interface not to crash when people try to recover slots that are +* not there. +* fix try_logical and friends to handle case where predicate has arity 0. +* * Revision 1.241 2008/06/04 14:47:18 vsc * make sure we do trim_trail whenever we mess with B! * @@ -835,7 +840,7 @@ ASP = (CELL *) PROTECT_FROZEN_B(B); } else { - ASP = YREG; + ASP = YREG+E_CB; } saveregs(); #if PUSH_REGS @@ -852,7 +857,7 @@ ASP = (CELL *) PROTECT_FROZEN_B(B); } else { - ASP = YREG; + ASP = YREG+E_CB; } saveregs(); #if PUSH_REGS @@ -861,7 +866,7 @@ #if BP_FREE P1REG = PCBACKUP; #endif - return (0); + return 0; ENDBOp(); /***************************************************************** @@ -1045,7 +1050,7 @@ JMPNext(); } restore_yaam_regs(PREG->u.lld.n); - restore_at_least_one_arg(PREG->u.lld.t.s); + restore_args(PREG->u.lld.t.s); LOCK(PREG->u.lld.d->ClPred->StatisticsForPred.lock); PREG->u.lld.d->ClPred->StatisticsForPred.NOfRetries++; UNLOCK(PREG->u.lld.d->ClPred->StatisticsForPred.lock); @@ -1142,7 +1147,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(ap->ArityOfPE); + restore_args(ap->ArityOfPE); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #else @@ -1153,7 +1158,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_at_least_one_arg(ap->ArityOfPE); + pop_args(ap->ArityOfPE); S_YREG--; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1338,7 +1343,7 @@ JMPNext(); } restore_yaam_regs(PREG->u.lld.n); - restore_at_least_one_arg(PREG->u.lld.t.s); + restore_args(PREG->u.lld.t.s); RetriesCounter--; if (RetriesCounter == 0) { saveregs(); @@ -1462,7 +1467,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(ap->ArityOfPE); + restore_args(ap->ArityOfPE); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #else @@ -1473,7 +1478,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_at_least_one_arg(ap->ArityOfPE); + pop_args(ap->ArityOfPE); S_YREG--; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); @@ -1557,7 +1562,7 @@ LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG); Term t; - ASP = YREG; + ASP = YREG+E_CB; saveregs(); while ((t = Yap_FetchTermFromDB(cl->ClSource)) == 0L) { if (Yap_Error_TYPE == OUT_OF_ATTVARS_ERROR) { @@ -2680,7 +2685,7 @@ if (ActiveSignals & YAP_CREEP_SIGNAL) { GONext(); } - ASP = YREG; + ASP = YREG+E_CB; /* cut_e */ if (SREG <= ASP) { ASP = SREG-EnvSizeInCells; @@ -8174,7 +8179,7 @@ /* fprintf(stderr,"+ %p/%p %d %d %d--%u\n",PREG,PREG->u.lld.d->ClPred,timestamp,PREG->u.lld.d->ClPred->TimeStampOfPred,PREG->u.lld.d->ClTimeStart,PREG->u.lld.d->ClTimeEnd);*/ /* Point AP to the code that follows this instruction */ /* always do this, even if we are not going to use it */ - store_at_least_one_arg(PREG->u.lld.t.s); + store_args(PREG->u.lld.t.s); store_yaam_regs(PREG->u.lld.n, 0); set_cut(S_YREG, B); B = B_YREG; @@ -8307,7 +8312,7 @@ #ifdef YAPOR if (SCH_top_shared_cp(B)) { SCH_last_alternative(PREG, B_YREG); - restore_at_least_one_arg(ap->ArityOfPE); + restore_args(ap->ArityOfPE); #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); #else @@ -8318,7 +8323,7 @@ #endif /* YAPOR */ { pop_yaam_regs(); - pop_at_least_one_arg(ap->ArityOfPE); + pop_args(ap->ArityOfPE); S_YREG--; #ifdef FROZEN_STACKS S_YREG = (CELL *) PROTECT_FROZEN_B(B_YREG); Index: adtdefs.c =================================================================== RCS file: /cvsroot/yap/C/adtdefs.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- adtdefs.c 27 Mar 2008 00:41:31 -0000 1.58 +++ adtdefs.c 17 Jun 2008 13:37:48 -0000 1.59 @@ -1165,12 +1165,16 @@ return((ASP+1)-LCL0); } -void +int Yap_RecoverSlots(int n) { Int old_slots = IntOfTerm(ASP[0]); + if (old_slots - n < 0) { + return FALSE; + } ASP += n; ASP[0] = MkIntTerm(old_slots-n); + return TRUE; } Term Index: c_interface.c =================================================================== RCS file: /cvsroot/yap/C/c_interface.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -r1.118 -r1.119 --- c_interface.c 4 Jun 2008 14:47:18 -0000 1.118 +++ c_interface.c 17 Jun 2008 13:37:48 -0000 1.119 @@ -12,6 +12,11 @@ * * * Last rev: $Date$,$Author$ * * $Log$ +* Revision 1.119 2008/06/17 13:37:48 vsc +* fix c_interface not to crash when people try to recover slots that are +* not there. +* fix try_logical and friends to handle case where predicate has arity 0. +* * Revision 1.118 2008/06/04 14:47:18 vsc * make sure we do trim_trail whenever we mess with B! * @@ -441,7 +446,7 @@ X_API Term STD_PROTO(YAP_GetFromSlot,(long)); X_API Term *STD_PROTO(YAP_AddressFromSlot,(long)); X_API void STD_PROTO(YAP_PutInSlot,(long, Term)); -X_API void STD_PROTO(YAP_RecoverSlots,(int)); +X_API int STD_PROTO(YAP_RecoverSlots,(int)); X_API void STD_PROTO(YAP_Throw,(Term)); X_API void STD_PROTO(YAP_Halt,(int)); X_API Term *STD_PROTO(YAP_TopOfLocalStack,(void)); @@ -1005,10 +1010,10 @@ return Yap_InitSlot(t); } -X_API void +X_API int YAP_RecoverSlots(int n) { - Yap_RecoverSlots(n); + return Yap_RecoverSlots(n); } X_API Term @@ -1443,7 +1448,7 @@ CP = old_CP; Yap_AllowRestart = TRUE; } else { - ASP = B->cp_env; + ENV = B->cp_env; B = B->cp_b; Yap_AllowRestart = FALSE; } Index: heapgc.c =================================================================== RCS file: /cvsroot/yap/C/heapgc.c,v retrieving revision 1.211 retrieving revision 1.212 diff -u -r1.211 -r1.212 --- heapgc.c 8 Jun 2008 08:05:11 -0000 1.211 +++ heapgc.c 17 Jun 2008 13:37:49 -0000 1.212 @@ -1566,7 +1566,7 @@ if (MARKED_PTR(gc_ENV+E_CB)) return; MARK(gc_ENV+E_CB); - + size = EnvSize((CELL_PTR) (gc_ENV[E_CP])); /* size = EnvSize(CP) */ pvbmap = EnvBMap((CELL_PTR) (gc_ENV[E_CP])); #if 0 |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 13:37:47
|
Update of /cvsroot/yap/include In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22579/include Modified Files: YapInterface.h Log Message: fix c_interface not to crash when people try to recover slots that are not there. fix try_logical and friends to handle case where predicate has arity 0. Index: YapInterface.h =================================================================== RCS file: /cvsroot/yap/include/YapInterface.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- YapInterface.h 4 Jun 2008 13:58:42 -0000 1.28 +++ YapInterface.h 17 Jun 2008 13:37:51 -0000 1.29 @@ -381,7 +381,7 @@ extern X_API void PROTO(YAP_PutInSlot,(long int, YAP_Term)); /* void YAP_RecoverSlots() */ -extern X_API void PROTO(YAP_RecoverSlots,(int)); +extern X_API int PROTO(YAP_RecoverSlots,(int)); /* void YAP_Throw() */ extern X_API void PROTO(YAP_Throw,(YAP_Term)); |
|
From: Vitor S. C. <vs...@us...> - 2008-06-17 13:37:43
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22579 Modified Files: changes-5.1.html Log Message: fix c_interface not to crash when people try to recover slots that are not there. fix try_logical and friends to handle case where predicate has arity 0. |
|
From: Vitor S. C. <vs...@us...> - 2008-06-16 21:22:11
|
Update of /cvsroot/yap/pl In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19140/pl Modified Files: boot.yap messages.yap statistics.yap Log Message: fix stack growth in globals fix compilation messages Index: boot.yap =================================================================== RCS file: /cvsroot/yap/pl/boot.yap,v retrieving revision 1.187 retrieving revision 1.188 diff -u -r1.187 -r1.188 --- boot.yap 26 May 2008 09:16:24 -0000 1.187 +++ boot.yap 16 Jun 2008 21:22:15 -0000 1.188 @@ -104,7 +104,7 @@ nb_setval('$endif',off), nb_setval('$consulting_file',[]), nb_setval('$consulting',false), - nb_setval('$included_file',''). + nb_setval('$included_file',[]). % Start file for yap Index: messages.yap =================================================================== RCS file: /cvsroot/yap/pl/messages.yap,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- messages.yap 12 Jun 2008 10:55:52 -0000 1.12 +++ messages.yap 16 Jun 2008 21:22:15 -0000 1.13 @@ -25,7 +25,7 @@ file_location(Prefix) --> { prolog_load_context(file, FileName) - }, + }, { '$start_line'(LN) }, file_position(FileName,LN,Prefix), [ nl ]. Index: statistics.yap =================================================================== RCS file: /cvsroot/yap/pl/statistics.yap,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- statistics.yap 12 Feb 2008 21:50:58 -0000 1.9 +++ statistics.yap 16 Jun 2008 21:22:15 -0000 1.10 @@ -135,6 +135,14 @@ :- meta_predicate time(:). time(Goal) :- + var(Goal), + '$do_error'(instantiation_error,time(Goal)). +time(_:Goal) :- + var(Goal), + '$do_error'(instantiation_error,time(Goal)). +time(Goal) :- \+ callable(Goal), !, + '$do_error'(type_error(callable,Goal),time(Goal)). +time(Goal) :- statistics(walltime, _), statistics(cputime, _), ( catch(Goal, E, true) |
|
From: Vitor S. C. <vs...@us...> - 2008-06-16 21:22:11
|
Update of /cvsroot/yap/C In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19140/C Modified Files: globals.c iopreds.c Log Message: fix stack growth in globals fix compilation messages Index: globals.c =================================================================== RCS file: /cvsroot/yap/C/globals.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- globals.c 23 Jan 2008 17:57:45 -0000 1.30 +++ globals.c 16 Jun 2008 21:22:13 -0000 1.31 @@ -1869,6 +1869,7 @@ CELL *qd = GetHeap(ARG1,"add_to_heap"), *oldH, *oldHB, *pt; UInt hsize, hmsize, old_sz; Term arena, to, key; + UInt mingrow; if (!qd) return FALSE; @@ -1879,7 +1880,7 @@ CELL *top = qd+(HEAP_START+2*hmsize); UInt extra_size; - if (hmsize >= 64*1024) { + if (hmsize <= 64*1024) { extra_size = 64*1024; } else { extra_size = hmsize; @@ -1913,9 +1914,10 @@ arena = qd[HEAP_ARENA]; if (arena == 0L) return FALSE; - key = CopyTermToArena(ARG2, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, 0); + mingrow = garena_overflow_size(ArenaPt(arena)); + key = CopyTermToArena(ARG2, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, mingrow); arena = qd[HEAP_ARENA]; - to = CopyTermToArena(ARG3, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, 0); + to = CopyTermToArena(ARG3, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, mingrow); if (key == 0 || to == 0L) return FALSE; qd = GetHeap(ARG1,"add_to_heap"); @@ -2295,6 +2297,7 @@ CELL *qd = GetHeap(ARG1,"add_to_beam"), *oldH, *oldHB, *pt; UInt hsize, hmsize, old_sz; Term arena, to, key; + UInt mingrow; if (!qd) return FALSE; @@ -2314,9 +2317,10 @@ arena = qd[HEAP_ARENA]; if (arena == 0L) return FALSE; - key = CopyTermToArena(ARG2, qd[HEAP_ARENA], FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, 0); + mingrow = garena_overflow_size(ArenaPt(arena)); + key = CopyTermToArena(ARG2, qd[HEAP_ARENA], FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, mingrow); arena = qd[HEAP_ARENA]; - to = CopyTermToArena(ARG3, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, 0); + to = CopyTermToArena(ARG3, arena, FALSE, 3, qd+HEAP_ARENA, qd+HEAP_DELAY_ARENA, mingrow); if (key == 0 || to == 0L) return FALSE; qd = GetHeap(ARG1,"add_to_beam"); Index: iopreds.c =================================================================== RCS file: /cvsroot/yap/C/iopreds.c,v retrieving revision 1.181 retrieving revision 1.182 diff -u -r1.181 -r1.182 --- iopreds.c 12 Jun 2008 10:55:52 -0000 1.181 +++ iopreds.c 16 Jun 2008 21:22:13 -0000 1.182 @@ -3703,7 +3703,7 @@ Int Yap_FirstLineInParse (void) { - return(StartLine); + return StartLine; } static Int |
|
From: Vitor S. C. <vs...@us...> - 2008-06-16 21:22:11
|
Update of /cvsroot/yap/docs In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19140/docs Modified Files: yap.tex Log Message: fix stack growth in globals fix compilation messages Index: yap.tex =================================================================== RCS file: /cvsroot/yap/docs/yap.tex,v retrieving revision 1.253 retrieving revision 1.254 diff -u -r1.253 -r1.254 --- yap.tex 7 Jun 2008 10:11:43 -0000 1.253 +++ yap.tex 16 Jun 2008 21:22:14 -0000 1.254 @@ -7072,6 +7072,12 @@ integer. The @var{Type} must be bound to one of types mentioned previously. +@item reset_static_array(+@var{Name}) +@findex reset_static_array/1 +@snindex reset_static_array/1 +@cnindex reset_static_array/1 +Reset static array with name @var{Name} to its initial value. + @item static_array_location(+@var{Name}, -@var{Ptr}) @findex static_array_location/4 @snindex static_array_location/4 @@ -9684,6 +9690,12 @@ @var{T0} creating a new red-black tree @var{TF}. Duplicated elements are not allowed. +@snindex rb_insert_new/4 +@cnindex rb_insert_new/4 +Add a new element with key @var{Key} and @var{Value} to the tree +@var{T0} creating a new red-black tree @var{TF}. Fails is an element +with @var{Key} exists in the tree. + @item rb_lookup(+@var{Key},-@var{Value},+@var{T}) @findex rb_lookup/3 @snindex rb_lookup/3 |
|
From: Vitor S. C. <vs...@us...> - 2008-06-13 14:10:26
|
Update of /cvsroot/yap/C In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25284/C Modified Files: dbase.c Log Message: fix debugging message. Index: dbase.c =================================================================== RCS file: /cvsroot/yap/C/dbase.c,v retrieving revision 1.173 retrieving revision 1.174 diff -u -r1.173 -r1.174 --- dbase.c 10 May 2008 23:24:11 -0000 1.173 +++ dbase.c 13 Jun 2008 14:10:27 -0000 1.174 @@ -3808,7 +3808,6 @@ /* only for log upds */ while (cl) { cls++; - fprintf(stderr,"cl=%p, %lx %lu\n",cl,(unsigned long int)cl->ClFlags,(unsigned long int)cl->ClRefCount); sz += cl->ClSize; cl = cl->ClNext; } |
|
From: Vitor S. C. <vs...@us...> - 2008-06-12 10:55:46
|
Update of /cvsroot/yap/pl In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20804/pl Modified Files: consult.yap errors.yap messages.yap Log Message: fix syntax error messages Index: consult.yap =================================================================== RCS file: /cvsroot/yap/pl/consult.yap,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- consult.yap 28 Apr 2008 23:02:32 -0000 1.76 +++ consult.yap 12 Jun 2008 10:55:52 -0000 1.77 @@ -381,7 +381,8 @@ prolog_load_context(file, FileName) :- nb_getval('$included_file',IncFileName), ( IncFileName = [] -> - nb_getval('$consulting_file',FileName) + nb_getval('$consulting_file',FileName), + FileName \= [] ; FileName = IncFileName ). Index: errors.yap =================================================================== RCS file: /cvsroot/yap/pl/errors.yap,v retrieving revision 1.88 retrieving revision 1.89 diff -u -r1.88 -r1.89 --- errors.yap 4 Apr 2008 10:02:44 -0000 1.88 +++ errors.yap 12 Jun 2008 10:55:52 -0000 1.89 @@ -13,6 +13,9 @@ * * * Last rev: $Date$,$Author$ * * $Log$ +* Revision 1.89 2008/06/12 10:55:52 vsc +* fix syntax error messages +* * Revision 1.88 2008/04/04 10:02:44 vsc * implement thread_cancel using signals * use duplicate_term instead of copy_term in throw: throw may lose @@ -250,8 +253,8 @@ ) ). print_message(silent, _) :- !. -print_message(_, error(syntax_error(_,between(_,L,_),_,_,_,_),_)) :- !, - format(user_error,'SYNTAX ERROR close to ~d~n',[L]). +print_message(_, error(syntax_error(_,between(_,L,_),_,_,_,_,StreamName),_)) :- !, + format(user_error,'SYNTAX ERROR at ~a, close to ~d~n',[StreamName,L]). print_message(_, loading(A, F)) :- !, format(user_error,' % ~a ~a~n',[A,F]). print_message(_, loaded(A, F, _, Time, Space)) :- !, @@ -272,7 +275,7 @@ '$print_system_message'(_, banner, _) :- current_prolog_flag(verbose, silent), !. '$print_system_message'(Term, Level, Lines) :- - Term = error(syntax_error(_,_,_,_,_,_),_), !, + Term = error(syntax_error(_,_,_,_,_,_,_),_), !, flush_output(user_output), flush_output(user_error), '$message':prefix(Level, LinePrefix, Stream, _, Lines), !, Index: messages.yap =================================================================== RCS file: /cvsroot/yap/pl/messages.yap,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- messages.yap 23 May 2008 22:29:52 -0000 1.11 +++ messages.yap 12 Jun 2008 10:55:52 -0000 1.12 @@ -24,8 +24,7 @@ file_location(Prefix) --> { - nb_getval('$consulting_file',FileName), - FileName \= [] + prolog_load_context(file, FileName) }, { '$start_line'(LN) }, file_position(FileName,LN,Prefix), @@ -245,11 +244,11 @@ [ 'RESOURCE ERROR- not enough virtual memory' - [Where] ]. system_message(error(signal(SIG,_), _)) --> [ 'UNEXPECTED SIGNAL: ~a' - [SIG] ]. -system_message(error(syntax_error(G,0,Msg,[],0,0), _)) --> - [ 'SYNTAX ERROR: ~a' - [G,Msg] ]. -system_message(error(syntax_error(_,_,_,Term,Pos,Start), Where)) --> +system_message(error(syntax_error(G,0,Msg,[],0,0,File), _)) --> + [ 'SYNTAX ERROR at "~a", goal ~q: ~a' - [File,G,Msg] ]. +system_message(error(syntax_error(read(Term),_,_,Term,Pos,Start,File), Where)) --> ['~w' - [Where]], - syntax_error_line(Start,Pos), + syntax_error_line(File, Start, Pos), syntax_error_term(10, Pos, Term), [ '.' ]. system_message(error(system_error, Where)) --> @@ -385,8 +384,8 @@ list_of_preds(L). -syntax_error_line(Position,_) --> - [', near line ~d:~n' - [Position]]. +syntax_error_line(File, Position,_) --> + [' at ~a, near line ~d:~n' - [File,Position]]. syntax_error_term(0,J,L) --> ['~n' ], |
|
From: Vitor S. C. <vs...@us...> - 2008-06-12 10:55:46
|
Update of /cvsroot/yap In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20804 Modified Files: changes-5.1.html Log Message: fix syntax error messages |
|
From: Vitor S. C. <vs...@us...> - 2008-06-12 10:55:46
|
Update of /cvsroot/yap/C In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20804/C Modified Files: iopreds.c stdpreds.c Log Message: fix syntax error messages Index: iopreds.c =================================================================== RCS file: /cvsroot/yap/C/iopreds.c,v retrieving revision 1.180 retrieving revision 1.181 diff -u -r1.180 -r1.181 --- iopreds.c 5 Jun 2008 16:24:07 -0000 1.180 +++ iopreds.c 12 Jun 2008 10:55:52 -0000 1.181 @@ -1592,7 +1592,7 @@ s->stream_getc = PlGetc; s->stream_gets = PlGetsFunc(); } - return(post_process_read_char(ch, s)); + return(ch); } /* give back 0376+ch */ @@ -3590,7 +3590,7 @@ } static Term -syntax_error (TokEntry * tokptr) +syntax_error (TokEntry * tokptr, int sno) { Term info; int count = 0, out = 0; @@ -3687,6 +3687,7 @@ tf[0] = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("read"),1),1,&ARG2); { Term t[3]; + t[0] = MkIntegerTerm(start); t[1] = MkIntegerTerm(err); t[2] = MkIntegerTerm(end); @@ -3695,7 +3696,8 @@ tf[2] = MkAtomTerm(Yap_LookupAtom("\n<==== HERE ====>\n")); tf[4] = MkIntegerTerm(out); tf[5] = MkIntegerTerm(err); - return(Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("syntax_error"),6),6,tf)); + tf[6] = StreamName(sno); + return(Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("syntax_error"),7),7,tf)); } Int @@ -3932,7 +3934,7 @@ /* try again */ goto repeat_cycle; } else { - Term terr = syntax_error(tokstart); + Term terr = syntax_error(tokstart, inp_stream); if (Yap_ErrorMessage == NULL) Yap_ErrorMessage = "SYNTAX ERROR"; @@ -4284,7 +4286,7 @@ Stream[sno].stream_gets = PlGetsFunc(); /* reset the counters */ Stream[sno].linepos = 0; - Stream[sno].linecount = 0; + Stream[sno].linecount = 1; Stream[sno].charcount = 0; } UNLOCK(Stream[sno].streamlock); @@ -5938,33 +5940,40 @@ if (sno < 0) return FALSE; + UNLOCK(Stream[sno].streamlock); TR_before_parse = TR; tokstart = Yap_tokptr = Yap_toktide = Yap_tokenizer(sno); - /* cannot actually use CloseStream, because we didn't allocate the buffer */ - Stream[sno].status = Free_Stream_f; if (tokstart == NIL && tokstart->Tok == Ord (eot_tok)) { if (tp) { *tp = MkAtomTerm(Yap_LookupAtom("end of file found before end of term")); } Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); + /* cannot actually use CloseStream, because we didn't allocate the buffer */ + Stream[sno].status = Free_Stream_f; return FALSE; } else if (Yap_ErrorMessage) { if (tp) { *tp = MkAtomTerm(Yap_LookupAtom(Yap_ErrorMessage)); } Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); + /* cannot actually use CloseStream, because we didn't allocate the buffer */ + Stream[sno].status = Free_Stream_f; return FALSE; } t = Yap_Parse(); TR = TR_before_parse; if (Yap_ErrorMessage) { if (tp) { - *tp = syntax_error(tokstart); + *tp = syntax_error(tokstart, sno); } Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); + /* cannot actually use CloseStream, because we didn't allocate the buffer */ + Stream[sno].status = Free_Stream_f; return FALSE; } Yap_clean_tokenizer(tokstart, Yap_VarTable, Yap_AnonVarTable); + /* cannot actually use CloseStream, because we didn't allocate the buffer */ + Stream[sno].status = Free_Stream_f; return t; } Index: stdpreds.c =================================================================== RCS file: /cvsroot/yap/C/stdpreds.c,v retrieving revision 1.130 retrieving revision 1.131 diff -u -r1.130 -r1.131 --- stdpreds.c 6 Apr 2008 11:53:02 -0000 1.130 +++ stdpreds.c 12 Jun 2008 10:55:52 -0000 1.131 @@ -13,6 +13,9 @@ * * * Last rev: $Date$,$Author$ * * $Log$ +* Revision 1.131 2008/06/12 10:55:52 vsc +* fix syntax error messages +* * Revision 1.130 2008/04/06 11:53:02 vsc * fix some restore bugs * @@ -1846,16 +1849,17 @@ } static Term -gen_syntax_error(char *s) +gen_syntax_error(Atom InpAtom, char *s) { Term ts[6], ti[2]; ti[0] = ARG1; ti[1] = ARG2; ts[0] = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom(s),2),2,ti); ts[1] = ts[4] = ts[5] = MkIntTerm(0); - ts[2] = MkAtomTerm(Yap_LookupAtom("number syntax")); + ts[2] = MkAtomTerm(Yap_LookupAtom("expected number syntax")); ts[3] = TermNil; - return(Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("syntax_error"),6),6,ts)); + ts[6] = MkAtomTerm(InpAtom); + return(Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("syntax_error"),7),7,ts)); } static Int @@ -1994,7 +1998,7 @@ } *s++ = '\0'; if ((NewT = get_num(String)) == TermNil) { - Yap_Error(SYNTAX_ERROR, gen_syntax_error("number_chars"), "while scanning %s", String); + Yap_Error(SYNTAX_ERROR, gen_syntax_error(Yap_LookupAtom(String), "number_chars"), "while scanning %s", String); return (FALSE); } return (Yap_unify(ARG1, NewT)); @@ -2063,7 +2067,7 @@ } s = RepAtom(AtomOfTerm(t))->StrOfAE; if ((NewT = get_num(s)) == TermNil) { - Yap_Error(SYNTAX_ERROR, gen_syntax_error("number_atom"), "while scanning %s", s); + Yap_Error(SYNTAX_ERROR, gen_syntax_error(Yap_LookupAtom(String), "number_atom"), "while scanning %s", s); return (FALSE); } return (Yap_unify(ARG1, NewT)); @@ -2158,7 +2162,7 @@ } *s++ = '\0'; if ((NewT = get_num(String)) == TermNil) { - Yap_Error(SYNTAX_ERROR, gen_syntax_error("number_codes"), "while scanning %s", String); + Yap_Error(SYNTAX_ERROR, gen_syntax_error(Yap_LookupAtom(String), "number_codes"), "while scanning %s", String); return (FALSE); } return (Yap_unify(ARG1, NewT)); @@ -2220,12 +2224,12 @@ } at = AtomOfTerm(t); if (IsWideAtom(at)) { - Yap_Error(SYNTAX_ERROR, gen_syntax_error("number_codes"), "while scanning %S", RepAtom(at)->WStrOfAE); + Yap_Error(SYNTAX_ERROR, gen_syntax_error(at, "number_codes"), "while scanning %S", RepAtom(at)->WStrOfAE); return FALSE; } s = RepAtom(at)->StrOfAE; /* alloc temp space on Trail */ if ((NewT = get_num(s)) == TermNil) { - Yap_Error(SYNTAX_ERROR, gen_syntax_error("atom_number"), "while scanning %s", s); + Yap_Error(SYNTAX_ERROR, gen_syntax_error(at, "atom_number"), "while scanning %s", s); return FALSE; } return Yap_unify(ARG2, NewT); |
|
From: Vitor S. C. <vs...@us...> - 2008-06-12 10:55:46
|
Update of /cvsroot/yap/library/matrix In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv20804/library/matrix Modified Files: matrix.c Log Message: fix syntax error messages Index: matrix.c =================================================================== RCS file: /cvsroot/yap/library/matrix/matrix.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- matrix.c 25 Mar 2008 16:45:53 -0000 1.10 +++ matrix.c 12 Jun 2008 10:55:52 -0000 1.11 @@ -478,8 +478,12 @@ int i; long int *data = matrix_long_data(mat,mat[MAT_NDIMS]); - for (i = 0; i< mat[MAT_SIZE]; i++) - data[i] = nval; + if (nval == 0) { + memset((void *)data,0,sizeof(long int)*mat[MAT_SIZE]); + } else { + for (i = 0; i< mat[MAT_SIZE]; i++) + data[i] = nval; + } } static void |
|
From: Vitor S. C. <vs...@us...> - 2008-06-11 16:57:27
|
Update of /cvsroot/yap/library In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv30245/library Modified Files: rbtrees.yap Log Message: fix insert_new in rbtrees Index: rbtrees.yap =================================================================== RCS file: /cvsroot/yap/library/rbtrees.yap,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- rbtrees.yap 11 Jun 2008 11:08:25 -0000 1.15 +++ rbtrees.yap 11 Jun 2008 16:57:31 -0000 1.16 @@ -403,6 +403,10 @@ % Add a new element with key Key and Value to the tree T0 creating a % new red-black tree TN. Duplicated elements are not allowed. +rb_insert_new(t(Nil,Tree0),Key,Val,t(Nil,Tree)) :- + insert_new(Tree0,Key,Val,Nil,Tree). + + insert_new(Tree0,Key,Val,Nil,Tree) :- insert_new_2(Tree0,Key,Val,Nil,TreeI,_), fix_root(TreeI,Tree). @@ -422,7 +426,7 @@ fail ; NT = red(L,K0,V0,NR), - insert2(R, K, V, Nil, NR, Flag) + insert_new_2(R, K, V, Nil, NR, Flag) ). insert_new_2(black(L,K0,V0,R), K, V, Nil, NT, Flag) :- ( K @< K0 |