Re: [RIF] Extensible Design: Horn semantics and syntax actions completed

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 Monday, 25 September 2006 17:11:15 UTC