Racer
From MathWeb
Racer is a general DL reasoner. All general information on this page is taken from the Racer homepage, user guide.
Contents |
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 <tcp-port>] [-http <http-port>] (default <tcp-port>=8088 <http-port>=8080)
The GUIs can be used to interact with the Racer server. Or alternatively
telnet <hostname> <port>
loading the T+A-box in telnet:
(racer-read-file <file of T+A-box>)
Running racer on the command line (without starting the server):
racer -f <file of T+A-box>.racer -q <query>.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.
;check if there are persons in the knowledge base (retrieve ( ) (?x person)) ;output: T ;check for a certain person (retrieve ( ) (beate person)) ;output: T ;all persons (retrieve (?x) (?x person)) ;output: (((?X HANS)) ((?X BEATE)) ((?X UDO))) ;all places in de (retrieve (?x) (?x de located)) ;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: (retrieve ($?x) (or ($?x de located) (and ($?x ?y located)(?y de located)))) ;output: ((($?X IUB)) (($?X BREMEN)) (($?X BERLIN))) ;all friends of Beate (retrieve (?x) (beate ?x friend-of)) ;output: (((?X UDO)) ((?X HANS))) ;or alternatively: (retrieve (?friend-of-beate) (?friend-of-beate beate (inv friend-of))) ;output: (((?X UDO)) ((?X HANS))) ;or change the knowlege base as followed: ;all German friends of Beate (retrieve (?x) (and (?x de lives-in) (beate ?x friend-of))) ;output: NIL ;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: (retrieve (?x) (and (?x ?y lives-in) (?y de located) (beate ?x friend-of))) ;output: (((?X UDO))) ;or in order to also get the places: (retrieve (?x ?y) (and (?x ?y lives-in ) (?y de located) (beate ?x friend-of))) ;output: (((?X UDO) (?Y BERLIN)))
Queries Containing Negation
;all things different from persons (retrieve (?x) (not (?x person))) ;output: (((?X PARIS)) ((?X BERLIN)) ((?X BREMEN)) ((?X FR)) ((?X DE)) ((?X IUB))) ;all concepts located in a place (retrieve (?x) (?x (some located top))) ;output: (((?X BERLIN)) ((?X PARIS)) ((?X BREMEN)) ((?X IUB))) ;top refers to "all" places that are located somewhere ;all concepts not located in a place (retrieve (?x) (neg (?x (some located top)))) ;output: (((?X BEATE)) ((?X UDO)) ((?X HANS)) ((?X FR)) ((?X DE))) ;all places not directly located in de (retrieve (?x) (and (?x ?y located) (not (= ?y de)))) ;output: (((?X IUB)) ((?X PARIS))) ;or: (retrieve (?x) (and (?x place) (?y place) (not (= ?y de)) (?x ?y located))) ;all places not indirectly located in de (retrieve (?x) (and (?x ?z located) (?z ?y located) (not (= ?y 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)

