... | ... | @@ -7,64 +7,102 @@ This plug-in is still in development! Very probably you may experience faulty an |
|
|
|
|
|
These steps are necessary in order to run the plug-in:
|
|
|
* Download the latest version of Protégé Desktop from [http://protege.stanford.edu/](http://protege.stanford.edu/) and follow the installation instructions. Note that the Debugger Plug-In is not compatible with Protégé version 4 and below.
|
|
|
* Install the Ontology Debugger Plugin with Protégé's Update Function```File->Check for Plugins...``` and select *Ontology Debugger* ![update](/uploads/44aea3438356dd8f6a50bf5ca937d2c2/update.PNG)
|
|
|
* Install the Ontology Debugger Plugin with Protégé's Update Function```File->Check for Plugins...``` and select *Ontology Debugger* ![installation](/uploads/878b277d18b3ee7e17cb985fd75530d6/installation.PNG)
|
|
|
|
|
|
* **Alternatively** you can also download the [latest jar-file](http://isbi.aau.at/ontodebug/plugin) of the *Ontology Debugger* and copy the jar-File into the ```plugins``` subfolder of your Protégé 5 desktop client.
|
|
|
* If your Protégé client is already running, then you have to restart the client to load the plug-In. You should now see a new menu entry called ```Debugger``` as shown here: ![menu](/uploads/e18d0faaa937e2ff179e729fb760d175/menu.PNG)
|
|
|
* If your Protégé client is already running, then you have to restart the client to load the plug-In.
|
|
|
* Once your Protégé client has restarted you will see an additional menu entry in ```Tools->Debug Ontology ...``` like shown here: ![debug_ontology_menuentry](/uploads/bee8628627ac19886a99ffa6cc7d8b55/debug_ontology_menuentry.PNG)
|
|
|
|
|
|
# How to use the Ontology Debugger Plug-In in Protégé
|
|
|
The Ontology Debugger shall support the user in the process of finding errors in [inconsistent and/or incoherent ontologies](http://ontogenesis.knowledgeblog.org/1329).
|
|
|
The Ontology Debugger's main task is to ***support the user*** in the process of ***finding the faulty axioms*** in [inconsistent and/or incoherent ontologies](http://ontogenesis.knowledgeblog.org/1329).
|
|
|
|
|
|
To demonstrate the features of the Ontology Debugger and how to use it, let us load the consistent but incoherent *Koala ontology*. Select ```File->Open from URL... ``` and enter the URL http://protege.stanford.edu/ontologies/koala.owl or simply select the URL from the Bookmarks. For this sample debugging session please also choose the provided *Hermit Reasoner* in the ```Reasoner``` menu.
|
|
|
- The process of finding the faulty axioms in the ontology that are responsible for the inconsistency/incoherency is done by ***interacting with the user***.
|
|
|
- The interaction with the user takes place in the way of ***iteratively stating questions*** to the user in the form of axioms.
|
|
|
- Each axiom given in a query can then be read in the form of the question: ***Is this axiom entailed in the ontology?*** or ***Does this axiom hold for the ontology?***
|
|
|
- The user then can give the answer yes if she thinks that this axiom must hold for the ontology or no otherwise.
|
|
|
- Note that the axioms in a query can be either already given explicitely in the ontology or they can be new to the user since they are inferred from the existing set of axioms in the ontology and the answers given before.
|
|
|
- The answers given by the user are also taken into account in the process of narrowing down the set of faulty axiom sets.
|
|
|
- As long as there are more than one set of faulty axioms that together explain the inconsistency/incoherency, the Ontology Debugger repeats with stating questions to the user.
|
|
|
- Once there is only one set of faulty axioms that explain the incoherency/inconsistency the interaction is finished and no more question is generated.
|
|
|
|
|
|
### Step 1: Load the ontology
|
|
|
To demonstrate these features of the Ontology Debugger, we will now try to find the faulty axioms in the ***consistent but incoherent*** [*Koala ontology*](http://protege.stanford.edu/ontologies/koala.owl). Select ```File->Open from URL... ``` and enter the URL http://protege.stanford.edu/ontologies/koala.owl or simply select the URL from the Bookmarks.
|
|
|
|
|
|
![koala](/uploads/3de58c1126cd7b4b641a131c28195ca7/koala.PNG)
|
|
|
|
|
|
### The Ontology Debugger Tab
|
|
|
### Step 2: Select a reasoner
|
|
|
For the process of formulating queries and finding the faulty axioms the Ontology Debugger also relies on using a reasoner.
|
|
|
For our example therefore we also must select a reasoner. Please choose the provided *Hermit Reasoner* in the ```Reasoner``` menu. ![reasoner](/uploads/654ee6fdd1959cc9f947945776142d1b/reasoner.PNG)
|
|
|
|
|
|
### Step 3: Open the Ontology Debugger Tab
|
|
|
|
|
|
Once you have loaded the *Koala ontology*, you can open the *Ontology Debugger Tab* by selecting ```Tools->Debug Ontology...``` in the menu. You may also activate the tab by selecting it in ```Window->Tabs```. The initial layout of the *Ontology Debugger* should look similar to this:
|
|
|
|
|
|
![step3](/uploads/3b5d8a2e56f26a7e9a4475c87dbc00c8/step3.PNG)
|
|
|
|
|
|
***Note*** if you do not see this layout or if you see errors then the layout has changed with a new version of the debugger. Please select ```Window->Reset selected tab to default state``` in such a case to display the current layout.
|
|
|
|
|
|
Once you have loaded the *Koala ontology*, you can open the *Ontology Debugger Tab* by selecting ```Ontology Debugger->Open Ontology Debugger Tab``` in the menu. You may also activate the tab by selecting it in ```Window->Tabs```. The initial layout of the *Ontology Debugger* should look similar to this:
|
|
|
### Step 4: Understanding the layout
|
|
|
|
|
|
![0](/uploads/935a147bdf347c35b2b520f2448e36e3/0.PNG)
|
|
|
The Ontology Debugger is divided into three sections where each one is responsible for the presentation and manipulation of different kind of data during the debugging session of inconsistent and/or incoherent ontologies. In the following we will describe the sections and their meaning.
|
|
|
|
|
|
The Ontology Debugger is divided into three main sections where each one is responsible for the presentation and manipulation of different kind of data during the debugging session of inconsistent and/or incoherent ontologies. In the following we will describe the sections and their meaning.
|
|
|
##### The Input Ontology
|
|
|
|
|
|
##### Input Ontology/ Test Cases
|
|
|
The right section shows us a list of all axioms from the the currently used __Input Ontology__ separating them between __Correct Axioms__ (also called the _Background Knowledge_) and the list of __Possibly Faulty Axioms__ (the _Knowledge Base_ or _KB_). __Correct Axioms__ are axioms that are guaranteed to be correct beforehand and are either identified as correct by an expert or are automatically assigned by the Ontology Debugger.
|
|
|
|
|
|
The left section shows us a list of all axioms from the the currently used __Input Ontology__ separating them between __Correct Axioms__ (also called the _Background Knowledge_) and the list of __Possibly Faulty Axioms__ (the _Knowledge Base_ or _KB_). __Correct Axioms__ are axioms that are guaranteed to be correct and are either identified as correct by an expert or are automatically assigned by the Ontology Debugger.
|
|
|
Below them, we see the list of __Possibly Faulty Axioms__ which represents the set of axioms that might be erroneous and thus might be the cause for the inconsistencies / incoherencies in your ontology.
|
|
|
|
|
|
Below, we see the list of __Possibly Faulty Axioms__ which represents the set of axioms that might be erroneous and thus might be the cause for the inconsistencies / incoherencies in your ontology.
|
|
|
**Note**: when loading the *Koala ontology* the debugger automatically separates axioms of ```AxiomType ClassAssertion``` from the set of axioms and marks them as *Correct Axioms*. All other axioms are *Possibly Faulty* axioms. As long as the Debugging Session has not been started, the expert can modify this two lists by clicking on the icons ![possibly_Faulty](/uploads/d152029365ddc44a0946c68e3ece74b7/possibly_Faulty.PNG) and the ![correct](/uploads/433f214d1523b2ec6c3ba2ef66aa83f9/correct.PNG) to assume axioms as possibly faulty or correct respectively.
|
|
|
|
|
|
**Note**: when loading the *Koala ontology* the debugger automatically separates axioms of ```AxiomType ClassAssertion``` from the set of axioms and marks them as *Correct Axioms*. All other axioms are *Possibly Faulty* axioms. As long as the Debugging Session has not been started, the expert can modify this two lists by clicking on the icons ![possibly_Faulty](/uploads/7f346fc71a0f1ce07dfca997572d3c8c/possibly_Faulty.PNG)and the ![correct](/uploads/2d9ca85e6297e4d8fce519aad80429b3/correct.PNG) to assume axioms as possibly faulty or correct respectively.
|
|
|
##### Test Cases
|
|
|
In the middle section the so called acquired and the original test cases of the current debugging session are shown. Acquired test cases are the answered axioms. They are named _Entailed Test Cases_ when they have been classified as entailed in the current ontology by the user or_Non Entailed Testcases_ when they must not be entailed in the current ontology according to the user's answer. In the following image we see two test cases that have been answered by an experted which have to be entailed in the _Koala_ ontology.
|
|
|
|
|
|
In the __Test Cases__-Tab the test cases of the current debugging session are shown. There are two possible kinds of test cases: _Entailed Test Cases_ represent test cases that must be entailed in the active ontology and _Non Entailed Testcases_ represent test cases that must not be entailed in the currently active ontology. In the following image we see two test cases that have been answered by an experted which have to be entailed in the _Koala_ ontology.
|
|
|
![acquired_testcases](/uploads/1429db4892205ccee3ddd6ffeb9da6db/acquired_testcases.PNG)
|
|
|
|
|
|
![testcases](/uploads/1dd8c9a08e12990b0bccac895f45e604/testcases.PNG)
|
|
|
Below the set of acquired test cases there will also be shown original test cases that are given beforehand. This feature however is not yet implemented and thus we omit this part.
|
|
|
|
|
|
##### Faulty Axioms/ Conflicts
|
|
|
##### Queries / Faulty Axioms
|
|
|
|
|
|
The mid-section shows us the faulty axioms (also called diagnoses) and the conflicts that are calculated during an ontology debugging session. The debugging session itself can be started by clicking on the __Start Debugging__ button. Once a debugging session is started, diagnoses are calculated and one or more queries are computed, which the expert has to answer in order to find the error in the ontology.
|
|
|
The left part finally shows us the most important information during a debugging session.
|
|
|
|
|
|
Each set of diagnoses are based on _minimal conflicts sets_ which will be shown in the __Conflicts__ tab. **Note** that the minimal conflict sets can only be calculated using *HS-Tree* and *HS-DAG* as *Diagnosis Engine Type* (selectable in the debuggers options). Since *HS-Tree* is the default engine you can also see the minimal conflict sets (because of a [known minor bug](https://git-ainf.aau.at/interactive-KB-debugging/debugger/issues/19) however you have to select the __Conflicts__ tab once before you start the session to be able to see the list of conflicts).
|
|
|
Firt we have 3 buttons:
|
|
|
- Start to start a new debugging session. Once a session has been started this button changes to restart. This let's the user restart a running session. ![start](/uploads/b93fbef049714ac66a819709aa3015e8/start.PNG)
|
|
|
- Stop to stop a running session. As long there is no running session this button is greyed out ![stop](/uploads/9a5f30421341fa4ff1a2f94437f6d52d/stop.PNG)
|
|
|
- Submit to answer a query. As long as a session has not been started ad the user has not classified a formulated axiom in the query as entailed or non-entailed this button is greyed out. ![submit](/uploads/06b7a61d7a3d6f8fac58bc4ba7a31730/submit.PNG)
|
|
|
|
|
|
Before we can start a debugging session we have to select a reasoner. Protégé 5 already comes with a pre-installed *HermiT* solver, but you can also install other reasoners like *FaCT++* or *Pellet*. Installing additional reasoner plug-ins in Protégé is done by selecting ```File->Check for plug-ins...```. Protégé has to be restarted once you have installed additional reasoner plug-ins.
|
|
|
Let us use now press the button Start to start a new debugging session. The ontology debugger now recognizes if the ontology is consistent/coherent. Since our Koala ontology is incoherent it states the first query consisting of 2 formulas.
|
|
|
|
|
|
If you start a new debugging session (__Start Debugging__) using he _HermiT_ solver and without changing any settings you should most probably see as set of such diagnoses: ![FirstSessionStep](/uploads/9d0f0234eec7cff9b91c06dc329a19c9/FirstSessionStep.PNG)
|
|
|
Below the 3 buttons you now will see these two axioms:
|
|
|
- ![axiom1](/uploads/72e8773f48025aa456a9b3720fe4fc69/axiom1.PNG)
|
|
|
- ![axiom2](/uploads/5d8a28bf5208799f8f6019e84029e707/axiom2.PNG)
|
|
|
|
|
|
##### Queries / Answers
|
|
|
Let us ignore these two axioms at first and let us concentrate on the lower part presenting us the possibly faulty axioms.
|
|
|
![possibly_Faulty](/uploads/fb81708f968681dd211a22b6af8774f4/possibly_Faulty.PNG)
|
|
|
|
|
|
Such possibly faulty axioms are calculated once the session has started or the user has given an answer to compute one or more queries. So the query given above are a result of the sets of possibly faulty axioms below. Each set of possibly faulty axioms are based on _minimal conflicts sets_ which can be shown in the Ontology Debugger's __Conflicts__ tab. **Note** that the conflict sets can only be calculated using *HS-Tree* and *HS-DAG* as *Diagnosis Engine Type* (selectable in the debuggers preferences).
|
|
|
|
|
|
### Step 5 Anwer the first query
|
|
|
Given the session from above, the right section will show us the following question to be answered by an expert: ```hasDegree Domain Person``` and ```isHardWorking Domain Person```.
|
|
|
|
|
|
These two axioms are to be understood as questions generated from the Ontology Debugger given to the expert. Note that the questions may be axioms already stated in the ontology or logically entailed axioms given the axioms in the ontology.
|
|
|
|
|
|
The expert now has to answer _at least one_ question. If the expert thinks this statement or axiom is true, he answers by clicking on the ![plus0](/uploads/53e6de21ab2264a301910e4e31cbc7e4/plus0.PNG) icon (__Entailed__). If he believes that this statement is false, he answers by clicking on the ![minus0](/uploads/10c449a582f342be1211599213c6480b/minus0.PNG) icon (__Not Entailed__).
|
|
|
|
|
|
In our example we answer both questions with __Entailed__. Acknowledging this decision by pressing __Commit__ list both axioms in the __Answers__ section as well as in the list of __Entailed Testcases__ in the view for Test Cases in the left section.
|
|
|
In our example we assume both axioms as correct since hasDegree is a domain of a person and persons are hardworking. Please note that as soon as the user answers/classifies one axiom the submit button is getting active.
|
|
|
|
|
|
![step1](/uploads/71eb8cb6fc4c95a048e9ab71492ece24/step1.PNG)
|
|
|
|
|
|
Acknowledging this decision by pressing __Submit__ list both axioms in the list of __Entailed Testcases__ in the view for Acquired Test Cases in the mid section.
|
|
|
|
|
|
![step2](/uploads/63bda321d784fc1792f86c6a03a1ed87/step2.PNG)
|
|
|
|
|
|
![SecondSessionStep](/uploads/a57df3b75ec7a4cc11b722294283f424/SecondSessionStep.PNG)
|
|
|
### Step 6 Answer all queries until the Debugger gives us a solution
|
|
|
|
|
|
Since we still have no solution the next set of diagnoses and queries are calculated. If we continue answering the questions we should finally find a diagnosis corresponding to our test cases and which represents the possible fault in the ontology.
|
|
|
Since we still have no solution the next set of diagnoses and queries are calculated immediately after our first submission. If we continue answering the questions we should finally find a diagnosis corresponding to our test cases and which represents the possibly faulty axioms in the ontology.
|
|
|
|
|
|
![FinalSessionStep](/uploads/068312d3065c9bfb93cf41614570afd9/FinalSessionStep.PNG)
|
|
|
![finalstep](/uploads/aa1cd5248e7c58b7455ae330bcaafc86/finalstep.PNG)
|
|
|
|
|
|
**Hint**: You can reproduce the answers and the resulting diagnoses with the **Answers** view in the lower right or by reproducing the answers given with the **Test Cases** on the left.
|
|
|
**Hint**: You can reproduce the answers and the resulting diagnoses with the **Acquired test cases ** view in the mid section.
|
|
|
|
|
|
Our debugging session ended with a found set of 3 faulty axioms:
|
|
|
- [x] ```KoalaWithPhD EquivalentTo Koala and (hasDegree value PhD)```
|
... | ... | @@ -75,11 +113,11 @@ and |
|
|
|
|
|
# Preference settings for the Ontology Debugger Plug-In in Protégé
|
|
|
|
|
|
The above debugging session was using the default settings and the *HermiT* solver. You can change these settings in ```Ontology Debugger->Options```
|
|
|
The above debugging session was using the default settings and the *HermiT* solver. You can change these settings in the debugger preferences in ```File->Preferences```
|
|
|
|
|
|
### Preferences for Fault Localization
|
|
|
|
|
|
![pref1](/uploads/0f9d049f1b4d7036d15b6eb010e5cfce/pref1.PNG)
|
|
|
![pref1](/uploads/6e6a182e3388b0eff9016d556f551f1f/pref1.PNG)
|
|
|
|
|
|
##### Engine Types
|
|
|
|
... | ... | @@ -99,7 +137,7 @@ If you want to debug an __incoherent ontology__, the process quite often can be |
|
|
|
|
|
### Preferences for Query computation
|
|
|
|
|
|
![pref2](/uploads/fae26104a4ec12624ede7034a4d2a908/pref2.PNG)
|
|
|
![pref2](/uploads/b35bb2d9fa82e571415ca893c68ee568/pref2.PNG)
|
|
|
|
|
|
##### Query Computation
|
|
|
|
... | ... | |