List structure -- an RDF Schema (original) (raw)
I think this is obsoleted by the list stuff in the KIF schema. (@@add support in html2rdf for obsoletes)
This obsoletes a model for lists that I worked out originally with Massimo on 12 Jul 2000, for use in the case of the next scribe.
for example: (a b c) becomes
list --first--> a
list --rest--> gen1
gen1 --first--> b
gen1 --rest--> gen2
gen2 --first--> c
gen2 --rest--> empty
I have since expanded it to include some utilities and rules.
see also: TimBL's discussion of definitive lists in the semantic web toolbox.
@@hmm... change to head/tail rather than first/rest? synonyms? use rdf:_2 for second? synonyms?
I maintain this as HTML, but I make it availble as RDF using a transformation. See an XSLT service for details on how to invoke it.
Use the namespace name http://www.w3.org/2000/07/hs78/lists#to refer to these properties and classes in RDF 1.0 syntax.
Class hierarchy
- Seq
- List
* Empty = {empty } @@enumerated set
- List
Properties
@@List partitioned by first, rest (in the larch sense)
- first: List -> anything
first(l, x) = x is the first item in l - rest: List -> List
rest(l1, l2) = l2 is the rest of l1, after the first item.
Utilities
append([], Z, Z). append([A|B], Z, [A|Z2]) :- append(B, Z, Z2). reverse([], []). reverse([A|B], Z) :- reverse(B, Brev), append(Brev, [A], Z).
-- js-prolog page
function symbols (i.e. [] notation) have to be manually "unwound", I guess
@@hhmm... how to handle n-ary relations? ALL paper says to treat r(x, y, z) as r(x, (y, z))... I think. @@hmm... how about supporting the r(x, y, z) syntax from the XSLT transformation?
@@specify converts ... in the larch sense. see also: faq entry
- in: Resource -> List
in(x, y) = x is in y.
in(x, l)
if - second: List -> anything
second(l, x) = x is the second item in l.
second(l, x)
if - append: List ->List
append(empty,Z--Z) - reverse: List -> List
reverse(empty, empty).
reverse(AB, Z)
if
Dan Connolly
Revision:1.9Revision: 1.9 Revision:1.9 of Date:2000/08/1304:11:20Date: 2000/08/13 04:11:20 Date:2000/08/1304:11:20 by Author:connollyAuthor: connolly Author:connolly
htm