W3C home > Mailing lists > Public > public-rif-wg@w3.org > March 2006

Re: On production rules and phase I&II

From: Peter F. Patel-Schneider <pfps@inf.unibz.it>
Date: Wed, 08 Mar 2006 10:00:02 -0500 (EST)
Message-Id: <20060308.100002.36666547.pfps@research.bell-labs.com>
To: hak@ilog.com
Cc: public-rif-wg@w3.org

From: Hassan At-Kaci <hak@ilog.com>
Subject: Re: On production rules and phase I&II
Date: Wed, 08 Mar 2006 15:27:44 +0100

> Peter F. Patel-Schneider wrote:
> > In the absence of any demonstration that appending two lists can be performed
> > by recursive (Horn) rules, 
> Here's the requested demonstration for pure Horn and no meta-rules:
> 	append([],L,L).
> 	append([H|T],L,[H|R]) :- append(T,L,R).
> > by recursive (Horn) rules, why should it be incumbent on me to show that it can
> > be done in pure production rules?  
> I did my part. Now, it is your (or anyone's) turn in "Pure PRs" ...

How about

 	(p (cons ^head <H> ^tail <T> ^result <L>)
	   (make append ^left nil ^right <L> ^result <L>) )

 	(p (append ^left <T> ^right <L> ^result <R>) 
	   (cons ^head <H> ^tail <T> ^result <M>) 
	   (cons ^head <H> ^tail <R> ^result <N>)
	   (append ^left <M> ^right <L> ^result <N>) )
Well, yes, this doesn't work, but only because pure production rules don't have
functions, which are needed in Prolog to do things like append.  This isn't
even a problem in theory, because we could simply provide the working memory
elements corresponding to the cons's.

Received on Wednesday, 8 March 2006 15:00:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:47:37 UTC