1

I have developed an algorithm (java piece of code) that finds specific paths (property chains) between two given classes in an OWL-DL ontology. Here is the ontology

Actually, Pellet reasoner is taking too much time to respond to my queries, about 5-7 seconds to check whether a class F is related by a to-one to a class D through a property r, and this query is repetitive in my algorithm, however, if I re-run it on similar classes, it executes much faster (I think it's something related to in-memory model or RAM memory caching...). However the first time, it takes about 4-5 minutes (depending on the number of checks done).

F ⊑ =1 r.D

This bottle neck is related to the ontology and the reasoner themselves: (If I run it without a reasoner, it executes immediately!)

Questions:

1- Can I evaluate the performance disregarding the reasoner time? i.e. something like: its execution is immediate, if we ignore the time taken by the reasoner!

2- Is there some way to improve the performance in this situation?

Median Hilal
  • 1,483
  • 9
  • 17

1 Answers1

1

My guess for the extra time required on the first call is that Pellet is doing other tasks as well (e.g., it might need to classify the ontology first).

In order to separate the reasoning time from your algorithm, you could run your code twice (in the same VM) and only consider the time used the second time around - that will remove any initialization costs from the total.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • thank you. However, Pellet takes about 4 minutes to classify the ontology first. After that, the first run takes about 4 minutes, i.e a total of 8 minutes. So the 4 minutes of the algorithm to run doesn't include the classification time. Actually, I tried it again, when I run it starting from a class that almost all other classes are reachable from (i.e. most of the possible queries are done and their results are cached), the next run is usually immediate. – Median Hilal May 15 '15 at 09:52
  • However, when I first run it over an isolated class (very little other classes are reachable, and less corresponding queries can be cached). The next run is not always immediate. It may take as long as required! – Median Hilal May 15 '15 at 09:53
  • So, I'm afraid it's something related to in-memory? Isn't it. Importantly, I tried using Pellet in Protege, answering the DL expression above F ⊑ =1 r.D takes about 5 seconds for each single run. So Imagine repeating it over and over! – Median Hilal May 15 '15 at 09:55