Re: user defined datatype in owl

Hi Fano,

You have a few questions, so I'll separate them out.

On Tue, Feb 27, 2024 at 11:52 AM <fano.ramparany@orange.com> wrote:

> Is it possible in owl to:
>
>    - define user defined datatypes? for example, a complex number
>    datatype, which is not a built-in datatype and could be defined as the
>    couple [real part, imaginary part].
>
> TLDR: no

OWL datatypes are built with set operations on existing datatypes. These
are generally the XSD datatypes, though individual implementations can do
more. So for existing datatypes D1 and D2, then a new datatype Dnew could
be defined by one of:

   1.     Dnew ⊑ D1 ⊓ D2
   2.     Dnew ⊑ D1 ⊔ D2
   3.     Dnew ⊑ D1
   4.     Dnew ⊑ ¬D1

In order, these are defined by:

   1. owl:intersectionOf
   2. owl:unionOf
   3. owl:withRestrictions + *facets*
   4. owl:complementOf

(There are also enumerations, but these are not particularly useful for the
suggested datatype)

What you have requested requires combining multiple numeric values (as for
complex numbers) which would require an operation of:
    Dnew ⊑ D1 × D2
However, this is not a feature of OWL.

It may be possible to describe a pair of numbers as a subtype of
rdf:XMLLiteral, but there is no way to interact with this using OWL
<https://www.w3.org/TR/2012/REC-owl2-syntax-20121211/#XML_Literals>.
Another alternative is to use a subtype of xsd:string which is constrained
by regex to be a lexical description of the data.

This sort of thing is usually addressed in RDF, where individual databases
may support new Literal datatypes (such geospatial data
<https://lup.lub.lu.se/luur/download?func=downloadFile&recordOId=8974835&fileOId=8974862>).
However, OWL does not require support for these. For general OWL support,
I'd probably represent such data as a class with real and imaginary
properties (along with an inferable absolute property).

On the next question...

>
>    - Another example is to define a numerical-value datatype as the union
>    of xsd:float, xsd:int, xsd:short, xsd:long,...
>
>
In functional syntax:
DatatypeDefinition( DataUnionOf( xsd:float xsd:double xsd:decimal owl:real
owl:rational ) )

Using Turtle:
ex:Number a rdfs:Datatype;
    owl:unionOf (xsd:float xsd:double xsd:decimal owl:real owl:rational) .


>
>    - use these datatypes as the range of DataProperties?
>
>
The proposed ex:Number datatype can be used this way. A database that had
an extension for literals that represent complex numbers could also extend
OWL for this.

Paula Gearon

>

Received on Tuesday, 27 February 2024 19:24:33 UTC