Search Mailing List Archives
[protege-owl] How to make a restriction for "A HasPrerequisite (X and Y and Z)" expression
tar at ISI.EDU
Tue May 27 14:35:53 PDT 2008
On May 27, 2008, at 10:50 AM, ozg wrote:
> I'm new and developing an university education ontology.
> I added every lecture as a class to the ontology. And I defined a
> "HasPrerequisite" meaning some lectures can have 1 or more
> 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. And by making restrictions I adapt the property for each
> My question is:
> If a lecture has only 1 prerequisite lecture, I define a hasValue
> restriction. Right?
> But if a lecture has many prerequisites I can't use hasValue with
> anding(intersecting) them. A person can take a lecture if the person
> all of the prerequisite lectures. How can I define such a
> restriction? Like
> "LectureA HasPrerequisite (LectureX and LectureY and LectureZ)"
> By making hasValue restrictions for all of the prerequisites one by
> Or and'ing them and using maybe allValuesFrom restriction.
Well, this is a bit of a tricky modeling situation.
But first, let's be clear about how some of the different restrictions
hasValue takes an Individual as its argument and means that the
restricted property must have that individual as one of its fillers.
someValueFrom takes a Class as its argument and means that the
restricted property must have at least one filler from that class.
Generally, unless you want to create OWL-Full ontologies, you will not
be using hasValue with classes. You would generally be using
But some of that depends on what other choices you make in your
modeling. In other words, it partly depends on what your domain of
discourse is, and that is where some of the choices get a bit tricky.
OPTION 1. Make each lecture an individual. In this case you will be
treating each lecture as an individual rather than as a class of
lectures. It will also mean that you can't distinguish between a
lecture given in 2006 and one given in 2008, since there will only be
one individual for each lecture.
If you go this route, then you can use hasValue to set the values of
the pre-requisites. You would have a separate hasValue restriction
for each pre-requisite. You can have multiple such restrictions.
Students can take these lectures, but you won't be able to distinguish
among lectures taken in different years or semesters. You also would
not be able to tell if two students took the lecture at the same
time. In effect, you will have treated the lecture class as the
concrete domain object that you are talking about.
But this is still problematic because pre-requisites are not
restrictions on the lectures, but rather on the students who take the
lectures. See discussion below.
OPTION 2. Make each lecture a class. The individuals of these
classes can be particular instances of the lectures happening, and
thus have particular instructors, students, times, etc. Pre-
requisites could perhaps then be modeled using someValuesFrom type
But this approach is problematic because the pre-requisites are NOT
actually restrictions on the lectures themselves, but rather
restrictions on the students who are taking the lectures. So one
would need to use a more complicated formulation to place the
restriction on the student. I think this may be the most accurate
model, but the formulation makes the pre-requisites be an implicit
model, which would make it difficult to answer the question "What are
the pre-requisites of course X?". That is because one would otherwise
require a higher order logic to represent the mapping rule.
This relies on the presence of some additional properties:
takesCourse (Student -> Lecture)
hasStudent (Lecture -> Student), inverse of takesCourse
To say that Lecture1 has Lecture2 as a pre-requisite, one could then
Lecture1 <=> hasStudent allValuesFrom (Student and takesCourse
In other words, students that are taking (an instance of) Lecture1
must belong to the class of students how have taken (an instance of)
Lecture2. Now this can be extended to a requirement of having passed
the class by just changing the "takesCourse" property to
"passesCourse" in the restriction.
This extends to multiple pre-requisites by just adding additional
LectureA <=> hasStudent allValuesFrom (Student
This gives a good structural model, although as noted above, it would
not be easy to query the ontology to find the restrictions from the
someValues from clauses.
OPTION 3. Make the pre-requisites annotations of the lecture classes
rather than restrictions. In this case you would have to build your
own inference procedure to check for consistency, because annotations
don't get enforced by the classification reasoner the way restrictions
do. Also, not all systems are happy having classes as values of
annotation properties. Since you have your own interpretation of the
annotation, you can assign the appropriate semantics to the
interpretation and enforcement of the pre-requisites property.
OPTION 4. Use classes as fillers of the pre-requisites property.
This puts you into OWL-Full and still doesn't solve the issue of the
student being the one restricted.
More information about the protege-owl