Search Mailing List Archives
[protege-discussion] Fwd: PAL problem
Peter Soren
p1soren at yahoo.com
Sun Jan 28 06:40:50 PST 2007
HI!
Thank you, Samson. I tried it, but it also didn't
cover all restrictions. Nevertheless, I found a
solution:
(defrange %X :SYMBOL mainslot_value)
(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 (forall %X
and (=> (mainslot_value ?class1 %X)
(exists ?classA (or (and (slot1_class12
?class1 ?classA)
(slot_value
?classA %X))
(and (slot1_class12
?class2 ?classA)
(slot2_class1
?class1 ?class2)
(slot_value
?classA %X)))))
(forall ?classB (and (mainslot_value ?class1
(slot_value ?classB))
(or (slot1_class12 ?class1
?classB)
(and (slot1_class12
?class2 ?classB)
(slot2_class1
?class1 ?class2)))))
)))
The second part ensures that mainslot_value has all
values of corresponding slot_value slots, but it
allows addition of values that doesn't exist in any
slot_value slot. The first part solves that problem.
Regards, Peter
--- Samson Tu <swt at stanford.edu> wrote:
> Date: Sat, 27 Jan 2007 15:39:11 -0800
> From: Samson Tu <swt at stanford.edu>
> To: User support for Core Protege and the
> Protege-Frames editor
> <protege-discussion at lists.stanford.edu>
> Subject: Re: [protege-discussion] Fwd: PAL problem
>
> Try this:
>
> (defrange ?c11 :FRAME Class1)
> (defrange ?cab1 :FRAME ClassAB)
> (defrange ?cab2 :FRAME ClassAB)
> (defrange ?c12 :FRAME Class1)
> (defrange ?c13 :FRAME Class1)
> (defrange ?c21 :FRAME Class2 )
>
>
> (forall ?c11
> (=> (own-slot-not-null mainslot_value ?c11)
> (or (exists ?cab1
> (and (= (slot_value
> ?cab1)(mainslot_value ?c11))
> (exists ?c12 (slot1_class12
> ?c12 ?cab1))))
> (exists ?cab2
> (and (= (slot_value
> ?cab2)(mainslot_value ?c11))
> (exists ?c21 (and
> (slot1_class12 ?c21 ?cab2)
> (exists ?c13
> (slot2_class1 ?c13 ?c21))))))
> )))
>
>
>
> Peter Soren wrote:
> > Hi all!
> >
> > 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 the 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 one of those
> > conditions:
> > - 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
> that
> > same instance of Class2 is a value of slot2_class1
> for
> > some instance of Class1
> >
> > I devided ClassAB in two for the purpose of
> solution.
> > 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
> > even if they are not)
> >
> >
> > Regards, Peter
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
>
https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing:
> http://protege.stanford.edu/doc/faq.html#01a.03
>
____________________________________________________________________________________
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
http://farechase.yahoo.com/promo-generic-14795097
More information about the protege-discussion
mailing list