Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] How to make a restriction for "A HasPrerequisite (X and Y and Z)" expression

ozg ozgun_yilmaz at
Wed May 28 16:41:41 PDT 2008


> Hi,
> On Tue, May 27, 2008 at 7:50 PM, ozg <ozgun_yilmaz at> wrote:
>> I'm new and developing an university education ontology.
>> I added every lecture as a class to the ontology.
> You mean that you have classes like 'calculus-1' and 'calculus-2'?
> Do you also have "individual" lectures like
> 'Calculus-1-with-id-code-1234'?

Yes. I have a super class: Lecture. And I have lecture classes like
Calculus1, ..  which are subclasses of Lecture. I also have individuals like
Calculus1-Year2001, Calculus1-Year2002....

>> And I defined a property
>> "HasPrerequisite" meaning some lectures can have 1 or more
>> prerequisite(s).
> OK.
>> If someone wants to take a lecture he/she must have passed from all of
>> the
>> prerequisite lectures. I defined HasPrerequisite property from lecture to
>> lecture.
> You mean that both the domain and the range of the property
> 'has-prerequisite'
> are the class 'lecture'?

Yes. For ex: LectureA hasPrerequisite LectureB. They are both subclasses of

>> And by making restrictions I adapt the property for each lecture
>> class.
> This sentence I don't understand...

For ex: Calculus2 hasPrerequisite Calculus1.
            LectureX hasPrerequisite Lecture Y and LectureZ.
I use a general property, I don't add a new property for every different

>> My question is:
>> If a lecture has only 1 prerequisite lecture, I define a hasValue
>> restriction. Right?
> Well, the argument of 'hasValue' must be an individual. You can say that:
> (1) Calculus-2 instanceof has-prerequisite value Calculus-1.
> but here both Calculus-1 and Calculus-2 are individual lectures.
> Note that (1) is equivalent to:
> (2) ObjectPropertyAssertion(has-prerequisite Calculus-2 Calculus-1)
> It is probably simpler to assert (2) in Protege.
>> But if a lecture has many prerequisites I can't use hasValue with
>> anding(intersecting) them.
> Just assert several axioms of type (2) (or (1)).
>> A person can take a lecture if the person passed
>> all of the prerequisite lectures. How can I define such a restriction?
> Do you mean something like this (think of 'takes' as 'has taken'):
> (3) If a person takes a lecture X then the person takes every lecture
> that is a prerequisite of the lecture X.
> Now, if your instance data says that:
> (4) John takes Calculus-2.
> (5) It is false that John takes Calculus-1.
> (6) A prerequisite of Calculus-2 is Calculus-1.
> Then you would get an inconsistency which helps you to "discover" that
> John hasn't been playing
> by the rules set by the prerequisite-assertions.
> The SWRL equivalent of (3) is
> (7) person(?x1) and lecture(?x2) and lecture(?x3) and take(?x1 ?x2)
> and has-prerequisite(?x2 ?x3) -> take(?x1 ?x3)
> which you could also express as an OWL 2 property chain (assuming that
> you use Protege 4):
> (8) (take o has-prerequisite) SubPropertyOf take
>> Like "LectureA HasPrerequisite (LectureX and LectureY and LectureZ)"
>> By making hasValue restrictions for all of the prerequisites one by one.
>> Or and'ing them and using maybe allValuesFrom restriction.
> Sorry, this part I didn't understand...
> hope this helps,
> Kaarel
Now I realized using hasValue is irrelevant. As I stated in another post:
I use allValuesFrom : For "LectureA has prerequisite LectureB" I make a
restriction on HasPrerequisite: 
"allValuesFrom LectureB" 
And when I try to add prerequisite LectureB instance for the
"HasPrerequisite property" for the instance of LectureA which has 1
prerequisite(LectureB), only the relevant prerequisite class's
instances(LectureB instances) come to choose from. Restriction works. It
seems okay. Right? 

But if a lecture has more than 1 prerequisite I "or" the prerequisites which
is not an exactly right solution for the case. I tried and'ing them and then
adding individuals to test(if i mixed up the and's and or's) but it is
irrelevant because it doesn't restrict the range as I wanted. 
For ex: "LectureA HasPrerequisite LectureX and LectureY and LectureZ" 
I use "allValuesFrom LectureX or LectureY or LectureZ" restriction for
HasPrerequisite property. 
And when I try to add prerequisites to the LectureA instance, only LectureX,
LectureY and LectureZ instances come to choose from. But it isn't exactly
right because it makes an union of LectureX, Y, Z classes, so someone can
choose all of the prerequisites from LectureX instances for example. Can't I
make a restriction for "1 LectureX and 1 LectureY and 1 LectureZ" with using
only lecture classes? 


View this message in context:
Sent from the Protege - OWL mailing list archive at

More information about the protege-owl mailing list