我有一个 UML 概念图;我想将其表达为DL本体。 UML 类被捕获为 DL 概念,其中关联是通过角色捕获的。一个重要的观点是 UML 类之间的多样性。一对一多重性 (0..* - 0..1) 由功能对象属性捕获,并使一侧 (0..1) 成为强制,即 (0..* - 1) 引用强制参与意味着一对一侧的最大和最小重数为 1。
类 C1 和 C2 之间的关联 A 在 DL 中通过以下方式形式化: 我们对其执行断言的角色 A
表达每个 C2 实例参与的多重性 ml..mu 给定 C1 实例,我们使用断言
我就是不明白C2强制参与断言是如何通过C1上的断言来表达的,最后一个断言是如何读取的?
最佳答案
使用A a 作为属性名称有点不寻常,因此我将使用p 代替。 UML 图也没有表达属性的方向,这使得其余的讨论有点困惑。不过,可以从您提供的公理中收集一些信息。
如果 UML 旨在表达:
- Instances of C1 are related by p to at least nl and and most nu instances of C2.
- At least ml and and most mu instances of C1 are related by p to each instance of C2.
那么你可以使用深度学习公理:
C1 ⊑ ≥nl p.C2
C1 ⊑ ≤nu p.C2
C2 ⊑ ≥ml p-1.C1
C2 ⊑ ≥mu p-1.C1
那些人说,如果 x 是 C1 (C2),那么 x 与 C 的适当数量相关2 (C1) 个实例,由 p (p-1) 提供。现在,由于 UML 中表达的关系将仅关联两个类的实例,即,不会通过属性 p 关联其他类型的实例,因此您更有可能声明域并p 的范围分别为 C1 和 C2,其中:
∃p ⊑ C1
∃p-1 ⊑ C2
然后使用上面公理的更简单版本:
C1 ⊑ ≥nl p
C1 ⊑ ≤nu p
C2 ⊑ ≥ml p-1
C2 ⊑ ≥mu p-1
回答非常具体的问题:
just cannot understand how the mandatory participation of C2 in the assertion is expressed by an assertion on C1, how is the last assertion read?
问题中最后一个公理中的符号很不寻常,我不确定到底应该是什么。我不确定这些小抑扬符应该是什么。它看起来像:
不过。如果是这样的话,它被读作C1 ⊑ ∃ p
C1 is a subclass of ∃ p
这意味着
If x is an instance of C1 then x is an instance of ∃ p
这意味着
If x is an instance of C1 then x is an instance of the class of things that have at least value for p (i.e., there is at least one y such that p(x,y)).
在一阶逻辑中,您可以将其表示为:
∀x.(C1(x) → ∃y.p(x,y))
关于owl - 描述逻辑;强制参与,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26852291/