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

Re: Lists in Core?

From: Gary Hallmark <gary.hallmark@oracle.com>
Date: Fri, 14 Mar 2008 11:05:10 -0700
Message-ID: <47DABE56.7070200@oracle.com>
To: Sandro Hawke <sandro@w3.org>
CC: Michael Kifer <kifer@cs.sunysb.edu>, RIF WG <public-rif-wg@w3.org>

xpath sequences can't be nested.  From the spec:

A |sequence| is an ordered collection of zero or more |items|. An |item| 
is either a node or an atomic value.

So you can have (a b c) but not ((a b) c).

Moreover, the xpath sequence functions are builtins whereas LP people 
would expect logical functions.

If we can use the xpath sequence function syntax but redefine the 
semantics a bit to work on RIF data objects and if BLD folks don't 
object to having them as builtins, then it would be a good thing to do 
because it would increase the Core and thus increase interoperability 
between BLD and PRD.

Sandro Hawke wrote:
>> Michael Kifer wrote:
>>> I started adding the lists, but doubts crept into my head after today's
>>> discussion. My assumption was that the reason for the lists was to
>>> benefit the dialects that have no function symbols.
>>> (As Hasan noted today, it makes little sense to add lists to dialects with
>>> function symbols.)
>>> But where are those dialects that do not have function symbols?  I thought
>> that PR dialects need that, but PR people today said they do not.  In any
>>> case, it seems that there is no good reason to stuff BLD with lists, since
>>> BLD has function symbols. If we decide to keep lists for the future
>>> potential function-less dialects, then they can be added to FLD only (since
>>> FLD is a toolbox from which dialects pick-and-choose).
>>> However, I somehow doubt that there will be takers: with lists you can
>>> simulate arbitrary function terms and you get the same undecidability
>>> results for entailment.
> Gary replies:
>> The PR systems I'm familiar with provide List builtins (e.g. at Oracle 
>> we use java.util.List).  Rule conditions use builtin predicates like 
>> contains(list, const) and builtin functions like get(list, index).  Rule 
>> actions use mutators like append(list, const), remove(index), as so on. 
>> PR cannot support the BLD list semantics.  If it could, then PR could 
>> also support function symbols. 
>> It's probably a bad idea to use the BLD list syntax for PRD given the 
>> semantic differences.  So I don't think it matters much to PRD what the 
>> BLD list syntax turns out to be.
> What about the xpath functions on lists?
>    http://www.w3.org/TR/xpath-functions/#general-seq-funcs
> Those functions can all be provided by PRD engines using internal data
> structures and in BLD engines using pairs.  I don't see why they
> shouldn't be in Core, actually.  The pair view of them would only be
> available in dialects with logic functions, though.
> Can't we do that?
>     -- Sandro


Oracle <http://www.oracle.com>
Gary Hallmark | Architect | +1.503.525.8043
Oracle Server Technologies
1211 SW 5th Avenue, Suite 800
Portland, OR 97204
Received on Friday, 14 March 2008 18:07:46 UTC

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