Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OR <em>is</em> legal in SWRL rules if expressed using OWL's <code>ObjectUnionOf</code>.</p> <p>I think the problem is with the tool support for the SWRL surface syntax like featured in your code samples. Protege 3.x does not support this OR-construct syntactically (at least it didn't last time I checked), and while Protege 4.1 can render it, it fails to reparse it (just checked with rc5). But if you are using a recent OWL-API (v3.2.x) and are using syntaxes like XML or the functional-style syntax everything should work. (Note that Protege 3.x and 4.x use wildly different OWL APIs, I'd recommend you to work only with Protege 4.x and OWL-API 3.x.)</p> <p>If you cannot get OR working in SWRL, then you could use a named class that is equivalent to the <code>ObjectUnionOf</code>, e.g.</p> <pre><code>EquivalentClasses(my-processes, ObjectUnionOf(end-milling, drilling)) machine-tool(?mt) ^ has-process(?mt, ?p) ^ my-processes(?p) -&gt; my-machine-tool(?mt) </code></pre> <p>Note that your work-around (2nd code sample) does not give a semantically equivalent statement, because you are only stating:</p> <pre><code>SubClassOf(end-milling, my-processes) SubClassOf(drilling, my-processes) </code></pre> <p>which is the same as stating:</p> <pre><code>SubClassOf(ObjectUnionOf(end-milling, drilling), my-processes) </code></pre> <p>i.e. to state an equivalence, you need the other implication as well:</p> <pre><code>SubClassOf(my-processes, ObjectUnionOf(end-milling, drilling)) </code></pre> <p>Note also that your rule can be easily expressed in OWL, i.e. you don't need SWRL at all for this rule:</p> <pre><code>SubClassOf( ObjectIntersectionOf( :machine-tool ObjectSomeValuesFrom( :has-process ObjectUnionOf( :end-milling :drilling ) ) ) :my-machine-tool ) </code></pre> <p>Stating everything in OWL (if possible) has some benefits, e.g. you get better tool support (there are more OWL reasoners than SWRL reasoners), and you get more powerful reasoning (SWRL reasoners apply the rule only to known individuals).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload