[RuleML-all] RuleML 0.91 Naf Datalog and Integrity
Boley, Harold
Harold.Boley at nrc-cnrc.gc.ca
Sat Mar 29 19:45:24 AST 2008
Hi David and All,
The turnstile |- is often used with either a set of formulas
(Rulebase |- Rulebase) or a 'query' (Rulebase |- Query) on the
right-hand side.
In RuleML 0.92 we should thus perhaps generalize
Entails: ( oid?, (body | Rulebase), (head | Rulebase) )
body-in-entails: (Rulebase)
head-in-entails: (Rulebase)
to
Entails: ( oid?, (body | Rulebase), (head | Rulebase | Query) )
body-in-entails: (Rulebase)
head-in-entails: (Rulebase | Query)
The Entails head can then really be this Query:
<Query>
<Naf>
<And>
<Atom>
<Rel>gold</Rel>
<Var>object</Var>
</Atom>
<Atom>
<Rel>rusty</Rel>
<Var>object</Var>
</Atom>
</And>
</Naf>
</Query>
Please let us know if you'd have a problem with this change
in RuleML 0.92.
Other RuleML 0.92 changes are already in Reaction RuleML 0.2
(http://ibis.in.tum.de/research/ReactionRuleML/0.2).
Cheers,
Harold
---------------------------------------------------------------
PS: Maybe we shouldn't have used context-sensitive role names in
Entails, in the sense that, e.g., <head> has different content in
<Implies> and in <Entails>, i.e. roles are local to their classes
(http://www.ruleml.org/0.91/xsd/modules/connective_module.xsd):
. . .
<xs:group name="body.content">
<xs:choice>
<xs:element name="Atom" type="Atom.type"/>
<xs:element name="And" type="And-inner.type"/>
<xs:element name="Or" type="Or-inner.type"/>
</xs:choice>
</xs:group>
<xs:group name="body-entails.content">
<xs:choice>
<xs:element ref="Rulebase"/>
</xs:choice>
</xs:group>
. . .
<xs:group name="head.content">
<xs:choice>
<xs:element name="Atom" type="Atom.type"/>
</xs:choice>
</xs:group>
<xs:group name="head-entails.content">
<xs:choice>
<xs:element ref="Rulebase"/>
</xs:choice>
</xs:group>
. . .
<xs:group name="Entails.content">
<xs:sequence>
<xs:element ref="oid" minOccurs="0"/>
<xs:choice>
<xs:element name="body"
type="body-entails.type"/>
<xs:group ref="body-entails.content"/>
</xs:choice>
<xs:choice>
<xs:element name="head"
type="head-entails.type"/>
<xs:group ref="head-entails.content"/>
</xs:choice>
</xs:sequence>
</xs:group>
. . .
These context-sensitive role names would go away in RuleML 0.92,
where we plan to change Implies' <body> to <if> and <head> to <then>,
so that we could keep, context-freely, Entails' <body> and <head>.
________________________________
From: ddossot at gmail.com [mailto:ddossot at gmail.com] On Behalf Of David
Dossot
Sent: March 29, 2008 6:57 PM
To: Boley, Harold
Cc: ruleml-all at ruleml.org
Subject: Re: [RuleML-all] RuleML 0.91 Naf Datalog and Integrity
Despite what I said below, I still can not implement an integrity
constraint in Naf Datalog 0.91. When I thought using an explicit body
would help me, I in fact misunderstood the Entails document model.
Entails: ( oid?, (body | Rulebase), (head | Rulebase) )
What limits me is what I can use in a Rulebase (or head) to express the
integrity query. head is not enough, as it can only contain an Atom and
Rulebase is also not fitted as its content model:
Rulebase: ( oid?, ( formula | Atom | Implies | Equivalent | Forall
)* )
does not allow Query. I could use an Implies, from which I would ignore
its head, but this is clunky.
Thanks for your help,
David
More information about the RuleML-all
mailing list