Hello Leonard;  Yes I do believe this is a typo in the rule set.  We
will look into this some more and get it fixed for the 3.6 release.

The two rules, cls-hv1 and cls-hv2, are converses of each other.  cls-
hv1 covers the case where if a class defines a hasValue restriction
property, then all members of the class must have that property
value.  The rule infers this, in typical OWA fashion, making the model
consistent.  So given a [:hasPrice value ".25"^^xsd:float] restriction
on :Orange, the triple {?u :hasPrice ".25"^^xsd:float} is inferred for
all members of Orange.  Note that members of :Orange can also have
other :hasPrice values - e.g. {?u :hasPrice ".50"^^xsd:float} - and
that is consistent with the model.

The cls-hv2 covers the case that if a resource meets the hasValue
criteria, then it is a member of the class.  So let's say we have an
instance with the triple {:alime a :Lime ; :hasPrice ".
25"^^xsd:float}, since the value of :hasPrice is .25, it meets the
criteria of :Orange membership and therefore the rule infers {:alime
a :Orange}.  The tricky part to understand in this query is that ?u
refers to any resource.  In our example the graph pattern is matched
as:
   WHERE
   {   ?x owl:hasValue ?y .  ## ?x bound to bnode representing the
restriction, ?y bound to ".25"
       ?x owl:onProperty ?p . ## ?p bound to :hasPrice
       ?u ?p ?y .  ## ?u bound to : alime
   }

Try this in your SPARQL view by applying the above to a model that has
some hasValue restrictions.  I'd suggest using 'SELECT *' so you can
follow the variable mappings.

<<BTW: what does it mean to assert that a class X hasValue y on
property P?
The class Orange does not have a price, only individual oranges have a
price.>>

If you are familiar with OO programming, this is akin to a class
variable.  hasValue restrictions are defined on the class and applies
"automatically" to all instances.  This is basically what cls-hv1
does.  cls-hv2 allows you to also infer that anything with the
property-value pair is a member of the class.

-- Scott

On Aug 25, 3:39 pm, Leonard Jacuzzo <[email protected]> wrote:
> Hello list,
>
> Thank you for all of the help that you have been to me in understanding how
> to use SPARQL for rule creation.
>
> I have a few questions.
>
> I was looking over the specification of OWL-RL 
> athttp://topbraid.org/spin/owlrl-all.html
>
> The rule cls hv1 has a typo in it. The last triple in the WHERE clause has
> not function in the rule and is not part of the W3C specification. That is
> "?u?p ?v should be removed. Here is the rule as it stands.
> # cls-hv1
> CONSTRUCT {
>     ?u ?p ?y .}
>
> WHERE {
>     ?x owl:hasValue ?y .
>     ?x owl:onProperty ?p .
>     ?u a ?x .
>     ?u ?p ?v .
>
> }
>
> I am also confused by the following rule, which conforms to the W3C, but
> makes no sense to me. Can you explain it to me?
> Here is the rule:
> # cls-hv2
> CONSTRUCT {
>     ?u a ?x .}
>
> WHERE {
>     ?x owl:hasValue ?y .
>     ?x owl:onProperty ?p .
>     ?u ?p ?y .
>
> }
>
> The reason that I am confused is that it seems easy to come up with a
> counter example. E.G. imagine that the class "Orange' hasvalue .25 on the
> property "hasPrice" (so oranges are priced at 25 cents) Further imagine that
> some individual lime(u) hasPrice .25. It does not follow from this that Lime
> (u) is a lemon.
>
> What am I missing in my understanding of this rule?
>
> BTW: what does it mean to assert that a class X hasValue y on property P?
> The class Orange does not have a price, only individual oranges have a
> price. Should this be a Orange is a subclass of the restriction on the
> property "hasPrice" to the value 25 cents? When would a person use the
> structure in the WHERE clause?
>
> I have one more question about rules, but I will wait until I think some
> more.
>
> Thank you for reading this. Any help will be great,
> LFJ

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to