umlrdfowlontologysemantic-web

Searching for a naming convention for properties in an OWL ontology when coming from an UML Model


Short Version: What is a good naming convention specifically for data & objectproperties in OWL2 when converting an UML model automatically into an OWL2 onthology.

Background

I am maintaining a large standard data model for data exchange of development data for automotive wiring harnesses (see: https://ecad-wiki.prostep.org/specifications/vec/v202/). The model is defined with UML with static structure (Class Diagrams only) and has about 500 classes and 1200 properties. For data exchange, a XML Schema is generated automatically from the UML model, which is a straight forward process.

For a number of reasons (e.g. lack of semantics in the XML schema) we are currently looking into deriving an OWL2 Ontology from the UML model (for further enrichment). I already had a look at a couple of sources (e.g. this question: Converting UML to OWL Ontology) and the article "UML Class Diagram to OWL and SROIQ Reference" by Henriette Harmse linked there. The "structural translation" is not an issue and already done in a first draft.

Due to the extent of the model, the translation must be done with a set of defined translationRules and can not be done manually. Due to established working procedures, the UML model will be the master for static structure in the future as well. So the translation process must generated the same result now and in the future.

Problem

The UML model does not define unique property within the model. E.g. there are three object properties assignment with completely different semantics, there are also properties that have the same semantic (e.g. there like 10 classes that have a abbreviation). How to name the properties in the onthology? Things I already thought about, and my conclusions:

  1. Use the name from the model. Pro: It is short, Con: There are different semantics and declaring for example rdfs:domain & rdfs:range while lead to completely wrong conclusions. -> not useful

  2. Since 1.) is not useful I need a unique URI for each property in the model. If I come to the conclusion, that two properties in the mode are actually the same (or have similiar semantics) with common inferences, I still can declare them owl:equivalentProperty or rdfs:subPropertyOf. And now, I am wondering how to create these unique URIS:

    • Use the name from the model, but add a qualifier to make it unique when it is ambigious (e.g. abbreviationX & abrreviationY). Pro: It is short and it compensates for 1.), but the translation UML -> to OWL is complicated and not clear (during conversion and later for users of the model). What happens when a currently unique property name becomes ambigious in the future? -> not useful

    • Opaque local names (e.g. p123456): For data, in think this okay, but for the ontology definition it feels akward. Especially when data is created during development debuging this will be a nightmare. -> not useful

    • Qualify the property with the class name. Actually, that is also the qualified name for a property defined in the UML. E.g. DocumentVersion::abbrevation, but there are multiple ways to achieve this and since I am a bit a newbie in OWL, I am wondering what is the OWLish way to do that.

      • <ClassName><seperator><propertyName>. What to use as seperator? However, this violates the convention to define property names in camel case with a small letter in the beginning (mentioned in "Semantic Web for the Working Ontologist" for example). --> This is what I currently do (e.g. DocumentVersion_abbrevation).
      • I also thought about things like <propertyName><ClassName> (e.g. abbrevationDocumentVersion) but that might lead to false implicit assumptions about the direction of the relation. Or <propertyName>Of<ClassName>, but that feels a bit awkward to me. Or <ClassName>/<propertyName> which leads to a mess with CURIE prefixes and poses a problem when useing #-namespaces.

My gut tells me, that it has to be something like the last point, which is what I am doing in prototype. I have years of experience in modelling, so I know that good naming is fundamental for model understanding (and sucess). However, I have little experience in semantic web modelling, so any more profound opinion is highly welcome!

Clarifications

Why do you want to retain so many unique properties?: Short Answer: Mapping all UML properties with the same name to a single OWL property would be a bit like having an ontology using the property "plays" for Persons playing in Football Teams, Kids playing a set of Video games, Actors playing in Movies and Movies playing in time periods and locations. It destroys subtile differences and defeats the possibility to draw correct conclusions.

Detailed reasons in my context for that:

  1. As mentioned before, I have to do an automatic, repeatable conversion from UML to OWL. So, clear general rules based on the information available in the UML model. No individual decisions. Enrichment of the generated ontology with additional axioms after the generation is possible.
  2. As I tried to explain, there are concepts where it is true, that the same property name adresses the same concept (like name, description, abreviation, etc.). However, there are concepts where it is not true. E.g. the model knows three properties "currentInformation". Two could be interpreted "as the maximum current before the part melts". However, their defintions are quit different. The other one describes the normal operating currents of an E/E component. Mapping those concepts to the same property name would simply be wrong (in my opinion, but I might be mistaken). The current model has no criteria to decided between the first and the latter case.
  3. What inferences can I draw from the model. When every UML property gets its own OWL URI, I can define rdfs:domain & rdfs:range assertions or owl:restrictions. When I map all UML properties with the same name to same OWL Property I can not do this. Because then, giving something a "name" would inference that is of all classes in the UML model that a define a "name". However, the correct inference would be, that it is a NamedElement. Unfortunately the UML does not know a NamedElement at the moment. Therefore the idea, to map every UML property to a unique OWL property with rdfs:domain & rdfs:range assertions or owl:restrictions (as suggested by the paper from Henriette Harmse). After that I can enrich the ontology with general concepts like "name" and map the unique one to the general ones (e.g. with rdf:subpropertyOf) and can draw inferences on the general concepts (like the NamedElement).
  4. In the current model, all properties have a textual definition (which applies to the context in which the property is defined). It is not guaranteed (and some cases highly unlikely) that the textual definitions are 100% consistent to each other.

Solution

  • Since you are obligated to retain all these properties and make sense of them later, I recommend you follow ISO 11179-5 naming and design rules. E.g., if a class Person has a last name property, call it PersonLastName. See wikipedia for more.