RE: GUIDE: Syntax query re parseType=

Dan,

Sure, I understood Peter's response.  And thanks for the nit.  

In ACL2 I would define (EC c KB) to return the extension of the 
named class based on an OWL interpretation and let (S x KB) be 
the name to resource mapping. 

The 'collection' case would be:

(set-equal (EC 'someFolks KB)
           (set (S 'john KB) (S 'bill KB)))

To assert that the persons 'john and 'bill exist, we might want to
conjoin the member clauses.

(and (member (S 'john KB) (EC 'person KB))
     (member (S 'bill KB) (EC 'person KB))
     (set-equal (EC 'someFolks KB)
                (set (S 'john KB) (S 'bill KB))))

The non-collection case would be

(subset (set (S 'john KB) (S 'bill KB))
        (EC 'someFolks KB))

- Mike

Michael K. Smith, Ph.D., P.E.
EDS - Austin Innovation Centre
98 San Jacinto, #500
Austin, TX  78701

* phone: +01-512-404-6683
* mailto:michael.smith@eds.com
www.eds.com


-----Original Message-----
From: Dan Connolly [mailto:connolly@w3.org]
Sent: Friday, August 30, 2002 10:52 AM
To: Smith, Michael K
Cc: Peter F. "Patel-Schneider; www-webont-wg@w3.org
Subject: RE: GUIDE: Syntax query re parseType=


On Thu, 2002-08-29 at 13:18, Smith, Michael K wrote:
> 
> Ok.  I find the choice of keyword bizarre.  Mixing syntax
> and semantics in an odd way. 
> 
> So the difference between
> 
> 	<daml:oneOf rdf:parseType="daml:collection">
> 	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
> 	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
> 	</daml:oneOf>
> and
> 	<daml:oneOf>
> 	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
> 	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
> 	</daml:oneOf>
> 
> is that I can prove that the first one has exactly 2 elements?

nit: At most 2; the two expressions could denote the same thing.

> While I can't extend the second one (since I can't reference it), the
> semantics don't require that it be closed.  

It might help to understand if you look at the corresponding
formulas in a more familiar syntax.

Hmm... I don't think the above syntax is what you meant even in RDF/XML.
I think it'll be more clear if we make the subject of these
statements explicit.

The first one should, I presume, look like:

      <rdfs:Class rdf:ID="someFolks">
 	<daml:oneOf rdf:parseType="daml:collection">
 	  <Person rdf:id="John" />
 	  <Person rdf:id="Bill" />
 	</daml:oneOf>
      </rdfs:Class>

which, in, say, ACL2, looks like:

  (exists (?x ?y)
    (and
      (PropertyValue daml:oneOf someFolks ?x)
      (PropertyValue first ?x John)
      (PropertyValue rest ?x ?y)
      (PropertyValue first ?y Bill)
      (PropertyValue rest ?y nil)
    ) )

which is pretty much just:
      (PropertyValue daml:oneOf someFolks (list John Bill))

[oops... ACL2 doesn't have quantifiers, does it?
oh well, I think you get the idea.]

If you've got a language like newer KIF dialects or CycL
or HiLog, you can skip the PropertyValue gizmo and just write
  (daml:oneOf someFolks (list John Bill))

and I think CycL even allows functional relations to be
used like function symbols:
	(= someFolks (daml:oneOf (list John Bill)))


The point here is that daml:oneOf is just a property name.
The RDF parser doesn't treat it as special syntax; it
doesn't change parsing modes for the contents of the
oneOf element; the parseType="collection" is what tells
it to change parsing modes and make a list.

Now the other one, I presume, should look like this:

      <rdfs:Class rdf:ID="someFolks">
 	<daml:oneOf rdf:parseType="Resource">
 	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
 	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
 	</daml:oneOf>
      </rdfs>

which, according to the RDF/XML syntax, represents
a formula pretty much like this:

  (exists (?x)
    (and
      (PropertyValue daml:oneOf someFolks ?x)
      (PropertyValue rdf:_1 ?x John)
      (PropertyValue rdf:type John Person)
      (PropertyValue rdf:_2 ?x Bill)
      (PropertyValue rdf:type Bill Person)
    ) )

or, more colloquially:

  (= someFolks (daml:oneOf ?x))
  (first ?x John)
  (second ?x Bill)

At this point, I hope it's clear how the parseType="collection"
construct closes the list but the <li> construct doesn't.


-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Sunday, 1 September 2002 14:39:27 UTC