Before the Lab


Reasoning on the Web - summary:

Lab instruction

DL Reasoning


In this exercise we will use Protege editor with the SWRLTab plugin.

Depending on the configurations, Pellet/Jess may be used to execute SWRL rules.

Family rules

  1. Open it in Protege (run protege3), in SWRLTab analyze the rules. Click on J button to enable Jess rule engine. Run the rules iteratively. Check the inferred axioms.

Implementing SWRL

  1. Open Protege editor and enable SWRL Tab (Project→Configure in Protege 3.4.4)
  2. Implement an example expert system - an expert system for recognizing animals:
    1. define Classes used in the system (look for isa predicate): Mammal, Bird, Carnivore, etc.
    2. define characteristics of the animals (There Is More Than One Way To Do It!)
      • as Properties, e.g.: has
      • as Classes, e.g. Swims
    3. Make assertions about individuals, e.g. has(dennis,hair). parent(dennis,diana). Swims(denzel).
    4. Define rules of the system
    5. Express the initial data as appropriate assertions
    6. Run Pellet/Jess to execute the rules. Observe the inferred facts. Execute the rule engine iteratively, till no more information can be concluded.
    7. extra task: add more rules to the system, use built-in SWRL predicates.


rule id1: 
  [1: has(X,hair)]

has(?x,„hair”) → Mammal(?x)

rule id4: 
  [1: flies(X),
   2: lays_eggs(X)]

Flies(?x) ∧ Lays_eggs(?x) → Bird(?x)

Initial data


Rules in OWL2RL

Read: OWL 2 and Rules slides

Control questions:

  • How to express rules using owl:subClass relationships?
  • what is a property chain axiom?
  1. Run Protege, version 4: protege4
  2. Create a new ontology in Protege
  3. Model the family ontology with rules using OWL 2 constructs (See OWL2 tutorials)
  4. extra task: if there is enough time, model the animals expert system in OWL 2 RL

If you want to know more

Further reading:

Test cases for OWL2 (incl.OWL2RL):


Z braku lepszego miejsca tutaj studenci wpisują komentarze natury ogólnej do tego lab. 8-)

Za dużo materiału do przerobienia. Gdy wybiła godzina końca zajęć, ja dotarłem do Family Rules (podpunkt 3), czytając wcześniej jedynie Reasoning Examples in OWL DL (co zajęło ponad 45 minut).

pl/dydaktyka/piw/2010/sw/rules.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna) Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0