top of page

Testing and Debugging Ontologies

  • Writer: Michael DeBellis
    Michael DeBellis
  • Jan 25, 2022
  • 2 min read

Updated: Feb 4, 2022

I'm a firm believer in using Agile methods for developing software. I'll never forget the first time I read Kent Beck's book Extreme Programming Explained. It was as if someone had finally put down in words the way I always tried to develop software. One of the principles of Agile is test-driven development.


Test-driven development applies to ontology design as well. When developing an ontology, one of the most common errors that I see new users commit is to spend all their initial work developing the classes, properties, and axioms while leaving the individuals (the test data for an ontology) until the end. This seems natural but it can make debugging the ontology much more difficult. The problem is that the reasoner will often only detect errors in your ontology when there are individuals. If you create a complex ontology with many axioms and only add individuals as the last step there may be many errors that are only detected by the reasoner once individuals are defined. When there are multiple inconsistencies in an ontology the feedback from the reasoner is often much less informative and rather than having the reasoner focus on the specific classes or properties causing the problem you get a very generic error message that is of little value. Here are some best practices I use for taking a test-driven approach to ontology design:

  1. Run the reasoner frequently. I usually run it after every change that could impact reasoning.

  2. Define individuals to test your ontology at the same time as you develop your ontology.

  3. Make all your test individuals instances of a class called TestData or something similar. That way you keep them separate from real data and can easily delete them when you go to load real data.

  4. Make sure that every leaf class (a class with no subclasses) has at least one instance.

  5. Make sure that each property has at least one instance with values.

  6. Use an ontology evaluation tool. These tools can find anti-patterns such as inconsistent naming schemes and many more. Two excellent tools are OOPS! and (for those who follow the OBO standards) ROBOT.

  7. Postpone adding Disjoint With axioms until you have added individuals, run the reasoner, and inspected the results. A common problem is that an individual will be assigned to an instance of some class that the designer didn't intend as a result of some domain or range definition. It is easier to find these errors by inspecting your individuals to see if the reasoner has asserted them to be instances of classes you didn't expect than to have the reasoner make the entire ontology inconsistent due to violations of a disjoint axiom.

  8. Don't add axioms for every possible condition in the ontology. For example, if the domain for hasFather is Person it typically isn't needed to add an axiom to the Person class such as hasFather some Person. Only add axioms if they satisfy some use case or story or provide some value added to differentiate individuals or automatically recognize an individual via a defined class. Every axiom adds complexity and the reasoner can become slow when you start to scale up with real data if you have superfluous axioms.




3 Comments


ZVirginiaZaider
Jun 03

We will continue to report on this story link as it develops and will update you as soon as more link information becomes available. We knew that this situation was far from resolved, but it appears link to be moving quickly.

Like

ZVirginiaZaider
May 30

The interesting thing about this partnership, and by extension the watch, is that there's already so much in common between the two companies that it seems like link Porsche was very hands-off in link terms of controlling the design of the watch. It feels very TAG Heuer, and also feels like something modern Porsche would produce, just link the same. And if the partnership works, everyone benefits. TAG Heuer can help solve the age old mystery of how car folks become watch folks and vice versa.

Like

IYolandapYannip
May 13

Brand: A. Lange & SöhneModel: OdysseusReference Number: 363.117Diameter: 40.5mmThickness: 11.1mmCase Material: TitaniumDial Color: Brass, in link ice blueIndexes: Baton appliques, link in white goldLume: Yes, link in hands and hour markersWater Resistance: 120 metersStrap/Bracelet: Titanium bracelet

Like
  • facebook
  • linkedin

©2019 by Michael DeBellis. Proudly created with Wix.com

bottom of page