Search Mailing List Archives
[protege-discussion] PAL problem
p1soren at yahoo.com
Sat Jan 27 03:53:29 PST 2007
I have this problem in PAL:
Both classes Class1 and Class2 have in slot1_class12 instance of ClassAB as value
Furthermore, Class1 has in slot2_class1 instance of Class2 as value
ClassAB has some specific value in slot_value (cardinality is single, and there are several allowed symbols that can be taken as a value)
Class1 has some specific values in mainslot_value (cardinality is multiple, and there are same allowed symbols as for slot_value that can be taken as value)
The restriction says that Class1 in mainslot_value can have only those values that meet this condition:
- the value is a value of value_slot of some instance of ClassAB, and that instance is a value of slot1_class12 for some instance of Class1 , or
- the value is a value of value_slot of some instance of ClassAB, and that instance is a value of slot1_class12 for some instance of Class2, and and that same instance of Class2 is a value of slot2_class1 for some instance of Class1
I devided ClassAB in two for the purpose.
The problem is that I need a general description and not only for a value "that".
The solution beneath is just one of a dozen I tried and it is only for 1 value.
I also need it to work when either Class1 or Class2 doesn't have any instances.
(defrange ?class1 :FRAME Class1)
(defrange ?classA :FRAME ClassAB slot1_class12)
(defrange ?classB :FRAME ClassAB slot1_class12)
(defrange ?class2 :FRAME Class2 slot2_class1)
(forall ?class1 (forall ?class2
(=> (and (not (exists ?classA
(and (slot1_class12 ?class2 ?classA)
(slot2_class1 ?class1 ?class2)
(slot_value ?classA "this"))))
(not (exists ?classB
(and (slot1_class12 ?class1 ?classB)
(slot_value ?classB "this")))))
(not (mainslot_value ?class1 "this")))))
Please, help, because I have tried so many solutions and it doesn't work. (It says that constraints are met when they are not)
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
More information about the protege-discussion