Search Mailing List Archives
[protege-owl] re asener that support constraints
swt at stanford.edu
Mon May 12 20:38:33 PDT 2008
I think you want to have
Class1(?x) and Class1(?y) and sameAs(?x,?y) and hasClass2a(?x,?z) and
hasClass2b(?y,?a) and differentFrom(?z,?a) -->
not sameAs(?z, ?a).
> Is the example I gave correct?
> thx seba
> Samson Tu wrote:
>> The type of constraints that you want CAN BE formulated as SWRL rules
>> with empty heads, but it doesn't mean that its easy to use Jess
>> implementation of SWRL reasoning to check these constraints. The problem
>> I see is that constraint violations correspond to those bindings of the
>> variables in SWRL rules that satisfy some, but not all, of the
>> predicates. It's not enough to see which rules fire. You need to have
>> code that look at patterns of variable bindings and recognize a subset
>> of non-firing bindings as constraint violations.
>> In other words, the current Protege SWRLTab doesn't support the checking
>> of constraint violations that you want.
>> bassiee wrote:
>>> hey martin,
>>> if you say that the jess back end in the swrltab supports a constraint
>>> an empty head
>>> then I probably don't understand how constraints have to be interpreted.
>>> So I give an example and if you could say it is correct or not (and what
>>> should be) that would be great.
>>> The example is very similar to what I want:
>>> 2 Classes: Class1 and Class2
>>> 2 properties: hasClass2a and hasClass2b both have domain Class1 and range
>>> I want to say in the constraint: an individual of Class1 can have a
>>> connection to Class2 via 'hasClass2a' and 'hasClass2b', but the
>>> it connects to have to be different.
>>> So it looks to me a SWRL constraint with an empty head:
>>> Class1(?x) and Class1(?y) and sameAs(?x,?y) and hasClass2a(?x,?z) and
>>> and sameAs(?z,?a) -->
>>> Is this correct?
>>> If it is why doesn't the reasoner react to any breach of the constraint.
>>> thanks seba
More information about the protege-owl