The problem you are experiencing is due to the open world assumption in OWL and Description Logics. This means the reasoner will only infer new inferences from explicitly stated information and not from absence of information.
So to achieve your desired result you have to state that Core_Course
and Elective_Course
are disjoint. Then you can do one of two things:
(1) State for each individual that is an elective that it is of type not
(Core_Course)
. But then you could just as well state it as of type Elective_Course
.
(2) Define all your knowledge unit individuals as say core1, core2, ... coren, elective1, elective2, ..., electivek
. Then set Knowledge_Unit
equivalent to all individuals and Core_Course
to all core course individuals, i.e.
Class: Knowledge_Unit
EquivalentTo: {core1, core2, ... coren, elective1, elective2, ..., electivek}
Class: Core_Course
SubClassOf: Knowledge_Unit,
EquivalentTo: {core1, core2, ... coren}
Update: 20180510
Wrt universal property restrictions like partOf only KnowledgeUnit
, it is important to understand that it also includes individuals for which it is known that they do not take part in any partOf
relation. This can lead to entailments that can be difficult to understand. I have written about this here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…