RE: [RIF] Extensible Design: Horn semantics and syntax actionscompleted

An XML syntax for integer constants has not yet been introduced
(I think your <Int> short-cut would make sense), but you infer
to apply the 'type' attribute we had before simplifying the RCL...
http://www.w3.org/2005/rules/wg/wiki/A.1_Basis%3A_Positive_Conditions?ac
tion=recall&rev=5
...to XML Schema Datatypes, related to UC&R 4.1.16. XML types:
http://www.w3.org/TR/2006/WD-rif-ucr-20060710/#Requirements
http://www.w3.org/2005/rules/wg/charter#datatype0
Again, this makes sense to me.

I don't remember any extended discussion of language information.
Regarding the XML syntax, I think for such purposes we could reuse
the existing attributes from relevant W3C specs within the <Data>
element.

Our Extensible Design has proceeded bottom-up from Conditions
to Horn clauses, but we have not yet proposed the next higher
level of [what has been called a 'Predicate' or a 'Procedure'
(the collection of all Horn clauses together defining a <Rel>)
and of] a Rulebase (which collects implicitly conjoined clauses
[and/or 'Procedures'] defining zero or more <Rel>s).

I think, using a new <Rulebase> element for that purpose would
be preferable to reusing (from Conditions) the <And> element,
mainly because <Rulebase> is neutral w.r.t. additional properties
(such as exploiting the XML order information of child elements),
so that <And> can be confined to its usual interpretation (incl.
commutativity, associativity, and idempotence).

Allowing <Atom> outside an Implies (e.g., directly in a Rulebase)
is what we intended.

-- Harold


-----Original Message-----
From: Dan Connolly [mailto:connolly@w3.org] 
Sent: September 25, 2006 2:03 PM
To: Boley, Harold
Cc: Public-Rif-Wg (E-mail)
Subject: Re: [RIF] Extensible Design: Horn semantics and syntax
actionscompleted

On Thu, 2006-09-14 at 13:23 -0400, Boley, Harold wrote:
> Michael & I have completed our Horn semantics and syntax
> actions from Tuesday, as part of the RIF Extensible Design:
> http://www.w3.org/2005/rules/wg/wiki/B._Extension%3A_RIF_Rule_Language
> http://www.w3.org/2005/rules/wg/wiki/B.1_Horn_Rules

I just had a go at implementing a translator from N3-rules syntax
to this syntax:

  http://www.w3.org/2000/10/swap/n3absyn.py 1.4

Attached find the output of running it on
  http://www.w3.org/2000/10/swap/test/syntax/numbers.n3
and then indenting the output with tidy -i -xml .

What's the XML syntax for integer constants? Did I miss it?
I infer it's something like:

   <Data type="http://www.w3.org/2001/XMLSchema#integer">2</Data>

I wonder if a short-cut is worthwhile...
   <Int>2</Int>

Oops; I see my code throws away lang information in cases like...
  "Le chat"@fr <#is> "The french phrase 'Le chat'".

Where does language information go in the abstract/concrete syntaxes?

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E


-----Original Message-----
From: Dan Connolly [mailto:connolly@w3.org] 
Sent: September 25, 2006 2:11 PM
To: Boley, Harold
Cc: Public-Rif-Wg (E-mail)
Subject: Re: [RIF] Extensible Design: Horn semantics and syntax
actionscompleted

On Thu, 2006-09-14 at 13:23 -0400, Boley, Harold wrote:
> Michael & I have completed our Horn semantics and syntax
> actions from Tuesday, as part of the RIF Extensible Design:
> http://www.w3.org/2005/rules/wg/wiki/B._Extension%3A_RIF_Rule_Language
> http://www.w3.org/2005/rules/wg/wiki/B.1_Horn_Rules

As I say, I'm working thru the translation from N3-rules to this
syntax.

In N3, you can write rules and data in the same file; for example:

  {  :Joe :likes ?y } => { ? :madeof :chocolate }.

  :Joe :likes :easterEggs .


My code currently turns the implicit conjunction into an
explicit one, so that the root of the XML document is 'And'.
Is that what you had in mind? Or do you expect
something like 'Rules' to be the top level XML construct,
with an implicit conjunction between whatever rules
are in the document?

And is it OK to use <Atom> outside a rule?

This is what I get when I run it on
  http://www.w3.org/2000/10/swap/test/rules-simple.n3 :

<And>
  <Implies>
    <Atom>
      <Rel>holds</Rel>
      <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#likes" />
      <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#Joe" />
      <Var>y</Var>
    </Atom>
    <Atom>
      <Rel>holds</Rel>
      <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#madeof" />
      <Var>y</Var>
      <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#chocolate" />
    </Atom>
  </Implies>
  <Atom>
    <Rel>holds</Rel>
    <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#likes" />
    <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#Joe" />
    <Ind
iri="http://www.w3.org/2000/10/swap/test/rules-simple.n3#easterEggs" />
</Atom>
</And>


p.s. more on <Rel>holds</Rel> separately.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E

Received on Wednesday, 27 September 2006 02:42:25 UTC