oml icon indicating copy to clipboard operation
oml copied to clipboard

[BUG] - missing support for swrl predicates involving scalar properties.

Open NicolasRouquette opened this issue 3 years ago • 2 comments

Description

A clear and concise description of what the bug is.

https://www.w3.org/Submission/SWRL/

SWRL supports using a data valued property as an atom:

atom ::= description '(' i-object ')'
	 | dataRange '(' d-object ')'
	 | individualvaluedPropertyID '(' i-object i-object ')'
	 | datavaluedPropertyID '(' i-object d-object ')'
	 | sameAs '(' i-object i-object ')'
	 | differentFrom '(' i-object i-object ')'
	 | builtIn '(' builtinID { d-object } ')'

In OML this would correspond to a scalar property.

Unfortunately, OML 1.0.6 does not support using a scalar property as a predicate. This should also include adding support for binding the value of the scalar property either to a SWRL variable or to a constant.

Steps to Reproduce

Steps to reproduce the behavior:

  • [ ] Step 1
  • [ ] Step 2
  • [ ] Step 3

Expected Behavior

A clear and concise description of what should be the expected behavior.

Additional Context

Enter any other details such as dependencies, environment, examples, etc.

Relevant screenshots

If applicable, add screenshots to help illustrate the issue.

NicolasRouquette avatar Jan 15 '22 01:01 NicolasRouquette

OML 1.0.6 already supports specifying scalar properties in a predicate since it inherits from Feature and there is support for FeaturePredicate: https://github.com/opencaesar/oml/blob/3276945fb3e17fc888130720a837abd202982bd1/io.opencaesar.oml.dsl/src/io/opencaesar/oml/dsl/Oml.xtext#L462

At least where the value is specified as a variable.

Are you sure this is not working for you? Can you give an example that does not work?

melaasar avatar Jan 31 '22 15:01 melaasar

See: https://github.com/NicolasRouquette/metrology-vocabularies

In vim4.oml, there is a rule that is commented out:

  // See https://github.com/opencaesar/oml/issues/90
//  rule incoherent-derived-unit-implies-incoherent-system-of-units [
//    systemHasDerivedUnit(su, dq) ^ isCoherent(dq, "false"^^xsd:boolean) ->
//    isCoherent(su, "false"^^xsd:boolean)
//  ]

NicolasRouquette avatar Jan 31 '22 15:01 NicolasRouquette