使用 Protege 中两个数据属性之间的关系定义 class 限制

Defining a class restriction using relationship between two data properties in Protege

我正致力于在 Protege v5.2 中构建一个简单的软件 ontology,我正在尝试 class 将软件(使用推理插件)CPU 化为密集型如果他们的 CPU 时间大于他们物理执行时间的 80%。 出于这个原因,每个人都有以下填充浮点值的数据属性:

a) 有CPU时间

b) hasPhysicalExecutionTime

我创建了一个 class CPUIntensive,我想添加一个限制,即具有 CPUTime > 0.8 * hasPhysicalExecutionTime 的个人属于此 class . 这可以在 Protege 中完成吗?

OWL 2 不允许算术计算,例如乘法(尽管可以使用数据范围进行某种比较)。

您需要内置 SWRL:

hasCPUTime (?ind, ?cpu) ^
hasPhysicalTime (?ind, ?phy) ^
swrlb:greaterThan (?cpu, ?mul) ^
swrlb:multiply (?mul, 0.8, ?phy)
 -> CPUIntensive(?ind)

如果第一个参数等于第二个参数到最后一个参数的算术积,则满足 swrlb:multiply 内置函数,如果第一个参数未绑定,则将其绑定到它们的算术积,很像 Mul is 0.8*Phy. 在 Prolog 中的工作。

Pellet 确实支持这些内置函数: