Racer

Racer is a general DL instance of::reasoner. All general information on this page is taken from the Racer homepage, user guide.

RacerPro and OWL
RACER or RacerPro as it now called was the first OWL Reasoner on the Market. They appeared in 2002 and have been continuously improved. While others have tried hard to achieve comparable speed, RacerPro is still one of the fastest OWL reasoning systems available. Many users have contributed to the stability that the reasoner currently demonstrates in many application projects around the world.

Expressivity and Optimization
With the exception of nominals, which are very hard to optimize, RacerPro supports the full OWL standard (indeed, nominals are supported with an approximation). Protege (see below) supports an extended version of OWL (namely OWL with qualified cardinality restrictions) that is already supported by RacerPro with novel algorithms and optimization techniques.

Ontologies and Data Descriptions
Many users use OWL for representing ontologies. In order to provide more flexibility than databases provide, with RacerPro, users can also describe their data and benefit from powerful ontology-based query answering systems. If RacerPro is used as a description logic reasoner, even more expressivity than covered by OWL is provided (e.g., constraint satisfaction, reasoning about topological relations (RCC), etc.).

GUIs and IDEs

 * RacerPorter is a GUI for managing the reasoning server and inspecting ontologies on the Racer server (screenshot).
 * RacerEditor is an Emacs-based text editor such that you can execute statements or process complete (OWL) files with a single keystroke (screenshot).
 * Rice is the Racer Interactive Client Environment. It provides functions for browsing TBoxes and ABoxes, plus querying facilities (homepage).
 * Protégé may be used as another graphical interface for RacerPro.
 * SWOOP is another ontology editor and exports OWL files which can then be further processed with RacerPro.

Running Racer
starting the Racer server on the command line racer [-p ] [-http ] (default =8088 =8080)

The GUIs can be used to interact with the Racer server. Or alternatively telnet loading the T+A-box in telnet: (racer-read-file )

Running racer on the command line (without starting the server): racer -f .racer -q .racer

Example
Racer accepts various input languages the most prominent being OWL. The example given here is in Racer's own input language which is in LISP Syntax (as Racer itself is written in LISP).

Example T-/A-Box
(in-tbox friendships-tbox)

(signature :atomic-concepts (place person)	  :roles ((located :domain place :range place :transitive t)		   (lives-in :domain person :range place) (friend-of :domain person :range person :inverse friend-of))	  :individuals (fr de paris berlin bremen hans udo beate))

(in-abox friendships-abox friendships-tbox)

(instance hans person) (instance beate person) (instance udo person) (instance fr place) (instance de place) (instance bremen place) (instance paris place) (instance berlin place) (instance iub place)

(related iub bremen located) (related bremen de located) (related berlin de located) (related paris fr located) (related beate udo friend-of) (related hans beate friend-of) (related hans bremen lives-in) (related udo berlin lives-in) (related beate paris lives-in)

Some Positive Queries
Racer has its own query language which is more powerful than standard OWL query languages. Look there for more examples.

(retrieve (?x person))
 * check if there are persons in the knowledge base
 * output: T

(retrieve (beate person))
 * check for a certain person
 * output: T

(retrieve (?x) (?x person))
 * all persons
 * output: (((?X HANS)) ((?X BEATE)) ((?X UDO)))

(retrieve (?x) (?x de located)) (retrieve ($?x) (or ($?x de located) (and ($?x ?y located)(?y de located))))
 * all places in de
 * output: (((?X BERLIN)) ((?X BREMEN)) ((?X IUB)))
 * the property located is transitive.
 * therefore, also IUB can be identified as something located in de
 * or without transitivity:
 * output: ((($?X IUB)) (($?X BREMEN)) (($?X BERLIN)))

(retrieve (?x) (beate ?x friend-of)) (retrieve (?friend-of-beate) (?friend-of-beate beate (inv friend-of)))
 * all friends of Beate
 * output: (((?X UDO)) ((?X HANS)))
 * or alternatively:
 * output: (((?X UDO)) ((?X HANS)))


 * or change the knowlege base as followed:

(retrieve (?x) (and (?x de lives-in) (beate ?x friend-of)))
 * all German friends of Beate
 * output: NIL

(retrieve (?x) (and (?x ?y lives-in) (?y de located) (beate ?x friend-of))) (retrieve (?x ?y) (and (?x ?y lives-in ) (?y de located) (beate ?x friend-of)))
 * problem: this is NIL since it is not complete; transitivity only works on the same property
 * but not the combination of two different property, such as "lives-in" with "located".
 * However, try:
 * output: (((?X UDO)))
 * or in order to also get the places:
 * output: (((?X UDO) (?Y BERLIN)))

Queries Containing Negation
(retrieve (?x) (not (?x person)))
 * all things different from persons
 * output: (((?X PARIS)) ((?X BERLIN)) ((?X BREMEN)) ((?X FR)) ((?X DE)) ((?X IUB)))

(retrieve (?x) (?x  (some located top)))
 * all concepts located in a place
 * output: (((?X BERLIN)) ((?X PARIS)) ((?X BREMEN)) ((?X IUB)))
 * top refers to "all" places that are located somewhere

(retrieve (?x) (neg (?x  (some located top))))
 * all concepts not located in a place
 * output: (((?X BEATE)) ((?X UDO)) ((?X HANS)) ((?X FR)) ((?X DE)))

(retrieve (?x) (and (?x ?y located) (not (= ?y de))))
 * all places not directly located in de
 * output: (((?X IUB)) ((?X PARIS)))
 * or: (retrieve (?x) (and (?x place) (?y place) (not (= ?y de)) (?x ?y located)))

(retrieve (?x) (and (?x ?z located) (?z ?y located) (not (= ?y de))))
 * all places not indirectly located in de
 * output:NIL

Unsolved task: How can we retrieve "all places not located in de"? The first who solves this problem gets a coffee for free from me. --Inormann 19:12, 17 November 2006 (CET) (Tentative solution on the discussion page)