<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-448</id>
	<title>Nabble - SWI Prolog</title>
	<updated>2008-10-11T11:25:17Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/SWI-Prolog-f448.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SWI-Prolog-f448.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-19935887</id>
	<title>Re: SW-Prolog Version 5.6.58 and Debian (lenny)</title>
	<published>2008-10-11T11:25:17Z</published>
	<updated>2008-10-11T11:25:17Z</updated>
	<author>
		<name>Chris Lamb-8</name>
	</author>
	<content type="html">Hi Valerio,
&lt;br&gt;&lt;br&gt;&amp;nbsp;(I'm the maintainer of swi-prolog in Debian.)
&lt;br&gt;&lt;br&gt;&amp;gt; The file test.pl contains the clause &amp;quot;:- use_module(library(clpq)).&amp;quot;
&lt;br&gt;&amp;gt; Is this expected ? :)
&lt;br&gt;&lt;br&gt;This is expected.
&lt;br&gt;&lt;br&gt;Debian's packaging of SWI Prolog is modular - the minimal working SWI
&lt;br&gt;functionality (essentially the &amp;quot;install-lite&amp;quot; target) is contained in the
&lt;br&gt;&amp;quot;swi-prolog&amp;quot; package, and the various other SWI packages such as odbc, clib,
&lt;br&gt;etc. are in seperate &amp;quot;swi-prolog-odbc&amp;quot; &amp;quot;swi-prolog-clib&amp;quot;, etc. packages.
&lt;br&gt;&lt;br&gt;These other packages were added when requested. However, as nobody requested
&lt;br&gt;the clpqr package yet, it does not yet exist. I suggest you file a wishlist
&lt;br&gt;bug against the Debian swi-prolog package. Please see:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.debian.org/Bugs/Reporting&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.debian.org/Bugs/Reporting&lt;/a&gt;&lt;br&gt;&lt;br&gt;for more details. Please also note the advice on that page regarding sending
&lt;br&gt;bugs upstream.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ,''`.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;: :' &amp;nbsp;: &amp;nbsp; &amp;nbsp; Chris Lamb
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;`. `'` &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19935887&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;lamby@...&lt;/a&gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`-
&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (204 bytes) &lt;a href=&quot;http://www.nabble.com/attachment/19935887/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SW-Prolog-Version-5.6.58-and-Debian-%28lenny%29-tp19915409p19935887.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19924214</id>
	<title>Re: tail recursion?</title>
	<published>2008-10-10T12:02:34Z</published>
	<updated>2008-10-10T12:02:34Z</updated>
	<author>
		<name>Bart Demoen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; % length of a list as a unary integer
&lt;br&gt;&amp;gt; len([],0).
&lt;br&gt;&amp;gt; len([H|T],s(N)):- len(T,N).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; % length of a list as an accumulated unary integer
&lt;br&gt;&amp;gt; len([],N,N).
&lt;br&gt;&amp;gt; len([H|T],A,N):- len(T,s(A),N).
&lt;br&gt;&lt;br&gt;Both programs are tail-recursive, and both are subject to
&lt;br&gt;tail-recursion optimization (or last-call optimiziation). Moreover,
&lt;br&gt;they use the same amount of heap. The second could be (a small
&lt;br&gt;constant factor) more efficient, because the s(A) term is in a
&lt;br&gt;&amp;quot;construct&amp;quot; position, while the s(N) term in the first version is in a
&lt;br&gt;position that could a priori be constructing or unifying, so it needs
&lt;br&gt;a test to decide on that. It might be impossible to measure the
&lt;br&gt;constant, and it might go either way depending on the Prolog system,
&lt;br&gt;for other reasons.
&lt;br&gt;&lt;br&gt;&amp;gt; is it correct to say the the second program is more efficient
&lt;br&gt;&amp;gt; since it &amp;quot;doesn't use a stack&amp;quot;?
&lt;br&gt;&lt;br&gt;Neither uses stack - it should be easy to check that with statistics.
&lt;br&gt;&lt;br&gt;&amp;gt; the second program builds the stack in its accumulator argument, and
&lt;br&gt;&amp;gt; that this is less costly than using the call stack for this purpose
&lt;br&gt;&lt;br&gt;That is true, but that's not a difference between the two versions of len.
&lt;br&gt;&lt;br&gt;&amp;gt; the benefits of tail recursion are greater in the case of normal,
&lt;br&gt;&amp;gt; decimal representation of integers, where you really don't need a
&lt;br&gt;&amp;gt; stack thanks to the efficiency of decimal representation.
&lt;br&gt;&lt;br&gt;Maybe you want to compare rather the following two versions:
&lt;br&gt;&lt;br&gt;len([],0).
&lt;br&gt;len([_|T],L) :- len(T,L1), L is L1 + 1.
&lt;br&gt;&lt;br&gt;and
&lt;br&gt;&lt;br&gt;len([],N,N).
&lt;br&gt;len([_|T],A,N) :- A1 is A + 1, len(T,A1,N).
&lt;br&gt;&lt;br&gt;In this case, the first consumes stack, while the latter does not.
&lt;br&gt;Neither consumes heap.
&lt;br&gt;&lt;br&gt;Think a bit about this, experiment (use statistics) and if you have
&lt;br&gt;further questions, please ask: we're here to help !
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Bart Demoen
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19924214&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/tail-recursion--tp19923147p19924214.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19923147</id>
	<title>tail recursion?</title>
	<published>2008-10-10T10:58:50Z</published>
	<updated>2008-10-10T10:58:50Z</updated>
	<author>
		<name>Marc.Bezem</name>
	</author>
	<content type="html">Dear All,
&lt;br&gt;&lt;br&gt;is the following program tail recursive:
&lt;br&gt;&lt;br&gt;% length of a list as a unary integer
&lt;br&gt;len([],0).
&lt;br&gt;len([H|T],s(N)):- len(T,N).
&lt;br&gt;&lt;br&gt;The reason that I hesitate is the term s(N) in the head.
&lt;br&gt;Is the call stack replaced by a linked list of s-records?
&lt;br&gt;&lt;br&gt;The following program should be tail recursive:
&lt;br&gt;&lt;br&gt;% length of a list as an accumulated unary integer
&lt;br&gt;len([],N,N).
&lt;br&gt;len([H|T],A,N):- len(T,s(A),N).
&lt;br&gt;&lt;br&gt;When explaining the difference between the two programs,
&lt;br&gt;is it correct to say the the second program is more efficient
&lt;br&gt;since it &amp;quot;doesn't use a stack&amp;quot;? Isn't it more correct to say
&lt;br&gt;that the second program builds the stack in its accumulator
&lt;br&gt;argument, and that this is less costly than using the call stack
&lt;br&gt;for this purpose? Of course, the benefits of tail recursion are
&lt;br&gt;greater in the case of normal, decimal representation of integers,
&lt;br&gt;where you really don't need a stack thanks to the efficiency
&lt;br&gt;of decimal representation. But actually &amp;quot;stacks encoded in
&lt;br&gt;accumulator arguments&amp;quot; are frequently encountered, for example,
&lt;br&gt;when reversing a list.
&lt;br&gt;&lt;br&gt;Any remark or comment is highly appreciated,
&lt;br&gt;&lt;br&gt;Marc Bezem.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19923147&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/tail-recursion--tp19923147p19923147.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19920781</id>
	<title>SPARQL licensing</title>
	<published>2008-10-10T08:22:52Z</published>
	<updated>2008-10-10T08:22:52Z</updated>
	<author>
		<name>Jacques Bergeron-2</name>
	</author>
	<content type="html">Hi all,&lt;br&gt;Sorry for this stupid question but I'm confused and need help!&lt;br&gt;&lt;br&gt;I want to use SWI-Prolog for a commercial client and that's what I undestand:&lt;br&gt;- no licensing problem because the interpreter is LPGL and the base libraries have an 'exception' to the GPL that allows for commercial use (if not modified)&lt;br&gt;- the semweb and rdf libraries carry the 'exception' (by the way it seems like pretty nice stuff)&lt;br&gt;- the SPARQL development was switched to the&amp;nbsp;ClioPatria project that is GPL (problem ahead!) and not officially published.&lt;br&gt;&lt;br&gt;If I get it right, do you know of a SPARQL library that would go on top of the rdf/semweb libraries and carry a licence compatible with the rest of SWI-Prolog.&lt;br&gt;&lt;br&gt;Best regards&lt;br&gt;Jacques&lt;br&gt;&lt;br&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SPARQL-licensing-tp19920781p19920781.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19915409</id>
	<title>SW-Prolog Version 5.6.58 and Debian (lenny)</title>
	<published>2008-10-10T02:59:59Z</published>
	<updated>2008-10-10T02:59:59Z</updated>
	<author>
		<name>Valerio Senni</name>
	</author>
	<content type="html">&lt;div dir=&quot;ltr&quot;&gt;&lt;div&gt;Hello to everyone,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;I have made a fresh new (apt-get) install of SWI Prolog&lt;div&gt;under Debian (lenny).&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; &quot;&gt;Version &lt;a href=&quot;http://5.6.58.&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;5.6.58.&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;And I get the following error:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;br&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;$ swipl&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;
Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.58)
Copyright (c) 1990-2008 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit &lt;a href=&quot;http://www.swi-prolog.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.swi-prolog.org&lt;/a&gt; for details.

For help, use ?- help(Topic). or ?- apropos(Word).

?- use_module(library(clpq)).
ERROR: source_sink `library(clpq)&amp;#39; does not exist
?- [test].&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;ERROR: /home/valerio/test.pl:1:
        source_sink `library(clpq)&amp;#39; does not exist
Warning: /home/valerio/test.pl:1:
        Goal (directive) failed: user:use_module(library(clpq))
% test compiled 0.01 sec, 1,584 bytes
true.&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;?-&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;br&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;The file test.pl contains the clause &amp;quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; font-family: -webkit-monospace; font-size: 16px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; &quot;&gt;:- use_module(library(clpq)).&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;Is this expected ? :)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;Can anyone help me?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;br&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;Thank you&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;Valerio&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;&quot;&gt;&lt;br&gt;
&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SW-Prolog-Version-5.6.58-and-Debian-%28lenny%29-tp19915409p19915409.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19897820</id>
	<title>XPCE questions for the list</title>
	<published>2008-10-09T05:21:03Z</published>
	<updated>2008-10-09T05:21:03Z</updated>
	<author>
		<name>jeffrose</name>
	</author>
	<content type="html">&lt;HTML&gt;&lt;FONT FACE=arial,helvetica&gt;&lt;HTML&gt;&lt;FONT SIZE=2 PTSIZE=10 FAMILY=&quot;SANSSERIF&quot; FACE=&quot;Arial&quot; LANG=&quot;0&quot;&gt;I have two questions for the list:&lt;BR&gt;
&lt;BR&gt;
1) I have created a refinement of bitmap class that has a popup recogniser associated with it. A side effect of the popup behavior is that the image on the bitmap is changed to reflect the popup selection. This works fine as long as I use it by itself in a dialog. But if I use it as a member of a menu (choice), then the images do not render properly. Any ideas? A test jig is attached.&lt;BR&gt;
&lt;BR&gt;
2) The second question has to do with XPCE and it associated tool set (PCEDraw, dialog editor, etc.) --What is to become of it? It does not appear to be maintained very well. Both the Linux and Windows variants are pretty buggy these days and have been for some time. XPCE seems to work well enough (except as noted) as long as you hand-write your dialogs. But that's not the way these sorts of things are done these days. I spoke briefly with Jan about it. He believes that it needs a major &quot;facelift&quot;, but has no resources to do it, and that it will be maintained at a &quot;basic level&quot; for the foreseeable future.&lt;BR&gt;
&lt;BR&gt;
Regards,&lt;BR&gt;
Jeff R.&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;**************&lt;BR&gt;New MapQuest Local shows what's happening at your destination.  Dining, Movies, Events, News &amp;amp; more. Try it out!&lt;BR&gt;      (http://local.mapquest.com/?ncid=emlcntnew00000001)&lt;/HTML&gt;
&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;fancyMenu.zip&lt;/strong&gt; (3K) &lt;a href=&quot;http://www.nabble.com/attachment/19897820/0/fancyMenu.zip&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/XPCE-questions-for-the-list-tp19897820p19897820.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19899000</id>
	<title>Special Journal Issue IEEE TKDE: Call for Contributions</title>
	<published>2008-10-09T05:04:39Z</published>
	<updated>2008-10-09T05:04:39Z</updated>
	<author>
		<name>paschke</name>
	</author>
	<content type="html">Dear Colleagues,
&lt;br&gt;&lt;br&gt;Please consider to participate in RuleML-2008
&lt;br&gt;(&lt;a href=&quot;http://2008.ruleml.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://2008.ruleml.org/&lt;/a&gt;) which will be in about 3 weeks in Orlando,
&lt;br&gt;Florida, collocated with the world largest Business Rules Forum.
&lt;br&gt;&lt;br&gt;We have a very interesting program with renowned speakers, a
&lt;br&gt;prestigious rules Challenge, a special session + panel about Rule
&lt;br&gt;standards, etc.
&lt;br&gt;&lt;br&gt;We are also editing a special issue of IEEE TKDE. Please consider to
&lt;br&gt;contribute to this issue and forward the open call for contributions
&lt;br&gt;(below) to your interested colleagues.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;&lt;br&gt;Adrian
&lt;br&gt;&lt;br&gt;&lt;br&gt;[ our apologies should you receive this message more than one time ]
&lt;br&gt;&lt;br&gt;===========================================================================
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CALL FOR Contributions
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Rule Representation, Interchange and Reasoning in Distributed,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Heterogeneous Environments
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Special Issue of IEEE Transactions on Knowledge and Data Engineering
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Guest Editors: N. Bassiliades, G. Governatori, A. Paschke, J.
&lt;br&gt;Dix
&lt;br&gt;===========================================================================
&lt;br&gt;&lt;br&gt;In recent years rule based technologies have enjoyed remarkable
&lt;br&gt;adoption in two areas: (1) Business Rule Processing and (2)
&lt;br&gt;Web-Centered Reasoning. The first trend is caused by the software
&lt;br&gt;development life cycle, which needs to be accelerated at reduced cost.
&lt;br&gt;The second trend is related to the Semantic Web and Service-oriented
&lt;br&gt;technologies, which aim to turn the Web into a huge repository of
&lt;br&gt;cross-referenced, machine-understandable data and processes. For both
&lt;br&gt;trends, rules can be used to extract, derive, transform, and integrate
&lt;br&gt;information in a platform-independent manner.
&lt;br&gt;While early rule engines and environments were complex, expensive to
&lt;br&gt;maintain, and not very user friendly, the current generation of rule
&lt;br&gt;technology provides enhanced usability, scalability and performance,
&lt;br&gt;and is less costly. A general advantage of using rules is that they
&lt;br&gt;are usually represented in a platform independent manner, often using
&lt;br&gt;XML. This fits well into today's distributed, heterogeneous Web-based
&lt;br&gt;system environments.
&lt;br&gt;Rules represented in standardized Web formats can be discovered,
&lt;br&gt;interchanged and invoked at runtime within and across Web systems, and
&lt;br&gt;can be interpreted and executed on any platform.
&lt;br&gt;&lt;br&gt;This special issue solicits state-of-the-art approaches, solutions and
&lt;br&gt;applications in the area of Rule Representation, Reasoning and
&lt;br&gt;Interchange in the context of distributed, (partially) open,
&lt;br&gt;heterogeneous environments, such as the Semantic Web, Intelligent
&lt;br&gt;Multi-Agent Systems, Event-Driven Architectures and Service-Oriented
&lt;br&gt;Computing. We strongly advise that solicited contributions should
&lt;br&gt;clearly identify the target class of applications they enable.
&lt;br&gt;&lt;br&gt;&lt;br&gt;=======
&lt;br&gt;Topics
&lt;br&gt;=======
&lt;br&gt;&lt;br&gt;Original contributions, not currently under review or accepted by
&lt;br&gt;another journal, are solicited in relevant areas including (but not
&lt;br&gt;limited to) the
&lt;br&gt;following:
&lt;br&gt;&lt;br&gt;- Rule Representation and Languages
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule languages for exchanging and processing information through the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;web
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Representation and meta-annotation of rules and rule sets for
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;publication and interchange
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Event-driven/action rule languages and models
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based event processing languages and rule-based complex event
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;processing
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Modeling of executable rule specifications and tool support
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Natural-language processing of rules
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Graphical processing, modeling and rendering of rules
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rules in web 2.0, web 3.0, semantic web technologies and web
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;intelligence research
&lt;br&gt;&lt;br&gt;&lt;br&gt;- Reasoning and Rule Engines
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Execution models, rule engines, and environments
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based (multi-valued) reasoning with and representing uncertain
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;and fuzzy information
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based reasoning with non-monotonic negation, modalities, deontic,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;temporal, priority, scoped or other rule qualifications
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based default reasoning with default logic, defeasible logic, and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;answer set programming
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Compilation vs. interpretation approaches of rules
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Hybrid rule systems
&lt;br&gt;&lt;br&gt;&lt;br&gt;- Rule Interchange and Integration
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Interchange and refactoring of rule bases in heterogeneous execution
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;environments
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based agility and its role in middleware
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Communication between rule based systems using interchange formats and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;processing / communication middleware
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Information integration of external data and domain knowledge into rules
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Homogeneous and heterogeneous integration of rules and ontologies
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Extraction and reengineering of platform-independent, interchangeable
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rules and rule models from existing platform-specific resources
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule interchange standards and related industry interchange formats
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Incorporation of rule technology into distributed enterprise
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;application architectures
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Interoperation between different rule formats and ontological domain
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;conceptualization
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Translation of interchangeable and domain-independent rule formats and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rule models into executable technical rule specifications
&lt;br&gt;&lt;br&gt;&lt;br&gt;- Rule Engineering and Repositories
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Verification and validation of interchanged rule bases in
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;heterogeneous execution environments
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Practical solutions tackling the real-world software engineering
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;requirements of rule-based systems in open, distributed environments
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Collaborative authoring, modeling and engineering of rule
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;specifications and rule repositories
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Management and maintenance of distributed rule bases and rule
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;repositories during their lifecycle
&lt;br&gt;&lt;br&gt;&lt;br&gt;- Web Rule Applications
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Applications and integration of rules in web standards
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Applications of rules in the semantic web and pragmatic web
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Applications based on (semantic) web rule standardization or
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;standards-proposing efforts
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Applications of rules in e.g. legal reasoning, compliance rules,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;security, government, security, risk management, trust and proof
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;reasoning, etc.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* E-contracting and automated negotiations with rule-based declarative
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strategies
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Specification, execution and management of rule-based policies and
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;electronic contracts
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Rule-based software agents and (web) services
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;* Theoretical and/or empirical evaluation of rule-based system
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;performance and scalability
&lt;br&gt;&lt;br&gt;&lt;br&gt;=======================
&lt;br&gt;Submission Guidelines
&lt;br&gt;=======================
&lt;br&gt;&lt;br&gt;Prospective authors should prepare manuscripts according to the Information
&lt;br&gt;for Authors as published in recent issues of the journal or at
&lt;br&gt;&lt;a href=&quot;http://www.computer.org/tkde/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.computer.org/tkde/&lt;/a&gt;. Note that mandatory over-length page charges
&lt;br&gt;and color charges will apply.
&lt;br&gt;Manuscripts should be submitted through the online IEEE manuscript
&lt;br&gt;submission system at &lt;a href=&quot;https://mc.manuscriptcentral.com/cs-ieee&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mc.manuscriptcentral.com/cs-ieee&lt;/a&gt;.
&lt;br&gt;Updated information of this call can be found at
&lt;br&gt;&lt;a href=&quot;http://lpis.csd.auth.gr/publications/tkde-si/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lpis.csd.auth.gr/publications/tkde-si/&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;=======================
&lt;br&gt;Schedule
&lt;br&gt;=======================
&lt;br&gt;&lt;br&gt;Deadline for paper submission: &amp;nbsp; &amp;nbsp; March 1, 2009
&lt;br&gt;Completion of first review: &amp;nbsp; &amp;nbsp;June 19, 2009
&lt;br&gt;Minor/Major revision due: &amp;nbsp; &amp;nbsp;August 21, 2009
&lt;br&gt;Final decision notification: &amp;nbsp; &amp;nbsp; November 6, 2009
&lt;br&gt;Publication materials due: &amp;nbsp; &amp;nbsp; December 4, 2009
&lt;br&gt;Publication date (tentative): &amp;nbsp; &amp;nbsp; July 2010
&lt;br&gt;&lt;br&gt;&lt;br&gt;=======================
&lt;br&gt;Guest Editors
&lt;br&gt;=======================
&lt;br&gt;&lt;br&gt;Nick Bassiliades, Aristotle University of Thessaloniki, Greece
&lt;br&gt;nbassili AT csd.auth.gr
&lt;br&gt;&lt;br&gt;Guido Governatori, NICTA, Australia
&lt;br&gt;guido.governatori AT nicta.com.au
&lt;br&gt;&lt;br&gt;Adrian Paschke, Free University Berlin, Corporate Semantic Web, Germany
&lt;br&gt;paschke AT inf.fu-berlin.de
&lt;br&gt;&lt;br&gt;Jurgen Dix, Clausthal University of Technology, Germany
&lt;br&gt;dix AT tu-clausthal.de
&lt;br&gt;&lt;br&gt;----------------------------------------------------------------
&lt;br&gt;This message was sent using IMP, the Internet Messaging Program.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19899000&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Special-Journal-Issue-IEEE-TKDE%3A-Call-for-Contributions-tp19899000p19899000.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19896186</id>
	<title>Re: Tail call optimisation</title>
	<published>2008-10-09T03:23:14Z</published>
	<updated>2008-10-09T03:23:14Z</updated>
	<author>
		<name>Nicolas Pelletier-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;On Wed, Oct 8, 2008 at 12:23 AM, Jan Wielemaker &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19896186&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;J.Wielemaker@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tuesday 07 October 2008 03:27:19 pm Nicolas Pelletier wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I am using SWI 5.6.61 on Linux and am wondering, out of curiosity, how
&lt;br&gt;&amp;gt;&amp;gt; I can verify that the compilation of a predicate leads to a tail call
&lt;br&gt;&amp;gt;&amp;gt; optimized blurb of code. Is there already such a thing in SWI ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Runtime, yes. You can use the graphical debugger to inspect
&lt;br&gt;&amp;gt; choicepoints. If there is no choicepoint since the entrance of the
&lt;br&gt;&amp;gt; current predicate at the moment you are about to make the last call, it
&lt;br&gt;&amp;gt; will do last call optimization. Note that in the current implementation
&lt;br&gt;&amp;gt; LCO (as it is abbreviated) saves space, but no time (it is even a bit
&lt;br&gt;&amp;gt; slower). &amp;nbsp;This will be improved in 5.7.x.
&lt;/div&gt;&lt;br&gt;Ok, thank you for pointing this out. I did not know the graphical
&lt;br&gt;debugger could show this.
&lt;br&gt;&lt;br&gt;&amp;gt; The other way out is to run the goal with lots of data and a small local
&lt;br&gt;&amp;gt; stack. &amp;nbsp;If it runs out of local stack, LCO didn't do its job :-)
&lt;br&gt;&lt;br&gt;Of course, yes :-) I was just looking for another way to do this...
&lt;br&gt;&lt;br&gt;&amp;gt; More tricks: ask prolog_current_frame(X). &amp;nbsp;on an LCO loop this should
&lt;br&gt;&amp;gt; remain the same frame.
&lt;br&gt;&lt;br&gt;Aha, that is nice to know !
&lt;br&gt;&lt;br&gt;&amp;gt; Note that LCO is never activated in debug mode!
&lt;br&gt;&lt;br&gt;Yes, of course.
&lt;br&gt;&lt;br&gt;Thank you for these tips.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Nicolas
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19896186&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tail-call-optimisation-tp19858276p19896186.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19893204</id>
	<title>Is there a way to make SWI-Prolog Valgrind-clean?</title>
	<published>2008-10-08T23:34:28Z</published>
	<updated>2008-10-08T23:34:28Z</updated>
	<author>
		<name>Roberto Bagnara</name>
	</author>
	<content type="html">&lt;br&gt;Here is what I observe (note that I simply typed Control-D at the prompt):
&lt;br&gt;&lt;br&gt;$ export VALGRIND=yes
&lt;br&gt;$ valgrind --tool=memcheck -q --trace-children=yes --leak-check=yes --num-callers=100 --leak-resolution=high --suppressions=/home/roberto/ppl/ppl/tests/valgrind_suppressions /usr/local/bin/pl
&lt;br&gt;Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.61)
&lt;br&gt;Copyright (c) 1990-2008 University of Amsterdam.
&lt;br&gt;SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
&lt;br&gt;and you are welcome to redistribute it under certain conditions.
&lt;br&gt;Please visit &lt;a href=&quot;http://www.swi-prolog.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.swi-prolog.org&lt;/a&gt;&amp;nbsp;for details.
&lt;br&gt;&lt;br&gt;For help, use ?- help(Topic). or ?- apropos(Word).
&lt;br&gt;&lt;br&gt;?-
&lt;br&gt;% halt
&lt;br&gt;==6515==
&lt;br&gt;==6515== 24 bytes in 1 blocks are definitely lost in loss record 16 of 61
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;at 0x40054E5: malloc (vg_replace_malloc.c:149)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x806904F: SinitStreams (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80E6B69: PL_initialise (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8050D91: main (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515==
&lt;br&gt;==6515==
&lt;br&gt;==6515== 24 bytes in 1 blocks are definitely lost in loss record 17 of 61
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;at 0x40054E5: malloc (vg_replace_malloc.c:149)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x806901D: SinitStreams (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80E6B69: PL_initialise (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8050D91: main (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515==
&lt;br&gt;==6515==
&lt;br&gt;==6515== 24 bytes in 1 blocks are definitely lost in loss record 18 of 61
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;at 0x40054E5: malloc (vg_replace_malloc.c:149)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8068FE3: SinitStreams (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80E6B69: PL_initialise (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8050D91: main (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515==
&lt;br&gt;==6515==
&lt;br&gt;==6515== 1,024 bytes in 1 blocks are definitely lost in loss record 49 of 61
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;at 0x40054E5: malloc (vg_replace_malloc.c:149)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x805546F: PL_malloc (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8057A4B: codeToAtom (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80B8DD2: simple_term (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80B71AA: complex_term (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80BB6A7: read_term (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80BC8AF: read_clause (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80BCAEA: pl_read_clause_va (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8064063: PL_next_solution (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80AA604: callProlog (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80DA15B: pl_with_mutex (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x805A9F1: callForeign (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8061D6C: PL_next_solution (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80AA233: prologToplevel (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80E705F: PL_initialise (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8050D91: main (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515==
&lt;br&gt;==6515==
&lt;br&gt;==6515== 2,596 (44 direct, 2,552 indirect) bytes in 1 blocks are definitely lost in loss record 54 of 61
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;at 0x40054E5: malloc (vg_replace_malloc.c:149)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x805546F: PL_malloc (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80D8546: allocSimpleMutex (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8098B66: _lookupModule (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80991A8: lookupModule (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8055736: PL_predicate (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x80E5702: PL_cleanup (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8054A41: PL_halt (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;==6515== &amp;nbsp; &amp;nbsp;by 0x8050DB6: main (in /usr/local/lib/pl-5.6.61/bin/i686-linux/pl)
&lt;br&gt;$
&lt;br&gt;&lt;br&gt;Is there a way to configure/compile/execute SWI-Prolog so that it deallocates all
&lt;br&gt;memory before exiting?
&lt;br&gt;All the best,
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Roberto
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Prof. Roberto Bagnara
&lt;br&gt;Computer Science Group
&lt;br&gt;Department of Mathematics, University of Parma, Italy
&lt;br&gt;&lt;a href=&quot;http://www.cs.unipr.it/~bagnara/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.unipr.it/~bagnara/&lt;/a&gt;&lt;br&gt;mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19893204&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;bagnara@...&lt;/a&gt;
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19893204&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Is-there-a-way-to-make-SWI-Prolog-Valgrind-clean--tp19893204p19893204.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19884004</id>
	<title>Re: SWI-Prolog web interface</title>
	<published>2008-10-08T10:54:24Z</published>
	<updated>2008-10-08T10:54:24Z</updated>
	<author>
		<name>BelenT</name>
	</author>
	<content type="html">Thank you very much.
&lt;br&gt;&lt;br&gt;Please, can you tell me how the prolog rule would look like in that case?
&lt;br&gt;&lt;br&gt;rule_open_www:- &amp;nbsp;?
&lt;br&gt;&lt;br&gt;Belen 
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Michiel Hildebrand wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;On 8 okt 2008, at 18:45, BelenT wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am developing a web interface using SWI-Prolog, I need a link to &amp;nbsp;
&lt;br&gt;&amp;gt; open in a
&lt;br&gt;&amp;gt; new window (in html it would be target=&amp;quot;_blank&amp;quot;).
&lt;br&gt;&lt;br&gt;I don't know exactly what you mean, but I assume you use the &amp;nbsp;
&lt;br&gt;html_write module.
&lt;br&gt;In that case you can do:
&lt;br&gt;&lt;br&gt;a([href('&lt;a href=&quot;http://example.com'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://example.com'&lt;/a&gt;), target('_blank')], 'example link')
&lt;br&gt;&lt;br&gt;Michiel
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;SWI-Prolog@iai.uni-bonn.de
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SWI-Prolog-web-interface-tp19882798p19884004.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19883705</id>
	<title>Re: SWI-Prolog web interface</title>
	<published>2008-10-08T10:32:50Z</published>
	<updated>2008-10-08T10:32:50Z</updated>
	<author>
		<name>Michiel Hildebrand</name>
	</author>
	<content type="html">&lt;br&gt;On 8 okt 2008, at 18:45, BelenT wrote:
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am developing a web interface using SWI-Prolog, I need a link to &amp;nbsp;
&lt;br&gt;&amp;gt; open in a
&lt;br&gt;&amp;gt; new window (in html it would be target=&amp;quot;_blank&amp;quot;).
&lt;br&gt;&lt;br&gt;I don't know exactly what you mean, but I assume you use the &amp;nbsp;
&lt;br&gt;html_write module.
&lt;br&gt;In that case you can do:
&lt;br&gt;&lt;br&gt;a([href('&lt;a href=&quot;http://example.com'&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://example.com'&lt;/a&gt;), target('_blank')], 'example link')
&lt;br&gt;&lt;br&gt;Michiel
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19883705&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SWI-Prolog-web-interface-tp19882798p19883705.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19882798</id>
	<title>SWI-Prolog web interface</title>
	<published>2008-10-08T09:45:03Z</published>
	<updated>2008-10-08T09:45:03Z</updated>
	<author>
		<name>BelenT</name>
	</author>
	<content type="html">I am developing a web interface using SWI-Prolog, I need a link to open in a new window (in html it would be target=&amp;quot;_blank&amp;quot;). I have read the documentation several times, but I am unable to find out how to do this.
&lt;br&gt;Any help will be appreciated.
&lt;br&gt;Thanks in advance,
&lt;br&gt;&lt;br&gt;Belen T.</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/SWI-Prolog-web-interface-tp19882798p19882798.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19880872</id>
	<title>Re: Compile JPL on Mac</title>
	<published>2008-10-08T07:50:33Z</published>
	<updated>2008-10-08T07:50:33Z</updated>
	<author>
		<name>Michael Igler-2</name>
	</author>
	<content type="html">Hold on, a
&lt;br&gt;&lt;br&gt;./configure --prefix=/usr/local --with-world
&lt;br&gt;&lt;br&gt;did it for me and compiled everything including JPL.
&lt;br&gt;So no need to do it separately.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Mit freundlichen Grüßen / Best Regards
&lt;br&gt;&lt;br&gt;Michael Igler
&lt;br&gt;Dipl. Inform. (Univ.)
&lt;br&gt;&lt;br&gt;Universität Bayreuth
&lt;br&gt;Fakultät für Mathematik, Physik und Informatik
&lt;br&gt;Lehrstuhl für Angewandte Informatik IV
&lt;br&gt;&lt;br&gt;AI 0.25
&lt;br&gt;D-95440 Bayreuth
&lt;br&gt;&lt;br&gt;Fon : +49 921 - 55 7625
&lt;br&gt;Fax : +49 921 - 55 7622
&lt;br&gt;Email : &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19880872&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.igler@...&lt;/a&gt;
&lt;br&gt;Internet : &lt;a href=&quot;http://www.ai4.uni-bayreuth.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ai4.uni-bayreuth.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Am 08.10.2008 um 15:58 schrieb Michael Igler:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I want to compile JPL on my Mac having the following problem:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; plld -embed-shared -o libjpl.dylib src/c/jpl.o -Wl,-framework,JavaVM
&lt;br&gt;&amp;gt; ld: in /opt/local/lib/libxml2.2.dylib, file is not of required &amp;nbsp;
&lt;br&gt;&amp;gt; architecture
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The libxml has no PPC code inside (checked it with nm -arch...) and &amp;nbsp;
&lt;br&gt;&amp;gt; plld wants to build for both, INTEL and PPC.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So I want alter the Makefile to force plld with &amp;nbsp;-ld-options* to use &amp;nbsp;
&lt;br&gt;&amp;gt; only something like -arch i386?
&lt;br&gt;&amp;gt; Has anyone a workaround?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Mit freundlichen Grüßen / Best Regards
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Michael Igler
&lt;br&gt;&amp;gt; Dipl. Inform. (Univ.)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Universität Bayreuth
&lt;br&gt;&amp;gt; Fakultät für Mathematik, Physik und Informatik
&lt;br&gt;&amp;gt; Lehrstuhl für Angewandte Informatik IV
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; AI 0.25
&lt;br&gt;&amp;gt; D-95440 Bayreuth
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Fon : +49 921 - 55 7625
&lt;br&gt;&amp;gt; Fax : +49 921 - 55 7622
&lt;br&gt;&amp;gt; Email : &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19880872&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.igler@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Internet : &lt;a href=&quot;http://www.ai4.uni-bayreuth.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ai4.uni-bayreuth.de&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://www.nabble.com/attachment/19880872/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Compile-JPL-on-Mac-tp19880266p19880872.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19880483</id>
	<title>Re: Compile JPL on Mac</title>
	<published>2008-10-08T07:50:08Z</published>
	<updated>2008-10-08T07:50:08Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">Michael,
&lt;br&gt;&lt;br&gt;On Wednesday 08 October 2008 03:58:40 pm Michael Igler wrote:
&lt;br&gt;&amp;gt; I want to compile JPL on my Mac having the following problem:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; plld -embed-shared -o libjpl.dylib src/c/jpl.o -Wl,-framework,JavaVM
&lt;br&gt;&amp;gt; ld: in /opt/local/lib/libxml2.2.dylib, file is not of required
&lt;br&gt;&amp;gt; architecture
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The libxml has no PPC code inside (checked it with nm -arch...) and
&lt;br&gt;&amp;gt; plld wants to build for both, INTEL and PPC.
&lt;br&gt;&lt;br&gt;plld wants to build for whatever architecture Prolog was build. I know
&lt;br&gt;this type of problems only from people using an intel mac that installed
&lt;br&gt;the ppc binaries and want to compile some extra for it.
&lt;br&gt;&lt;br&gt;On the other hand, JPL is already in all binary distributions ...
&lt;br&gt;&lt;br&gt;&amp;gt; So I want alter the Makefile to force plld with &amp;nbsp;-ld-options* to use
&lt;br&gt;&amp;gt; only something like -arch i386?
&lt;br&gt;&lt;br&gt;Unlikely to work
&lt;br&gt;&lt;br&gt;&amp;gt; Has anyone a workaround?
&lt;br&gt;&lt;br&gt;Get the full source and follow README.MacOSX?
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19880483&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Compile-JPL-on-Mac-tp19880266p19880483.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19880266</id>
	<title>Compile JPL on Mac</title>
	<published>2008-10-08T06:58:40Z</published>
	<updated>2008-10-08T06:58:40Z</updated>
	<author>
		<name>Michael Igler-2</name>
	</author>
	<content type="html">I want to compile JPL on my Mac having the following problem:
&lt;br&gt;&lt;br&gt;plld -embed-shared -o libjpl.dylib src/c/jpl.o -Wl,-framework,JavaVM
&lt;br&gt;ld: in /opt/local/lib/libxml2.2.dylib, file is not of required &amp;nbsp;
&lt;br&gt;architecture
&lt;br&gt;&lt;br&gt;The libxml has no PPC code inside (checked it with nm -arch...) and &amp;nbsp;
&lt;br&gt;plld wants to build for both, INTEL and PPC.
&lt;br&gt;&lt;br&gt;So I want alter the Makefile to force plld with &amp;nbsp;-ld-options* to use &amp;nbsp;
&lt;br&gt;only something like -arch i386?
&lt;br&gt;Has anyone a workaround?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Mit freundlichen Grüßen / Best Regards
&lt;br&gt;&lt;br&gt;Michael Igler
&lt;br&gt;Dipl. Inform. (Univ.)
&lt;br&gt;&lt;br&gt;Universität Bayreuth
&lt;br&gt;Fakultät für Mathematik, Physik und Informatik
&lt;br&gt;Lehrstuhl für Angewandte Informatik IV
&lt;br&gt;&lt;br&gt;AI 0.25
&lt;br&gt;D-95440 Bayreuth
&lt;br&gt;&lt;br&gt;Fon : +49 921 - 55 7625
&lt;br&gt;Fax : +49 921 - 55 7622
&lt;br&gt;Email : &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19880266&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;michael.igler@...&lt;/a&gt;
&lt;br&gt;Internet : &lt;a href=&quot;http://www.ai4.uni-bayreuth.de&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.ai4.uni-bayreuth.de&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://www.nabble.com/attachment/19880266/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Compile-JPL-on-Mac-tp19880266p19880266.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19862940</id>
	<title>Re: Tail call optimisation</title>
	<published>2008-10-07T10:11:11Z</published>
	<updated>2008-10-07T10:11:11Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">Pablo,
&lt;br&gt;&lt;br&gt;On Tuesday 07 October 2008 17:47:02 Pablo López wrote:
&lt;br&gt;&amp;gt; I wonder whether inserting a call to deterministic/1 just
&lt;br&gt;&amp;gt; before the last call can make the trick as well.
&lt;br&gt;&amp;gt; What do you think?
&lt;br&gt;&lt;br&gt;No. deterministic/1 finds choicepoints since *entering* the clause. I.e.
&lt;br&gt;it misses the choicepoint left by an alternative clause that prevents
&lt;br&gt;LCO. &amp;nbsp;Anyway, it is hackers corner ...
&lt;br&gt;&lt;br&gt;A somewhat more portable way of finding (non-)determinism was once
&lt;br&gt;told to me by Ulrich Neumerkel:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call_cleanup(Goal, Det=true),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( &amp;nbsp; Det == true
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt; &amp;nbsp;&amp;lt;Goal succeeded without choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ; &amp;nbsp; &amp;lt;Goal succeeded with choice&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Cheers,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; --Pablo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Tuesday 07 October 2008 05:23:21 pm Jan Wielemaker wrote:
&lt;br&gt;&amp;gt; &amp;gt; On Tuesday 07 October 2008 03:27:19 pm Nicolas Pelletier wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I am using SWI 5.6.61 on Linux and am wondering, out of curiosity, how
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I can verify that the compilation of a predicate leads to a tail call
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; optimized blurb of code. Is there already such a thing in SWI ?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Runtime, yes. You can use the graphical debugger to inspect
&lt;br&gt;&amp;gt; &amp;gt; choicepoints. If there is no choicepoint since the entrance of the
&lt;br&gt;&amp;gt; &amp;gt; current predicate at the moment you are about to make the last call, it
&lt;br&gt;&amp;gt; &amp;gt; will do last call optimization. Note that in the current implementation
&lt;br&gt;&amp;gt; &amp;gt; LCO (as it is abbreviated) saves space, but no time (it is even a bit
&lt;br&gt;&amp;gt; &amp;gt; slower). &amp;nbsp;This will be improved in 5.7.x.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The other way out is to run the goal with lots of data and a small local
&lt;br&gt;&amp;gt; &amp;gt; stack. &amp;nbsp;If it runs out of local stack, LCO didn't do its job :-)
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; More tricks: ask prolog_current_frame(X). &amp;nbsp;on an LCO loop this should
&lt;br&gt;&amp;gt; &amp;gt; remain the same frame.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Note that LCO is never activated in debug mode!
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; 	Cheers --- Jan
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; &amp;gt; SWI-Prolog mailing list
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19862940&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; SWI-Prolog mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19862940&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19862940&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tail-call-optimisation-tp19858276p19862940.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19861174</id>
	<title>Re: Tail call optimisation</title>
	<published>2008-10-07T08:47:02Z</published>
	<updated>2008-10-07T08:47:02Z</updated>
	<author>
		<name>Pablo López</name>
	</author>
	<content type="html">&lt;br&gt;Jan,
&lt;br&gt;&lt;br&gt;I wonder whether inserting a call to deterministic/1 just 
&lt;br&gt;before the last call can make the trick as well.
&lt;br&gt;What do you think?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;&amp;nbsp; --Pablo
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Tuesday 07 October 2008 05:23:21 pm Jan Wielemaker wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tuesday 07 October 2008 03:27:19 pm Nicolas Pelletier wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hello,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am using SWI 5.6.61 on Linux and am wondering, out of curiosity, how
&lt;br&gt;&amp;gt; &amp;gt; I can verify that the compilation of a predicate leads to a tail call
&lt;br&gt;&amp;gt; &amp;gt; optimized blurb of code. Is there already such a thing in SWI ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Runtime, yes. You can use the graphical debugger to inspect
&lt;br&gt;&amp;gt; choicepoints. If there is no choicepoint since the entrance of the
&lt;br&gt;&amp;gt; current predicate at the moment you are about to make the last call, it
&lt;br&gt;&amp;gt; will do last call optimization. Note that in the current implementation
&lt;br&gt;&amp;gt; LCO (as it is abbreviated) saves space, but no time (it is even a bit
&lt;br&gt;&amp;gt; slower). &amp;nbsp;This will be improved in 5.7.x.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The other way out is to run the goal with lots of data and a small local
&lt;br&gt;&amp;gt; stack. &amp;nbsp;If it runs out of local stack, LCO didn't do its job :-)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; More tricks: ask prolog_current_frame(X). &amp;nbsp;on an LCO loop this should
&lt;br&gt;&amp;gt; remain the same frame.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Note that LCO is never activated in debug mode!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	Cheers --- Jan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; SWI-Prolog mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19861174&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19861174&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tail-call-optimisation-tp19858276p19861174.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19860708</id>
	<title>Re: Tail call optimisation</title>
	<published>2008-10-07T08:23:21Z</published>
	<updated>2008-10-07T08:23:21Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">On Tuesday 07 October 2008 03:27:19 pm Nicolas Pelletier wrote:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am using SWI 5.6.61 on Linux and am wondering, out of curiosity, how
&lt;br&gt;&amp;gt; I can verify that the compilation of a predicate leads to a tail call
&lt;br&gt;&amp;gt; optimized blurb of code. Is there already such a thing in SWI ?
&lt;br&gt;&lt;br&gt;Runtime, yes. You can use the graphical debugger to inspect
&lt;br&gt;choicepoints. If there is no choicepoint since the entrance of the
&lt;br&gt;current predicate at the moment you are about to make the last call, it
&lt;br&gt;will do last call optimization. Note that in the current implementation
&lt;br&gt;LCO (as it is abbreviated) saves space, but no time (it is even a bit
&lt;br&gt;slower). &amp;nbsp;This will be improved in 5.7.x.
&lt;br&gt;&lt;br&gt;The other way out is to run the goal with lots of data and a small local
&lt;br&gt;stack. &amp;nbsp;If it runs out of local stack, LCO didn't do its job :-)
&lt;br&gt;&lt;br&gt;More tricks: ask prolog_current_frame(X). &amp;nbsp;on an LCO loop this should
&lt;br&gt;remain the same frame.
&lt;br&gt;&lt;br&gt;Note that LCO is never activated in debug mode!
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19860708&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tail-call-optimisation-tp19858276p19860708.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19858994</id>
	<title>Re: Inconsistent display of variable bindings in visual debugger</title>
	<published>2008-10-07T07:02:31Z</published>
	<updated>2008-10-07T07:02:31Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">Hi Gunter,
&lt;br&gt;&lt;br&gt;On Tuesday 07 October 2008 02:22:21 pm Günter Kniesel wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I just noted that the visual debugger displays different names for
&lt;br&gt;&amp;gt; the same internal variable in its &amp;quot;normal&amp;quot; binding view and in the &amp;quot;detail
&lt;br&gt;&amp;gt; binding view&amp;quot; that appears when double-klicking one of the bindings.
&lt;br&gt;&amp;gt; For instance, in the attached screenshot, _G4968, which appears in
&lt;br&gt;&amp;gt; both arguments, changes to two different names in the detail view
&lt;br&gt;&amp;gt; of each argument. The screenshot shows that in the detail view for
&lt;br&gt;&amp;gt; the first argument, _G4968 is displayed as _G1486.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This behaviour can be quite confusing. Worse, it might lead to errors.
&lt;br&gt;&amp;gt; When using the detail view to access large values and to assemble
&lt;br&gt;&amp;gt; a test call that exposes a problem, the consistency of variables
&lt;br&gt;&amp;gt; shared among the bindings will be lost. For instance, replacement
&lt;br&gt;&amp;gt; of _G4968 by two different variables, say A and C, leads to
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; Arg1 = calls(a2,A), Arg2 = (f=B, C=D, ...), testcall(Arg1,Arg2).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^
&lt;br&gt;&amp;gt; instead of
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; Arg1 = calls(a2,A), Arg2 = (f=B, A=D, ...), testcall(Arg1,Arg2).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^
&lt;br&gt;&amp;gt; Is this possibly a result of a recent change? I am pretty sure
&lt;br&gt;&amp;gt; that I used to cut and paste large values from detail views in
&lt;br&gt;&amp;gt; order to create test cases for identified bugs. Or did it only
&lt;br&gt;&amp;gt; work by accident because the different bindings didn't share any
&lt;br&gt;&amp;gt; variables?
&lt;/div&gt;&lt;br&gt;Variables written as _G&amp;lt;N&amp;gt; are unnamed variables for which Prolog writes
&lt;br&gt;the offset in the stack. Unfortunately, if a garbage collect happens,
&lt;br&gt;these addresses change. AFAIK this has always been the case. The only
&lt;br&gt;way `around' would be to disable GC. Ideal might be to copy the whole
&lt;br&gt;goal term and numbervars it, but unfortunately these terms can be really
&lt;br&gt;big. Another trick might be to redisplay all bindings if a GC happens.
&lt;br&gt;&lt;br&gt;&amp;gt; Could this be changed (back) in a future release?
&lt;br&gt;&lt;br&gt;Afraid. &amp;nbsp;For now I leave it as an `excercise for the user' ...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19858994&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inconsistent-display-of-variable-bindings-in-visual-debugger-tp19856947p19858994.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19858276</id>
	<title>Tail call optimisation</title>
	<published>2008-10-07T06:27:19Z</published>
	<updated>2008-10-07T06:27:19Z</updated>
	<author>
		<name>Nicolas Pelletier-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I am using SWI 5.6.61 on Linux and am wondering, out of curiosity, how
&lt;br&gt;I can verify that the compilation of a predicate leads to a tail call
&lt;br&gt;optimized blurb of code. Is there already such a thing in SWI ?
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Nicolas
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19858276&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Tail-call-optimisation-tp19858276p19858276.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19856947</id>
	<title>Inconsistent display of variable bindings in visual debugger</title>
	<published>2008-10-07T05:22:21Z</published>
	<updated>2008-10-07T05:22:21Z</updated>
	<author>
		<name>Günter Kniesel</name>
	</author>
	<content type="html">&lt;br&gt;I just noted that the visual debugger displays different names for
&lt;br&gt;the same internal variable in its &amp;quot;normal&amp;quot; binding view and in the &amp;quot;detail
&lt;br&gt;binding view&amp;quot; that appears when double-klicking one of the bindings.
&lt;br&gt;For instance, in the attached screenshot, _G4968, which appears in
&lt;br&gt;both arguments, changes to two different names in the detail view
&lt;br&gt;of each argument. The screenshot shows that in the detail view for
&lt;br&gt;the first argument, _G4968 is displayed as _G1486.
&lt;br&gt;&lt;br&gt;This behaviour can be quite confusing. Worse, it might lead to errors.
&lt;br&gt;When using the detail view to access large values and to assemble
&lt;br&gt;a test call that exposes a problem, the consistency of variables
&lt;br&gt;shared among the bindings will be lost. For instance, replacement
&lt;br&gt;of _G4968 by two different variables, say A and C, leads to
&lt;br&gt;&lt;br&gt;&amp;nbsp; Arg1 = calls(a2,A), Arg2 = (f=B, C=D, ...), testcall(Arg1,Arg2).
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^
&lt;br&gt;instead of
&lt;br&gt;&lt;br&gt;&amp;nbsp; Arg1 = calls(a2,A), Arg2 = (f=B, A=D, ...), testcall(Arg1,Arg2).
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ^ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;^
&lt;br&gt;Is this possibly a result of a recent change? I am pretty sure
&lt;br&gt;that I used to cut and paste large values from detail views in
&lt;br&gt;order to create test cases for identified bugs. Or did it only
&lt;br&gt;work by accident because the different bindings didn't share any
&lt;br&gt;variables?
&lt;br&gt;&lt;br&gt;Could this be changed (back) in a future release?
&lt;br&gt;&lt;br&gt;-- Günter
&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------
&lt;br&gt;Dr. Günter Kniesel &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.cs.uni-bonn.de/~gk/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cs.uni-bonn.de/~gk/&lt;/a&gt;&lt;br&gt;Institut für Informatik III &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19856947&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gk@...&lt;/a&gt;
&lt;br&gt;Universität Bonn
&lt;br&gt;Römerstr. 164 (Raum A107) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Tel (+49 228) 73-4511
&lt;br&gt;D-53117 Bonn &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fax (+49 228) 73-4382
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;swi-debugger-bug.jpg&lt;/strong&gt; (40K) &lt;a href=&quot;http://www.nabble.com/attachment/19856947/0/swi-debugger-bug.jpg&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Inconsistent-display-of-variable-bindings-in-visual-debugger-tp19856947p19856947.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19853018</id>
	<title>Rem's algorithm for maintaining equivalence classes</title>
	<published>2008-10-07T00:49:47Z</published>
	<updated>2008-10-07T00:49:47Z</updated>
	<author>
		<name>Jocelyn Paine</name>
	</author>
	<content type="html">SICStus Prolog has a library(rem) for maintaining equivalence classes
&lt;br&gt;using Rem's algorithm - see
&lt;br&gt;&lt;a href=&quot;http://www.sics.se/sicstus/docs/latest/html/sicstus/lib_002drem.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.sics.se/sicstus/docs/latest/html/sicstus/lib_002drem.html&lt;/a&gt;&amp;nbsp;. Has
&lt;br&gt;anyone - its author perhaps... - written an equivalent for SWI?
&lt;br&gt;&lt;br&gt;Jocelyn Paine
&lt;br&gt;&lt;a href=&quot;http://www.j-paine.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.j-paine.org&lt;/a&gt;&lt;br&gt;+44 (0)7768 534 091
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19853018&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Compiling-a-prolog-string-into-new-rules-I-can-use-tp19748205p19853018.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19838824</id>
	<title>Re: [JPL] Reset Prolog session</title>
	<published>2008-10-06T07:12:10Z</published>
	<updated>2008-10-06T07:12:10Z</updated>
	<author>
		<name>Paul Singleton</name>
	</author>
	<content type="html">Florian Pommmerening wrote:
&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I read in the chanegelog that one can initialize JPL only once to avoid inconsistencies. My problem is that a prolog program I'm trying to use from Java works only once per session. I'm trying to fix this bug at its source of course but this is not my code and debugging foreign code is ... well lets just say I'm looking for a workaround in case I cannot find a way to fix this bug. 
&lt;br&gt;&lt;br&gt;Well you can stop debugging - it isn't a bug ;-)
&lt;br&gt;&lt;br&gt;It's a deliberately unimplemented feature: the effort required to 
&lt;br&gt;support this in JPL would be fairly minor compared to supporting full 
&lt;br&gt;reinitialisation in SWI-Prolog, but it's not a high priority for 
&lt;br&gt;either me or Jan.
&lt;br&gt;&lt;br&gt;&amp;gt; Is there any way to start a new prolog session with JPL?
&lt;br&gt;&lt;br&gt;Sorry, no.
&lt;br&gt;&lt;br&gt;&amp;gt; Are there other possibilities to reset prolog? (I tried retractall(x(_)) for every dynamic x but it did not help)
&lt;br&gt;&lt;br&gt;Yes, but it will need a bit more thought and care. &amp;nbsp;For motivation, 
&lt;br&gt;tell yourself that you will benefit from understanding all the changes 
&lt;br&gt;which this Prolog program (I understand that it may not be your own 
&lt;br&gt;code) can or does make to the Prolog environment.
&lt;br&gt;&lt;br&gt;Maybe scan the SWIPL docs for things which could be left in a 
&lt;br&gt;different state: flags, streams, modules, dynamic procedures etc.
&lt;br&gt;&lt;br&gt;Maybe rewrite the app to separate setup from running, add some code to 
&lt;br&gt;tidy up after itself ready to run again.
&lt;br&gt;&lt;br&gt;NB I sympathise with your wish to just restart from scratch, and 
&lt;br&gt;realise that (depending how this program is written) you may never get 
&lt;br&gt;it to rerun correctly :-(
&lt;br&gt;&lt;br&gt;cheers
&lt;br&gt;&lt;br&gt;Paul Singleton
&lt;br&gt;&lt;br&gt;&amp;gt; thanks
&lt;br&gt;&amp;gt; Florian
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19838824&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-JPL--Reset-Prolog-session-tp19837509p19838824.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19837509</id>
	<title>[JPL] Reset Prolog session</title>
	<published>2008-10-06T06:00:16Z</published>
	<updated>2008-10-06T06:00:16Z</updated>
	<author>
		<name>Florian Pommmerening</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I read in the chanegelog that one can initialize JPL only once to avoid inconsistencies. My problem is that a prolog program I'm trying to use from Java works only once per session. I'm trying to fix this bug at its source of course but this is not my code and debugging foreign code is ... well lets just say I'm looking for a workaround in case I cannot find a way to fix this bug. 
&lt;br&gt;&lt;br&gt;Is there any way to start a new prolog session with JPL?
&lt;br&gt;Are there other possibilities to reset prolog? (I tried retractall(x(_)) for every dynamic x but it did not help)
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;Florian
&lt;br&gt;-- 
&lt;br&gt;Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: &lt;a href=&quot;http://www.gmx.net/de/go/multimessenger&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.gmx.net/de/go/multimessenger&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19837509&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/-JPL--Reset-Prolog-session-tp19837509p19837509.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19826590</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T09:50:17Z</published>
	<updated>2008-10-05T09:50:17Z</updated>
	<author>
		<name>Ulrich Neumerkel</name>
	</author>
	<content type="html">&amp;gt; Is this a bug? Nobody says it is not allowed to call the wakeup in the
&lt;br&gt;&amp;gt; middle of a unify.
&lt;br&gt;&lt;br&gt;True. &amp;nbsp;As such, this is not a bug. &amp;nbsp;But implicitely I assumed that within
&lt;br&gt;=/2 you will not call other goals. &amp;nbsp;So you will only call them thereafter.
&lt;br&gt;Further, this was a change from 5.6 to 5.7.
&lt;br&gt;&lt;br&gt;But you are right. &amp;nbsp;To make the case even more explicit:
&lt;br&gt;&lt;br&gt;p :- put_attr(V1,user,10),(V1,4)=(0,1).
&lt;br&gt;&lt;br&gt;... could be transformed into:
&lt;br&gt;&lt;br&gt;p :- put_attr(V1,user,10), V1 = 0, 4 = 1.
&lt;br&gt;&lt;br&gt;Still, I am somewhat hesitant about the exact freedom (and nondeterminacy) that
&lt;br&gt;should be respected. &amp;nbsp;For this reason it is really best if all delayed goals
&lt;br&gt;etc. will terminate always, otherwise life is much harder (as it is with freeze/2).
&lt;br&gt;Who wants a system where turning on -O produces nontermination that did not
&lt;br&gt;exist before?
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19826590&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19826590.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19825799</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T08:37:22Z</published>
	<updated>2008-10-05T08:37:22Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">On Sunday 05 October 2008 17:14:47 Bart Demoen wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;_ = something&amp;quot; is simply replaced by `true'.
&lt;br&gt;&amp;gt; &amp;gt; I'm still considering GCC-like warnings here, such as
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; 'Goal has no effect'
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; 'Goal always fails'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I had the message &amp;quot;Stupid unification&amp;quot; in the BIM-Prolog compiler long
&lt;br&gt;&amp;gt; ago. Just before shipping it to customers, someone would replace it
&lt;br&gt;&amp;gt; with something more gentle because it upset the customers :-)
&lt;br&gt;&lt;br&gt;The SWI-Prolog customers don't pay, but still I prefer to be a bit more
&lt;br&gt;polite :-)
&lt;br&gt;&lt;br&gt;&amp;gt; I think that flagging such code is a really nice thing, because it
&lt;br&gt;&amp;gt; almost always is due to typos.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Don't stop there though - flag first occurrences of variables in
&lt;br&gt;&amp;gt; arithmetic expressions, uses of functor/3 with a non-integer in third
&lt;br&gt;&amp;gt; argument, ..., and look (at compile time) inside what is asserted,
&lt;br&gt;&amp;gt; meta-called, etc.
&lt;br&gt;&lt;br&gt;The interesting question of course is, what is better left to a type
&lt;br&gt;checker and what is better done by the compiler? Your functor/3 example
&lt;br&gt;appears to be as a clear example of an issue for the type checker.
&lt;br&gt;&lt;br&gt;Of course, &amp;quot;_ = something&amp;quot; is not a type error, so at least strickly
&lt;br&gt;speaking it isn't the domain of the type checker. It could still be
&lt;br&gt;argued it must be the responsibility of some sort of static analysis
&lt;br&gt;tool outside the compiler proper. On the other hand, the compiler does a
&lt;br&gt;lot of the work, so it can do some of these tasks without any overhead.
&lt;br&gt;In the Var = Something example it already distinguishes singleton, first
&lt;br&gt;use and non-first use, so while writing the compiler you have to do
&lt;br&gt;*something* if you see &amp;lt;singleton&amp;gt; = something ...
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19825799&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19825799.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19825777</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T08:14:47Z</published>
	<updated>2008-10-05T08:14:47Z</updated>
	<author>
		<name>Bart Demoen-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; &amp;quot;_ = something&amp;quot; is simply replaced by `true'.
&lt;br&gt;&amp;gt; I'm still considering GCC-like warnings here, such as
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; 'Goal has no effect'
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; 'Goal always fails'
&lt;br&gt;&lt;br&gt;I had the message &amp;quot;Stupid unification&amp;quot; in the BIM-Prolog compiler long
&lt;br&gt;ago. Just before shipping it to customers, someone would replace it
&lt;br&gt;with something more gentle because it upset the customers :-)
&lt;br&gt;&lt;br&gt;I think that flagging such code is a really nice thing, because it
&lt;br&gt;almost always is due to typos.
&lt;br&gt;&lt;br&gt;Don't stop there though - flag first occurrences of variables in
&lt;br&gt;arithmetic expressions, uses of functor/3 with a non-integer in third
&lt;br&gt;argument, ..., and look (at compile time) inside what is asserted,
&lt;br&gt;meta-called, etc.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Bart Demoen
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19825777&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19825777.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19824000</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T05:10:09Z</published>
	<updated>2008-10-05T05:10:09Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">Hi Victor,
&lt;br&gt;&lt;br&gt;On Sunday 05 October 2008 13:36:12 Victor NOEL wrote:
&lt;br&gt;&amp;gt; On Sun, Oct 05, 2008 at 01:30:04PM +0200, Jan Wielemaker wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; &amp;gt; here and the bug was diagnosed as an error due to changes of handling
&lt;br&gt;&amp;gt; &amp;gt; the wakeup list. Only applies to 5.7.x. Fixed.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks you, this fix with the previous one fixes all my problems now
&lt;br&gt;&lt;br&gt;The bug found by Ulrich can probably cause crashes and many other
&lt;br&gt;unwanted behaviours. Thanks for the reports. Still, be careful with
&lt;br&gt;5.7.x. In a large app by us I found a GC crash. I left it for now as it
&lt;br&gt;reproduces very poorly (big multi-threaded app with lots of data in it)
&lt;br&gt;and I have no time to dig into it. Still, be warned and if you find a
&lt;br&gt;better case, send it.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19824000&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19824000.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19823732</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T04:36:12Z</published>
	<updated>2008-10-05T04:36:12Z</updated>
	<author>
		<name>Victor NOEL</name>
	</author>
	<content type="html">On Sun, Oct 05, 2008 at 01:30:04PM +0200, Jan Wielemaker wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Ulrich,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sunday 05 October 2008 02:01:33 Ulrich Neumerkel wrote:
&lt;br&gt;&amp;gt; &amp;gt; The current bug is that a syntactically failing unification still
&lt;br&gt;&amp;gt; &amp;gt; invokes accumulated unification-hooks in stead of failing.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Sometimes this works, and sometimes not.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; g3&amp;gt; /opt/gupu/pl-57x/bin/pl -f none
&lt;br&gt;&amp;gt; &amp;gt; Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.7.1-46-g32a4502)
&lt;br&gt;&amp;gt; &amp;gt; ...
&lt;br&gt;&amp;gt; &amp;gt; ?- put_attr(V1,user,10),(V1,4)=(0,1).
&lt;br&gt;&amp;gt; &amp;gt; ERROR: uhook/3: Undefined procedure: attr_unify_hook/2
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is this a bug? Nobody says it is not allowed to call the wakeup in the
&lt;br&gt;&amp;gt; middle of a unify. I think implementations are allowed to do many things
&lt;br&gt;&amp;gt; with this code, including replacing it by 'fail'. SWI-Prolog 5.7 already
&lt;br&gt;&amp;gt; does a few of these. E.g. &amp;quot;_ = something&amp;quot; is simply replaced by `true'.
&lt;br&gt;&amp;gt; I'm still considering GCC-like warnings here, such as
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; 'Goal has no effect'
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; 'Goal always fails'
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; That was my first intuition and I still think that is a valid
&lt;br&gt;&amp;gt; observation, but a little digging showed this should not be the case
&lt;br&gt;&amp;gt; here and the bug was diagnosed as an error due to changes of handling
&lt;br&gt;&amp;gt; the wakeup list. Only applies to 5.7.x. Fixed.
&lt;/div&gt;&lt;/div&gt;Thanks you, this fix with the previous one fixes all my problems now
&lt;br&gt;:)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Victor
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (196 bytes) &lt;a href=&quot;http://www.nabble.com/attachment/19823732/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19823732.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19823687</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T04:30:04Z</published>
	<updated>2008-10-05T04:30:04Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">Hi Ulrich,
&lt;br&gt;&lt;br&gt;On Sunday 05 October 2008 02:01:33 Ulrich Neumerkel wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The current bug is that a syntactically failing unification still
&lt;br&gt;&amp;gt; invokes accumulated unification-hooks in stead of failing.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sometimes this works, and sometimes not.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; g3&amp;gt; /opt/gupu/pl-57x/bin/pl -f none
&lt;br&gt;&amp;gt; Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.7.1-46-g32a4502)
&lt;br&gt;&amp;gt; ...
&lt;br&gt;&amp;gt; ?- put_attr(V1,user,10),(V1,4)=(0,1).
&lt;br&gt;&amp;gt; ERROR: uhook/3: Undefined procedure: attr_unify_hook/2
&lt;/div&gt;&lt;br&gt;Is this a bug? Nobody says it is not allowed to call the wakeup in the
&lt;br&gt;middle of a unify. I think implementations are allowed to do many things
&lt;br&gt;with this code, including replacing it by 'fail'. SWI-Prolog 5.7 already
&lt;br&gt;does a few of these. E.g. &amp;quot;_ = something&amp;quot; is simply replaced by `true'.
&lt;br&gt;I'm still considering GCC-like warnings here, such as
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; 'Goal has no effect'
&lt;br&gt;&amp;nbsp; &amp;nbsp; 'Goal always fails'
&lt;br&gt;&lt;br&gt;That was my first intuition and I still think that is a valid
&lt;br&gt;observation, but a little digging showed this should not be the case
&lt;br&gt;here and the bug was diagnosed as an error due to changes of handling
&lt;br&gt;the wakeup list. Only applies to 5.7.x. Fixed.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Cheers --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19823687&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19823687.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19823054</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T03:07:53Z</published>
	<updated>2008-10-05T03:07:53Z</updated>
	<author>
		<name>Jan Wielemaker-2</name>
	</author>
	<content type="html">On Saturday 04 October 2008 22:08:59 Bart Demoen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; ?- A in 0..5, B in 6..7, memberchk(A, [B, C]).
&lt;br&gt;&amp;gt; &amp;gt; false.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Shouldn't the last one return :
&lt;br&gt;&amp;gt; &amp;gt; A = C,
&lt;br&gt;&amp;gt; &amp;gt; C in 0..5,
&lt;br&gt;&amp;gt; &amp;gt; B in 6..7.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; First a look at:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;?- help(memberchk).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memberchk(?Elem, +List)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Equivalent to member/2, but leaves no choice point.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; This is enough to answer your question: yes, you are correct about
&lt;br&gt;&amp;gt; your expectation.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In fact, the implementation of pl_memberchk in pl-list.c cuts the
&lt;br&gt;&amp;gt; choicepoint before executing woken goals. It is a bit tricky to get
&lt;br&gt;&amp;gt; this correct (from within C), but currently it doesn't deliver what
&lt;br&gt;&amp;gt; the manual promises I think. If memchk/2 is written in Prolog, you get
&lt;br&gt;&amp;gt; what you expect.
&lt;/div&gt;&lt;br&gt;Thanks Bart. There is a call foreignWakeup() that executes delayed calls
&lt;br&gt;and can be used (only) at places where C code is about to do something
&lt;br&gt;that is effectively a cut. Also used by (e.g.) \=. Fixed in 5.6.x and
&lt;br&gt;merged into 5.7.x.
&lt;br&gt;&lt;br&gt;memberchk/2 is now getting a bit complicated and hopefully 5.7.x itself
&lt;br&gt;will get fast enough someday to avoid the desire to write memberchk in C
&lt;br&gt;:-). Setup and exit are a bit slower. Luckily the iteration over
&lt;br&gt;non-unifying elements without attributes remains the same.
&lt;br&gt;&lt;br&gt;&amp;gt; How did you find this bug ?
&lt;br&gt;&lt;br&gt;I'm still surprised how obvious bugs remain unnoticed for years while
&lt;br&gt;at the same time there are reports on very weird bugs.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --- Jan
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19823054&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19823054.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19823010</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-05T03:03:59Z</published>
	<updated>2008-10-05T03:03:59Z</updated>
	<author>
		<name>Victor NOEL</name>
	</author>
	<content type="html">On Sun, Oct 05, 2008 at 08:39:53AM +0200, Bart Demoen wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Which version of SWI are you using ?
&lt;br&gt;&amp;gt; Your queries give the expected results in Version 5.6.50.
&lt;br&gt;&lt;br&gt;It is written in the title : 5.7.X git (5.7.1-46-g32a4502-DIRTY)
&lt;br&gt;&lt;br&gt;:)
&lt;br&gt;&lt;br&gt;Victor
&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (196 bytes) &lt;a href=&quot;http://www.nabble.com/attachment/19823010/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19823010.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19822243</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-04T23:39:53Z</published>
	<updated>2008-10-04T23:39:53Z</updated>
	<author>
		<name>Bart Demoen-2</name>
	</author>
	<content type="html">&lt;br&gt;Which version of SWI are you using ?
&lt;br&gt;Your queries give the expected results in Version 5.6.50.
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Bart Demoen
&lt;br&gt;_______________________________________________
&lt;br&gt;SWI-Prolog mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=19822243&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;SWI-Prolog@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://mailbox.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19822243.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19818443</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-04T15:21:47Z</published>
	<updated>2008-10-04T15:21:47Z</updated>
	<author>
		<name>Victor NOEL</name>
	</author>
	<content type="html">On Sat, Oct 04, 2008 at 10:08:59PM +0200, Bart Demoen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ?- A in 0..5, B in 6..7, memberchk(A, [B, C]).
&lt;br&gt;&amp;gt; &amp;gt; false.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Shouldn't the last one return :
&lt;br&gt;&amp;gt; &amp;gt; A = C,
&lt;br&gt;&amp;gt; &amp;gt; C in 0..5,
&lt;br&gt;&amp;gt; &amp;gt; B in 6..7.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; First a look at:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;?- help(memberchk).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memberchk(?Elem, +List)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Equivalent to member/2, but leaves no choice point.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is enough to answer your question: yes, you are correct about
&lt;br&gt;&amp;gt; your expectation.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In fact, the implementation of pl_memberchk in pl-list.c cuts the
&lt;br&gt;&amp;gt; choicepoint before executing woken goals. It is a bit tricky to get
&lt;br&gt;&amp;gt; this correct (from within C), but currently it doesn't deliver what
&lt;br&gt;&amp;gt; the manual promises I think. If memchk/2 is written in Prolog, you get
&lt;br&gt;&amp;gt; what you expect.
&lt;/div&gt;&lt;/div&gt;I come back on this, I think it is is more complex than just
&lt;br&gt;a pl_memberchk problem.
&lt;br&gt;&lt;br&gt;I tried with a real example from the running of my app and a
&lt;br&gt;handmade definition of member and memberchk, and both have
&lt;br&gt;problem. I think something wrong happens when unification is done
&lt;br&gt;(maybe it has to do with the woken goals you are talking about, I
&lt;br&gt;do know nothing about all of this :).
&lt;br&gt;&lt;br&gt;This is what I get :
&lt;br&gt;&lt;br&gt;?- _G656 in 19..135, _G1879 in 12..134, _G1228 in 19..133, _G3188 in 0..19, _G3189 in 0..9\/11..200, _G3190 in 0..200,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mymember(ass(start(_G3188, _G3189, 4, _G3190)), [ass(start(0, 1, 0, _G1228)), ass(start(0, 0, 4, _G656))]).
&lt;br&gt;false.
&lt;br&gt;&lt;br&gt;and
&lt;br&gt;?- _G656 in 19..135, _G1879 in 12..134, _G1228 in 19..133, _G3188 in 0..19, _G3189 in 0..9\/11..200, _G3190 in 0..200,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mymember(ass(start(_G3188, _G3189, 4, _G3190)), [ass(start(0, 0, 4, _G656))]).
&lt;br&gt;_G656 = _G3190,
&lt;br&gt;_G3188 = 0,
&lt;br&gt;_G3189 = 0,
&lt;br&gt;_G3190 in 19..135,
&lt;br&gt;_G1879 in 12..134,
&lt;br&gt;_G1228 in 19..133 ;
&lt;br&gt;false.
&lt;br&gt;&lt;br&gt;With this definition for mymember :
&lt;br&gt;mymember(Element, [Element| _]).
&lt;br&gt;mymember(Element, [_| List]) :-
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mymember(Element, List).
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks you for your help,
&lt;br&gt;&lt;br&gt;Victor
&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (196 bytes) &lt;a href=&quot;http://www.nabble.com/attachment/19818443/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19818443.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-19817256</id>
	<title>Re: 5.7.X : problem with attributed variables and memberchk ?</title>
	<published>2008-10-04T13:46:13Z</published>
	<updated>2008-10-04T13:46:13Z</updated>
	<author>
		<name>Victor NOEL</name>
	</author>
	<content type="html">On Sat, Oct 04, 2008 at 10:08:59PM +0200, Bart Demoen wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ?- A in 0..5, B in 6..7, memberchk(A, [B, C]).
&lt;br&gt;&amp;gt; &amp;gt; false.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Shouldn't the last one return :
&lt;br&gt;&amp;gt; &amp;gt; A = C,
&lt;br&gt;&amp;gt; &amp;gt; C in 0..5,
&lt;br&gt;&amp;gt; &amp;gt; B in 6..7.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; First a look at:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;?- help(memberchk).
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;memberchk(?Elem, +List)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Equivalent to member/2, but leaves no choice point.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is enough to answer your question: yes, you are correct about
&lt;br&gt;&amp;gt; your expectation.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In fact, the implementation of pl_memberchk in pl-list.c cuts the
&lt;br&gt;&amp;gt; choicepoint before executing woken goals. It is a bit tricky to get
&lt;br&gt;&amp;gt; this correct (from within C), but currently it doesn't deliver what
&lt;br&gt;&amp;gt; the manual promises I think. If memchk/2 is written in Prolog, you get
&lt;br&gt;&amp;gt; what you expect.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; How did you find this bug ?
&lt;/div&gt;&lt;/div&gt;It is complicated to explain, in simple :
&lt;br&gt;I have a big program using memberchk and it was not doing what it should 
&lt;br&gt;be doing :&amp;gt;
&lt;br&gt;&lt;br&gt;I tried for a long time understanding what happened, at first I
&lt;br&gt;thought it was the constraints on the variables that were not
&lt;br&gt;compatibles so the results would have been normal, but after a lot
&lt;br&gt;of test (now I know how to make attributes(portray) for
&lt;br&gt;write_term/2 works :) I reduced it to this little example.
&lt;br&gt;&lt;br&gt;The program is a general argumentation framework that combines
&lt;br&gt;preference reasoning, abduction and constraint programming.
&lt;br&gt;I am working on the inclusion of constraint programming to it, you
&lt;br&gt;can take a look at if you want, there is a hg branch for it there :
&lt;br&gt;&lt;a href=&quot;https://dev.crazydwarves.org/trac/Gorgias&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://dev.crazydwarves.org/trac/Gorgias&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;Victor
&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://www.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (196 bytes) &lt;a href=&quot;http://www.nabble.com/attachment/19817256/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/5.7.X-%3A-problem-with-attributed-variables-and-memberchk---tp19816107p19817256.html" />
</entry>

</feed>
