Home
RacerPro User's Guide Version 2.0 - Institut für Informationssysteme
Contents
1. Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http www lehigh edu zhp2 2004 0401 univ bench owls amp TBox t test kb ABox a test kb Concept c 0 Role r 0 Individual i http www Department0 University0 edu AssistantProfes 1 Axiom ax 0 Request 86 indvidual directtypes ht piwwweDepartment Unversi Response Classic Layout 10140 gt _ Deletean Recover FutlReset 7 Simplify Arg Comp RacerPro is processing Nothing 3 http w ww Department0 Univers top datatype role http w ww lehigh edu j http w ww 7 2 2 2004 0401 http www Jehigh edu 7Ezhp2 2004 040 1 univ bench owi mastersDegreeFTom http w ww University279 edu http www lehigh edu 7Ezhp2 2004 0401 univ bench ow rom top datatvoe role htto w w w lehioh edu 67Ezho2 2003 026 univ S Hinnrareihi 22 adi E Labels Graph V Auto Update Show Top Role Only Sel Succs 5 Trans Roles Data Fillers Told Only Request Graph Display Graph Reset Graph Print Graph Cur ind Sel Cur Role Sel Roles Hor Ver UNBOUNDE Search amp Select E Sel First Clear Sel Roles Descr Ind DirectTypes AllTypes Dele
2. OR CUP UNION lt query body gt NOT NEG lt query body gt INV lt query body gt lt empty query body gt gt lt abox query atom gt gt NOT NEG lt abox query atom gt INV abox query atom lt abox query object gt lt concept expression gt lt abox query object gt lt abox query object gt lt role expression gt lt abox query object gt NIL lt role expression gt NIL lt abox query object gt lt role expression gt lt abox query object gt BOTTOM lt abox query object gt lt abox query object gt lt abox query object gt CONSTRAINT 4 1 THE NRQL LANGUAGE 153 lt role chain followed by attribute gt lt role chain followed by attribute gt lt predicate expression gt BIND INDIVIDUAL lt abox query individual gt SUBSTITUTE INSERT lt query name gt lt abox query object gt lt data query object gt NIL uy lt lt abox query object gt lt data query object gt query name n SAME AS lu EQUAL lt abox query object gt lt abox query object gt us lt abox query object gt HAS KNOWN SUCCESSOR lt role expression gt wy nRQL query syntax used for querying the data substrate lt data query atom gt gt NOT
3. JRE Connect Mylyn X Connect to your task and Use an execution environment JRE JavaSE 1 6 i DC CERE a local task Use a project specific JRE Java SE 6 MacOS X Default Use default JRE currently Java SE 6 MacOS X Default Configure JREs B Outline 3 EUH Project layout An outline is not available Use project folder as root for sources and class files 9 Create separate folders for sources and class files Working sets Add project to working sets Working sets Figure 2 9 Select a name for the project client application to connect to the RacerPro server You can then run the project testi see Figure 2 18 The output is printed to the Eclipse Console window Figure 2 19 2 2 THE RACERPRO SERVER 23 Q Quick Access ES H Package Explorer 5 Task List 5 EI asle v 2 8 e x BI New gt ad gt m Golnto Find gt All gt Acti Open in New Window Open Type Hierarchy F4 Show In o Copy Connect Mylyn R E Copy Qualified Name e eee Paste local task X Delete Outline 23 p amp Remove from Context 031 XES 4 An outline is not available Refactor XT gt s Import r Export Refresh F5 Close Project Assign Working Sets Run As gt vero d Javadoc 9 Declaration veu Add Remove Lisp Nature Compare With p E Location
4. Cur Concept and Sel Concepts The layout of the graph can be horizontal or vertical Moreover the graph can be drawn as a tree or a DAG directed acyclic graph The Top and Bottom concepts can be omitted In some cases if the taxonomy is very big it is helpful to limit the maximum depth of the graph display Use the depth limit combo box for this In the taxonomy select a node in order to further expand this node Obviously these nodes only appear if max depth is not set to unbounded As with the Concepts tab nodes can be selected and deselected with the mouse Multi selection is supported If Freeze Graph is turned on then selection of a node and thus changing the current concept does not automatically change the graph layout Note that if Freeze Graph is turned off and Cur Concept display mode is used then changing the current concept with a click of the left mouse button sets the graph root to the current concept This behavior is sometimes undesirable Some concept specific commands can be applied with the present command buttons Note that if Auto Update and Selected Concepts is turned on and Freeze Graph is turned off then using the Search amp Select field results in a very dynamic display Please note that the default profiles for Big T boxes differ from the default profiles for Small T boxes only w r t the default display opt
5. gt Dewean Recover FullReset Simpity C Am Comp RacerPro is processing Not Connected _ Disconnect from RacerPro 2 running on localhost 8088 case preserve ma gt 0KAY 1 Using Profile 1 Localhost Big TBoxes Big ABoxes to Connect to RacerPro 2 0 running on localhost 8088 cose UPCASE Lean Layout D m lt cl gt 0KAY RacerPro 2 0 running on localhost 8088 case UPCASE Cowl read file 8 F Arguments of owl read file Ctrl g to remove this message FILENAME amp KEY VERBOSE INIT KB NAME LOCATOR RECURSIVE IGNORE IMPORT IMPORT META ONTOLOGIES EXCLUDED META ONTOLOGIES FIRE RULES MAINTAIN OWLAPI AXIOMS IGNORE ANNOTATIONS ONTOLOGY NAME MERGE IMPORTED ONTOLOGIES P amp ALLOW OTHER KEYS Sel Concepts Last Resut Sel Roles LastResut Sel Individuals Last Resut CearSel Concepts CwarSel Roes CearSeiinds Snow Manual Save Snell CearShel New Editor Open in Edtor Load Figure 2 26 Documentation of function arguments in RacerPorter 2 3 RACERPORTER IN DETAILS Al 2 3 RacerPorter in Details With RacerPorter you can interactively use RacerPro load knowledge bases visualize ontologies T Boxes and instances A Boxes send queries and native commands to RacerPro The following items show a general overview of the features offered by RacerPorter e A powerful a
6. Abort Request __ doris has sibling 0 eve 7 4 7 has descendant has child 3 betty has descendant has child B8 f eve E has descendant has child lice ias descendant has child 4 charles has sibling GOTO betty has descendant eve ER SER TENTE Labels V Freeze Graph V Auto Update F Show Role f Only Sel Succs Trans Roles Data Fillers Told Only Request Graph Display Graph Reset Graph Print Graph Allinds Cur ind Sel nds AllRoles Cur Role Sel Roles Hor 3 Search amp Select Sel First Clear Sel Inds Clear Sel Ind Direct Types All Types Delete Selected 3 concept ancestors mother 3 gt wonan parent person top top human Figure 2 4 The A box Graph tab shows the explicit relations for A box individuals in knowledge base family smith family gt family smith family Concept parent causes a cycle in TBox family concept subsumes brother i uncle gt t concept ancestors mother gt woman parent person top top i human concept descendants man gt xbottom bottom uncle brother father all transitiue roles gt inu has descendant has descendant individual instance doris woman gt t individual types eue gt sister woman person human xtop top
7. a equivalent aunt and woman some has sibling parent equivalent uncle and man some has sibling parent 16 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n NIL TBox t family ABox a smith family Concept c Role r Individual i Axiom ax Request Shell Command C XXProgram Files RacerPro 26 Preview RacerPro exe p 8888 host localhost http 8686 u gt 0KAY Automatically connected to RacerPro 2 6 running on localhost 8688 case preserve gt OKAY RacerPro 2 8 running on localhost 8888 case preserue 1 racer read file C Program Files RacerPro 28 Previeuw examples natiue fanmily racer in knouledge base family smith family gt family smith family 1 gt 0KAY 2 concept subsumes brother uncle 2 gt t 3 concept ancestors mother 3 gt voman parent person top top human 4 Ready Sel Concepts LastResutt Sel Roles LastResut Sel individuals LastResut Clear Sel Concepts Clear Sel Roles Clear Sel Inds Show Manual Save shen UE i New Editor Open in Editor Load Qui Shutdown RacerPro amp Quit Figure 2 3 The Shell tab of RacerPorter used for executing queries tab In the A box Graph tab see Figure 2 4 adju
8. MeatTopping FruitTopping VegetableTopping FishTopping Cheesey V egetableTopping w SauceTopping 3 Show Inferences Figure 2 33 Removing the disjointness axiom that causes inconsistencies to the class CheeseVegetableTopping By selecting the class CheeseTopping see Figure 2 33 view the field Disjoint classes in the Description pane then localize the VegetableTopping class and click on the symbol x to remove the axiom Finally click on the option Synchronize Reasoner of the Reasoner menu A new inferred class hierarchy is computed and only the class IceCream is inconsistent To remove the inconsistency from the class IceCream Remove the domain restriction to the property hasTopping Given that hasTopping has an inverse functional role called isToppingOf the restrictions set on its domain and range have to be deleted as well Finally synchronize the reasoner and all the inconsistencies should have been removed from the ontology Save the ontology and close Prot g Now we will open the pizza owl ontology with RacerPorter In Figure 2 34 a graph of the taxonomy of the pizza ontology is presented With RacerPorter for instance queries can be answered Figure 2 35 shows the result of the follow ing queries executed in pizza owl all individuals and retrieve x x Country The symbol is used to avoid writing the namespace
9. Moreover it is even possible to find pairs of nodes x and y which satisfy a certain predicate even if there is no explicit edge between these nodes The query retrieve x y x y satisfies predicate lt returns X MICHAEL Y RALF Here we have been searching for substrate nodes x y which satisfy the binary predicate lt this means there must be a numeric literal a in the label of the node bound to x and another numeric literal b in the label of the node bound to y such that a b holds A predicate used within a satisfies substrate predicate edge query must always have arity two Please note that the previous query does not require the presence of an edge between michael and ralf Only the node labels are taken into account The Mirror Data Substrate Obviously most users do not want to populate a data substrate manually but will prefer a facility which automatically creates associated data substrate objects for ABox individuals The so called mirror data substrate is provided for this purpose It automatically creates for every object in a given ABox the ABox which is the associated ABox of the substrate a corresponding and appropriately labeled substrate data object The functionality provided by the mirror data substrate is especially valuable for users who want to query OWL KBs Suppose RacerPro has internally created an ABox as a result of reading in an OWL file If th
10. NEG lt data query atom gt lt data query object gt lt data node query expression gt lt data query object gt lt data query object gt data edge query expression lt data query object gt NIL data edge query expression NIL lt data query object gt data edge query expression TOP lt data query object gt BOTTOM lt data query object gt lt data query object gt lt data query object gt lt data edge query satisfies expression gt nyu BIND INDIVIDUAL lt data query individual gt nen SAME AS EQUAL lt data query variable gt lt data query individual gt uy lt data query object gt HAS KNOWN SUCCESSOR data edge query expression 2 SUBSTITUTE INSERT 154 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL lt query name gt lt abox query object gt lt data query object gt NIL 7 lt lt abox query object gt lt data query object gt query name Auxiliary Racer syntax lt role chain followed by attribute gt gt lt cd attribute name gt lt role expression gt lt cd attribute name gt lt concept expression gt gt see lt C gt on page 56 Fig 3 1 lt cd attribute name gt gt see lt AN gt on page 57 Fig 3 2 cd object name gt a RacerPro concrete domain object lt role expressioni gt gt see lt R
11. INSTANCE ALICE CONCEPT FOR ALICE Note that we have constructed as set of new atomic concepts using the new symbol operator The new symbol operator takes the same arguments as the new ind operator and also has Identical semantics Due to the added assertions the query retrieve x x some has child concept for doris now returns JAMES X BETTY The concept name concept for doris can be called a pseudo nominal for the individual doris The API of the Rule Engine There are various nRQL API functions and macros related to nRQL rules Please consult the ref erence manual Moreover rules can be used in a add all consequences at once or in a incremental add one set of consequences at a time style It is possible to implement different strategies of rule application nRQL offers API functions in order to enable the user or application to control how and when rule consequences are added to an A Box See Section 4 2 4 4 1 THE NRQL LANGUAGE 129 4 1 6 Complex TBox Queries nRQL can also be used to search for specific superclass class subclass relationship patterns in the taxonomy of a TBox For this purpose use tbox retrieve The Relational Structure of a TBox Taxonomy Suppose that we view the taxonomy of a TBox as a relational structure The taxonomy of a TBox is a so called directed acyclic graph DAG A nodes in this DAG represents an equivalence class of equivalent concept
12. Inspect 2 Display Execute Force Return Step Into Selection 9 Toggle Breakpoint 9 Toggle Line Breakpoint 9 Toggle Method Breakpoint gt Toggle Watchpoint X Skip All Breakpoints Remove All Breakpoints 36F11 k Access gt E Task List 52 a gt c 8 e x el gt gt Find b AH Acti QEN Connect Mylyn X Connect to your task and ALM tools or create a local task Q3D 3U Outline 53 g TW BRNON OB test v Q Test main String void 27 Add Java Exception Breakpoint c Add Class Load Breakpoint External Tools gt B E 80 73 ines 1 6 0 jdk Contents Home bin java Sep 27 2012 2 28 5 Writable Smart Insert 12 50 Figure 2 18 Run the project I Package Explorer 23 u raversuenee socket useStringBuildersEvenForTokens withMacroStack f RacerClient String int addArgs StringBuilder Object vc closeConnection void openConnection void B parse String String parsel String RacerResult parseList String RacerList lt RacerRes parseList String RacerList lt RacerRi parseRacerAnswer String RacerRe parsingTest RacerResult popWith String void pushWith String Object void RacerBooleanArgument boolean b racerCall Object RacerResult racerCallString Object StringBuil Race
13. X BOTTOM C Since there is no node named A querying this ABox with tbox retrieve a a a gives us NIL However tbox retrieve c c c correctly returns C as well as tbox retrieve c c a tbox retrieve c c b Thus it is usually better to query for a b and c like this tbox retrieve x x a tbox retrieve x x b tbox retrieve x x c For all three queries the answer will be CX C Again we like to emphasize that nRQL T Box queries are basically just plain nRQL ABox queries which are posed to a very specific ABox the taxonomy ABox representing the taxonomy This taxonomy ABox is constructed from the taxonomy of the T Box according to the given four laws the semantics of the TBox queries is a direct consequence of using nRQL on the taxonomy ABox 4 1 THE NRQL LANGUAGE 133 4 1 7 Hybrid Representations with the Substrate Representation Layer The so called substrate representation layer is used to associate a RacerPro ABox with an additional representation layer This additional representation layer is called a substrate The coupling of a RacerPro ABox with a substrate results in a hybrid representation The substrate layer is useful for the representation of semi structured data nRQL offers various types of substrates e the basic data substrate e the mirror data substrate as well as e the RCC substrate We will discuss each substrate brie
14. http www owl ontologies com unnamed owl p1 X 1 2 3 Note that the extended RacerPro concept expression 4 1 THE NRQL LANGUAGE 107 at least http www owl ontologies com unnamed owl pt1 and min 0 max 5 not equal 4 can only be used in concept query atoms and thus only for retrieval purposes It is not possible to use such concepts in other places nRQL rewrites this concept expression into a native RacerPro concept syntax at least 3 http www owl ontologies com unnamed owl p1 and min racer racer internal has integer value 0 max racer racer internal has integer value 5 not equal racer racer internal has integer value 4 More generally a concept which references a role that represents an OWL datatype property is rewritten in such a way that the qualification used in the concept will make sense for the declared datatype property as in the examples Datatype properties can also be used instead of concrete domain attributes in concept expressions in concept query atoms Thus also expressions such as an http a com ontology p1 are valid even though http a com ontology p1 is not a concrete domain attribute Retrieving Told Values of OWL Annotation Properties In OWL the so called annotation properties are used to annotate resources with meta information e g comments on authorship of an ontology etc Annotation properties are not used for reason ing Typically the f
15. individual fillers alice has descendant gt charles eve doris betty individual direct types eue gt sister concept instances sister gt betty eve doris Figure 2 5 Console of RacerPro 18 CHAPTER 2 USING RACERPRO AND ITS INTERFACES 2 2 The RacerPro Server The RacerPro server is an executable file available for Linux Mac OS X Solaris 2 and Windows It can be started implicitly using RacerPorter or explicitly from a shell or by double clicking the corresponding program icon in a graphics based environment For instance the Windows version is shown in Figure 2 6 Welcome to RacerPro Version 2 6 2616 16 62 Racer Renamed Abox and Concept Expression Reasoner Supported description logic ALCQHIr D Supported ontology web language subset of OWL DL no so called nominals Copyright C 2664 2669 by Racer Systems GmbH amp Co KG All rights reserved See license terms for permitted usage Racer and RacerPro are trademarks of Racer Systems GmbH amp Co For more information see http www racer systems com RacerPro comes with ABSOLUTELY NO WARRANTY use at your own risk RacerPro is based on International Allegro CL Enterprise Edition 8 2 Windows Oct 2 2616 12 27 Copyright C 1985 2818 Franz Inc Oakland CA USA All Rights Reserved The XML RDF RDFS OWL parser is implemented with Wilbur developed by Ora Lassila For more information on Wilbur see http vilbur rdf
16. returns t The reason is that in this case the index structures for the A box are not recomputed 5 2 Rule Formalism Extended to Support Abduction In RacerPro A box rules can be specified that are applied w r t the autoepistemic semantics In a nutshell this means the following if for the variables in the rule body precondition some bindings with individuals of the A box can be found such that all instantiated query atoms of the body are entailed then the assertion of the rule head conclusion is added to the A box with variables instantiated appropriately forward chaining All rules whose preconditions match the assertions of the A box in the way just described are applied until nothing new can be added The rule mechanism allows for a convenient augmentation of A boxes with assertions For details of the formalism see the nRQL User s Guide An example for such a rule is the following statement define rule x y has sibling and z x has child 185 186 CHAPTER 5 ADDITIONAL FACILITIES z y has child x human The form x y has sibling is the head and the rest is the body Rules may also be specified as part of an OWL document in SWRL syntax see Figure 5 1 for a graphical specification of SWRL rules in Protege ontology htp a com entology CAPregram Files RacerPro 20 Preview examples swrl family swrlowl PN File Edit Ontologies Reasoner Tools Refactor Tabs View Window Help o ntology htt
17. x z has child y u has child z u has child The answer is TOP Y MALE Z FEMALE U BOTTOM X TOP Y FEMALE Z MALE U BOTTOM X PERSON Y PARENT Z MAN U FATHER X PERSON Y MAN Z PARENT U FATHER X PERSON Y PARENT Z WOMAN U MOTHER X PERSON Y WOMAN Z PARENT U MOTHER Problems Caused By Equivalent Concepts Consider the following example delete all tboxes define concept a b define concept c b taxonomy The returned taxonomy looks like this NIL A B C B TOP BOTTOM BOTTOM A B C NIL 132 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Thus the concepts A B C are actually equivalent The taxonomy ABox will contain nodes for TOP BOTTOM as well as a node representing the equivalence class A B C However we do not know whether this node is named C A or B Let us assume the name C is given to this node Then the following concept assertions are added to the taxonomy ABox instance TOP TOP instance BOTTOM BOTTOM instance C A instance C B instance C C Note that we do not check this imaginary ABox for consistency so instance bottom bottom does no yield an inconsistent ABox we are merely interested in the relational structure of this ABox here Thus querying this ABox with tbox retrieve x top x gives us TOP
18. Find b All b Acti Connect Mylyn X Connect to your task and ALM tools or create a local task B Outline 33 Bi amp wwewu HB test Test mainString void x Erie terminated Test Java Application System Library Java JavaVirtualMachines 1 6 0 jdk Contents Home bin java Sep 27 2012 2 28 5 Writable Smartinsert 12 50 Figure 2 15 Source code for the example inserted CHAPTER 2 USING RACERPRO AND ITS INTERFACES _ RacerPorter ee Roles indivi Asse Axioms Role ABox Quer Def Log gt Delete A Recover FullReset V Smoity Comp RaceProisprcessmg Nothing Min Aber Rema Default Comm Status Server Case 127 0 0 1 8088 2 2 Localhost Bia TBoxes Small ABoxes localhost 8088 3 Localhost Small TBoxes Big ABoxes localhost 8088 4 Localhost Small TBoxes Small ABoxes NO localhost 8088 Show Manual Edn Prot CopyProfie DeieteProtie New Editor in Editor License Details Disconnect StatRacerPro ShutdownRacerPro Load Restore image Store image Figure 2 16 RacerPorter eoo _ v rm RacerPro 132x40 RacerPro is based International Allegro CL Enterprise Edition 8 2 Mac 05 X Intel Apr 38 2012 5 56 Copyright C 1985 2011 Franz Inc Oaklan
19. gt query entails p query 1 query 3 NIL 4 2 THE NRQL QUERY PROCESSING ENGINE 175 gt query entails p query 2 query 3 NIL Note betty woman DOES NOT ENTAIL charles human Since charles will not be renamed into betty gt prepare abox query x woman QUERY 4 READY TO RUN gt query entails p query 4 query 1 NIL gt query entails p query 1 query 4 T Note betty woman ENTAILS woman but not the other way arround gt query entails p query 2 query 4 T Note betty mother ENTAILS x woman gt prepare abox query x human QUERY 5 READY TO RUN gt query entails p query 2 query 5 T gt query entails p query 5 query 4 NIL gt query entails p query 4 query 5 T gt define concept woman and person some has gender female NIL gt prepare abox query and x person x y has gender y female QUERY 6 READY TO RUN gt query entails p query 6 query 5 T Note and x person ENTAILS x human gt query entails p query 6 query 4 T Note and x person even ENTAILS x woman due to redefinition of concept woman 176 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt query entails p query 4 query 6 NIL gt prepare abox query and x person has gender f female x y has child person QUERY 7 READY TO RUN gt pr
20. hasConsort not accurate ready to run NO prepare abox rule and http a com ontologysty Person 7http a convontology y http a com ontology x hasChild 7h not accurate ready to run NO prepare abox rule and http a com ontology x Person 7http a conVvontology x http a com ontologysy hasSibling 7 not accurate ready to run NO prepare abox rule and http a com ontologys amp x Person http a com ontologystx 7http a convontology y hasParent not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology y hasParent 7 not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology y hasChild h D Al Ready Running Waiting Cheap W Expensive W Processed Status Describe Rewritten Describe Original WextTuple GetAnswer Delete Abort Execute Re Execute Re Prepare 18 abox consistent file C Programz28Files RacerPro 28 Preview examples surl family surl owl Figure 3 6 SWRL rules shown in the Queries Rules tab of RacerPorter To show how the OWL SWRL specification is interpreted by RacerPro we will use an example ontology containing SWRL rules The ontology is called family swrl owl which is found in the RacerPro di
21. lt query body gt retrieve under premise lt query premise gt lt query head gt lt query body gt 4 1 THE NRQL LANGUAGE 151 tbox retrieve lt query head gt lt query body gt Note In TBox queries only the roles has child has parent has ancestor has descendant are meaningful in role query atoms and only concept names are meaningful in concept query atoms defquery lt query name gt def query head lt query body gt firerule lt rule antecedence gt lt rule consequence gt Query head for queries and defined queries Note that also the syntax for the data substrate layer queries is included hybrid nRQL queries see manual lt query head gt gt lt head entry gt lt query premise gt gt List of RacerPro ABox assertions Xquery name gt symbol naming a defined query lt def query head gt gt lt def head entry gt lt head entry gt gt lt abox query object gt lt data substrate query object gt lt head projection operator gt def head entry gt lt abox query object gt data substrate query object lt abox query object gt gt lt abox query variable gt lt abox query individual gt lt abox query variable gt gt lt symbol gt symbol lt abox query individual gt lt symbol gt naming a RacerPro ABox individual Note Data query objects can only be used if nRQL is put into data substrate mode lt da
22. uses the DIG interface to connect to RacerPro Therefore one can use RacerPorter to inspect details about knowledge bases that have been edited and verified with Prot g In this section we will show that it is possible for RacerPorter to manage and execute queries on knowledge bases which have been previously edited and verified with Prot g Start by opening the pizza owl file in Prot g found in the RacerPro distribution in the folloow ing path examples ow1 Once the pizza owl is uploaded to Prot g activate RacerPro as the reasoner to be used by Prot g From the Reasoner menu select RacerPro and click on Start Reasoner By activating RacerPro the ontology that is opened in Prot g will be automatically classified Classifying an ontology means that RacerPro will compute the inferred class hierarchy and check the logical consistency of the ontology As Figure 2 32 shows during consistency check ing RacerPro localized inconsistencies which are friendly highlighted by Prot g under the class Nothing withing the pane Class hierarchy inferred X pizza http www co ode org ontologies pizza pizza owl http www co ode org ontologies pizza 2007 02 12 pizza owl cis File Edit Ontologies Reasoner Tools Refactor Tabs View Window Help lt gt pizza http www co ode org ontologies pizza pizza ow B8 Active Ontology Entities Classes Object Properties Data P
23. x H Germany x f France x H England E x Wt Rmerica FV CONCEPTS IN INSTANCE RSSERTIONS P EXCLUDE PERMUTATIONS P RECORD EXPLANATIONS P PARSER CLASS REURITE DEFINED CONCEPTS P GRO UP BY OPS BIND SPECIRLS P ORIGINRL QUERY RULE CON PRTTERN NEW IND OPS PREMISE GENERATE CODE P 2 REWRITE SEMANTICALLY P REWRITE TO DNF P REPORT INCONSISTENT QUERIES P REPORT TAUTOLOGICAL QUERIES P USE REPOSITORY P PUT INTO REPOSITORY P ID DON T CHECK ID P PARSER RESULT UOIS SUBSTRATE ABOX CREATE ABOX IF NOT FOUND P PACKAGE TYPE OF SUBSTRATE PREPARE NOW P Sel Concepts LastResutt Sel Roles Last Result Sel Individuals Last Result Clear Sel Concepts Clear Sel Roles Clear Sel nds Figure 2 35 RacerPorter used to query an ontology edited with Prot g Chapter 3 Modeling Languages and Basic Reasoning Services In description logic systems a knowledge base is consisting of a T box and an A box The conceptual knowledge is represented in the T box and the knowledge about the instances of a domain is represented in the A box For more information about the description logic SHZQ supported by RacerPro see 43 The extension of expressive description logics with concrete domains is discussed in 33 In this section the constructs that RacerPro supports for building knowledge bases are described as well as the inference modes that are supported But before th
24. 138 1993 211 212 14 18 19 20 21 22 24 25 26 27 BIBLIOGRAPHY D Calvanese De Giacomo D Lembo M Lenzerini and R Rosati Egl lite effective first order query processing in description logics In JCAI 07 Proceedings of the 20th International Joint Conference on Artifical intelligence pages 274 279 San Francisco CA USA 2007 Morgan Kaufmann Publishers Inc S Castano S Espinosa A Ferrara V Karkaletsis A Kaya R Moller S Montanelli G Peta sis and M Wessel Multimedia interpretation for dynamic ontology evolution Journal of Logic and Computation 19 5 859 897 2008 A K Chandra Theory of database queries In Proc of the 7th ACM SIGACT SIGMOD SIGART Symp on Principles of Database Systems PODS 88 pages 1 9 1988 S Espinosa A Kaya and R M ller Formalizing multimedia interpretation based on abduc tion over description logic Aboxes In Proc of the 2009 International Workshop on Description Logics DL 2009 27 to 30 July 2009 Oxford United Kingdom 2009 CEUR Workshop Pro ceedings Vol 477 J Faddoul and V Haarslev Algebraic tableau reasoning for the description logic SHOQ In Journal of Applied Logic Special Issue on Hybrid Logics page 31 pages 2010 Accepted for publication J Faddoul and V Haarslev Optimizing algebraic tableau reasoning for SHOQ First ex perimental results In Proceedings of the 2010 International Worksh
25. BETTY Y EVE ALICE Y EVE EVE Y ALICE DORIS Y ALICE BETTY Y ALICE 112 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt retrieve x y and x top y man X BETTY Y CHARLES X DORIS Y CHARLES X EVE Y CHARLES X ALICE Y CHARLES However the second disjunct does not produce any additional tuples Now consider the same query but with a modified head retrieve y union x woman man Thus we are only interested in the bindings of A common pitfall is to think that this query is equivalent to the query retrieve y y man However it is not As already described RacerPro will rewrite this query into retrieve union and x woman y top and x top y man Thus the possible bindings for y are from the union of top and man and thus top RacerPro therefore replies ALICE DORIS Y EVE Y CHARLES Y BETTY whereas retrieve y y man just returns CHARLES UNION vs OR Consider the query retrieve x union x C x NOT C for some concept C A common pitfall is to consider this as equivalent to retrieve x x or C NOT C which in turn is equivalent to retrieve x x TOP 4 1 THE NRQL LANGUAGE 113 and should thus return all individuals However this is not the case The answer of this query is given be the union of the ans
26. In contrast to usual data substrates the set of admissible edge labels is 144 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL constrained Edges must be labeled with so called RCC relationships However the set of allowed node labels is not constrained The edges of an RCC network are labeled with RCC relationships denoting the relative qualitative spatial arrangement of two objects For example you can use the set of RCC5 relationships to distinguish whether two objects are disjoint RCC5 relationship DR overlapping RCC5 re lationship O congruent RCC5 relationship EQ or contained within each other PP for proper part or inside and its converse PPI for contains Moreover disjunctions of these relations can be used to represent coarser or indefinite underspecified knowledge regarding the spatial relationship between two objects The RCC substrate offers the well known set of RCC8 rela tionships as well as the RCC5 relationships The latter ones can be defined in terms of disjunctions of the former ones An RCC relation is specified as a single symbol e g DR or as a flat list of symbols e g PO DR representing a disjunction In general again a CNF like description is employed as for ordinary data substrate edge labels However in contrast only data literals which are symbols from the set of RCC5 or RCCS base relations are acceptable For example suppose you want to represent
27. NOT FOUND gt execute rule rule 1 RULE 1 RUNNING gt active rules RULE 1 gt get next set of rule consequences rule 1 CINSTANCE DORIS MOTHER RELATED DORIS CHILD OF DORIS HAS CHILD gt get current set of rule consequences rule 1 CINSTANCE DORIS MOTHER RELATED DORIS CHILD OF DORIS HAS CHILD gt choose current set of rule consequences rule 1 CCINSTANCE DORIS MOTHER RELATED DORIS CHILD OF DORIS HAS CHILD gt get next set of rule consequences rule 1 4 2 THE NRQL QUERY PROCESSING ENGINE CINSTANCE BETTY MOTHER RELATED BETTY CHILD OF BETTY HAS CHILD gt get next set of rule consequences rule 1 EXHAUSTED gt get next set of rule consequences rule 1 EXHAUSTED gt active rules NIL gt all concept assertions DORIS MOTHER DORIS WOMAN BETTY WOMAN gt all role assertions DORIS CHILD OF DORIS HAS CHILD gt applicable rules RULE 1 gt execute rule rule 1 RULE 1 RUNNING gt get next set of rule consequences rule 1 CINSTANCE BETTY MOTHER RELATED BETTY CHILD OF BETTY HAS CHILD gt applicable rules NIL NOTE RULES WHICH ARE ALREADY RUNNING E G RULE 1 DO NOT APPEAR ON THE LIST OF APPLICABLE RULES gt choose current set of rule consequences rule 1 C CCINSTANCE BETTY MOTHER RELATED BETTY CHILD OF BETTY HAS CHILD CINSTANCE DORIS MOTHER RELATED DORIS CHILD OF DORIS HAS CHILD gt g
28. RDF gt By default RacerPro prepends the URL of the default namespace to all OWL names starting with the sign If you would like to instruct RacerPro to return abbreviated names i e to remove the prefix again in output it produces start the RacerPro server with the option n Individual names nominals in class declarations introduced with owl oneOf are treated as disjoint atomic concepts This is similar to the behavior of other OWL inference engines Currently RacerPro can provide only an approximation for true nominals Note that reasoning is sound but still incomplete if owl oneOf is used In RacerPro individuals used in class declarations are also represented in the A box part of the knowledge base They are instances of a concept with the same name An example is appropriate to illustrate the idea Although the KRSS syntax implemented by RacerPro does not include one of as a concept building operator we use it here for demonstration purposes in knowledge base test implies c some r one of j instance i c Dealing with individuals is done by an approximation such that reasoning is sound but must remain incomplete The following examples demonstrate the effects of the approximation 200 CHAPTER 5 ADDITIONAL FACILITIES Given this knowledge base asking for the role fillers of r w r t i returns nil Note that OWL names must be enclosed with bars individual fillers file C Ralf Ind Examples ex1 owl i
29. TBoxes ABoxes Concepts Roles individuals Assertions Axioms Taxonomy Role Hierarchy ABox Graph Query 10 Queries Rules Def Quer Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n httpzwww lehigh edu zhp2 2004 0401 univ bench owls t test kb a test kb Concept c 0 Role r 0 Individual i http www Department0 University0 edu AssistantProfes 1 Axiom ax 0 Request 73 concept http www Department Universitjbedu Assistan Response Classic Layout v lt jas gt gt _ Deiete An Recover FullReset 7 Simpify Arg Comp RacerPro is processing Nothing Abort Request 5 retrieve x y z and x y http www lehigh edu 7Ezhp2 26604 6461 univ bench owl tadvisor x z http www lehigh edu 7Ezhp2 2664 6461 univ bench owl takesCourse y z http www lehigh edu 7Ezhp2 2664 6461 univ bench owl teacher Of x http www lehigh edu 7Ezhp2 2664 6461 univ bench owl GraduateStudent fey http wuww lehigh edu Z7Ezhp2 2085 8581 univ bench owl AssistantProfessorg z http www lehigh edu 7Ezhp2 2 664 6461 univ bench owl GraduateCourse 5 gt x http www Department8 Uniuersity8 edu GraduateStudent76 m y http www Department8 University edu AssistantProfessor5 PTIMIZE P REWRITE SEMANTICALLY P REURITE TO DNF P RE
30. Tobies Reasoning with individuals for the description logic SHIQ In David McAllester editor Proc of the 17th Int Conf on Automated Deduction CADE 2000 volume 1831 of Lecture Notes in Computer Science pages 482 496 Springer Verlag 2000 I Horrocks and S Tobies Reasoning with axioms Theory and practice In Proc of the 7th Int Conf on Principles of Knowledge Representation and Reasoning KR 2000 pages 285 296 2000 Ian Horrocks and Ulrike Sattler Optimised reasoning for SHZQ In Proc of the 15th Eur Conf on Artificial Intelligence ECAI 2002 pages 277 281 July 2002 Ian Horrocks Ulrike Sattler and Stephan Tobies A description logic with transitive and converse roles role hierarchies and qualifying number restrictions LI CS Report 99 08 LuFg Theoretical Computer Science RWTH Aachen Germany 1999 Ian Horrocks Ulrike Sattler and Stephan Tobies Practical reasoning for expressive descrip tion logics In Harald Ganzinger David McAllester and Andrei Voronkov editors Proceed ings of the 6th International Conference on Logic for Programming and Automated Reasoning LPAR 99 number 1705 in Lecture Notes in Computer Science pages 161 180 Springer Verlag 1999 Michael H lsen J Marius Z llner Nino Haeberlen and Christian Weiss Asynchronous real time framework for knowledge based intersection assistance In 14th International IEEE Con ference on Intelligent Transportation Systems Washington DC
31. USA October 5 7 2011 Michael H lsen J Marius Z llner and Christian Weiss Traffic intersection situation descrip tion ontology for advanced driver assistance In 2011 IEEE Intelligent Vehicles Symposium IV Baden Baden Germany June 5 9 2011 B Hummel Description Logic for Scene Understanding at the example of Urban Road Inter sections S dwestdeutscher Verlag f r Hochschulschriften 2010 R L G Lemmens Semantic interoperability of distributed geo services PhD thesis Interna tional Institute for Geo Information Science and Earth Observations CT Delft Netherlands Geodetic Commission NCG 2006 T Liebig M Luther O Noppens M Rodrigues D Calvanesez M Wessel R M ller M Hor ridge S Bechhofer D Tsarkov and E Sirin OWLlink DIG for OWL 2 In Fifth International Workshop on OWL Experiences and Directions OWLEDO08 Karlsruhe Germany 2008 R Moller and B Neumann Ontology based Reasoning Techniques for Multimedia Inter pretation and Retrieval In Semantic Multimedia and Ontologies Theory and Applications Springer 2008 BIBLIOGRAPHY 215 55 56 58 59 60 61 62 63 64 69 70 O Noppens RACER reasoning support for OWLAPI and Prot g http www uni ulm de in ki semantics owltools Noppens M Luther and Th Liebig The OWLlink protocol Infrastructure for inter facing and managing OWL 2 reasoning systems In OWLED 2009 6th OWL Exper
32. and then go back to the Taxonomy tab It will highlight the types of the selected individual note the Individual field in the state display Select the A box Graph tab afterwards in order to show the A box structure focusing on the selected individual Adapt the tree depth accordingly and push Sel Inds You can always change the focus individual by simply selecting it The focus individual is shown in the Individual field at the top To display the complete A box structure simply push the Clear Sel Inds button You can also focus on a subset of the A box edges simply select the roles you are interested in from the Roles tab and check out Selected Roles in the A box Graph tab Then only the edges labeled with selected roles are shown Note that the Roles tab is the only tab which allows multiple selection of items The last selected role is always the current role as shown in the Role text field in the state display The other list panes only allow a single selection In the Queries Rules tab select a nRQL query from the list then use the buttons to apply a command on the selected query Note that the current query or rule is shown in the Query or Rule field in the state display at the top 2 3 5 Known Problems Note that the JPEG image shown in the About tab will only work on Linux if you have user lib libImlib so installed SuSE 1n s opt gnome lib l
33. does not work Moreover the correct namespace etc must be used You can use RacerPorter to find out the correct syntactical names for the concepts roles and individuals that RacerPro has created for an OWL document Note that you can also query RDF documents in this way nRQL is more powerful than other RDF query languages For example complex concept expressions can be used which is not possible in other RDF query languages retrieve x x or http www owl ontologies com unnamed owl person http www owl ontologies com unnamed owlitbook Answer http www owl ontologies com unnamed owlitmichaell C X http www owl ontologies com unnamed owlitbook123 Role Query Atoms The second type of nRQL atoms are the role query atoms These are binary atoms in contrast to the previously discussed unary concept query atoms Role query atoms are used to retrieve pairs of role fillers from an ABox or pairs of OWL RDF individuals which stand in a certain OWL object property relationship to one another Suppose we are looking for all explicitly modeled mother child pairs in the smith family ABox The role has child is declared in the associated TBox family We can therefore make the following query 4 1 THE NRQL LANGUAGE 89 retrieve mother child mother child has child RacerPro replies BETTY CHILD DORIS C MOTHER BETTY CHILD EVE C MOTHER ALICE CHILD
34. dump file However it is not possible to resurrect the queries from the QBox they merely serve as caches Thus you cannot call reexecute query on a query Id which you see in a restored QBox This list of queries processed queries active queries etc are NOT saved If you really want to save queries into a file we ask you the define these queries see Section 4 1 4 Restored definitions can be reused See the example below 182 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL We have also discussed in Section 4 1 7 that there are specialized types of substrates available tailored for special representation tasks For example the data substrate or the RCC substrate These substrates can be saved as well and thus the created hybrid representation can be preserved The following session demonstrates the utility of the nRQL persistency facility gt full reset OKAY FULL RESET racer load kb family Loading text file home mi wessel family racer P home mi wessel family racer gt enable query repository OKAY QUERY REPOSITORY ENABLED gt retrieve x x woman Concept BROTHER causes a cycle in TBox FAMILY Concept SISTER causes a cycle in TBox FAMILY Concept PARENT causes a cycle in TBox FAMILY X EVE X DORIS X BETTY X ALICE gt defquery mother with son x and x woman x y has child y man MOTHER WITH SON gt show current qbox QBOX FO
35. file C Ralf Ind Examples ex1 ow1 R NIL Asking for the instances of j returns j concept instances file C Ralf Ind Examples ex1 owl j file C Ralf Ind Examples ex1 ow1 j The following knowledge base for the OWL version see file ex2 owl in the examples folder is inconsistent in knowledge base test implies c all r one of j instance i c related i k r Note again that in general reasoning is incomplete if individuals are used in concept terms The following query is given w r t the above mentioned knowledge base given in OWL file ex2 0wl in the examples folder 7 concept subsumes at most 1 file C Ralf Ind Examples ex1 owl R file C Ralf Ind Examples ex1 owl c NIL If dealing with nominals were no approximation i e if reasoning were complete then RacerPro would be able to prove a subsumption relationship because all r one of j implies at most 1 r RacerPro can download imported ontology documents Use the command owl read file lt filename gt to read an OWL file or use owl read document lt url gt to read an OWL resource given a URL You can manage multiple knowledge bases with RacerPro and you can load multiple ontologies into a single knowledge base For instance try owl read document http www w3 org TR 2004 REC owl guide 20040210 wine rdf kb name dinner owl read document http www co ode org ontologies pizza 2005 05 16 pizza owl kb name d
36. gt 45 lt age gt name rdf datatype http www w3 org 2001 XMLSchema string gt betty lt name gt lt person gt lt person rdf ID a gt name rdf datatype http www w3 org 2001 XMLSchema string gt betty lt name gt lt age rdf datatype http www w3 org 2001 XMLSchema int gt 35 lt age gt lt person gt lt person rdf ID c gt name rdf datatype http www w3 org 2001 XMLSchema string gt michael lt name gt lt age rdf datatype http www w3 org 2001 XMLSchema int gt 35 lt age gt lt person gt lt rdf RDF gt Let us assume that this OWL document is stored as a file under dtp owl We can then use a constraint query atoms to retrieve those individuals which have same age as in the concrete domain case gt full reset OKAY FULL RESET gt owl read file dtp owl Reading dtp owl done add role assertions for datatype properties OKAY ADDING ROLE ASSERTIONS FOR DATATYPE PROPERTIES gt retrieve x y Cx y constraint http www owl ontologies com unnamed owl age lhttp www owl ontologies com unnamed owl age 2423 http www owl ontologies com unnamed owlitc Y http www owl ontologies com unnamed owl a http www owl ontologies com unnamed owl a http www owl ontologies com unnamed owl c 4 1 THE NRQL LANGUAGE 99 Again you can also use complex predicates as discussed above nRQL is the only OWL query language whic
37. nRQL offers incomplete query satisfiability and query subsumption entailment checks nRQL can be advised to maintain a so called query repository QBox which is a DAG structured query cache nRQL uses the query subsumption check to maintain and compute this DAG This can be called an semantic optimization A further optimization technique which is also still experimental is query realization see below We will first introduce the nRQL language in a tutorial like style and then describe the nRQL engine The complete nRQL API is discussed in the nRQL Reference Manual 4 1 THE NRQL LANGUAGE 85 In the next Section we describe the nRQL language by following a bottom up way of description First the available atoms are discussed then we show how to combine the described atoms into complex queries We then turn to more complex and non essential issues such as defined queries nRQL rules complex TBox queries and the substrate representation facility Finally we give an EBNF syntax description of the nRQL language In the subsequent section we describe the nRQL engine by simply presenting and discussing the features of this engine 4 1 The nRQL Language We will introduce the nRQL language in a tutorial like style For the description of nRQL from the ABox query language perspective we will use the knowledge base family racer as a running example You will find this example KB in the file containing the example KBs which you can fin
38. retrieve x and x Mf person x y Mt has pet with html example html 150 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL html head html title content MiniLisp Output html body html h1 content MiniLisp Output html h2 content Query Head content query head last html h2 content Query Body content query body last html h2 content Query Answer html table border 1 let count 0 maplist lambda bindings html tr html th colspan 2 content format nil Result Tuple No a incf count maplist lambda var val let var first var val val second var val html tr html td content var html td content val bindings res 4 1 9 Formal Syntax of nRQL Here we give an EBNF syntax definition of nRQL means zero or more occurrences X denotes a literal X Y Z means chose exactly one from the given literals X Y 2 For example the list x betty age y is a valid query head if age is a concrete domain attribute see lt attribute name gt as well as x betty betty http a com ontoly a nil or t are invalid lt query head gt s Moreover the set of objects referenced within query head must be a subset of the objects which are referenced in query body otherwise an error will be signaled Top level syntax retrieve query head
39. retrieve x x mother QUERY 9 RUNNING gt get next tuple last X ALICE gt get next tuple last WARNING EXPENSIVE PHASE TWO STARTS gt get next tuple last X BETTY gt get next tuple last X EVE 168 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt get next tuple last EXHAUSTED We can also switch to mode 5 Note that phase 1 using mode 5 is now able to produce one more tuple thus the WARNING EXPENSIVE PHASE TWO STARTS warning token is delivered slightly later gt set nrql completeness 5 OKAY MODE 5 retrieve x x mother QUERY 10 RUNNING gt get next tuple last X ALICE gt get next tuple last X BETTY gt get next tuple last WARNING EXPENSIVE PHASE TWO STARTS gt get next tuple last X EVE gt get next tuple last EXHAUSTED Mode 6 vs Mode 3 If you use set nrql mode 6 then nRQL will basically behave as if set nrql mode 3 were used Thus mode 6 is a complete set at a time mode However unlike mode 3 nRQL will exploit the two phase query processing scheme nRQL will thus ensure that an expensive ABox test on a tuple in phase two will only be made if that same tuple has not already been computed in phase one Thus expensive ABox retrieval functions are avoided whenever possible However since phase one is incomplete it might be the case that no answer tuples can be computed in ph
40. the concepts are symbols or lists Please note that for macros in contrast to functions the arguments should not be quoted 61 62 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES C CN top bottom not C and Cj Chn or Cj C some R C all R C at least n R at most n R exactly n R at least n R C at most n R C exactly n R C a AN an AN no AN CDC R RN inv RN Figure 3 1 RacerPro concept and role terms 3 2 Concept Language The content of RacerPro T boxes includes the conceptual modeling of concepts and roles as well The modeling is based on the signature which consists of two disjoint sets the set of concept names C also called the atomic concepts and the set R containing the role names Starting from the set C complex concept terms can be build using several operators An overview over all concept and role building operators is given in Figure 3 1 Boolean terms build concepts by using the boolean operators DL notation RacerPro syntax Negation not C Conjunction 1 Ci Cn Disjunction CqL1 L1 C Cor Ci Chn Qualified restrictions state that role fillers have to be of a certain concept Value restrictions assure that the type of all role fillers is of the specified concept while exist restrictions require that there be a filler of that role which is an instance of the speci
41. transitive t inverse has descendant define primitive role has descendant equivalent human some ancestor of one of adam instance john human related kain john has descendant The concept forming operator one of takes an individual and construct a concept whose extension contains just the semantic object to which the individual adam is mapped Thus the extension of one of adam is a singleton set Individuals in concepts are also known a nominals Asking for the ancestors of john yields kain and adam although the latter is not explicitly stated in the A box Currently RacerPro does not support nominals in full generality Only axioms of the form equivalent one of i c equivalent one of i some r one of j are supported These axioms are very important for practical purposes and they directly correspond to the following A box assertions instance i c related i j r In many practically important cases nominals are not required in concepts terms The same effect can be achieve using concrete domain values For instance one might think of using nominals for representing colors of simple traffic lights one of red green The following example demonstrates the use of A boxes and the string concrete domain to provide for a formal model of a crossing with simple traffic lights in knowledge base traffic lights define concrete domain attribute color type string define concept colorful object or st
42. 55 instance eve age 18 instance doris age 24 Please enter full reset and reload the modified file family racer into RacerPro Every person should now have an age This we can verify with the concept query atom x an age retrieve x x an age RacerPro replies CHARLES X DORIS X BETTY X EVE X ALICE Fine Now we can ask RacerPro who is at least 75 years old retrieve x x gt age 75 RacerPro replies X ALICE We can now proceed with the constraint query atoms 4 1 THE NRQL LANGUAGE 95 Our First Constraint Query Atom Concept query atoms such as x gt age 75 are insufficient if we want for example find out who is older than whom or who is older than alice However using constraint query atoms we can make the following queries retrieve x y x y constraint age age gt RacerPro replies CC X CHARLES EVE X CHARLES Y DORIS X CHARLES Y BETTY X ALICE CHARLES X ALICE EVE X ALICE Y DORIS X ALICE Y BETTY X DORIS EVE X BETTY EVE X BETTY Y DORIS Thus charles is older than eve doris and betty etc Note that constraint is a keyword age is a concrete domain attribute and gt is one of the concrete domain predicates offered by RacerPro As usual individuals can be used at variable object9 positions Let us verify that nobody is
43. Assertions Axi Taxonomy Role Hierarchy ABox Graph Query Queries Rules Def Queries Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n NIL TBox t family ABox a smith family Concept c Role r Individual Classic Layout g gt gt Detetean Recover 5 5 Arg Comp RacerPro is processing Nothing female brother uncle tmm father father top human person parent lt mother grandmother Girone lt grandmother sister aunt Freeze Graph Auto Update V Show Show Bottom Request Graph Display Graph Reset Graph Print Graph All Concepts Cur Concept Sel Concepts Tree Graph Search amp Select Sel First Clear Sel Concepts Select Children Select Parents Descr Concept Concept Query Synonyms Info 3 concept ancestors mother 3 gt woman parent person topx top human Figure 2 27 RacerPorter The Taxonomy Tab arguments to the operation In general an operator can be invoked in various ways e g via a push button or via the shell Multiple arguments and thus multi selection of objects are currently only supported for objects of type concept individual role and axiom The number of selected objects of the corresponding type is
44. Exception e e printStackTrace 32 CHAPTER 2 USING RACERPRO AND ITS INTERFACES 8 Bava I Package Explorer 3 Test java Test2 java Test3 java 53 E Task List 3 e S 5 package test et 8 x B oe import com racersystems jracer src Y test public class Test3 Connect Mylyn px gt D Test java Connect to your task and gt D Test2 java public static void main String args gt J Test3 java E bra Devas 10 String filename Applications RacerPro 2 0 preview examples ees a z s t Y Bl Referenced Libraries 5 i awe x gt Ga jracer jar String ip localhost int port 8088 Y lib 8 test 0 S jracer jar RacerClient racer new 1 in nart WO i Problems Javadoc B Declaration El Console terminated Test3 Java Application System Library Java JavaVirtualMachines 1 6 0 jdk Contents Home bin java Sep 27 2012 3 59 CCx Ihttp cohse semanticweb org ontologies people Joel y lhttp cohse semanticweb org ontologies RM 1 cohse semanticweb org ontologies people Joel ies 1 cohse semanticweb org ontologies people amp Fidol us 1 cohse semanticweb org ontologies peoplesfredl us cohse semanticweb org ontologies people Tibbs canis semanticweb org ontologies people Walt itin cohse semanticweb org ontologies people Louiel Semanticweb org ontologies people Walt hes c
45. FULL RESET ENABLE DATA SUBSTRATE MIRRORING OKAY DATA SUBSTRATE MIRRORING ENABLED OWL READ FILE dtp owl Reading dtp owl done The following queries demonstrate the retrieval possibilities offered by the mirror data substrate gt retrieve x x dtp value x dtp value owl datatype role http www owl ontologies com unnamed owl b X DTP VALUE 45 http www owl ontologies com unnamed owl b X DTP VALUE betty http www owl ontologies com unnamed owl a X DTP VALUE 35 http www owl ontologies com unnamed owl a X DTP VALUE betty http www owl ontologies com unnamed owlic X DTP VALUE 35 X http www owl ontologies com unnamed owl c X DTP VALUE michael gt retrieve x x dtp value x dtp value owl datatype role http www owl ontologies com unnamed owl age http www owl ontologies com unnamed owl b X DTP VALUE 45 http www owl ontologies com unnamed owl a X DTP VALUE 35 X http www owl ontologies com unnamed owl c X DTP VALUE 35 gt retrieve x x dtp value y y dtp value and x x dtp value owl datatype role 4 1 THE NRQL LANGUAGE 143 lhttp www owl ontologies com unnamed owl age y y dtp value owl datatype role lhttp www owl ontologies com unnamed owl age x dtp value y dtp va
46. For more information CL HTTP see http www ai mit edu projects iiip doc cl http home page html Finally we would like to thank all customers and users that have directly contributed to the function ality and stability of the RacerPro system by giving comments providing ideas and test knowledge bases implementing interfaces or sending bug reports 209 210 APPENDIX ACKNOWLEDGMENTS Bibliography Allegrograph user guide http www franz com agraph allegrograph F Baader A Bauer P Baumgartner A Cregan A Gabaldon K Ji K Lee D Rajaratnam and R Schwitter A novel architecture for situation awareness systems In Martin Giese and Arild Waaler editors Proceedings of the 18th International Conference on Automated Rea soning with Analytic Tableaur and Related Methods Tableaux 2009 volume 5607 of Lecture Notes in Computer Science pages 77 92 Springer Verlag 2009 F Baader S Brandt and C Lutz Pushing the E envelope In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence IJCAI 05 Edinburgh UK Morgan Kaufmann Publishers 2005 F Baader D Calvanese D MacGuinness D Nardi and P F Patel Schneider editors The Description Logic Handbook Cambridge University Press Cambridge UK 2003 F Baader E Franconi B Hollunder B Nebel and H J Profitlich An empirical analysis of optimization techniques for terminological representation systems or Making
47. GUI is not available during layout computation this job can t be processed in the background thus the GUI blocks and disables its widgets However in the Linux and Windows version of RacerPorter the layout computation can be canceled if it takes too long Unfortunately this is not the case for the Macintosh version of RacerPorter 2 3 RACERPORTER IN DETAILS 53 In general Auto Update can be problematic for big graphs In case graph computation or graph layout takes too long you may cancel the operation and retry with some other layout and or focus options e g by focusing only on the current or selected concepts and by specifying a max graph depth cut off limit This depth limit can be specified in the little combo box default is 0 for this reason select always a depth in order to see the graph In some cases also the tree display visualization option results in unacceptable performance due to a combinatorial explosion A node in the taxonomy graph represents a set of synonym concept OWL class names and an edge between two nodes represents a direct subsumption relationship between the concepts OWL classes represented by these nodes Selected concepts will be shown in blue and the current concept will be highlighted Either the top concept is taken as the root of the taxonomy graph or the current concept or each selected concept is taken as a root This is controlled by the radio buttons labeled Concepts
48. INDIVIDUAL INDIVIDUAL CREATE INDIVIDUAL symbol query object a RacerPro concept expression which may contain new symbol lt atomic concept gt lt query object gt operators allowing for the construction of new atomic concepts based on bindings of lt query objects gt s INSTANCE lt generalized object gt lt concept expression2 gt RELATED lt generalized object gt lt generalized object gt lt role expressioni gt CONSTRAINED lt generalized object gt lt generalized object gt lt cd attribute name gt 4 2 THE NRQL QUERY PROCESSING ENGINE 157 lt constraints assertion gt CONSTRAINTS CONSTRAINT see RacerPro constraints syntax Note that you can also use projection operators within constraint expression thus the syntax has been extended by allowing also expression such as constraints age b 30 age a or constraints told value age y age y etc forget concept assertion FORGET CONCEPT ASSERTION lt query object gt lt concept expression2 gt lt forget role assertion gt gt FORGET ROLE ASSERTION lt query object gt lt query object gt lt 1 gt lt forget constrained assertion gt gt FORGET CONSTRAINED ASSERTION lt query object gt lt cd object gt lt cd attribute name gt lt forget constraint assertion gt gt see Ra
49. If you turn on the Sel First checkbox then only the SubClass axioms which mention the cat class are displayed Some other axiom ontology container and reasoner container specific commands are provided by command buttons Note that Dispose Axioms disposes unloads and then deletes all selected axioms The Taxonomy tab This tab presents a graph display of the so called concept subsumption hierarchy the so called taxonomy What is described in the following also applies to the other graph displays in RacerPorter e g Role Hierarchy and the A box Graph tabs All graph displays can be configured to either update their content automatically or manually Automatic updates are performed if the Auto Update checkbox is enabled In case the checkbox is disabled updates must be performed by hand For this purpose use the Request Graph Display Graph and Reset Graph buttons The display of a graph is a two step process First the information to be displayed has to be acquired from RacerPro If the Request Graph button is pushed a background job is started which acquires the graph information This job can be canceled with the Abort Request button Once the graph is available the Display Graph button can be used this is the second step A layout has to be computed for the graph Please note that this can even take more time than the first phase Unfortunately the RacerPorter
50. RacerMaster on request for Allegro Common Lisp Lispworks MCL and other Lisp development environments 205 206 APPENDIX A EDITIONS AND LICENSES A 2 Licenses RacerPro is available as a desktop version in which the server and clients run on localhost In addition there are licenses available to run RacerPro on a powerful server machine whereas graph ical interfaces or client applications can be executed on you personal computer or via wireless connections on your portable computer Your license file is available from your personal download page the file is called license racerlicense Put this license file in your home directory Do not edit or delete this file If the installation process is executed successfully the RacerPro application comes with an additional license file named racerpro lic in the same directory as the RacerPro executable Do not remove or edit this file either We offer the following license schemes Network license Is the standard license of RacerPro It allows you to run RacerPro on a single system server with an unlimited number of users from the network This license covers the complete product including the RacerPorter Available for 32bit versions of Windows Linux or Mac OS X for Sun and other branded UNIX workstations with 32bit or 64bit as well as 64bit Linux environments A Network license also includes one year of software updates and upgrades see Terms and Conditions below The 32 bit vers
51. RacerPro server system 1 1 SYSTEM OVERVIEW 3 which communicates with remote application programs using well defined axiom manipulation lan guages as well as query languages that refer to the semantics of the axioms In addition a rule language based on SWRL syntax is used to conveniently extend the A boxes stored by the rea soning server i e rules that are transferred to the server can be used to extend the expressivity w r t assertional reasoning and or make implicit information explicit Server side A boxes can be remotely cloned and easily extended such that variants of assertional knowledge can be conveniently managed as lightweight objects while the T box part they refer to is shared Besides this approach of lightweight A boxes the RacerPro architecture nevertheless also supports large A boxes stored in a triple store database see Section 5 3 One of the main design principles of RacerPro is to automatically select applicable optimizations based on an analysis of the language of the input knowledge bases and the queries being processed There are various usage scenarios of DL systems for which RacerPro is optimized In one scenario T boxes are usually rather large and A boxes are small 100 individuals but many variants of A boxes need to be handled In the other scenario T boxes are rather small and one large A box 100 000 individuals is referred to in queries RacerPorter provides default configurations to best s
52. System RacerPro is a knowledge representation and reasoning system that implements a highly optimized tableau calculus for a very expressive description logic It offers reasoning services for multiple T boxes and for multiple A boxes as well The system implements the description logic SRTQ see 40 This is the basic logic ALC augmented with qualifying number restrictions inverse roles and acyclic role axioms for specifying e g role hierarchies symmetric relexive and transitive roles etc In addition to these basic features RacerPro also provides facilities for algebraic reasoning using so called concrete domains for dealing with e min max restrictions over the integers e linear polynomial in equations over the reals or cardinals with order relations e equalities and inequalities of strings Given a T box various kinds of queries can be answered Based on the logical semantics of the rep resentation language different kinds of queries are defined as inference problems hence answering a query is called providing inference service As a summary we list only the most important ones here e Concept consistency w r t a T box Is the set of objects described by a concept empty e Concept subsumption w r t a T box Is there a subset relationship between the set of objects described by two concepts e Find all inconsistent concept names mentioned in T box Inconsistent concept names result from T box axioms and it
53. The axioms tab always shows the axioms which are contained in the current reasoner container Single axioms can be selected and deselected The last selected axiom becomes the current axiom All other selected axioms are shown highlighted Command buttons are provided for loading and unloading of axioms etc They all apply to the current ontology in the current reasoner Please note that such a reasoner container is NOT identical with a RacerPro server Each single RacerPro 52 CHAPTER 2 USING RACERPRO AND ITS INTERFACES server instance can host an arbitrary number of these reasoner containers Reasoner Containers are simply OWLAPI conformant notions of KBs Attributes of axioms can be edited In order to edit an attribute you ll have to select the appropriate row of that axiom The selected attribute of that axiom can then be edited by pressing the Edit Axiom button In case you want to create a new axiom make sure to select a non abstract axiom type from the axiom type selector on the left Select the axiom type from the type selector until the word NEW AXIOM appears behind it and the New Axiom button will get enabled If you push it an interactive graphical axiom editor will pop up Basically you ll have to supply an attribute value for each attribute of an axiom You can either enter expressions by hand using the supplied editor fields or select building blocks for interactive expression composition from t
54. The field Namespace shown on the top right part of Figure 2 35 provides two options to simplify the namespace e g and n Queries can be inspected also using the tab Queries Rules in RacerPorter To try this click on the Queries Rules tab and reexecute the query by selecting the query 1 and click on the Re Execute button In this way using RacerPorter queries can be inspected as objects 60 CHAPTER 2 USING RACERPRO AND ITS INTERFACES WF RacerPorter Profiles Shell TBoxes ABoxes Concepts Roles Individuals Assertions Axioms Taxonomy Role Hierarchy ABox Graph Query IO Queries Rules Def 0 Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http www co ode org ontologies pizza pizza owls TBox t Ifile z C Program Files RacerPro 20 Preview examples owl pizza ow ABox a file C Program Files RacerPro 20 Preview examples owl pizza ow Concept c 0 Role r Individual i 0 Axiom ax Request Classic Layout v k lt 818 RacerPro is processing J Freeze Graph Auto Update Show Top Show Bottom RequestGraph Display Graph ResetGraph Print Graph AllConcepts Cur Concept Sel Concepts Hor Ver O Tree Graph P Select All Clear Sel Concepts Select Chidren Select Parents Descr Con
55. Use Porter Logfile rum 7 Start RacerPro V Use Log Tab V Auto Connect E Start RacerPro in DIG 1 1 Mode Iii Dont Modify User input Start RacerPro in OWLLINK Mode Popup Message Box for Large Results Radiobox Font E Put Button Commands in Shell History 7 Show Mouse Select Commands Ask Before Transmitting Large Files Seron Create Axioms by Default Time all Operations Graph Font Auto Save Profiles on Quit V Show Progress V Confirm Quit Status Display Font List Display Font Width Height 1100 900 Use this global Font Size in Points NIL Figure 2 28 The editor of preferences for RacerPro with the use of RacerPorter In order to specify preferences simply press the Edit Profile button in the Profiles pane Mac choose Preferences item from the menu specify the RacerPro host and port to connect to press OK and then Connect to that RacerPro server See also Figure 2 28 Note that you can manage different server settings with profiles The file profiles racerporter in your home directory 2 3 RACERPORTER IN DETAILS 45 is used to store your profiles The default profile will be automatically used on startup You will be connected automatically if auto connect is specified in the default profile If you are successfully connected you can use the tabs to access the functionality of RacerPro The six text fields at the top
56. at the time of this writing additional assertions must be added to the original ABox extensional information in an OWL document is represented as an ABox in RacerPro which is therefore polluted Consider the following OWL KB in which we have two datatype properties age and name names pace prefixes skipped as well as 3 instance a b c lt xml version 1 0 gt lt rdf RDF xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns xsd http www w3 org 2001 XMLSchema xmlns rdfs http www w3 org 2000 01 rdf schema xmlns owl http www w3 org 2002 07 owl xmlns http www owl ontologies com unnamed owl xml base http www owl ontologies com unnamed owl gt lt owl Ontology rdf about gt lt owl Class rdf ID person gt lt owl DatatypeProperty rdf ID age gt lt rdfs domain rdf resource person gt lt rdf type rdf resource http www w3 org 2002 07 owl FunctionalProperty gt 98 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL lt rdfs range rdf resource http www w3 org 2001 XMLSchema int gt lt owl DatatypeProperty gt lt owl FunctionalProperty rdf ID name gt lt rdfs range rdf resource http www w3 org 2001 XMLSchema string gt lt rdfs domain rdf resource person gt lt rdf type rdf resource http www w3 org 2002 07 owl DatatypeProperty gt lt owl FunctionalProperty gt lt person rdf ID b gt lt age rdf datatype http www w3 org 2001 XMLSchema int
57. background ontology This involves reasoning and might result in additional implicit triples to be found RacerPro allows for accessing existing AllegroGraph triple stores as well as for the creation of new ones In the following example a triple store is created afterwards it is opened and the triples are read into the knowledge base nRQL queries are executed over the knowledge base There is no need to write long winded data extraction programs that move triples to OWL files on which in turn reasoning is then applied To create the triple store the following commands are used on the shell of RacerPorter consider that AllegroGraph should be started before the following commands are executed create triple store test directory C test ts if exists supersede triple store read file C Program Files RacerPro 20 Preview examples semweb lubm university universityO 0 owl init nil ignore import t index all triples close triple store The commands above create a triple store on the provided directory notice that the directory folder should be created in advanced The content of the ontology university0 0 owl found in the RacerPro distribution is added to the triple store The index all triples command is necessary to increase performance when working on secondary memory Figure 5 2 shows the files created on the system containing the triple store Now we can open the triple store and use it for querying on a knowledg
58. classes with a cardinality greater than one To retrieve all concepts but woman use woman with neg tbox retrieve x neg x woman RacerPro replies TOP CC X BOTTOM X GRANDMOTHER FATHER MOTHER X UNCLE X BROTHER AUNT X SISTER X PARENT X MAN X PERSON X HUMAN C X MALE X FEMALE Due to the presence of the instance x x assertions the child concepts of woman can also be retrieved like this tbox retrieve y woman y has child How to Retrieve All Concept Names How can we retrieve all concept names The following query gives us only the TOP concept tbox retrieve x x top returns TOP 4 1 THE NRQL LANGUAGE 131 Note that this is a consequence of the four rules which we used for construction of the taxonomy ABox Thus in order to retrieve all concept names from the taxonomy we need a special syntax tbox retrieve x top x RacerPro replies TOP BOTTOM X GRANDMOTHER X FATHER X MOTHER X UNCLE X BROTHER X AUNT X SISTER C X PARENT X MAN X WOMAN X PERSON X HUMAN MALE X FEMALE Complex TBox Queries Now let us consider a more complex examples Suppose we are searching for diamond shaped super subclass relationships in the taxonomy tbox retrieve x y z u and top x x y has child
59. computer science best seller by definition although the actual number of sold copies is not known to RacerPro describe individual document 8 DOCUMENT 8 ASSERTIONS DOCUMENT 8 COMPUTER SCIENCE BEST SELLER ROLE FILLERS NIL TOLD ATTRIBUTE FILLERS ISBN 8234567 DIRECT TYPES COMPUTER SCIENCE BEST SELLER The following subscription queries indicate that the query concept must not necessarily be a concept name but can be a concept term state subscribe client 4 equal isbn 7234567 RacerPro returns the following information CLIENT 4 DOCUMENT 7 Notice again that subscriptions might be considered when new information is added to the A box state subscribe client 5 equal isbn 10234567 The latter statement returns NIL However the subscription is considered if at some time point later on a document with the corresponding ISBN number is introduced and published state instance document 10 document constrained document 10 isbn 10 isbn constraints equal isbn 10 10234567 publish document 10 CLIENT 5 DOCUMENT 10 This concludes the examples for the publish subscribe facility offered by the RacerPro system The publish subscribe mechanism provided with the current implementation is just a first step This facility will be extended significantly Future versions will include optimization techniques in order to speedup answering subscription based instance retrieval queries such th
60. current or selected objects to a result or result set returned by some shell command This is the purpose of the Selected buttons i e Sel Concepts Last Result Sel Roles Last Result and Sel Individuals Last Result For example one possibility to select the concept instances of the concept C is to enter concept instances C and push the Sel Individuals Last Result button The returned individuals will the become the selected individuals The selection can be cleared using the appropriate Clear Sel button In some cases the result of a RacerPro command can be very big e g the result of all individuals with a KB containing thousands of individuals In such cases there is the option to put an abbreviated result into the shell instead of the whole result a popup confirmer will ask you RacerPro may need some time to execute a command Whenever a command is send RacerPorter waits 3 seconds for its result from RacerPro If the result is still not available after 3 seconds the execution of the command is performed as a background request in a background task Thus the shell returns with a notification busy backgrounding and the RacerPorter GUI becomes available again Thus it is not blocking further user requests and appears alive However it will accept no more commands for this session RacerPro server and thus RacerPorter disables its widgets they wi
61. detailed information is printed with dump license info lt filename gt If no filename is supplied output is directed to stdout In case only the li cense string is required use dump license string instead same arguments 2 2 THE RACERPRO SERVER 37 e With t lt s gt a timeout for queries can be specified in seconds e With c lt s gt a timeout for persistent connections can be specified in seconds e With the option alisp RacerPro is instructed not to be case sensitive used for backward compatibility only e no patches disables automatic loading of default patches from default patch directory e no plugins disables automatic loading of default plugins from default plugin directory e patch directory directory specifies the default patch directory these patches are au tomatically loaded e plugin directory directory specifies the default plugin directory these plugins are automatically loaded e patches directory loads all patches from the specified directory after the default patches have been loaded if any e plugins directory loads all plugins from the specified directory after the default plugins have been loaded if any e patch filename loads a single patch after the default patches and other patches have been loaded if any e plugin filename loads a single plugin after the default plugins and other plugins have been loaded if any e check4updates checks for online upda
62. f and features are functional roles k and j are in fact different names for the semantically same domain individual in the interpretation domain nRQL offers a special so called equal role which can be used to query for those pairs of individuals by means of a role query atom which are semantically equal The special role NRQL EQUAL ROLE is reserved for use within role query atoms and has a special meaning there The special meaning of NRQL EQUAL ROLE will only be recognized in role query atoms not in concept expressions gt retrieve x y x y nrql equal role CY JD X J CY K gt retrieve x y x y nrql equal role Y JD X J Y K I Y I X J Y J X Y K Please note that the second query delivers more answer tuples namely those which are excluded from the answer of the first query due to the invectiveness requirement We can add some more atoms to the last query to make it equivalent to the first query gt retrieve x y and x y nrql equal role neg same as x Y X J Y K Here we query for individuals which are semantically equal but have different names The SAME AS atom is explained in more detail below Basically SAME AS only checks whether individual names are syntactically equal whereas NRQL EQUAL ROLE check whether these ABox individual names semantically denote the sa
63. family racer KB file and replace the instance alice mother with instance alice and human grandmother and instance betty mother with 166 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL instance betty or mother grandmother Also add related eve jade has child En ter full reset and reload the file into RacerPro Then the following answers should be repro ducable gt set nrql mode 0 OKAY MODE O gt retrieve x x mother NIL gt set nrql mode 1 OKAY MODE 1 retrieve x x mother X ALICE gt set nrql mode 2 OKAY MODE 2 retrieve x x mother ALICE gt set nrql mode 3 OKAY MODE 3 retrieve x x mother X BETTY X EVE X ALICE The Two Phase Query Processing Modes The so called two phase query processing modes are special lazy incremental tuple at a time query processing modes The modes are complete To put nRQL into one of these modes use set nrql mode 4 or set nrql mode 5 Internally the two phase tuple computation mode will also be exploited for the nRQL mode 6 which is a set at a time mode Mode 6 behaves like mode 3 and is thus complete but reduces the number of calls to RacerPro s expensive ABox retrieval functions to a minimum See below for further discussion of this mode Let us describe the modes 4 and 5 If nRQL is used in these modes then delivery of tuples will be arranged
64. following terminal log demonstrates these possibilities full reset OKAY FULL RESET v in tbox a 124 CHAPTER 4 gt defquery test x x a TEST gt instance a a gt retrieve x x test A gt describe all definitions DEFQUERY TEST X X A gt in tbox b B Vv in abox b B Vv associated tbox b B gt instance b b gt defquery test x x b TEST gt retrieve x x test X B gt describe all definitions DEFQUERY TEST X X B THE NEW RACERPRO QUERY LANGUAGE NRQL gt defquery test2 x x top tbox a TEST2 gt describe all definitions DEFQUERY TEST X X B gt describe all definitions tbox a DEFQUERY TEST X X A DEFQUERY TEST2 X X TOP gt retrieve x substitute test2 x Error NRQL ERROR CAN T FIND DEFINITION OF QUERY TEST2 IN DBOX FOR TBOX B in tbox a A in abox a A 4 1 THE NRQL LANGUAGE 125 gt describe all definitions DEFQUERY TEST 7X X DEFQUERY TEST2 X X TOP gt retrieve x substitute test2 x A 4 1 5 ABox Augmentation with Simple Rules nRQL offers a simple ABox augmentation mechanism rules This rule engine is also used as a basis engine for the experimental SWRL facilities of RacerPro Terminology Rule Antecedent and Consequence nR
65. i the query language uses the active domain semantics for variable bindings in knowledge base test instance i and a some r b For a detailed explanation see Chapter 4 In any case description logics and ontology languages such as OWL are important if concept names have definitions in the T box or if the A box contains indefinite descriptions such as instance john or french italian Although it is possible to represent an object based view of a database as an A box currently description logic systems do not provide for transactions and persistency of data and in order to ensure decidability in the general case the query language is in some sense less expressive than for instance relational database query languages such as SQL So mass data representing definite information is better stored in databases right now Description logic and semantic web technology comes into play when indefinite information disjunctive information is to be treated as well See also the comment about the open world and closed world assumptions below Databases employ the closed world assumption What is not explicitly stated in the database is assumed to be false 3 8 HINTS ON MODELING AND REASONING WITH RACERPRO 75 3 8 2 Nominals Concrete Domains The language OWL provides for means to address individuals in concepts As a example one could represent the concept human with the following axioms define primitive role ancestor of
66. of which are symbols The example shows how to iterate over RacerPro result data structures from within Java programs As you can see in the code the method racerAnswerQuery has a as a suffix in the second call In case the suffix is used a data structure is returned rather than only a string which can be easily printed as shown in the first call but otherwise have to be parsed by the user to access the results for subsequent computations The Figure 2 22 for the output package test import com racersystems jracer public class Test3 public static void main String args String filename Applications RacerPro 2 0 preview examples owl people pets owl String ip localhost int port 8088 RacerClient racer new RacerClient ip port try racer openConnection 2 2 THE RACERPRO SERVER 31 racer fullReset racer owlReadFile filenamet System out println racer racerAnswerQuery x y person has_pet SuppressWarnings unchecked RacerList lt RacerList lt RacerList lt RacerSymbol gt gt gt res2 RacerList lt RacerList lt RacerList lt RacerSymbol gt gt gt racer racerAnswerQuery x y and x person x y has_pet for RacerList lt RacerList lt RacerSymbol gt gt bindings res2 for RacerList lt RacerSymbol gt binding bindings for RacerSymbol varval binding System out println varval catch
67. older versions of RacerPro lt 1 9 it was required that the first argument of SAME AS must be a variable and the second argument had to be an individual This is no longer required as the examples demonstrate Suppose we have on more individual k 100 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt instance k top The query using three injective variables x y z gt retrieve x y z and x top y top z top DY T CZ RD COX K 94039 COXI CY 2 K CZ IJ CX K FY IJ 727 D CCP aR 2 CZ 1222 is in fact equivalent to gt retrieve x y 2 and x top y top z top neg same as x neg same as x 2 neg same as y 2 I Y 7Z X I Y J Z X J Y Z DD X J I Z X Y J Z I X Y Z J See below for an explanation of the and neg constructors Auxiliary Query Atoms Some auxiliary query atoms are offered by nRQL However these atoms are not as important as the atoms we have already discussed HAS KNOWN SUCCESSOR Query Atoms Sometimes one just wants to retrieve individuals which have a certain explicitly modeled role successor in an ABox but one is not interested in actually retrieving this successor For example suppose we want to know for which individuals we have explicitly modeled children in th
68. owllink In order to submit a query to RacerPro just create a file q racer with queries in KRSS syntax and start RacerPro as follows RacerPro owllink kb owllink q q racer 20 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Note the use of the option owllink for specifying that the input knowledge base is in OWLlink syntax If you would like to use OWLlink syntax for queries as well just create q racer with contents owllink read file queries owllink Under Windows you might want to suppress the shell window RacerPro c owllink kb owllink q q racer For any performance evaluation please refer to Section 3 9 in order to properly measure system runtimes for reasoning subtasks 2 2 2 TCP Interfaces There are two APIs based on TCP sockets namely for the programming languages Common Lisp and Java The socket interface of the RacerPro server can be used from application programs or graphical interfaces Bindings for C and Prolog dialects have been developed as well If the option f is not provided the socket interface is automatically enabled Just execute the following RacerPro The default TCP communication port used by RacerPro is 8088 In order to change the port number the RacerPro server should be started with the option p For instance RacerPro p 8000 or RacerPro p 8000 under Windows In this document the TCP socket is also called the raw TCP interface The functionality offered by the TCP sock
69. projection operator project to for query bodies nRQL is more expressive than relational algebra or non recursive Datalog however the semantics of nRQL is specified in an algebraic way which is easy to understand for users which are familiar with relational algebra Please refer to the list of research publications at www racer systems com for the formal specification of the semantics of nRQL Various projection operators e g types direct types describe individual synonyms as well as a more complete told value if exists head projection operator to retrieve told values of concrete domain attributes nRQL is also a powerful OWL and RDF query language which is far more expressive than typical RDF query languages and even more expressive in certain aspects than the semi official OWL query language OWL QL nRQL allows you to exploit the expressive power of arbritrary anonymous concept expres sions in concept query atoms use negated roles in role query atoms have queries with NAF semantics as well as with classical negation in one query etc None of these expressive means is supported by typical RDF query languages nRQL allows for the specification of complex retrieval conditions on the XML Schema datatype fillers values of OWL datatype properties Like in the case of the concrete domain 83 we might be interested in retrieving those individuals from an OWL document which are adults thus the filler of the has age OWL Dat
70. query are realized We recommend that T boxes and A boxes should be kept in separate files If an A box is revised by reloading or reevaluating a file there is no need to recompute anything for the T box How ever if the T box is placed in the same file reevaluating a file presumably causes the T box to be reinitialized and the axioms to be declared again Thus in order to answer an A box query 3 9 EVALUATING RACERPRO AND CONFIGURING REASONING MODES 79 recomputations concerning the T box might be necessary So if different A boxes are to be tested they should probably be located separately from the associated T boxes in order to save processing time During the development phase of a T box it might be advantageous to call inference services directly For instance during the development phase of a T box it might be useful to check which atomic concepts in the T box are inconsistent by calling check tbox coherence This service is usually much faster than calling classify tbox However if an application problem can be solved for example by checking whether a certain A box is consistent or not see the function abox consistent p it is not necessary to call either check tbox coherence or classify tbox For all queries RacerPro ensures that the knowledge bases are in the appropriate states This behavior usually guarantees minimum runtimes for answering queries The standard configuration of RacerPro ensures that only those computation
71. retrieve x y and x woman x y has child you will only get SUSAN Y PETER since there are no known children of jenny However we can still check if not retrieve which individuals necessarily must have children in all models of the KB The concept query atom retrieve x x some has child top yields SUSAN JENNY However note that we have used a concept query atom not a role query atom Constraint Query Atoms Another important type of query atom is the constraint query atom Constraint query atoms are binary atoms like the role query atoms They are are meant to address the concrete domain part of a KB A constraint query atom can be used to retrieve those pairs of ABox or OWL individuals whose fillers of certain specified concrete domain attributes or OWL datatype properties satisfy a specified concrete domain predicate also called constraint For example we can retrieve those pairs of individuals that have the same age if we assume that age is a concrete domain attribute Getting Ready for Constraint Query Atoms To demonstrate a constraint query atom we need to make some changes to the family racer KB Please load family racer into your favorite text editor and add the following concept membership assertions representing the ages of the individual family members at the end of the file instance alice age 80 instance betty age 50 instance charles age
72. shown in the little numeric box after the current object of the corresponding type Moreover the selected objects are displayed in a highlighted style in the corresponding item lists e g the selected concepts are highlighted in the Concepts tab which simply lists the concept names which are available in the current T box 3 The history navigator For each interaction a so called history entry is created and main tained in a list the so called history Previous views states of the RacerPorter GUI can be reestablished easily with the help of the navigator buttons Thus it is possible to go back to reawake a previous session state Similar to a web browser this navigation in interaction history is supported with the help of navigator buttons back and forth The current history position and length of the history is shown as well The history entries can be deleted with the help of the Delete All button Note that this does not affect the RacerPro server Sometimes in case of errors the widgets of RacerPorter are disabled even though RacerPorter is still connected to a living RacerPro server which accepts requests In order to recover Rac erPorter from such errors and reawake its GUI please use the Recover button This button also invalidates the cache of RacerPorter So if you suspect that RacerPorter displays incorrect information please press this button as well the cache may have become inaccurate if a
73. statement How ever complete reclassification may be necessary in order to answer queries Retracting axioms is mainly useful if the RacerPro server is used With retracting there is no need to delete and retransfer a knowledge base T box RacerPro also offers constructs for retracting A box assertions see forget forget concept assertion forget role assertion and friends If a query has been answered and some assertions are retracted then RacerPro might be forced to compute the index structures for the A box again realization i e after retractions some queries might take some time to answer Note that may queries are answered without index structures at all see also Section 3 9 RacerPro also supports incremental additions to A boxes i e assertions can be added even after queries have been answered However the internal data structures used for answering queries are recomputed from scratch This might take some time If an A box is used for hypothesis genera tion e g for testing whether the assertion 7 C can be added without causing an inconsistency we recommend using the instance checking inference service If individual instance i not C returns t i C cannot be added to the A box Now let us assume we can addi C and afterwards want to test whether i D can be added without causing an inconsistency In this case it might be faster not to add i C directly but to check whether individual instance and C not D
74. substrate query expression 136 deadlock prevention 168 Defined Queries tab 54 defined query 120 defined query and NAF 122 defined query and PROJECT TO 122 Desktop license 206 disjoint concepts 64 disjunctive query 110 domain restriction 66 eager mode 160 equal role 91 event recognition 203 exists restriction 62 expensive query 166 expensive rule 166 expensive tuple 166 explicit role filler query 93 extended OWL query 137 141 feature 65 feature chains in queries 95 Functional Lambda Expressions 146 GCI 64 graphical client interfaces 55 head projection operators 101 hybrid ABox individual 134 hybrid OWL query 137 141 hybrid query 135 138 INDEX INDEX hybrid representation 133 implicit role filler query 93 incomplete mode 164 incremental mode 157 incremental query processing 159 individual 85 Individuals tab 51 inference modes 78 injective variable 85 JRacer 20 lazy mode 160 Log tab 54 LRacer 34 macro query 120 marker 140 mirror data substrate 137 mirror of an ABox 137 mirror substrate 137 mirror substrate marker 140 mirror substrate query 138 mirroring an ABox 137 mirroring an OWL file 137 mirroring OWL documents 141 NAF 113 NAF in constraint query atom 116 NAF in query with individuals 117 NAF in SAME AS query atom 117 NAF query 113 negation as failure 113 Network license 206 nominals 75 128 nominals in que
75. that document can be considered as structured objects not just names This is demonstrated with the following statement whose result is displayed just below describe individual document 7 DOCUMENT 7 ASSERTIONS DOCUMENT 7 COMPUTER SCIENCE DOCUMENT ROLE FILLERS NIL TOLD ATTRIBUTE FILLERS ISBN 7234567 NUMBER OF COPIES SOLD 4000 DIRECT TYPES COMPUTER SCIENCE BEST SELLER COMPUTER SCIENCE DOCUMENT Thus RacerPro has determined that the individual document 7 is also an instance of the concept computer science best seller This is due to the value of the at tribute number of copies sold and the given sufficient conditions for the concept computer science best seller in the T box document ontology Now we have information about seven documents declared in the A box current document all individuals DOCUMENT 1 DOCUMENT 2 DOCUMENT 3 DOCUMENT 4 DOCUMENT 5 DOCUMENT 6 DOCUMENT 7 196 CHAPTER 5 ADDITIONAL FACILITIES In order to delete a document from the A box it is possible to use RacerPro s forget facility The instance assertion can be removed from the A box with the following statement forget O instance document 3 book Now asking for all individuals reveal that there are only six individuals left all individuals DOCUMENT 1 DOCUMENT 2 DOCUMENT 4 DOCUMENT 5 DOCUMENT 6 DOCUMENT 7 With the next subscription a fourth client is introduced The query is to retrieve the instances of book RacerPr
76. that object a contains b and b contains c but a and c are disjoint The build in RCC network consistency checker will discover that this network is inconsistent More importantly it is also possible to query an RCC network using nRQL Usually you will not create an isolated RCC network but a network in which the nodes will have associated corresponding ABox individuals Thus the RCC substrate can serve an ABox as an additional representation medium which is aware of the special characteristics of qualitative spatial RCC relationships and thus can be used for answering qualitative spatial queries by means of constraint checking For example if a contains b PPI and a and c are disjoint DC then a nRQL query asking for disjoint DC objects will not only retrieve a and c but also b and c even though only the edges a b PPI a c DO are explicitly modeled in the RCC substrate However b c DC isa logical consequence in this RCC network Moreover the RCC substrate will detect inconsistencies like the one discussed above The RCC querying facilities are best demonstrated with yet another example full reset in tbox geo example define concrete domain attribute inhabitants type cardinal define concrete domain attribute has name type string define primitive attribute has language in abox geo example Create an RCC5 substrate which is associated with the ABox 333 geo example in rcc box geo example rc
77. to the associated substrate node if an associated node exists and vice versa Note that you can enforce the existence of appropriate corresponding objects by putting conjuncts like x top and top x into your query Finally it should be mentioned that variables which are prefixed with also denote substrate variables However these variables are non injective whereas variables beginning with are in jective variables as for the nRQL variables ranging over the ABox individuals 136 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Data Substrate Query Expressions A data substrate variable is bound to a substrate node with a certain label if this label satisfies the given data node query expression see 150 rule lt data node query expression gt These substrate data query expressions play the same role as concept and role expression for ABox query atoms The node query expressions for example the query expression Michael Wessel in the query atom x Michael Wessel have a structure similar to the node edge labels Again a positive boolean description of data substrate query items in CNF is assumed As for the usual ABox concept query atoms e g x and human some colleague teacher a notion of logical entailment is employed for the matching process A data node matches a given data substrate node query atom iff the label of this node logically implies the node query expression used within this substrate que
78. typed command A command is executed once it is syntactically complete RacerPorter allows you to inspect data descriptions in an A box for this select the A box Graph Evaluate OWL Buffer rdf rdf or ofn implies top all has child person disjoint female male equivalent mother and woman parent equivalent father and man parent equivalent grandmother and mother some has child Fontifying family racer done Pro 2 0 running on localhost 8088 case preserve family Figure 2 2 The RacerEditor interface for RacerPro implies some has child xtopx parent Complete Racer Command Ctrl A Complete Racer Filename Ctrl 7 signatu Complete Word Ctrl 8 Racer Command Signature Ctrl I Evaluate Racer Expression Ctrl Shift E Evaluate Sparql Expression Ctrl Shift S Evaluate Racer Buffer Ctrl Shift H Ctrl Shift Y indiuiduals alice betty charles doris eve implies some has sibling top or sister brother implies xtopx all has sibling or sister brother implies topx all has sister some has gender female implies top all has brother some has gender male implies person and human some has gender or female male implies woman and person some has gender female implies man and person some has gender male equivalent parent and person some has child person sone has child person
79. user guide e g contents images tables etc In case you encounter difficulties you can contact support racer systems com and submit bug reports We are highly interested into your feedback and your comments are highly appreciated However Racer Systems cannot provide free assistance about how to solve a specific problem or about how to configure a specialized system Professional support can be provided on line or on site on a contractual basis Please refer to http www racer systems com services or contact us for more information how to use our knowledge and experience for your projects 1 1 System Overview RacerPro is available for all major operating systems in 32bit and 64bit modes Linux Mac OS X Solaris 2 Windows For larger knowledge bases in industrial projects we recommend at least 1 GB of main memory and a 1GHz processor For large ontologies 7 100000 concept and role names we recommend 64bit computer architectures The RacerPro system can be obtained from the following web site http www racer systems com products download index phtml A documentation for the RacerPro installation process is included in the installer file that you can download from your personal download page The URL for your personal download page is sent to you via email 1 1 1 Design Principles RacerPro is available as a server version RacerPro Server with APIs e g for Java or Common Lisp RacerPro communicates with client programs via variou
80. we will add the necessary individuals to the A box part of the ontology that satisfy the precondition of the rule above For this we will add the individuals MARY SUE and JOHN as instances of Person then relate MARY with SUE under the role hasParent and SUE with JOHN under the role hasBrother For this we use the following commands instance MARY Person instance SUE Person instance JOHN Person related MARY SUE hasParent related SUE JOHN hasBrother Figure 3 7 shows the resulting A box graph To execute the famous has uncle rule one can use the Queries Rules tab of RacerPorter With the Queries Rules tab rules can be inspected see buttons Describe Original executed re executed etc To execute the rule select the id of the corresponding rule and click on the button Execute As Figure 3 8 shows a new role is added between the individuals MARY and JOHN called hasUncle This new assertion can be seen in the A box graph of RacerPorter which allows us to analyze the effect graphically the shell window also updates the information accordingly Thus the rule is responsible for asserting a new role RacerPro offers a forward chainer with the command swrl forward chaining that applies SWRL rules until no new information is added In RacerPro for a fixed variable binding to a individual in an A box the predicates in the body must be satisfied in all models This ha
81. x neg x some has child top 116 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL then doris will be excluded from the answer even if doris does not have a known child X EVE The reason is that RacerPro can now prove that doris has a child since doris is an instance of the concept mother Thus if we want to get a positive answer that doris does not have any explicitly modeled children in the ABox we must use the query retrieve x meg x has known successor has child and finally get C X DORIS EVE even if instance doris mother has been added to the ABox Please note that this query is equivalent to retrieve x neg project to x x y has child Thus before computing the complement set of x y has child with neg we must make a projection to x and then compute the unary complement of the result of this projection This will solve the retrieval problem We will describe the project to constructor in more detail later on We also borrowed the following syntax from the query language of the LOOM system retrieve x x NIL has child which is just syntactic sugar for the previous query Please note that since has parent is the inverse role of has child the following query achieves the same retrieve x NIL x has parent As for the concept query atoms it is the case that x y not R always returns a subset of neg x y R This holds for an arbitrary r
82. 6 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 Typ Dateiordner Datei DATA Datei MIDX Datei IDX Datei MIDX Datei IDX Datei MIDX Datei IDX Datei MIDX Datei IDX Datei MIDX Datei IDX Datei MIDX Datei IDX Datei MIDX Datei Datei Windows Journal Ji Windows Mail J Windows Media Player Ji Windows Media Komponenten Jj Windows NT Windows Photo Gallery Windows Portable Devices Ji Windows Sidebar I Wisdom soft AutoScreenRecorder 3 F UM con gt 26 Elemente 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 15 11 03 2011 18 15 11 03 2011 18 11 Datei Datei Datei Datei Datei Datei Datei DATA Datei Datei 1191 52 Os Lis Os 6 i strings __Jtriples data Li version Figure 5 2 The triple store test created with RacerPorter open triple store test directory C test ts pretrieve x y and y http www lehigh edu 7Ezhp2 2004 0401 univ bench owl Publication y http www lehigh edu 7Ezhp2 2004 0401 univ bench owl publicationAuthor x http www DepartmentO UniversityO edu http www lehigh edu 7Ezhp2 2004 0401 univ bench owl memberOf http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateStudent 5 3 REASONING WITH TRIPLES IN SECONDARY MEMORY 191 fee i _ SS err Profiles Shell
83. 6 use 8 for no http host specify the host name nohttpconsolelog swith off console logging for http server write output to specified filename specify neu stack size ignored in this version timeout for answer a query in seconds timeout for persistent connections in seconds default 18 unsafe mode enable saving of Tboxes Aboxes to local file system log logging print logging information to the console or into a fil Figure 2 7 The shell window of RacerPro showed when using the option h The f RacerPro option has the following meaning The input file is family racer and the queries file is family queries racer The output of RacerPro is printed into the shell If output is to be printed into a file specify the file with the option o as in the following example RacerPro f family racer q family queries racer o ouput text Or use the following under Windows as explained above RacerPro c f family racer q family queries racer o ouput text The syntax for processing input files is determined by RacerPro using the file type file extension If lisp krss or racer is specified a KRSS based syntax is used Other possibilities are rdfs owl owllink and dig If the input file has one of these extensions the respective syntax for the input is assumed The syntax can be enforced with corresponding options instead of f rdfs owl and dig Let us assume an OWLlink knowledge base is given in the file kb
84. 9 HacerPorter im Details 24 20 4584 ncs e Ee Sa ea Re a Eas 41 2 3 1 Distribution of GUI elements 41 2 9 4 Preferene S 2 255222 o oo aaie ox o XR RU EO TOR OR RR 44 20 Racer baee ux o WR ORE Y ee 45 230A Tabs in RacerPorter lt o eos ac erei ee ky E OY y Y ROUES 47 245 Known Problems 2 4 64 24 eens a fee a ARS RUE Yo 55 2 4 Other Graphical Client 55 DAI PROTEGE ee hee dh he x05 eee ee d epo mo grs 55 2 4 2 Using Prot g and RacerPorter in Combination 58 3 Modeling Languages and Basic Reasoning Services 61 3 1 Naming Conventions 3 o x eee ee wa 61 ii CONTENTS 3 2 Concept Language lt lt o oho oom oro RR E RE RR RR 62 d Concept AXIOMS wor Roe we cee ak WR Reno ee ee E Igea 64 GA WROle Axioms ce ce wave Ae se ee OR ed ce UR A e e o ets 65 3 5 Concrete Domains 2 2 ox eR eb ea 3k ox cw wy you EE a ee Rs 66 3 6 Individual Assertions and A boxes 69 2 4 wpecitying Riles ba Roo xo s kc a eda ue o PRSE ES wo Row Ey e bee 71 3 8 Hints on Modeling and Reasoning with 74 3 8 1 Representing Data with Description Logics 74 3 8 2 Nominals or Con
85. AN X ANO1 Y HAS CHILD 313 ___ X ANO1 MOTHER Y MAN Y X ANO1 HAS PARENT A ___MASTER BOTTOM QUERY 333 TOP 355 ___ A HUMAN ___ B WOMAN e ___ A MOTHER ix ___MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt query children last MASTER BOTTOM QUERY gt query children query 9 QUERY 72 gt query parents query 72 QUERY 9 IN gt query equivalents query 37 QUERY 9 PX gt query equivalents query 9 QUERY 37 E dio 180 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL 4 2 9 The Query Realizer Query realization can be called a semantic query optimization which will enhance the amount of information available for the guidance of the search process used for query answering The service is experimental as well The query realization process is similar to an ABox realization process logically implied conjuncts are added The realized query is semantically equivalent to the original query Let us consider the following example session gt full reset OKAY FULL RESET gt load family racer Loading text file home mi wessel family racer P home mi wessel family racer gt enable query realization OKAY QUERY REALIZATION ENABLED gt retrieve x and x woman x y has child y human ALICE X BETTY DESCRIBE QUERY outputs by default always the internally rewritten query N
86. B then we will get ALICE ALICE CAGE 7ALICE HUHU ALICE AGE for the previous query Semantically huhu and alice age denote the same concrete domain object resp value If there is no concrete domain object which is known to be a filler of an attribute e g as for retrieve betty age betty bind individual betty we will get BETTY BETTY CAGE BETTY NO KNOWN CD OBJECTS Thus the token no known cd objects indicates that there is no concrete domain object which is a filler of this attribute The Told Value Projection Operator in More Detail As already seen the projection operator told value age alice can be used on concrete domain objects to retrieve their actual told values This is how we can actually retrieve the age of Alice retrieve alice age alice told value age alice bind individual alice and get ALICE CAGE ALICE HUHU ALICE AGE C TOLD VALUE AGE ALICE NO TOLD VALUE 80 Note that we have no told value for the concrete domain object huhu RacerPro indicates this using the token no told value Also note that even though huhu and alice age semantically denote the same concrete domain object only for alice age the correct told value of 80 is returned whereas for huhu the binding is no told value This behavior is inherited from RacerPro s ABox querying function told value Remarks on Completeness Please note that told value i
87. BETTY C MOTHER ALICE CHILD CHARLES The expression mother child has child is a role query atom If we are just interested in the children of Betty we could ask Racer like this retrieve child of betty betty child of betty has child and RacerPro replies CHILD OF BETTY DORIS CHILD OF BETTY EVE Role Terms in Role Query Atoms We mentioned that arbitrary concept expressions can be used in concept query atoms not only concept names The same applies to role query atoms role terms can be used not only role names as the following example demonstrates retrieve child of betty child of betty betty inv has child Again RacerPro replies CHILD OF BETTY DORIS CHILD OF BETTY EVE Please note that the set of role terms is rather limited in RacerPro only inv is available as a term constructor However nRQL adds one more constructor which is only available in role query atoms classical negated roles which are provided with the not constructor Classical Negated Roles in nRQL It is obvious that the instances of the concept not mother can be retrieved with retrieve x x not mother RacerPro replies X CHARLES since charles is man and man and woman are disjoint This follows from the defini tions of these concepts in the family TBox Thus RacerPro can prove that charles is an instance of the concept not mother In the ACCQHTp D description logic the DL impl
88. Before we continue with the description of the syntax of the query expressions how to combine the introduced query atoms to form complex query bodies we want to discuss another more basic feature the head projection operators These projection operators are needed in order e to retrieve the fillers of concrete domain attributes of ABox individuals so called concrete domain objects and e to retrieve the told values of such concrete domain attributes so called concrete domain values e to retrieve the XML Schema datatype values which are told fillers of OWL datatype and OWL annotation properties of OWL individuals It is not only possible to retrieve these told values but also to specify complex retrieval conditions using concrete domain predicates on the told values to be retrieved 102 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Motivation We have mentioned that the query head is simply a list of objects But this is only half of the story Moreover special head projection operators are permitted in the head of a query as well Such an operator is denoted in a functional style e g lt op1 gt x lt op2 gt lt op1 gt alice mean ing the projection operator lt op1 gt is applied to the current binding of x the projection operator lt op2 gt is applied to the result of applying the projection operator opi to alice etc So what is the purpose of these projection operators We already mentio
89. CCONSTRAINTS AGE OF B 30 AGE OF A gt retrieve x x age 30 NIL gt constraints age of a 30 NIL gt retrieve x x age 30 A gt retrieve x told value age x x age 60 TOLD VALUE AGE X 30 AGE OF A gt firerule a top constraints told value age a age a C CONSTRAINTS 30 AGE 0F A gt firerule b top constraints told value age b age b CONSTRAINTS 30 AGE OF A AGE OF B gt firerule and a an age b an age constraints told value age b 30 told value age a 128 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL CCCCONSTRAINTS 30 AGE OF A 30 30 gt abox consistent T Adding Pseudo Nominals with Rules A similar mechanism can be used to add so called pseudo nominals to an ABox Suppose you need one new unique concept name for each ABox individual e g you want to add instance betty concept for betty for betty instance doris concept for doris for doris and so on The following rule achieves exactly this firerule x top instance x new symbol concept for x Firing the rule adds the following concept assertions to the ABox INSTANCE CHARLES CONCEPT FOR CHARLES CINSTANCE DORIS CONCEPT FOR DORIS INSTANCE JAMES CONCEPT FOR JAMES CINSTANCE EVE CONCEPT FOR EVE CINSTANCE BETTY CONCEPT FOR BETTY
90. Communication with possibly different RacerPro servers is managed using so called profiles A profile has a name and specifies at least the parameters of the connection TCP IP address and port to a RacerPro server see Profile Specific Connection Options in the Edit Profile dialog so that RacerPorter knows how to connect to that server Profiles are managed with the Profiles tab Simply select a profile from the list of profiles in the Profiles tab to activate it There is always one active profile at a time The name of the active profile is always shown in the status display field Active Profile There is one default profile The default profile is the one which is automatically activated during startup of RacerPorter If auto connect is enabled for this profile the connection to the specified RacerPro server is automatically established Moreover a profile can also specify parameters required for starting up a RacerPro server on the local machine see Profile Specific Server Startup Options in the Edit Profile dialog For the default profile it is possible to startup a fresh RacerPro server during startup of RacerPorter with parameters specified in the default profile For non default profiles the Start RacerPro button can be used to startup a fresh RacerPro server In any case in order to enable RacerPorter to start RacerPro servers you ll have to specify the RacerPro Executable in t
91. Connection catch Exception e printStackTrace Javadoc is provided for all JRacer methods Figure 2 20 2 2 THE RACERPRO SERVER 29 RacerStubs owlapiGetOWLAxiomAnnotationAxiom public java lang String owlapiGetOWLAxiomAnnotationAxiom java lang Object axiomId java lang Object annotation java lang Object reasoner throws RacerClientException Throws RacerClientException owlapiGetOWLAxiomAnnotationAxiom public RacerResult owlapiGetOWLAxiomAnnotationAxiom java lang Object axiomId java lang Object annotation java lang Object reasoner throws RacerClientException owlapiGetOWLClassAssertionAxiom public java lang String owlapiGetOWLClassAssertionAxiom java lang Object individual L java lang Object description throws RacerClientException Racer Function owlapi getowlclassassertionaxiom IOWLAPI getOWLClassAssertionA xioml owlapi individual owlapi description amp optional owlapi reasoner Throws RacerClientException owlapiGetOWLClassAssertionAxiom public RacerResult owlapiGetOWLClassAssertionAxiom java lang Object individual java lang Object description throws RacerClientException Throws RacerClientException Figure 2 20 JRacer documentation using Javadoc 30 In Eclipse the example can be run in a similar way as explained above In Figure 2 21 the output CHAPTER 2 USING RACERPRO AND ITS INTERFACES of the above program is shown in the Consol
92. ED gt GET NEXT TUPLE CX L CY DD GET NEXT TUPLE CX Y L gt GET NEXT TUPLE K J gt GET NEXT TUPLE CX Y DD gt GET NEXT TUPLE CX J CY L gt GET NEXT TUPLE J CH I gt GET NEXT TUPLE CX I Y L gt GET NEXT TUPLE CX D J gt GET NEXT TUPLE EXHAUSTED gt ACTIVE QUERIES NIL LAST LAST LAST LAST LAST LAST LAST LAST LAST gt PROCESSED QUERIES QUERY 3 QUERY 1 4 2 THE NRQL QUERY PROCESSING ENGINE 171 4 2 7 Reasoning with Queries The services described in this Section should be considered as non essential add ons and are still experimental If you are wondering why a certain query never returns any tuples and you think it should consider using the consistency checking service it might find an inconsistency in your query Reporting Inconsistent and Tautological Queries The nRQL engine also offers yet experimental reasoning services for queries Consistency checking of queries is such a service An inconsistent query must necessarily produce an empty answer on all ABoxes thus CPU cycles can be saved if such queries are recognized before starting them In contrast a tautological query always returns all possible combinations of tuples In most cases such a query does not return useful information Thus it is good to recognize such queries as well Even though the rea
93. Franz Inc Oakland CA USA All Rights Reserved The XML RDF RDFS OWL parser is implemented with Wilbur developed by Ora Lassila For more information on Wilbur see 333 http wilbur rdf sourceforge net Found license file C Program Files RacerPro 20 Preview license racerlicense 333 This copy of RacerPro is licensed to Juan Perez Technische Universitaet Hamburg Harburg Harburger Schlossstrasse 20 333 21073 Hamburg 333 DE Initial license generated on November 03 2010 10 22 for 1 9 0 Desktop Educational for X86 Win32 Ihis license is valid up to version 2 0 999 This license is valid until April 30 2011 23 59 HTTP service enabled for http localhost 8080 TCP service enabled for http localhost 8088 If you do not have a valid license you are allowed to use RacerPro but some restrictions apply see the RacerPro web site for details If you have a valid license your own name will be mentioned in the output To edit knowledge bases or ontologies and data descriptions you can either use the Load button in the Profiles tab or by selecting Load in the menu File on Mac OS X or you can also work with the built in editor The following file types syntaxes for KBs are recognized and supported OWL RDF owl rdf KRSS native RacerPro syntax racer lisp and OWL 2 functional funct For this sample session we will use the built in e
94. GE TOLD VALUE AGE X 10 Retrieving Told Values Fillers of OWL Datatype Properties As already mentioned OWL offers so called datatype properties Let us consider an example KB lt xml version 1 0 gt rdf RDF xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns xsd http www w3 org 2001 XMLSchema xmlns rdfs http www w3 org 2000 01 rdf schema xmlns owl http www w3 org 2002 07 owl xmlns http www owl ontologies com unnamed owl xml base http www owl ontologies com unnamed owl gt lt owl Ontology rdf about gt lt owl Class rdf ID test gt lt owl DatatypeProperty rdf ID pi gt lt rdfs domain rdf resource test gt lt rdfs range rdf resource http www w3 org 2001 XMLSchema int gt lt owl DatatypeProperty gt test rdf ID i gt lt 1 rdf datatype http www w3 org 2001 XMLSchema int gt 3 lt p1 gt lt p1 rdf datatype http www w3 org 2001 XMLSchema int gt 2 lt p1 gt lt 1 rdf datatype http www w3 org 2001 XMLSchema int gt 1 lt p1 gt lt test gt lt rdf RDF gt 106 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Let us assume this OWL document is stored as a file under dtp2 owl Please load it into Rac erPro FULL RESET OKAY FULL RESET gt OWL READ FILE dtp2 owl Reading dtp2 owl done In this document http a com ontology p1 is a datatype property of type type int For the individual i the three conc
95. Index Prot g 55 RacerEditor 45 RacerMaster 205 RacerPlus 205 RacerPorter 11 41 205 RacerPro 205 AND query 109 HAS KNOWN SUCCESSOR query atom 100 NEG query 113 PROJECT TO operator 119 SAME AS query atom 99 UNION query 110 A box Graph tab 53 A boxes tab 50 abduction 185 ABox augmentation 125 ABox modification 125 active domain semantics 86 APIs 20 assertion 69 Assertions tab 51 associated ABox individual 134 associated Abox individual 134 associated substrate node 134 Axioms tab 51 binary query atom 85 body projection operator 119 boolean query 118 bug reports 37 cheap query 166 cheap rule 166 cheap tuple 166 Classroom license 206 closed world assumption 77 complex query 108 complex TBox query 129 concept axioms 64 concept definition 65 concept equation 64 217 218 concept query atom 86 concept term 62 Concepts tab 50 concrete domain restriction 64 concrete domain value query 101 concrete domains 66 concurrent query processing 159 conjunction of roles 66 conjunctive query 109 consistency of qualitative spatial networks 143 constraint query atom 94 creating individuals with a rule 126 data representation 133 data substrate 133 data substrate edge 133 data substrate edge query expression 136 data substrate label 133 data substrate node 133 data substrate node query expression 136 data substrate predicate 136 data
96. KRIS get a move on Applied Artificial Intelligence Special Issue on Knowledge Base Management 4 109 132 1994 F Baader and B Hollunder KRZS Knowledge Representation and Znference System SIGART Bull 2 3 8 14 1991 F Baader I Horrocks and U Sattler Description logics as ontology languages for the se mantic web In Festschrift in honor of J rg Siekmann Lecture Notes in Artificial Intelligence Springer 2003 2003 S Bechhofer R Moller and P Crowther The DIG description logic interface In Proceedings of the International Workshop on Description Logics DL 2003 Rome Italy September 5 7 2003 A Borgida On the relationship between description logics and predicate logic queries Tech nical Report LCSR TR 295 A Rutgers University New Brunswick NJ USA 1992 A Borgida Description logics in data management IEEE Trans on Knowledge and Data Engineering 7 5 671 682 1995 A Borgida R J Brachman D L McGuinness and L Alperin Resnick CLASSIC A struc tural data model for objects In Proc of the ACM SIGMOD Int Conf on Management of Data pages 59 67 1989 A Borgida and P F Patel Schneider A semantics and complete algorithm for subsumption in the CLASSIC description logic J of Artificial Intelligence Research 1 277 308 1994 M Buchheit F M Donini and A Schaerf Decidable reasoning in terminological knowledge representation systems Journal of Artificial Intelligence Research 1 109
97. LObjectPropertyDomai vO Test2 owlapiGetOWLObjectPropertyDomai owlapiGetOWLObjectPropertyRange owlapiGetOWLObjectPropertyRange owlapiGetOWLObjectPropertyRange owlapiGetOWLObjectPropertyRange racer owlapiLoadOntology test System out println racer tboxCoherentP test System out println racer aboxConsistentP test racer closeConnection main String void owlapiGetOWLObjectSubPropertyAx owlapiGetOWLObjectSubPropertyAx catch Exception e owlapiGetOWLObjectSubPropertyAx m owlapiGetOWLObjectSubPropertyAx owlapiGetOWLOntologyAnnotation 1 Problems Javadoc Declaration EJ Console 53 x f Ex BB E mE rjn owlapiGetOWLOntologyAnnotationA owlapiGetOWLOntologyAnnotationA owlapiGetOWLOntologyAnnotationA owlapiGetOWLOntologyVersionDecl owlapiGetOWLOntologyVersionDecl owlapiGetOWLOntologyVersionDecl owlapiGetOWLOntologyVersionDect terminated Test2 Java Application System Library Java JavaVirtualMachines 1 6 0 jdk Contents Home bin java Sep 27 2012 3 18 true true writable Smartinset 20 56 Figure 2 21 Second example with output printed to the Console window In the following example we demonstrate how to access the result s returned from RacerPro For instance a list of binding lists is returned as an answer to a conjunctive query A binding is a list consisting of a variable name and an individual name both
98. NG STRING EQUAL STRING NOT EQUAL STRING STRING STRING gt STRING gt STRING NOT LESSP STRING NOT GREATERP SEARCH lt string data literal gt yy STRING LESSP STRING GREATERP 156 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL n 1 non gt lt gt lt lt numeric data literal gt iy find lt character data literal gt lt 2 ary data query predicate gt STRING STRING STRING EQUAL STRING NOT EQUAL STRING lt STRING STRING gt STRING Rule consequences lt rule consequence gt lt rule antecedence gt gt gt lt generalized abox assertion gt lt generalized object gt lt new ind operator gt lt concept expression2 gt lt instance assertion gt lt related assertion gt lt constrained assertion gt STRING NOT LESSP STRING NOT GREATERP f n lt gt lt lt generalized abox assertion gt lt query body gt gt lt related assertion gt lt instance assertion gt lt constrained assertion gt lt constraints assertion gt lt forget role assertion gt lt forget concept assertion gt lt forget constrained assertion gt lt forget constraint assertion gt 7 lt query object gt lt new ind operator gt NEW IND INDIVIDUAL NEW
99. PI for Working with OWL 2 Ontolo gies In OWLED 2009 6th OWL Experienced and Directions Workshop Chantilly Virginia 2009 I Horrocks Optimising Tableaux Decision Procedures for Description Logics PhD thesis University of Manchester 1997 I Horrocks Using an expressive description logic FaCT or fiction In Proc of the 6th Int Conf on Principles of Knowledge Representation and Reasoning KR 98 pages 636 647 1998 I Horrocks O Kutz and U Sattler The even more irresistible SROZQ In Proc of the 10th Int Conf on Principles of Knowledge Representation and Reasoning KR 2006 pages 57 67 AAAI Press 2006 214 41 42 43 44 49 90 BIBLIOGRAPHY I Horrocks and U Sattler A tableaux decision procedure for SHOZQ In Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence IJCAI 05 Edinburgh UK Edinburgh UK 2005 Morgan Kaufmann Los Altos I Horrocks U Sattler and S Tobies A PSPACE algorithm for deciding ALCI p satisfiability LTCS Report 98 08 LuFg Theoretical Computer Science RWTH Aachen Germany 1998 I Horrocks U Sattler and S Tobies Reasoning with individuals for the description logic SHIQ In David MacAllester editor Proceedings of the 17th International Conference on Automated Deduction CADE 17 number 1831 in Lecture Notes in Computer Science pages 482 496 Germany 2000 Springer Verlag I Horrocks U Sattler and St
100. PORT INCONSISTENT QUERIES P REPORT TRUTOLOGICRL QUERIES P USE REPOSITO RY P PUT INTO REPOSITORV P ID DONT CHECK ID P PARSER RESULT UOIS SUBSTRATE ABOX CREATE ABOX IF NOT FOUND P PACKAGE TYPE OF SUBSTRATE PREPARE NOW P Search amp Select Sel First Sei individuals Last Result clear Set Descr ind DirectTypes Alltypes Delete Selected Sel Concepts Last Result Clear Sel Concepts Select Children Select Parents Descr Concept Concept Query a Variable Binding http www Department0 University0 edu GraduateStudent76 y http www Department0 University0 edu AssistantProfessorS http www Department0 University0 edu GraduateCourse46 http www Department0 University0 edu GraduateStudent60 y gt gt gt http www Department0 Univ 0 edu AssistantProfessor8 lt lt lt http www Department0 University0 edu GraduateCourseS2 x http www w Department0 UniversityO edu GraduateStudent143 y gt gt gt http ww w Department0 University0 edu AssistantProfessor8 lt lt lt z http www Department0 University0 edu GraduateCourseS3 R Figure 5 3 Query results dus 0 COENA CHA AUN Profiles Shell TBoxes ABoxes Concepts Roles individuals Assertions Axioms Taxonomy Role Hierarchy Graph Query 10 Queries Rules Def Queries Log About
101. Pro 2 0 preview examples owl RacerClient racer new RacerClient ip port try racer openConnection System out println racer sendRaw owl read file filename System out println racer sendRaw all atomic concepts racer closeConnection catch Exception e e printStackTrace i Problems Javadoc B Declaration EJ Console _ I Package Explorer 24 EB E Task List 3 eB _ BS le 7 e e x amp ovigitestl Y Find gt All gt Acti PRE g Java Project Open in New Window Project v n Open Type Hierarchy 2 F4 gi Package an Show In X W C amp Class DONE Copy C Interface Connect to your task and E Copy Qualified Name G Enum Or create Paste sev Annotation X Delete 8 Folder 15 Java Working Set Remove from Context C361 03 Folder Build Path gt File An outline is not available Source X865 ia Untitled Text File Refactor 75360 JUnit Test Case is Import Task A r Export T Example f Refresh F5 Assign Working Sets E Other MN pa Run As gt Debug As gt Validate Javadoc Declaration vog Add Remove Lisp Nature Compare With gt Resource Path locaton Tyee Restore from Local History Team gt Properties 1 test test1 sre E Task List 23 H 2 8
102. Publish Subscribe Mechanism Instance retrieval see the function concept instances is one of the main inference services for A boxes However using the standard mechanism there is no efficient way to declare so called hidden or auxiliary individuals which are not returned as elements of the result set of instance retrieval queries Furthermore if some assertions are added to an A box a previous instance retrieval query might have an extended result set In this case some applications require that this might be indicated by a certain event For instance in a document retrieval scenario an application submitting an instance retrieval query for searching documents might also state that future matches should be indicated In order to support these features RacerPro provides the publish subscribe facility The idea of the publish subscribe system is to let users subscribe an instance retrieval query under a certain name the subscription name A subscribed query is answered as usual i e it is treated as an instance retrieval query The elements in the result set are by definition are only those individuals of the A box in question that have been published previously If information about a new individuals is added to an A box and these individuals are published the set of subscription queries is examined If there are new elements in the result set of previous queries the publish function returns pairs of correspondin
103. QL rules have an antecedent and a consequence An antecedent is just an ordinary nRQL query body The consequence is a set of so called generalized assertions A generalized ABox asser tion can also reference variables which are bound in the rule antecedent query body A Simple nRQL Rule The following simple nRQL rule promotes woman which are not yet known to be mother to mothers firerule and x woman neg x mother instance x mother The antecedence is the simple conjunctive query body and x woman neg x mother and the consequence is a single generalize instance assertion If this rule is applied then the bindings for x from the answer set of and x woman neg x mother are used to instantiate the generalized concept assertion thus producing a set list of ordinary instance assertions by substituting x with the current binding RacerPro returns CCINSTANCE EVE MOTHER INSTANCE DORIS MOTHER to indicate which ABox assertions have been added by the rule The query retrieve x x mother now returns ALICE X BETTY X DORIS X EVE Note that nRQL rules can behave non monotonically this rule cannot be applied again since now all woman are known to be mothers thus neg x mother must fail Automatically Adding Rule Consequences to an ABox RacerPro can be advised to automatically add created rule consequences to an ABox if add rule cons
104. R ABOX SMITH FAMILY MASTER TOP QUERY a8 AND X ANO1 WOMAN Y HUMAN X ANO1 Y HAS CHILD 265 NL MASTER BOTTOM QUERY 333 TOP 358 ___ A HUMAN 135 ___ B WOMAN ___MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt retrieve a a mother A BETTY ALICE gt retrieve y and x mother x y has child y human Y BETTY Y CHARLES Y DORIS Y EVE gt show current qbox t QBOX FOR ABOX SMITH FAMILY MASTER TOP QUERY ae AND X ANO1 WOMAN Y HUMAN X ANO1 Y HAS CHILD 154 ___MASTER BOTTOM QUERY 333 TOP 3955 ___ A HUMAN 15 5 ___ B WOMAN MES ___ A MOTHER ___MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt show current qbox QBOX FOR RACER DUMMY SUBSTRATE FOR ABOX SMITH FAMILY 333 O MASTER TOP QUERY 333 4 QUERY 9 QUERY 48 2359 ___0 MASTER BOTTOM QUERY 355 ___1 QUERY 1 355 ___2 QUERY 2 SUBQUERY 2 OF QUERY 48 SUBQUERY 2 OF QUERY 9 4 2 THE NRQL QUERY PROCESSING ENGINE 179 i5 ___3 QUERY 5 SUBQUERY 1 OF QUERY 9 253 ___5 QUERY 43 SUBQUERY 1 O0F QUERY 48 DERE ___0 MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt query equivalents last C QUERY 9 gt retrieve y and x mother y x has parent y man Y CHARLES gt show current qbox t QBOX FOR ABOX SMITH FAMILY MASTER TOP QUERY iud AND X ANO1 WOMAN Y HUM
105. R ABOX SMITH FAMILY O MASTER TOP QUERY 23 N LL 1 QUERY 1 135 ___0 MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt describe all definitions DEFQUERY MOTHER WITH SON AND X WOMAN X HAS CHILD MAN gt store substrate for current abox test SMITH FAMILY The substrate can now for example be restored on a different RacerPro server 4 2 THE NRQL QUERY PROCESSING ENGINE 183 gt full reset OKAY FULL RESET gt restore substrate test SMITH FAMILY gt describe all definitions DEFQUERY MOTHER WITH SON X AND X WOMAN X HAS CHILD MAN gt current abox SMITH FAMILY gt show current qbox 333 QBOX FOR ABOX SMITH FAMILY 3525 NIL MASTER TOP QUERY 33 NIL QUERY 1 555 ___NIL MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT gt retrieve x y x y mother with son ALICE CHARLES gt enable query repository OKAY QUERY REPOSITORY ENABLED retrieve x x mother ALICE X gt show current qbox QBOX FOR ABOX SMITH FAMILY NIL MASTER TOP QUERY 2653 ___NIL QUERY 1 ae ___2 QUERY 3 1535 ___NIL MASTER BOTTOM QUERY SEE OUTPUT ON STDOUT 184 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Chapter 5 Additional Facilities 5 1 Retraction and Incremental Additions RacerPro offers constructs for retracting T box axioms see the function forget
106. RacerPro User s Guide Version 2 0 Racer Systems GmbH amp Co KG http www racer systems com October 24 2012 Contents 1 Introduction 1 Id System Overview aos ak 4 Exo 3 Ro ROW ES Eee nn 2 LLI Design PUB koe dom 2 1 1 2 Description and Query Languages 4 LIS GTInbef ageR o e kasd xe ee PR a ad 8 RS ee 5 1 2 Different views on RacerPro sec eoma ee 5 1 2 1 RacerPro as a Semantic Web Reasoning System and Information Repository 5 1 2 2 RacerPro as a Knowledge Representation and Reasoning System 6 13 Application Areas os s eca be Fa oo pomorum C ROUX PER FOR v Y 3 Xo e 8 2 Using RacerPro and its Interfaces 11 2 1 Sample Session o 220 b Ro Ro Ro o4 XOT EO EROR S RR os 11 2 LI Using RacerPro with RacerPorter 2 22212 nS 13 2 1 2 Using RacerPro from the Command Line 16 2 2 The BacerPEo Server ooo c 2 a a he Ew eod e de 18 2 2 The Pile Internac sa cost nu Meee BO ee be 18 2 9 2 TOP MENACES ue ce moy hex tA UE ee reta 20 22 3 Options ior RacerPro Server REG GR E REN ES 35 2 2 4 How to Send Bug 5 37 2 25 Online Reference Manual eee 38 2
107. RacerPro server e g the Concept Query button These buttons are called command buttons The titles of these command but 3 Although RacerPorter does not block in phase 1 unfortunately we have to block the GUI in phase 2 due to restriction of the GUI framework we are currently using 44 CHAPTER 2 USING RACERPRO AND ITS INTERFACES tons are displayed somewhat highlighted italic font on Windows and Linux and bold font on the Macintosh Some of the RacerPro requests invoked by command buttons may take some time to compute These requests are executed in the same way as if they were invoked from the shell So commands which take more than 3 seconds to finish also produce busy backgrounding messages In the profile editor you can specify whether the commands produced by commands buttons will be put into the shell command history or not Please note that many command buttons automatically select certain objects i e concepts in dividuals roles For example the Concept Query button returns a possibly empty set of individuals The returned individuals become selected automatically 6 The info display area This area is similar to the shell however it only echos the shell interaction or all user invoked commands thus it accepts no input e g the result produced by pushing the Concept Query button in the Concepts tab on a selected concept is shown there as well as in the shell so it can
108. SERVER 25 I Package Explorer 53 a faversuenee socket useStringBuildersEvenForTokens withMacroStack RacerClient String int addArgs StringBuilder Object vc closeConnection void openConnection void parse String String B parsel String RacerResult parseList String RacerList lt RacerRes parseListl String RacerList RacerRe parseRacerAnswer String RacerRes parsingTest RacerResult popWith String void pushWith String Object void RacerBooleanArgument boolean b racerCall Object RacerResult racerCallString Object StringBuil RacerStringArgument String Racer RacerSymbolArgument String Race returnBoolean RacerResult booleai returnBoolean String boolean send StringBuilder RacerResult sendRaw String String setPrintWarningMessages boolean simpleParse String String transferFile String String void acerClientException class acerKeyword class tacerList class acerLiteral class tacerNull class tacerNumber class acerResult class tacerString class Figure 2 14 Create a file Test java e D Test java 2 package test import com racersystems jracer public class Test _ e public static void main String argv String ip 127 0 0 1 int port 8088 String filename Applications Racer
109. T tv 2 and x abox individual x y has child y woman age of y abox attribute relationship age name of y abox attribute relationship name age of y abox concrete domain object ename of y abox concrete domain object age of y tv 1 abox told value relationship ename of y tv 2 abox told value relationship tv 1 abox concrete domain value predicate lt 90 tv 2 abox concrete domain value predicate search tty RacerPro replies CC X ALICE Y BETTY NAME OF Y BETTY NAME AGE OF Y BETTY AGE TV 1 80 TV 2 Betty Note that for example the ABox assertion constraints equal betty age 80 was responsi ble for the creation of the nodes betty age 80 as well as for the establishment of an edge between these two Let us inspect the labels of these objects gt node label alice WOMAN TOP TOP ABOX OBJECT ABOX INDIVIDUAL gt node label betty age C ABOX CONCRETE DOMAIN OBJECT ABOX OBJECT 140 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt node label 80 C ABOX CONCRETE DOMAIN VALUE 80 gt edge label betty age 80 C ABOX RELATIONSHIP ABOX TOLD VALUE RELATIONSHIP gt edge label alice betty C ABOX RELATIONSHIP ABOX ROLE RELATIONSHIP HAS CHILD Please note that also concept assertions have been mirrored e g the information that alice i
110. Type Restore from Local History Team gt Configure gt Properties testl Figure 2 10 Refresh the project display after having created a directory lib into which you copied jracer jar I Package Explorer 23 Y Ejtestl src lib jracer jar test1 lib asle 7 gt E JRE System Library JavaSE 1 6 v Open Open With Show In vva KEW Copy Copy Qualified Name Paste 38V X Delete 0 COET amp Remove from Context dl Mark as Landmark Build Path Add to Build Path gt Refactor CHT amp amp Configure Build Path s Import D r Export Refresh F5 Assign Working Sets Validate Run As D Declaration E Task List 23 2 8 e x Find b All Acti G Connect Mylyn Connect to your task and B Outline 53 en An outline is not available Debug As Compare With Replace With Team eor TYTYY Properties 36l Location Type Figure 2 11 Select jracer jar in the lib directory do a right click and add the file to the project s build path 24 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Ei 8 Package Explorer a EUG E Task List 75 6 asl 7 2 8 e x bth ty ai Open in New Window Project porre a Show In X W qd Class Cop
111. age and it maps nominals to atomic concepts the standard approximation of nominals 12 While interesting optimization techniques for true nominals have been developed 55 reasoning with nominals is known as hard not only from a theoretical 41 but also from a practical point of view i e hard also for typical case input RacerPro might be extended with nominals once optimization techniques for reasoning with nominals get mature enough such that RacerPro applications can effectively exploit this feature see e g 18 19 Inference services for concept subsumption and the taxonomy of a T box have been part of de scription logic reasoning systems right from the beginning in the eighties T box classification Classification is supported in RacerPro with specific optimization techniques 24 25 28 71 70 that are based on or are integrated with results obtained in other projects 20 21 as well as tech niques implemented in mature predecessor DL systems such as KRIS 6 5 and FaCT 38 39 61 Still T box classification is a very fruitful research area and new techniques are being integrated into RacerPro Interestingly for dealing with a non cyclic ELH 3 version of the Snomed CT knowledge base a very old structural subsumption technique being integrated into RacerPro pro vided for classification in the range of minutes for this very large T box 30 with the additional advantage that small parts of the T box can indeed u
112. ample Consider family racer loaded into Rac erPro You are already familiar with the behavior of the API in the set at a time mode gt retrieve x x woman BETTY EVE X DORIS ALICE gt describe query processing mode SET AT A TIME MODE Now let us switch the nRQL engine into the tuple at a time mode gt process tuple at a time OKAY PROCESSING TUPLE AT A TIME gt describe query processing mode TUPLE AT A TIME MODE EAGER The meaning of EAGER will be explained later Now let us use the incremental query processing mode retrieve x x woman QUERY 466 RUNNING gt get next tuple last X BETTY gt get next tuple query 466 C X EVE gt get next tuple query 466 X DORIS gt get next tuple query 466 ALICE gt get next tuple query 466 EXHAUSTED gt get answer query 456 NOT FOUND gt get answer query 466 BETTY X EVE DORIS ALICE Thus after the nRQL engine has been set into incremental mode retrieve behaves differently Instead of returning the whole answer set at once it returns a so called query Identifier Id This query Id can then be used as an argument to API functions such as get next tuple to Identify the query Moreover the Identifier 1ast always refers to the last submitted query 4 2 THE NRQL QUERY PROCESSING ENGINE 159 Multiple Runnin
113. an y man instead then we get CC X CHARLES Y CHARLES If ABox individuals are used within a query then these individuals are NOT automatically excluded as bindings for other injective variables in the query Thus injective variables only see other injective variables A query referencing an individual such as retrieve x charles and x man charles man is rewritten into retrieve x charles and x man charles man same as charles charles which means that charles is a non injective variable see below We will thus get the desired result X CHARLES CHARLES CHARLES A More Complex Example nRQL queries are especially useful when searching for complex role filler graph structures in an A Box Consider the following query which searches for children having a common mother retrieve mother 141 child2 and child1 human child2 human mother child1 has child mother child2 has child 110 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL RacerPro replies CC MOTHER BETTY CHILD1 DORIS CHILD2 EVE MOTHER BETTY CHILD1 EVE CHILD2 DORIS C MOTHER ALICE CHILD1 BETTY CHILD2 CHARLES C MOTHER ALICE CHILD1 CHARLES CHILD2 BETTY An even more complex query is required if we want to search for odd family interrelationships it is assumed that you have added the additional ABox axioms from the previous chapters to the original
114. an x y has child y all has parent all has descendant woman y z has child z u has child u uncle NRQL WARNING QUERY 5 IS INCONSISTENT QUERY 5 READY TO RUN gt prepare abox query and x woman x y has child y all descendant of all has descendant woman y z has child z u has child u uncle NRQL WARNING QUERY 7 IS INCONSISTENT QUERY 7 READY TO RUN gt prepare abox query x neg x bottom NRQL WARNING QUERY 9 IS TAUTOLOGICAL QUERY 9 READY TO RUN gt prepare abox query x union neg x man neg x woman WARNING QUERY 11 IS TAUTOLOGICAL QUERY 11 READY TO RUN Reporting Inconsistent and Tautological Rules The described reasoning services are also provided for rule In this case also the consequence of the rule is taken into account full reset OKAY FULL RESET gt report inconsistent queries OKAY REPORTING INCONSISTENT QUERIES gt prepare abox rule and x c y d instance x d related x y r instance y all inv r not d WARNING RULE 1 IS INCONSISTENT 4 2 THE NRQL QUERY PROCESSING ENGINE 173 RULE 1 READY TO RUN gt prepare abox rule and x c x not c instance x d WARNING RULE 2 IS INCONSISTENT RULE 2 READY TO RUN gt prepare abox rule and x c x d instance x not and c
115. and exploiting relational algebras based on so called event rules RacerPro can detect whether a temporal high level event can be instanti ated Various features of RacerPro have been used in the research community to support these application areas for example the explanation facility of RacerPro has been used to support the development of the OWL translator for the SUMO ontology 57 Explanation features for inconsistent concepts are available for knowledge bases as large as Snomed CT the RacerPro explanation facility uses built in data structures of the tableau reasoner It should be noted that A box reasoning services can be used for problem solving For instance in 63 an application of A box realization for 1 3 APPLICATION AREAS 9 computing solutions to Sudoku problems is presented note that nominals are not required for this purpose 60 In 59 nRQL has been used to represent integrity constraints as queries which must return an empty result set This early use case also has shaped the functionalities provided by nRQL Rob Lemmens has used Racer for investigating the semantic interoperability of distributed geo services 52 A box reasoning consistency direct types etc has been used to formalize scene interpretation problems 51 In particular it was shown that complete reasoning is necessary for efficiently in tegrating different clues obtained from sensors into a coherent whole Furthermore in 51 de ductio
116. and non strings may not be used in constraints for strings Last but not least please note that concrete domain attributes should not be confused with datatype properties as defined in OWL 3 6 Individual Assertions and A boxes An A box contains assertions about individuals The set of individual names or individuals for brevity Z is the signature of the A box The set of individuals must be disjoint to the set of concept names and the set of role names There are four kinds of assertions Concept assertions with instance state that an individual JN is an instance of a specified concept C 70 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES Role assertions with related state that an individual JN is a role filler for a role R with respect to an individual IN2 Attribute assertions with constrained state that an object ON is a filler for a role R with respect to an individual IN Constraints within constraints state relationships between objects of the concrete domain The syntax for constraints is explained in Figure 3 2 Instead of attribute names object names must be used In RacerPro the unique name assumption holds this means that all individual names used in an A box refer to distinct domain objects therefore two names cannot refer to the same domain object Note that the unique name assumption does not hold for object names In the RacerPro system each A box refers to a T box The concept assertions in the A box ar
117. another injective variable the mapping from variables to ABox individuals is an injective mapping Thus if x is bound to betty then y cannot be bound to betty as well e Ordinary non injective variables are prefixed with e g x y are ordinary vari ables The mapping need not be injective an arbitrary mapping is fine Thus if x is bound to betty then y can be bound to betty as well Moreover if only certain pairs of variables shall be bound to different individuals then SAME AS query atoms such as neg same as x y can be used see below This will enforce that x y are bound to different ABox individuals 86 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL There are only four types of atoms available e Unary atoms concept query atoms e Binary atoms role query atoms constraint query atoms SAME AS query atoms There are some auxiliary atoms syntactic sugar such as bind individual atoms etc We will now introduce each type of atom Each atom can also be negated in two ways nRQL offers negation as failure NAF as well as classical true negation Concept Query Atoms Concept query atoms are unary atoms A concept query atom is used to retrieve the individu als members of a concept or an OWL or RDFS class Please enter full reset and load family racer Our first nRQL query uses a concept query atom x woman to retrieve the in stances
118. are no unsatisfiable classes Problems Javadoc Declaration EJ Console 53 XE Dri terminated example Java Application System Library Java JavaVirtualMachines 1 6 0 jdk Contents Home bin java Oct 24 2012 7 02 07 PM http cohse semanticweb org ontologies peopleimad cow OWLAPI unloadOntology OWLAPI2 OWLAPI disposeReasoner OWLAPI2 Writable Smart Insert 36 18 Figure 2 23 An Eclipse project for using RacerPro with the Manchester OWLAPI LRacer LRacer is the API for Common Lisp to access all services of RacerPro in a convenient way LRacer is provided with source code You can download the latest version from http www racer systems com products download LRacer provides all functions and macros described in the Rac erPro user s guide and reference manual directly from Common Lisp Thus from Common Lisp you do not send strings to the server directly but use stub functions or macros which internally communicate with the RacerPro server interpret the results and provide them as Common Lisp data structures In this sense LRacer is not more powerful than JRacer but a little bit more conve nient Note the difference between LRacer and RacerMaster Although LRacer provides the same functionality all functions calls are sent to a RacerPro server via the TCP socket interface whereas for RacerMaster there is no such overhead The advantage of LRacer is that you can run RacerPro on a powerful se
119. ase one at all thus leaving all the work for phase two Nevertheless it is worth trying to use mode 6 whenever you encounter performance problems in mode 3 4 2 6 Automatic Deadlock Prevention Certain types of queries or rules must make temporary changes to the queried ABox in order to be answered i e ABox assertions must be added This is for example the case if classical negated roles are used in role query atoms If more than one query or rule is currently active and references the same ABox then these different queries most be isolated from one another nRQL uses locking techniques to achieve isolation and preserve ABox consistency Thus an ABox which must be modified by a query or rule in order to be answered will be locked until that query has been terminated This means that nRQL will not allow you to start execute a query rule which is about to make changes to an ABox if there are still other queries active that refer to the same ABox Such a delay situation for a query can only happen if nRQL is used in incremental tuple at a time mode 4 2 THE NRQL QUERY PROCESSING ENGINE 169 But there is a problem If some of these active queries had been started in lazy incremental tuple computation mode then these queries will not terminate automatically unless a timeout had been set or the last tuple is requested Please note that queries which have been started in eager incremental mode will terminate automatically after
120. at reasonably large set of documents can be handled Furthermore it will be possible to define how applications are to be informed about matches to previous subscriptions i e event handlers can be introduced 198 CHAPTER 5 ADDITIONAL FACILITIES 5 4 2 Using JRacer for Publish and Subscribe The following code fragment demonstrates how to interact with a RacerPro server from a Java application The aim of the example is to demonstrate the relative ease of use that such an API provides In our scenario we assume that the agent instructs the RacerPro system to direct the channel to computer rm sts tu harburg de at port 8080 Before the subscription is sent to a RacerPro server the agent should make sure that at rm sts tu harburg de the assumed agent base station a so called listener process is started at port 8080 This can be easily accomplished by starting the following program on rm sts tu harburg de public class Listener public static void main String argv try ServerSocket server new ServerSocket 8080 while true Socket client server accept BufferedReader in new BufferedReader new InputStreamReader client getlInputStream String result in readLine in close catch IOException e If a message comes in over the input stream the variable result is bound accordingly Then the message can be processed as suitable to the application We do not discuss details here The subscr
121. atus display The current objects can be referred to in the shell via the indicated variables as arguments to shell commands e g enter describe tbox t in the shell to get a description of the current T box The cur rent profile represents the current server connection as well as the current communication status The clipboard content is not shown only the cardinality of the sets of selected objects in the small number fields The selected objects are highlighted once an appropriate tab is selected In general the current selected objects are employed for information flow and for focus control what to display visualize in RacerPorter For example each T box contains a set of concept names Thus the content of the Concepts tab depends on the current T box RacerPro API functions often require certain arguments These arguments are supplied by the current and selected objects of the appropriate type A postfix command mode pattern is thus used as the main interaction pattern first select the arguments then select and invoke the operation on the selected arguments If an operation requires only one argument then the current object of the required type is used e g the current concept If an operator requires more than one argument also the selected objects are passed as 42 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Profiles Shell TBoxes ABoxes Concepts Roles individuals
122. atype Property should satisfy the predicate gt 18 For this purpose nRQL offers an extended RacerPro concept syntax which can be used in concept query atoms The extended syntax allows for the user friendly specification of such retrieval conditions Moreover the known told concrete fillers of such OWL datatype or annotation properties can be retrieved like in the concrete domain case Note that OWL itself does not support the specification of complex predicates Thus nRQL is currently the only OWL query language which offers this expressivity Also the constraint checking facilities of nRQL apply to the OWL case The constraint check ing facility is unique to nRQL Complex TBox queries are also available These enable you to search for certain patterns of sub superclass relationships in a taxonomy of a RacerPro TBox or OWL KB nRQL offers now termination safe functional lambda expressions These lambda expressions can be used in query heads and rule antecedences nRQL allows a restricted kind of server sided programming and can thus be used to implement for example 1 user defined output formats for query results e g the query results can also be written into a file 2 certain kinds of combined ABox TBox queries 3 efficient aggregation operators e g sum avg like in SQL nRQL also supports so called hybrid queries see below The nRQL language must be distinguished from the nRQL query processing engine w
123. ause this might result in paradoxes which are reported elsewhere The triples in RDFS files are processed in a special way They are represented as T box axioms If the property is rdf type the object must be rdfs Class or rdfs Property These statements are interpreted as declarations for concept and role names respectively Three types of axioms are supported with the following properties rdfs subClassOf rdfs range and rdfs domain Other triples are ignored OWL files are processed in a similar way The semantics of OWL is described elsewhere see http www w3 org TR owl ref There are a few restrictions in the RacerPro implementation The UNA cannot be switched off and number restrictions for attributes datatype properties are not supported Only basic datatypes of XML Schema are supported i e RacerPro cannot read files with datatype declarations right now Usually the default namespace for concept and role name is defined by the pathname of the OWL file If the OWL file contains a specification for the default namespace i e a specification xmlns this URL is taken as a prefix for concept and role names lt xml version 1 0 encoding IS0 8859 1 gt rdf RDF xmlns http www mycompany com project xmlns owl http www w3 org 2002 07 owl xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns rdfs http www w3 0rg 2000 01 rdf schemait xmlns xsd http www w3 org 2000 10 XMLSchema gt lt rdf
124. be added if the rule was applied in a forward chaining way i e no hypothesized assertions are required The retrieve with explanation facility can also be used for explaining to a user what must be added to an A box in order to positively answer a query Racer Systems has applied the abduction operator to media interpretation problems image in terpretation and natural language text interpretation We offer consulting to support industrial application projects that could use these facilities 5 3 Reasoning with Triples in Secondary Memory In practical applications not all parts always require reasoning with expressive T boxes specified for instance in OWL ontologies Indeed for some purposes classical data retrieval is just fine However in almost all practical applications there will be a large amount of data Hence data access must scale at least for the standard retrieval tasks At the same time it must be possible to apply expressive reasoning to parts of the data without producing copies of the data For this purpose we propose to use a triple store for RDF Using a triple store has several advantages On the one hand triples may be manipulated and retrieved from programs Turing complete representations e g Java programs or Common Lisp 5 3 REASONING WITH TRIPLES IN SECONDARY MEMORY 189 programs without reasoning as usual in industrial applications On the other hand the same triples can be queried w r t a background a
125. be reused This helps to avoid opaqueness and as a side effect the user learns the correct KRSS syntax Please note that all this displayed information is session and thus profile specific depends on the active profile and thus changes if another profile session is activated 2 3 2 Preferences EEUU H M E d Profile Editor am eaat wmo Mik eaa dec cl aU A Profile Specific General Options Profile Specific Fonts Profile Specific Connection Options Profile Specific Server Startup Options Profile Name RacerPro TCP IP Address RacerPro Executable Start RacerPro with Logging to File 1 Localhost Big TBoxes Big ABoxes Tab Title Font localhost review RacerPro exe RacerPorter Temp Directory RacerPro Native Port KRSS Wait Before Auto Connect after Start s Start RacerPro with License File 30 fia AppData LocalTemp Browse Shell Font 8088 4 RacerPorter Logfile Open Connection Timeout s Start RacerPro with DIG Port Start RacerPro with Temp Directory 3ofia racerporter logfile log Browse Button Fonte 3 8080 RacerEditor Config File SSE EE AU eh V Auto Start RacerPro if Default Start RacerPro with Additional Arguments ereditor configraceredtor Browse SET 3 ROUSE 2 pem Info Timeout E Start RacerPro with Debugging V Make Default Profile 0 3 Start RacerPro without DIG Logging
126. betty neg betty top In fact RacerPro replies DORIS BETTY EVE BETTY CHARLES BETTY ALICE Consequently retrieve betty neg betty top is an abbreviation for retrieve betty neg and same as betty betty betty top Due to DeMorgan s Law this query is equivalent to the query 118 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL retrieve betty union neg same as betty betty and neg betty top betty top Thus whenever an ABox individual appears within a negated query atom it is important to re member that it behaves in fact like a non injective variable However sometimes this behavior is unwanted Suppose we want to verify that it cannot be proven that eve is a mother i e we want to get a positive answer iff it cannot be proven that eve is a mother However the query retrieve eve neg eve mother yields CC EVE EVE EVE DORIS EVE CHARLES EVE BETTY EVE ALICE as described above since eve turned into a variable We can focus on eve if we add an additional conjunct to the query either same as eve eve or bind individual eve which is just syntactic sugar for same as eve eve retrieve eve and bind individual eve neg eve mother yields EVE EVE Thus retrieve and bind individual eve neg eve mother returns T A Note on Boolean Comp
127. ble for Linux systems with a graphic display RacerPlus To minimize the performance overhead due to network based communication between RacerPorter and RacerPro as well as to utilize the computing power offered by a single workstation we introduce RacerPlus an integrated workbench which includes RacerPro and the RacerPorter graphical user interface in a single application But RacerPlus goes even further RacerPlus has a built in knowledge base editor that has direct access to the data structures of the integrated RacerPro You can open inspect verify and edit your T Boxes and A Boxes in a user interface which instantly reflects the state of the embedded RacerPro server Of course RacerPlus offers all the features of the integrated products You can connect from RacerPlus to any RacerPro server on the network or your data in RacerPlus can be accessed via client applications over the network RacerPlus is available as a separate product positioned above the RacerPro kernel license RacerMaster Do you develop complex applications for the Semantic Web Are you researching in the area of description logic knowledge basis and implement your own systems and algorithms for inference problems using the Common Lisp programming language Then you might be interested in RacerMaster which actually is RacerPro as an object code library fasl file You can develop your own application and use Racer technology without an external server application We offer
128. c5 333 Create some RCC substrate nodes 333 Note that data node can be used as well rcc instance europe 4 1 THE NRQL LANGUAGE 145 rcc instance germany country germany and country string has name Germany all has language german some has language language inhabitants 82600000 rcc instance hamburg city hamburg and city some in country germany string has name Hamburg Create some RCC substrate edges Note that data edge can be used as well Europe contains PPI Germany rcc related europe germany PPI Germany contains PPI Hamburg rcc related germany hamburg PPI In this example 3 RCC nodes named europe germany and hamburg are created For europe no additional description and no corresponding ABox individual is created The RCC node germany is described as country germany and a corresponding ABox individual called germany is cre ated as well The ABox individual is annotated with a RacerPro concept expression Finally the node hamburg is created and the three nodes are set into a spatial containment relation by using the RCC5 role PPI proper part inverse Note that rcc instance is just syntactic sugar and data node can be used as well The same applies to rcc related and data edge We can pose the following spatio thematic query to the RCC substrate we have just defined retrieve x 2 and x and string has name Hambur
129. cept ConceptQuery Synonyms 03 retrieve x x t Country 3 gt x tt Italy x H Germany x Hf France C x u England x Figure 2 34 RacerPorter used to inspect an ontology edited with Prot g fen TT Omm Profiles Shell TBoxes ABoxes Concepts Roles Individuals Assertions Axioms Taxonomy Role Hierarchy ABox Graph Query 10 Queries Rules Def Queries gt Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http www co ode org ontologies pizza pizza owl TBox t _ file C Program Files RacerPro 20 Preview examples owl pizza ow ABox a file C Program Files RacerPro 20 Preview examples owl pizza ow Concept c 0 Role r 0 Individual i 0 Axiom ax 0 Request 37 getnamespace prefines Response Classic Layout gt gt Detetean Recover 7 Simpity F Arg Comp 1 OWLAPI readOntology C Program Files RacerPro 26 Preview examples owl pizza owl maintain owlapi axioms t 3 Looks like ontology file C Program Files RacerPro 26 Preview examples owl pizza owl is in OWL XML syntax 1 NIL 2 all individuals 2 gt t America it t England France iif Germany iif Italy 3 retrieve x x tt t Country 3 gt x itf Italy
130. cept Axioms RacerPro supports several kinds of concept axioms General concept inclusions GCIs state the subsumption relation between two concept terms DL notation 1 C5 RacerPro syntax implies Cj Concept equations state the equivalence between two concept terms DL notation Ci C5 RacerPro syntax equivalent Cj C3 Concept disjointness axioms state pairwise disjointness between several concepts Disjoint con cepts do not have instances in common DL notation Cy E C3 U C3 LI O Ch C2 E C3 D FOR 3For KRSS compatibility reasons RacerPro also supports the synonym concepts top and bottom 3 4 ROLE AXIOMS 65 Chl m aC RacerPro syntax disjoint Ci Actually a concept equation C1 can be expressed by the two GCIs E C5 and C5 E C4 The disjointness of the concepts Cn can also be expressed by GCIs There are also separate forms for concept axioms with just concept names on their left hand sides These concept axioms implement special kinds of GCIs and concept equations But concept names are only a special kind of concept terms so these forms are just syntactic sugar They are added to the RacerPro system for historical reasons and for compatibility with KRSS These concept axioms are Primitive concept axioms state the subsumption relation between a concept name and a con cept term DL notation CN E C RacerPro syntax define primitive co
131. cer closeConnection catch Exception e printStackTrace eoo Java Eclipse Users rm Documents workspace racer users guide a Tem P1 7 H Package Explorer 23 Ef E Task List 53 B5 Cf Find P P Acti New gt Java Project Show In xew p Project 8 Package Copy Gi Class Connect Mylyn Copy Qualified Name Connect to your task and Paste gv Interface ALM tools or create a 4 local task X Delete x G Enum local tasi Annotation Import amp 5 Source Folder 05 Outline 5 r Export Java Working Set Folder An outline is not available Refresh F5 bed 3 File Untitled Text File E JUnit Test Case Task F5 Example T Other WN i Problems 75 Javadoc Declaration 0 items Description A Resource Path Location Type Figure 2 8 Create a project with Eclispe We demonstrate how to run the test program from within Eclipse here the Juno release of Eclipse is used We use workspace racer users guide as a workspace name and a corresponding directory is assumed to exist in the standard workspace path for Eclipse For running the test program create a new project in Eclipse see Figures 2 8 and 2 9 For demonstration purposes we have used test1 In the workspace directory a project directory will be created automatically In the project directory testi you should create a directory lib into wh
132. cerPro syntax However the extensions mentioned in lt constraints assertion gt cannot be used here 4 2 The nRQL Query Processing Engine The nRQL query processing engine implements the nRQL language It is an internal part of Rac erPro The nRQL engine offers various querying modes In this section we describe the core func tionality of this engine 4 2 1 The Query Processing Modes of nRQL nRQL can be used in different querying modes The two major modes are the set at a time mode and the tuple at a time mode The Set at a Time Mode So far we have only used the so called set at a time mode In this mode a call to retrieve directly returns the answer set of a query at once in one bunch the answer set Most users and or client applications will be happy with this mode The Tuple at a Time Modes Incremental Query Processing Sometimes it is demanded to load and compute the tuples from the answer set of a query in an incremental fashion The user or application requesting the tuples can look at the already retrieved tuples and decide whether it is necessary to request yet another tuple from the answer set These incremental modes are called tuple at a time modes 158 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL The nRQL API provides the function get next tuple for this purpose Applications can also check for the availability of a next tuple by calling next tuple available p We demonstrate the incremental mode with an ex
133. cial variables and For example if you have executed current tbox and RacerPro has returned default then is bound to default Thus you can use describe tbox instead of describe tbox default If you are working with OWL then concepts roles individuals will have so called namespace pre fixes e g http www owl ontologies com unnamed owl is the namespace prefix of the concept http www owl ontologies com unnamed owl cat It is often awkward of having to type these rather long names An abbreviated syntax is thus offered The same abbreviation syntax which is used for display if the Simplify checkbox is enabled is also accepted for input e g cat refers to the default namespace The default namespace is shown in the status display You can define additional prefixes with the help of the shell and the define prefix command e g define prefix racer http www racer systems com There is also the prefix which is used for nRQL mirror data substrate queries see Section 4 for more details Thus cat expands into http www owl ontologies com unnamed owl cat please note the at the beginning As explained certain special variables are bound to the current objects e g t is bound to the current T box The reverse direction of data flow regarding the current objects is also supported since it is possible to set the
134. cific taxonomy ABox with nRQL thus the full power of nRQL can be used for TBox querying purposes However set of roles that can be used in role query atoms is then limited to has child has parent has descendant has ancestor and the the set of concept expressions available in concept query atoms is limited to the set of concept names from the TBox taxonomy Of course querying for concrete domain attributes etc does not make sense in this setting since the taxonomy ABox contains only information according to the given four rules above Using TBOX RETRIEVE to Query the Taxonomy To give an example suppose we want to retrieve all direct sub concepts of the class woman tbox retrieve y and x woman x y has child Answer MOTHER Y SISTER 130 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Alternatively tbox retrieve y and x woman y x has parent can be used To get all sub concepts of woman use tbox retrieve y and x woman x y has descendant Answer CC Y SISTER AUNT Y BOTTOM MOTHER GRANDMOTHER Please note that in this example tbox retrieve x x woman means actually the same as tbox retrieve woman woman woman However this is only true because there are no equivalent concepts for woman the equivalence class of woman has cardinality one See below for an example which problems arise if nodes represent equivalence
135. cle rule Profiles shell TBoxes ABoxes Concepts Roles Individuals Assertions Axioms Taxonomy Role Hierarchy Graph Query IO Queries Rules Def Queries Log About Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http a com ontology TBox t fileilC Program 20Files RacerPro 20 Preview examples swrl fami ABox a file IC Program 20Files RacerPro 20 Previewlexamples swrlifami Concept c 0 Role r 0 Individual i Axiom ax Request 331 all concept assertions for individual http lla com ontolog Response 334 CACHEHT 0000000000000 Classic Layout jx 28 gt a i Deetean Recover FunReset IV Simpity Arg Comp LL hasuncie P JOHN FMARY qehasParent p SUE hasBrother GOTO JOHN SUE ie JOHN i G Labels V FreezeGraph V Auto Update F Show Top Role Ony Sel Succs F Trans Roles Data Fiers RequestGraph Display Graph ResetGraph PrntGraph Cur ind Sel Inds AllRoles Cur Role Sel Roles UNBOUNDE Search amp Select F Sel First Clear Sel Inds CiearSel Roles Descr ind DirectTypes AwTypes Delete Sel
136. crete Domains 75 3 8 3 Open World Assumption 77 3 8 4 Closed World 77 3 8 5 Unique Name 78 3 9 Evaluating RacerPro and Configuring Reasoning Modes 78 4 The New RacerPro Query Language nRQL 81 LASSUSEE 223 A Be DECOR Y 85 4 1 1 Query Atoms Objects Individuals and Variables 85 4 1 2 Query Head Projection Operators to Retrieve Told Values 101 11 2 Complex Queries e ss se ss aca AERE eR IRURE Roux s 108 AIA QUGFI S o eb eG d Ren Oe Koma E ms X RR og 120 4 1 5 ABox Augmentation with Simple Rules 125 41 6 Complex TBox Queries 129 4 1 7 Hybrid Representations with the Substrate Representation Layer 133 4 1 8 Functional Lambda 146 4 1 9 Formal Syntax oinRQh 2l22 ec kx RR ES moy Rh ROSE E 150 4 2 The nRQL Query Processing Engine eaa wma s odo Dwe a 157 4 2 91 The Query Processing Modes 157 422 The dite Cycle of amp Query aacra o oe oom d Ro A Oe ew x8 160 42 3 The Life Cycle ofa Rule ooo ee es 161 4 2 4 How to Implement Your Own Rule Application Strategy 161 4 2 5 Con
137. cumented in the RacerPro Reference Manual The shell tab offers the following facilities e Completion This facility provides automatic completion for commands arguments and file names thus it can be used to learn about the available commands and required arguments for each command For command completion simply press the tab key and all available commands are presented in a pop up list If you have written a partial command name e g start typing describe con into the shell and press tab you can complete the command with the use of the tab key in case there is more than one possible completion a popup menu appears with the possible choices use enter to confirm and escape to exit the menu Argument completion can be executed by using also the tab key once a command has been written or chosen from the pop up list The list of acceptable arguments the so called function lambda list is shown in the line below the shell For file name completion try owl read file and press tab key Finally you can get rid of these popup menus by using Esc e Command history The shell maintains a command history in order to make it easy to re execute commands not to be mistaken with the navigation history To use this simply use Alt p or Ctrl p to get the previous command and use Alt n or Ctrl n to get the next command in the command history It is also possible to position the cursor in a previously entered command expression and simply pres
138. d WARNING RULE 3 IS INCONSISTENT RULE 3 READY TO RUN Checking for Query Entailment The function query entails p checks whether one query is more specific than another one This is also known as query subsumption The function query equivalent p checks whether both queries mutually entail subsume each other The offered query entailment check is incomplete as well but T answers can be trusted Query entailment is more difficult to understand than query consistency For each query an asso ciated vector of variables and individuals exists This vector is called the object vector and should not be confused with the head of a query Even queries with empty head have an object vector The object vector lists all variables and individuals which are referenced in the body of the query but in lexicographic order not in syntactic order Recall that union queries are internally rewritten such that each disjunct references the same variables see Section 4 1 3 For example the associated object vector of the query and x person y top is lt gt The vector of and y person x top is also lt x y gt This vector specifies the internal format of the answer tuples which are projected and reordered according to an eventually given head to yield the answer set which is finally returned to the user as a result of a call to retrieve etc When two queries are checked for entailment then these interna
139. d USA ALL Rights Reserved The XML RDF RDFS OWL parser is implemented with Wilbur developed by Ora Lassila For more information on Wilbur see http wi lbur rdf sourceforge net Found license file Users rm ralf master racer license This copy of RacerPro is licensed to Ralf Moeller Hamburg University of Technology TUHH Harburger Schlossstr 28 STS Group 21879 Hamburg Deutschland Initial license generated on November 01 2006 18 06 for 1 9 1 Site Commercial for MASTER This license is valid up to version 9 9 99 This license is valid forever This is a MASTER LICENSE for Ralf Moeller HTTP service enabled for http localhost 8080 TCP service enabled for http localhost 8088 TCP control enabled for http localhost 8089 External format of 8888 is utf8 base External format of 8888 is utf8 base External format of 8888 is utf8 base External format of 8088 is utf8 base External format of 8888 is utf8 base External format of 8888 is utf8 base Figure 2 17 RacerPro with output H Package Explorer 23 eSg v u raver socket useStringBuildersEvenForTokens 2 withMacroStack f RacerClient String int addArgs StringBuilder Object vc closeConnection void openConnection void parse String String parsel String RacerResult B parseList String RacerList RacerRe parseList1 String RacerList RacerR parseRacerAns
140. d on your personal RacerPro download page However for the description of nRQL from the OWL RFD query language perspective we will sometimes use OWL snippets and or ad hoc OWL examples which you will not find among the example KBs however you can use an OWL ontology editor such as Prot g or simply type in the listed OWL examples into the RacerEditor In order to get the same answers for the queries as printed in this manual it is assumed that you evaluate full reset before you load a new KB or OWL document You can either use the Load button of RacerPorter or use RacerPro API commands such as owl read file racer read file We assume that you use RacerPorter as an interactive shell for the following example queries in the remainder of this manual 4 1 1 Query Atoms Objects Individuals and Variables The basic expressions of the nRQL language are so called query atoms or simply atoms Atoms are either unary or binary A unary atom references one object and a binary atom references two objects An object is either an ABoz individual or a variable For example x and x are variables and betty is an individual Variables are bound to those ABox individuals that satisfy the query expression nRQL offers different kinds of variables e Injective variables are prefixed with e g x y are injective variables An injective variable can only be bound to an ABox individual which is not already bound by
141. data literal gt string data literal numeric a Common a Common a Common a Common Syntax of nRQL data substrate queries data node query expression lt data edge query expression gt lt data edge query satisfies expression gt gt lt data query item gt data literal gt LISP symbol e g symbol LISP character e g a LISP string e g string LISP number e g 123 3 2 123 23 lt conjunction of data query items gt lt conjunction of data query items gt SATISFIES lt 2 ary data query predicate gt lt disjunction of data query predicates gt nm lt data literal gt lt data query predicate gt lt conjunction of data query items gt gt lt data query item gt lt disjunction of data query items gt lt disjunction of data query items gt lt data query item gt lt data query item gt lt data query predicate gt gt PREDICATE lt O ary data query predicate gt X 1 ary data query predicate lt disjunction of data query predicate items gt gt lt 2 ary data query predicate gt lt O ary data query predicate gt gt lt l ary data query predicate gt gt STRING LESSP lt 2 ary data query predicate gt STRING GREATERP STRINGP ZEROP INTEGERP NUMBERP CONSP SYMBOLP KEYWORDP RATIONALP FLOATP MINUSP STRING STRI
142. ditor Press the button Open in Editor or select Open in Editor in the File menu on Mac OS 2 1 SAMPLE SESSION 15 X and double click the file family racer If you have the file family racer displayed in the editor see Figure 2 2 you can send the statements to RacerPro by selecting Evaluate Racer Expression in the Buffer menu make sure the window RacerEditor is the active window RacerPro supports the standard Emacs commands and key bindings e g change buffer is bound to c x b Press tab to see a list of possible completions After having loaded the file family racer into RacerPro you can use RacerPorter to inspect the knowledge base For instance you might be interested in the hierarchy of concept names or roles using the tabs Taxonomy and Role Hierarchy respectively You can switch between the shell the taxonomy and the role hierarchy by selecting the corresponding tabs in the RacerPorter window Next we will use RacerPorter to specify some queries and inspect the answers for this you can use the Shell tab to execute queries as we have done in Figure 2 3 You can use the queries of the family queries racer file specified above Information about commands and key abbreviations is printed into the shell window With meta p or alt p and meta n or alt n you can get the previous and next command of the command history respectively By using the tab key you can complete a partially
143. down RacerPro Load Restore Image Store Image Quit Shutdown RacerPro amp Quit Automatically connected to RacerPro 2 6 running localhost 8888 case preserve gt 0KAY RacerPro 2 8 running on localhost 8888 case preserue Figure 2 1 The RacerPorter interface for RacerPro 2 1 1 Using RacerPro with RacerPorter Start RacerPorter by double clicking the program icon When RacerPorter is opened it will locate the RacerPro executable and automatically start it and connect to it To locate the RacerPro executable the RacerPorter looks within the installation path of RacerPorter or looks if there has been an environment variable set to RacerPro However if you are interested in executing a specific RacerPro executable you can configure this within RacerPorter as follows Click the Edit Profile button in order to configure RacerPorter Once the Profile Editor dialog is opened edit the RacerPro Executable field by providing the required path e g C Program Files RacerPro 20 Preview RacerPro exe then press OK amp Save Profile By saving the profile RacerPorter will be able to localize the RacerPro executable you specified every time RacerPorter is started The configuration is saved in a file called racereditor config racereditor found in the same path of the RacerPro executable Profiles are stored in the User Home directory under the file called pro
144. e interpreted with respect to the concept axioms given in the referenced T box The role assertions are also interpreted according to the role declarations stated in that T box When a new A box is built the T box to be referenced must already exist The same T box may be referred to by several A boxes If no signature is used for the T box the assertions in the A box may use new names for roles or concepts which are not mentioned in the T box These roles are treated as roles that are neither a feature nor transitive and do not have any superroles New items are added to the T box Note that this might lead to surprising query results e g the set of subconcepts for T contains concepts not mentioned in the T box in any concept axiom Therefore we recommend to use a signature declaration see below 5These concepts are assumed to be atomic concepts 3 7 SPECIFYING RULES 71 3 7 Specifying Rules The application of rules provides for optimized manipulation of structures in particular in server based environments such as RacerPro Standards such as SWRL ensure the necessary consolidation such that industrial work becomes possible Therefore RacerPro has been extended with support for applying SWRL rules to instances mentioned in an OWL ontology or corresponding RDF data descriptions in order to make implicit information explicit Shell TBoxes ABoxes Concepts Roles Individuals Assertions Axioms Taxonomy Role H
145. e ABox The query retrieve x x has known successor has child gives us CC X CHARLES X BETTY X ALICE since these are the individuals for which we have has child role successors in the ABox Alterna tively we could have used retrieve x x y has child However there is a subtle difference between the two alternative formulation which will come into play if we consider NAF negated atoms see below Also note that as a consequence of the active domain semantics for variables the query retrieve x x has known successor has child 4 1 THE NRQL LANGUAGE is not equivalent to retrieve x x some has child top Suppose we add the axiom instance doris mother to the ABox and query with retrieve x x some has child top We then get DORIS X CHARLES X BETTY X ALICE but retrieve x x has known successor has child still only gives us CC X CHARLES X BETTY X ALICE 101 since the child of Doris is not explicitly present in the ABox However its existence is logically implied due to Doris motherhood But there is no such known successor The has known successor is just syntactic sugar The atom x has known successor has child is rewritten into project to x x y has child see below for an expla nation of project to and and 4 1 2 Query Head Projection Operators to Retrieve Told Values
146. e base called test kb evaluate let db open triple store test directory C test ts use triple store db kb name test kb retrieve x y and http www lehigh edu 7Ezhp2 2004 0401 univ bench owl Publication y x http www lehigh edu 7Ezhp2 2004 0401 univ bench owl publicationAuthor x http www DepartmentO UniversityO edu http www lehigh edu 7Ezhp2 2004 0401 univ bench owl memberOf x http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateStudent retrieve x y z and x y http www lehigh edu 7Ezhp2 2004 0401 univ bench owl advisor x z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl takesCourse y z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl teacherOf x http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateStudent y http www lehigh edu 7Ezhp2 2004 0401 univ bench owl AssistantProfessor z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateCourse The examples should illustrate the flavor of how triples can be accessed from RacerPro Currently for reasoning the triples are loaded into main memory by RacerPro Thus only a limited number of triples should be in the store In a future version reasoning will be done also on secondary memory The result tuples can be selected in a separate presentation tab Query IO of the editor as il lustrated in Figure 5 3 Afterwards e g the corresponding inferr
147. e data substrate mirroring facility is enabled RacerPro will automatically create data substrate objects for all elements in the OWL KB However RacerPro will also create associated data substrate if a KB which is not an OWL KB will be read in The associated data substrate is valuable since nRQL can then offer additional retrieval function ality which is not available on the ABox side For example the additional retrieval predicates can be used which are only available in the hybrid nRQL query language 138 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Querying the Mirror Data Substrate Let us consider an example to demonstrate the benefits of the mirror data substrate full reset in tbox test define concrete domain attribute age type integer define concrete domain attribute name type string define primitive role has child parent is relative equivalent mother and woman some has child human implies woman human in abox test in mirror data box test instance alice woman instance betty woman related alice betty has child constrained betty betty age age constrained alice alice age age constrained betty betty name name constrained alice alice name name constraints equal betty age 80 constraints equal alice age 50 constraints string betty name Betty constraints string alice name Alice Due to the declaration in mirror data box test mirroring is enabled A data
148. e expressive power of RacerPro s concept ex pressions e g use statements such as x some has child Negation as failure NAF as well as true classical negation is available NAF is especially useful for measuring the degree of completeness of a modeling of the domain of discourse in the KB e g we can ask for the individuals from the ABox which are known to be woman but not known to be mothers nRQL is currently the only practically available OWL query language which allows for the execution of such autoepistemic queries Special support for querying the concrete domain part of an ABox nRQL allows for the specification of complex retrieval conditions on concrete domain attribute fillers of ABox individuals by means of complex concrete domain predicates Moreover in case satisfying concrete domain values are known told in the ABox these can be retrieved For example we can query for the individuals which are adults i e the filler of the has age concrete domain attribute of these individuals of type real must satisfy the complex concrete domain predicate gt 18 Constraint checking on the concrete domain is also supported by nRQL again by means of complex predicate expressions For example we can use nRQL to query for all pairs of individuals such that one individual is at least 8 years older than the other individual Adequate handling of synonym individuals and proper treatment of same as assertions A
149. e maximizes the availability of nRQL whereas the eager mode has the advantage that requesting a next tuple of a certain query will eventually be faster if it has already been computed e Configurable degree of completeness nRQL offers a complete mode as well as various incom plete modes which differ w r t the amount of completeness they achieve An incomplete mode will only deliver a subset of the answer to a query compared with the answer which would be computed in the complete mode However the incomplete modes can be much more performant and will also be complete for KBs which do not required the full expressivity of ALCQOHTR D or OWL Moreover the incomplete modes scale better than the complete mode The so called two phase processing modes take care that query processing works in two phases In the first phase the so called cheap tuples are computed and delivered to the client ABox reasoning is not required for the computation of these cheap tuples Thus RacerPro is not involved for their computation The client application can now chose to request more tuples Then the second phase is used to compute the missing tuples exploiting full RacerPro ABox reasoning These tuples are therefore called expensive tuples nRQL can be advised to deliver a so called warning token which will be delivered before phase two starts Clients can then chose to retrieve these additional expensive tuples or not Configurable runtime resources The n
150. e naming conventions used in this document are provided 3 1 Naming Conventions Throughout this document we use the following abbreviations possibly subscripted C Concept term name Name of any sort CN Concept name S List of Assertions IN Individual name GNL List of group names ON Object name LCN List of concept names R Role term Abox object RN Role name Tbox T box object AN Attribute name n A natural number ABN A box name real A real number TBN box name integer An integer number KBN knowledge base name string A string The API is designed to the following conventions For most of the services offered by Racer Pro macro interfaces and function interfaces are provided For macro forms the T box or A box arguments are optional If no T box or A box is specified the value of current tbox or current abox is taken respectively However for the functional counterpart of a macro the T box or A box argument is not optional For functions which do not have macro counterparts the T box or A box argument may or may not be optional Furthermore if an argument T box or boz is specified in this documentation a name a symbol can be used as well Functions and macros are only distinguished in the Lisp version Macros do not evaluate their arguments If you use the RacerPro server you can use functions just like macros Arguments are never evaluated For RacerMaster or LRacer users All names are Lisp symbols
151. e projection operator for query bodies The first argument to this con structor is a projection list this must be a list of objects Head projection operators are not permitted here The second argument is an ordinary query body However as for a nRQL query the objects mentioned in the projection list must form a subset of the objects mentioned in this query body This operator must not be confused with the head projection operators which have been discussed before Please look up the EBNF specification to learn more about the compositional syntax of nRQL see Section 4 1 9 4 1 THE NRQL LANGUAGE 109 The AND Constructor Conjunctive Queries Suppose we want to retrieve all mothers of male persons in the family racer KB This is a classic conjunctive query retrieve x y and x mother y man x y has child RacerPro replies X ALICE Y CHARLES About Variables in Conjunctive AND Queries We have already mentioned that nRQL offers different kinds of variables If we query family racer with retrieve x y and x man y man then we will get NIL Again the rationale is that there is only one known man in the ABox Due to the constraint that injective variables must be mapped injectively to ABox individuals x and y must be bound to different man in the ABox but there is only charles The alternative would be to use non injective variables if we use retrieve x and x m
152. e window eoo Java test1 src test Test2 java Eclipse Users rm Documents workspace racer users guide 2 i o mp elit S O Gr G Fr Bir E Package Explorer 53 2 Test java D Test2 java 33 1 E Task List 23 Bg Y package test f 8 Q e X B8 owlapiGetOWLNegativeDataProperty import com racersystems jracer owlapiGetOWLNegativeDataProperty Find b Acti owlapiGetOWLNegativeDataProperty public class Test2 zi 6 owlapiGetOWLNegativeObjectPropei Wiese id owlapiGetOWLNegativeObjectPropei ou String ip QwlapiGetOWLNegativeObjectPropei int port 8088 TOM owlapiGetOWLNegativeObjectPropet RacerClient racer new RacerClient ip port owlapiGetOWLObjectPropertyAssert Connect Mylyn owlapiGetOWLObjectPropertyAssert try Connect to your task and owlapiGetOWLObjectPropertyAssert racer openConnection ALM tools or create a owlapiGetOWLObjectPropertyAssert local task OWlapiGet Ot OhjecifmpertyChain racer owlapiNewOntology test BE Outline 23 TH 9 owlapiGetOWLObjectPropertyChaint racer owlapiAutoAddAxionsTo test 6 owlapiGetOWLObjectPropertyChaint 6 5 8 x owlapiGetOWLObjectPropertyDomai racer owlapiGetOWLClassAssertionAxiom d m owlapiGetOWLObjectPropertyDomai racer 3 p EU 8 test owlapiGetOW
153. eTopping and VegetableTopping Next we will the disjointness axiom causing this inconsistency The pizza ontology was taken from http www co ode org ontologies pizza 2007 02 12 pizza owl 2 4 OTHER GRAPHICAL CLIENT INTERFACES lt pizza http www co ode org ontologies pizza pizza owl http www co ode org ontologies pizza 2007 02 12 pizza owl File Edit Ontologies Reasoner Tools Refactor Tabs View Window lt c pizza httpJIwww co ode org ontologies pizza pizza owl Class hierarchy Class hierarchy inferred Class hierarchy CheeseTopping E3EJET prosa i IceCream p Pizza p PizzaBase PizzaTopping v CheeseTopping FourCheesesTopping GoatsCheeseTopping GorgonzolaTopping MozzarellaTopping i fy ParmesanTopping gt FishTopping gt FruitTopping gt HerbSpiceT opping gt MeatTopping gt NurTopping gt SauceTopping SpicyTopping VegetableTopping ArtichokeTopping AsparagusTopping CaperTopping Cheesey V egetableT opping Active Ontology Entities Classes Object Properties Data Properties individuals OWLViz DL Query _ Annotations CheeseTopping IESU Annotations label CoberturaDeQueijo pt Description CheeseTopping IE Inherited anonymous classes Members Keys Disjoint classes HerbSpiceTopping NurTopping
154. ecific concept up to k levels of nested existentials is supported In order to demonstrate the application of these operators the following knowledge base is used in knowledge base test equivalent x some r and a d equivalent y some r b implies a b implies c b instance j a instance i all r and some r b d related i j r related j k r related k i r We no apply the LCS operator to two input concepts lcs unfold x and all r d some r c The result is some r and d b If no unfolding is desired use 1cs instead of 1cs unfold It is possible to specify the T box as an optional last argument default is the current T box For some purposes an extract of the information contained in an A box might be useful RacerPro 2 0 provides an implementation of the MSC k operator MSC k is applied to an individual and a nesting depth For instance given the knowledge base above the following form is executed msc k i 3 The result is 5 8 EVENT RECOGNITION 203 and some r and a some r and some r and all r and some r b d some r and a top It is possible to supply an additional boolean argument which indicates whether for each individual the direct types are included in the MSC approximation For instance msc k i 3 t returns and some r and x a some r and a d y some r and top all r and some r b d some r and x a top The default f
155. ected Info execute rule it Def hasUncle 6 gt related MARY JOHN i hasUncle Figure 3 8 A box Graph of RacerPorter after applying the uncle rule 74 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES 3 8 Hints on Modeling and Reasoning with RacerPro There are several excellent books and introductory papers on description logics e g 4 7 In this Chapter we discuss additional issues that are important when RacerPro is used in practical applications 3 8 Representing Data with Description Logics Almost nothing is required to use a description logic inference system to store data In particular there is not need to specify any kind of memory management information as in databases or even in object oriented programming systems In order to make this clear a very simple example is given as follows in knowledge base test instance i a instance i b related i j r Given these declaration for data query functions can be used to retrieve data concept instances and a some r b returns i You could also use the nRQL query language see Chapter 4 retrieve x x and a some a b If you would like to know which fillers actually got names in the A box use the following query retrieve x y and x a x y y b Note however that the latter query would not return results for the following A box whereas the former query would return
156. ed ABox and Concept Expression Reasoner Professional is a server system for building knowledge based applications based on ontologies The backbone of RacerPro is a descrip tion logic reasoning engine It provides inference services for descriptions of terminological knowl edge as well as for knowledge about individuals Based on a plethora of optimization techniques developed in the research field of description logics throughout the years a mature architecture op timized for typical case application scenarios involving expressive description languages is provided The system has been used in hundreds of research projects and industrial contexts throughout the last twelve years W3C standards as well as detailed feedback reports from numerous users have influenced the design of the system architecture in general and have also shaped the RacerPro knowledge representation and interface languages in particular Description logics provide the foundation for international approaches to standardize conceptual modeling languages in the context of the so called semantic web RacerPro can be used as a system for managing semantic web ontologies based on syntaxes provided by the web ontology language OWL It can be used as a reasoning engine for ontology editors such as Prot g In addition RacerPro can also be seen as a semantic web information repository with an optimized retrieval engine It can handle large sets of data descriptions e g defined using t
157. ed relational role filler A box structure can be viewed using one of the graph panes of RacerPorter see Figure 5 4 As mentioned before it is not always the case that reasoning is required Therefore one can pose the same nRQL queries to secondary memory for very fast access but without reasoning RacerPro optimizes the queries in order to provide good average case performance CHAPTER 5 ADDITIONAL FACILITIES fox GO Computer Vista test ts test gt Suchen p s m oe Organisieren v hten Linkfavoriten Dokumente Weitere Ordner Spesoft Sun swoop 2 3beta4 Symantec jj TeXnicCenter J The Virtual Decorator Kitchen Samp TOSHIBA Ulead Systems VideoLAN Windows Calendar Windows Collaboration Windows Defender Name TS LJ admin deleted data id indexmidx _ index gospi 1 8555 idx _ index gospi 1 8555 midx _ index gposi 1 8555 idx index gposi 1 8555 midx index gspoi 1 8555 idx J index gspoi 1 8555 midx index ospgi 1 8555 idx _ index ospgi 1 8555 midx _ index posgi 1 8555 idx _ index posgi 1 8555 midx _ index spogi 1 8555 idx _ index spogi 1 8555 midx _ metadata Anderungsdatum 11 03 2011 18 11 11 03 2011 18 15 11 03 2011 18 15 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 16 11 03 2011 18 1
158. ed tuples The tuples from the cache must therefore have the same format as the requested tuples Therefore a stronger notion of query entailment is required for this purpose It is possible to ask for the parents children as well as for equivalent queries of queries which have been classified The QBox can also be printed graphically Please consult the Reference Manual Please consider the following example session to get familiar with the offered functionality and API functions gt full reset OKAY FULL RESET gt load family racer Loading text file home mi wessel family racer P home mi wessel family racer gt define primitive role has parent inverse has child HAS PARENT gt enable query repository OKAY QUERY REPOSITORY ENABLED retrieve x x top Concept BROTHER causes a cycle in TBox FAMILY Concept SISTER causes a cycle in TBox FAMILY Concept PARENT causes a cycle in TBox FAMILY ALICE X BETTY X DORIS X CHARLES X EVE retrieve a a human EVE CHARLES A DORIS A BETTY ALICE retrieve b b woman 178 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL ALICE B BETTY B DORIS B EVE gt retrieve y and x woman x y has child y human CC Y EVE Y DORIS CHARLES Y BETTY gt show current qbox t QBOX FOR RACER DUMMY SUBSTRATE FO
159. ed world assumption and the ambiguities about what closing should actually mean in description logic inference systems usually there is no support for the closed world assumption However with the publish and subscribe interface of RacerPro users can achieve a local closed world LCW assumption see Section 5 4 The nRQL query language allows you to query A boxes using negation as failure semantics see Chapter 4 Feedback from many users of the RacerPro system indicates that for instance instance retrieval queries could profit from possibilities to close a knowledge base in one way or another Due to the non monotonic nature of the closed world assumption and the ambiguities about what closing should actually mean in description logic inference systems usually there is no support for the closed world assumption However with the publish and subscribe interface of RacerPro users can achieve a similar effect Consider for instance a query for a book which does not have an author Because of the open world assumption subscribing to a channel for and Book at most has author does not make much sense Nevertheless the agent can subscribe to a channel for Book and a channel for at least 1 has author It can accumulate the results returned by 78 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES RacerPro into two variables A and B respectively and in order to compute the set of books for which there does not exist an auth
160. ehind vwi vw2 10 30 define event assertion beside vw1 vw2 30 40 define event assertion in front of vwi vw2 40 80 define event assertion recede vwi vw2 40 60 define event rule overtake obji obj2 t1 t2 obji car tO tn obji obj2 r tO tn move obji1 tO 2 move obj2 t1 t2 approach obji obj2 t1 t3 behind obji obj2 t1 t3 beside obji obj2 t3 t4 in front of obj1 obj2 t4 t2 recede obji obj2 t4 t2 The following query check whether there exists an overtake event hidden in the A box and the event assertions timenet retrieve overtake obji obj2 t1 t2 The query returns a set of binding for variables if an event can be detected and nil otherwise For time variables an interval for the lower bound and upper bound are returned Thus the overtake event start at time unit 10 at the earliest and 29 at the latest It ends at time unit 29 at the earliest and 60 at the latest In a future version of RacerPro redundant binding specifications will be removed obji vwi obj2 vw2 ti 10 29 t2 41 60 obji vw1 obj2 vw2 ti 10 29 t2 41 60 Note that the example involves reasoning The fact that vw1 is a car is only implicitly stated In addition temporal constraint have to be checked for the time intervals In the previous queries variables are used However one might very well use constants in event queries as shown
161. emented by RacerPro negated roles are not offered in contrast to negated concepts due to reasons of decidability However negated roles can be used in nRQL role query atoms for querying purposes Analogously as for x not mother and charles where RacerPro can prove that charles is not an instance of mother sometimes it can also be proven that a certain pair of ABox individuals cannot be in a certain role relationship To demonstrate this let us add the features functional roles has father and has mother to family racer Please modify the KBs signature as follows don t forget to modify the role has child as well 90 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL signature roles has child parent has descendant inverse has parent domain parent range person features has father parent has parent range father has mother parent has parent range mother At the end of the file add the following ABox role membership assertion to the file related eve charles has father Please enter full reset and reload the modified file family racer into RacerPro Now the query retrieve x y x y has father should return EVE Y CHARLES Let us now use a negated role in a role query atom Since female persons cannot be fathers RacerPro is actually able to prove that certain individuals cannot be in a has father role relationship to one another Thus retrieve x y x y NOT ha
162. ent meaning in Emacs and analogously in RacerEditor The editor uses standard Emacs compatible key bindings e g Ctrl x Ctrl w saves a file Ctrl x Ctrl f loads a file etc The GNU Emacs Reference Card is a good reference to get to know the usual key bindings In the following we list the most important key bindings e Return or Enter fresh line or send command e Tab Completion key e Ctrl a Beginning of line e Ctrl e End of line 46 CHAPTER 2 USING RACERPRO AND ITS INTERFACES e Ctrl k Kill line e Ctrl left Matching starting e Ctrl right Matching ending e Ctrl d Del Delete e Backspace Backspace e Ctrl Space Set Mark e Meta w Copy e Ctrl y Paste e Ctrl w Cut e Meta p Alt p Previous Command e Meta n Alt n Next Command The editor has three modes 1 Racer mode This mode is useful for editing RacerPro KBs in RacerPro native syntax You can incrementally evaluate expressions using Ctrl Shift e or send a whole buffer to a RacerPro server using Ctrl Shift h see also the Buffer Menu Note that Ctrl Shift e also puts the evaluated command into the shell and in the shell command history unlike Ctrl Shift h 2 OWL RDF XML mode In this mode Ctrl Shift y can be used to evaluate an OWL buffer The OWL buffer evaluation will only work if the connected RacerPro server is running in unsafe mode consult the Profiles tab for this information since buffer evaluation requires creati
163. epare abox query x mother QUERY 8 READY TO RUN gt query entails p query 7 query 8 NIL Note In fact we have expected T here but then we See that the object vector of QUERY 7 is 333 lt x y gt thus of type lt FEMALE PERSON PERSON gt which is compared to the vector of QUERY 8 which is 333 lt x gt MOTHER Due to the modelling in the TBox female and mother are unrelated gt prepare abox query and x person x y has gender y female x z has child z person QUERY 9 READY TO RUN Note The object vector of QUERY 9 is now lt x y z gt lt PERSON FEMALE PERSON gt Ihus we get the expected result gt query entails p query 9 query 8 T lt PERSON FEMALE PERSON gt is in fact lt MOTHER FEMALE PERSON gt thus this is compared to MOTHER and the entailment is detected Note that this is a non trivial inference gt query entails p query 8 query 9 NIL Note This is correct since QUERY 8 x mother DOEST NOT enforce the existence of KNOWN children but QUERY 9 does Ihus QUERY 9 is more specific than QUERY 8 4 2 THE NRQL QUERY PROCESSING ENGINE 177 4 2 8 The Query Repository The QBox The query entailment check see previous Section is used for the maintenance of a query repository This repository is also called the QBoz If enabled a QBox is maintained for each queried ABox The QBo
164. equences automatically is enabled you must add rule consequences manually see below if dont add rule consequences automatically has been evaluated 126 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Creating New ABox Individuals and Establishing ABox Relationships with Rules A nRQL rule consequence can contain generalized concept assertions generalized role assertions generalized constrained as well as generalized constraint assertions Suppose that for each mother which does not have a known child yet in the ABox we want to create a new child retrieve x and x mother neg x has known successor has child Answer X DORIS X EVE Thus doris and eve are known to be mothers but they have no known children So let s add these children with a rule firerule and x mother neg x has known successor has child instance new ind first child of x human related new ind first child of x x has mother which adds the role assertions INSTANCE FIRST CHILD OF EVE HUMAN RELATED FIRST CHILD OF EVE EVE HAS MOTHER CINSTANCE FIRST CHILD OF DORIS HUMAN RELATED FIRST CHILD OF DORIS DORIS HAS MOTHER to the ABox Note that the operator new ind lt name gt lt ind or var gt creates a new ABox individual prefixed with lt name gt for each different binding possibility of the argument objects in lt ind or var gt and new ind lt name gt will simply create a
165. er The display of inferred role assertions and the display of role assertions for transitive roles can be enabled or disabled checkboxes Told Only and Trans Roles 54 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Selected roles can be used to determine which role assertions to display In this mode a role assertion is visualized if the corresponding role is selected The set of selected individuals is exploited in the obvious way Each individual supplies a graph root Since the exploited graph layout algorithm currently cannot display cyclic graphs a tree unraveling of the graph starting from the root individual is used Cycles are indicated with the help of the back to annotation Please note that the Search amp Select field can select individuals as well as roles by name here As expected some individual specific commands are present as command buttons as in the Indi viduals tab The Query IO tab This tab offers a tabular display for query results from which query results can be selected Whenever a nRQL or SPARQL query is entered into the shell or editor using Ctrl Shift e its result set is shown in the list below the shell which is duplicated here from the Shell tab for convenient query input in this tab From this result list items in answer tuples individuals or concept names can be selected Note that in principle a nRQL query can return individuals or concept names in case of tbox re
166. et interface is documented in the next sections JRacer JRacer is the client library to access the services of a RacerPro server from Java client programs In addition to the jar archive for the class files the JRacer interface is provided with source code in your RacerPro distribution directory See http www racer systems com products download for the latest JRacer version JRacer uses the socket interface to communicate with the RacerPro server The main idea of the socket interface is to open a socket stream submit declarations and queries using strings and to parse the answer strings provided by RacerPro such that the results can be used in the Java program The following very simple code fragment explains how to send messages to a RacerPro server running on 127 0 0 1 localhost under port 8088 The file used in the code is provided in the RacerPro distribution directory You might need to adapt the string according to your installation directory for RacerPro package test import com racersystems jracer public class Test 1 public static void main String argv String ip 127 0 0 1 int port 8088 String filename Applications RacerPro 2 0 preview examples owl people pets owl RacerClient racer new RacerClient ip port try i racer openConnection System out println racer sendRaw owl read file filename System out println racer sendRaw all atomic concepts 2 2 THE RACERPRO SERVER 21 ra
167. et next set of rule consequences rule 1 CINSTANCE DORIS MOTHER RELATED DORIS CHILD OF DORIS HAS CHILD gt get next set of rule consequences rule 1 EXHAUSTED gt all concept assertions BETTY MOTHER DORIS MOTHER DORIS WOMAN BETTY WOMAN gt all role assertions BETTY CHILD OF BETTY HAS CHILD DORIS CHILD OF DORIS HAS CHILD 163 164 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL 4 2 5 Configuring the Degree of nRQL Completeness So far we have only used the complete modes of nRQL In these modes nRQL uses the basic ABox querying functions of RacerPro in order to achieve completeness However for certain ABoxes this mode might not scale too well ABoxes might simply become too big to be checked for consistency with RacerPro If consistency checking becomes impossible also the basic ABox retrieval functions of RacerPro which are called by nRQL during retrieval such as concept instances will fail as well If the ABox reasoning and retrieval services of RacerPro come to their limits and become practically unavailable due to high complexity then it might be an option to consider using the incomplete modes of nRQL for retrieval on such an ABox However for certain kinds of ABoxes which are simply structured the incomplete modes might be complete For example some ABoxes only contain data those ABoxes are basically sets of ground terms and thus contain no disjunctions no role qualifications etc B
168. family racer KB otherwise the answer will be NIL retrieve x y z u and x y has descendant x z has descendant y u has descendant z u has descendant RacerPro replies X ALICE Y BETTY Z CHARLES U EVE X ALICE Y CHARLES Z BETTY U EVE The properties of the roles are of course correctly preserved in nRQL queries for example has descendant is a transitive role Other properties of roles are correctly handled as well The UNION Constructor nRQL also offers a UNION constructor retrieve x union x woman x man RacerPro replies CC X CHARLES X EVE X DORIS X BETTY X ALICE Understanding the UNION Constructor As the name suggests the UNION just constructs the union of the answer sets of the argument queries disjuncts However the union is only well defined and meaningful if the argument sets have the same arity Thus nRQL must ensure that the answer sets will have the same arity The arguments query bodies of a union query are thus transformed in such a way that they will all produce answer sets of same arity Consider the query retrieve x y union x y has child x man nRQL will rewrite this query into the following retrieve x y union x y has child and x man y top Now both component queries x y has child and and x man y top return lists of x y pairs Thus the union is meaningful T
169. ference to connect to an external RacerPro executable or by default to connect to the RacerPro that is integrated to Prot g through the plug in Usually the 56 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Automatic Update Inst Name Current versi Available version Annotation Search Views 1 1 1 J URI Utilities 1 1 1 Pty JracerProtG Reasoner LI OWL2 Query Plugin 0 1 0 OWLDiff 0 1 5 OWLDoc 2 0 0 OWLlink HTTPXML Reasoner 0 7 0 Pellet Reasoner Plug in 2 2 0 Plugin info Author Olaf Noppens at Derivo GmbH for Racer Systems GmbH amp Co KG License http www racer systems com protege racerprotg license html RacerPro Prot g Plugin This plug in makes the RacerPro reasoner available in Prot g 4 The Plugin will download a current version of the reasoner software from Racer Systems website Racer Systems grants a free and permanent license to use this special RacerPro version aka RacerProTG together with Prot g or other OWL API OWLIink tools The RacerPro reasoner will be installed automatically in a subdirectory of your Prot g 4 plugin directory On request the reasoner is started as a separate process and will be shut down together with Prot g Use the Reasoner menu to select and start un RacerPra _ Always check for updates on startup Not now Figure 2 29 Installing RacerPro as the reasoner used by Prot g defaults Local P
170. fference of at least 40 between the ages of x and y The nRQL query retrieve x y x y constraint age age gt age 1 age 2 40 retrieves X ALICE Y EVE X ALICE Y DORIS So what is age 1 and age 2 in the expression gt age 1 age 2 40 The answer is simple In order to differentiate the age attribute of the individual bound to x from the age attribute of the individual bound to y nRQL has internally renamed the attributes by adding suffixes Thus age 1 represents the filler of the age attribute of the individual reached by following the first role chain whereas age 2 references the filler of the age attribute of the individual reached by following the second role chain If the two attributes fillers to compare are different then the suffixes will not be added e g as in retrieve x y x y constraint age works for years in company age works for years in company 10 Please consult the EBNF in Section 4 1 9 to learn more about the syntax for complex predicate expressions Querying OWL KBs with Constraint Query Atoms In the OWL realm the equivalent of concrete domain attributes are called OWL datatype properties Thus it would be good if constraint query atoms could be used to query OWL documents with constraint query atoms referencing datatype properties as if they were concrete domain attributes In principle this is possible with nRQL However the price is that
171. fied concept DL notation RacerPro syntax J R C some R C Y R C all R C Exists restriction Value restriction The signature does not have to be specified explicitly in RacerPro knowledge bases the system can compute it from the all the used names in the knowledge base but specifying a signature may help avoiding errors caused by typos 3 2 CONCEPT LANGUAGE 63 CDC gt min AN integer max AN integer equal AN integer equal AN AN divisible AN cardinal not divisible AN cardinal gt aexpr aexpr gt aexpr lt aexpr aexpr lt aexpr lt gt aexpr string AN string string lt gt AN string string AN AN string lt gt AN AN string gt letter aexpr gt AN AN must be of type real real aexpri aezpr1 Figure 3 2 RacerPro concrete domain concepts and attribute expressions aexpri gt aexpr2 aexpr3 aexpr2 3 real AN AN of type real or complex real AN AN of type real aexpr3s gt integer AN AN of type cardinal integer AN AN of type cardinal Figure 3 3 Specific expressions for predicates Number restrictions can specify a lower bound an upper bound or an exact number for the amount of role fillers each instance of this concept has for a certain role Only roles that are not transitive and do not have any transitive subroles are allowed in n
172. figuring the Degree of nRQL Completeness 164 4 2 0 Automatic Deadlock Prevention 168 4 2 7 Reasoning with Queries 171 42 6 The Query Repository The QBox e dao ra Teuma t r ER 177 42 9 The Query Resliger co ecs 4 84 ae x Awd RE EER ee we 180 4 2 10 The nRQL Persistency Facility lt a s a a scoa ae e a a aa E aa a a 181 5 Additional Facilities 185 5 1 Retraction and Incremental Additions 185 5 2 Rule Formalism Extended to Support Abduction 185 5 3 Reasoning with Triples in Secondary 188 CONTENTS 5 4 The Publish Subscribe Mechanism 5 4 1 An Application 5 4 2 Using JRacer for Publish and Subscribe 55 OWL Interac ee BR EUR SA HE 9 Sw eH ys 5 6 Explanation 4 4 2 254484 ee hc os de WO E Re bea Re 5 7 Non standard Inferences o o 222 4 xo ek eS 5 8 Event Recognition s qe aese esar daame ka A Editions and Licenses AT a 84 ke BE uT uxo eee Bae Oe s Au LCE sul n Ee he a che RO A Sm dos EG dr Poe A B Acknowledgments Index ii 193 193 198 199 201 202 203 205 205 206 209 217 Chapter 1 Introduction RacerPro Renam
173. file button in the Edit Profile dialog On startup RacerPorter automatically looks for the profiles file C Users Juan profiles racerporter and loads it if it exists Once you have established a connection to a RacerPro server the functionality provided in the other tabs becomes available RacerPorter can manage multiple connections to possibly different RacerPro servers at a time For example you may send a time consuming request to one server While that server is busy simply switch to a different profile to work with a different RacerPro server Once the time consuming request has been processed you will be notified and RacerPorter can automatically switch back to the original session and profile You can switch between different profiles and thus servers and corresponding sessions at any time The Profiles tab offers some auxiliary functionality via command buttons It is possible to store restore an image of a RacerPro server This image contains the complete state data structures of the server in binary form Since the server state contains the results of inferences which might have took a long time to be reached e g a taxonomy computation can easily last an hour or more on complex OWL KBs a server state may be very valuable and it should thus be possible to store and restore it quickly This is the purpose of the Store Image and Restore Image buttons The Full Reset not only sends t
174. files racerporter To know more about the profiles see Section 2 3 4 If the RacerPorter was able to localized the RacerPro server then the connection to RacerPro is set automatically as shown in Figure 2 1 After a successful connection the RacerPorter will become alive and the functionality provided by the different tabs can be accessed The button Connect can be used to connect or disconnect to the RacerPro server For example to connect to a freshly started server Note that it is possible to connect to a local as well as to a remote RacerPro server even if it is used by another GUI such as Prot g Once the RacerPro server is executed you should see a shell showing the following lines 14 CHAPTER 2 USING RACERPRO AND ITS INTERFACES 3 Welcome to RacerPro Version 2 0 2010 10 02 Racer Renamed A box and Concept Expression Reasoner Supported description logic ALCQHIr D Supported ontology web language subset of OWL DL no so called nominals Copyright C 2004 2009 by Racer Systems GmbH amp Co KG All rights reserved See license terms for permitted usage Racer and RacerPro are trademarks of Racer Systems GmbH amp Co KG For more information see http www racer systems com RacerPro comes with ABSOLUTELY NO WARRANTY use at your own risk RacerPro is based on International Allegro CL Enterprise Edition 8 2 Windows Oct 2 2010 12 27 Copyright C 1985 2010
175. finition can be selected see status display field Request The Log tab This tab keeps all communication with RacerPro servers logged It can be inspected at any time in order to learn what the DLS is currently doing Each request gets a unique ID and can either be synchronous S or asynchronous A Moreover it is indicated whether a request is answered with a local cache lookup whether a request is performed in the background etc This log is cleared automatically every 10000 lines Please note that RacerPorter can also maintain a log file This depends on the active profile Please consult the profile editor for RacerPorter log file specific settings Information flow In the following a sequence of steps are described for you to follow as a manner of exercise such that you can get to know how the principle of information flow allows to link different interactions between the different tabs of RacerPorter 2 4 OTHER GRAPHICAL CLIENT INTERFACES 95 In the Taxonomy tab select a concept from the taxonomy then use Concept Query to retrieve the instances of the selected concept Note that the Concept field of the state display always shows the current concept Adapt the depth of the tree as necessary If you push Sel Concepts while in the Tree display mode then only the subconcepts of the current concept will be shown Got to the Individuals tab and select an individual press Direct Types or All Types
176. fly More types of substrates will be added in the future e g the database substrate for coupling an ABox with a relational database is in preparation The Data Substrate Similar to an ABox a data substrate is a relational structure which can be viewed as a node and edge labeled directed graph Nodes are named and have an optional description the label Edges must always have a description the label Data Substrate Labels These descriptions are called data substrate labels The exact syntax can be found on Page 150 syntax rule lt data substrate label gt A data substrate label is either a simple data literal or a list of data literals or a list of list of data literals Data literals are taken from the host language Common LISP Symbols strings numbers as well as character are supported Such a data substrate label is similar to a boolean formula in Conjunctive Normal Form CNF For example the data substrate label foo bar 123 3 foobar somehow represents the positive boolean formula foo V bar A 123 3 foobar Note that foo and bar are strings 123 3 is a floating point number and foobar is a symbol Unlike boolean formulas data literals are always positive and thus cannot be negated Data Substrate Nodes Edges and Labels populate a data substrate nodes and edges with appropriate data substrate labels must be created The macros data node and data edge are provided for this pur
177. for this area With the exception of the Shell Log and About tab the other tabs use list panes List panes allow single or multiple selections of items selected items represent the selected objects clipboard The last selected item specifies the current object Some list panes display additional information on their items in multiple columns e g in case of the T box pane not only the T box name is shown but also the number of concepts in that T box profile and DLS server information is shown in the profiles list etc 5 The tab specific buttons area This area shows options and commands that are useful for the related tab Appropriate radio buttons are provided which control whether only told role assertions or also inferred role assertions shall be shown Many tabs offer the Search amp Select field which is used to select objects individuals concepts roles axioms based on their names or structured content in the case of axioms Simply enter a text string into the Search amp Select field and the objects which contain the search string somehow in their names or in their structure in the case of axioms as a substring will become selected note that you need to press enter Please note that Search amp Select always adds additional selected objects but never deselects already selected objects and thus works in an accumulating way If required the set of selected objects should be cleared man
178. g some in country germany y and country gt inhabitants 8000000 i pp y z The answer is HAMBURG Y GERMANY Z EUROPE Given the previous explanation the meaning of the query should be obvious Note that nRQL has deduced that rcc related europe hamburg PPI holds thus also rcc related hamburg europe PP by means of constraint checking due to the presence of rcc related europe germany PPI and rcc related germany hamburg PPI 146 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL 4 1 8 Functional Lambda Expressions As previously introduced lambda expressions can be used in query heads and rule antecedences nRQL allows a restricted kind of server sided programming and can thus be used to implement for example 1 user defined output formats for query results e g the query results can also be written into a file 2 certain kinds of combined ABox TBox queries 3 efficient aggregation operators e g sum avg like in SQL In the following nRQL examples we will demonstratee the points 1 to 3 For this consider the following simple ABox related i j r related j k r Suppose you want to create a comma separated values file called test csv which contains all the possible implied R role assertions nRQL allows you to do this retrieve lambda x y with open output file test csv format output stream A 7A 4 x y x Ty x
179. g Queries Concurrent Incremental Query Processing Conceptually the nRQL engine is a multi process query answering engine which allows you to run several queries concurrently in parallel Thus is is possible to submit a number of calls to retrieve to the engine and then request tuples from these queries in a random order gt retrieve QUERY 467 gt retrieve QUERY 468 gt get next tuple X CHARLES gt get next tuple X CHARLES gt get next tuple EXHAUSTED gt get next tuple EXHAUSTED gt retrieve QUERY 469 gt retrieve QUERY 470 gt get next tuple X BETTY gt get next tuple X EVE gt get next tuple X CHARLES gt get next tuple X DORIS gt get next tuple EXHAUSTED gt get next tuple X ALICE gt get next tuple EXHAUSTED x x man RUNNING x x uncle RUNNING query 467 query 468 query 467 query 468 x x woman RUNNING x x man RUNNING query 469 query 469 query 470 query 469 query 470 query 469 query 469 160 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Lazy and Eager Tuple at a Time Modes The tuple at a time mode comes in two forms lazy and eager e In the so called lazy incremental mode the next tuple of a query is not computed before it is actually requested by the user or application unless get next
180. g example in knowledge base test implies a b equivalent c some r a equivalent d some r b instance i and c not d check abox coherence The lines below are obtained from the shell of the RacerPorter and show the result of the explanation facility It is indicated which axioms in the T box and which assertions in the A box are the culprits for the inconsistency of the A box The explanation facilities are provided through the commands check abox coherence check tbox coherence and check ontology 1 in knowledge base 1 gt NIL NIL 2 implies a b 2 gt OKAY 3 equivalent c some r a 3 gt OKAY 4 equivalent d some r b 4 gt OKAY 5 instance i and c not d 5 gt OKAY 6 check abox coherence 202 CHAPTER 5 ADDITIONAL FACILITIES 6 gt NIL i and mot d c inference step assertion i c axiom equivalent c some r a inference step assertion i not d axiom equivalent not d not SOME r b One can use the operator retrieve with explanation in order to use the explanation facility for query answering which is available in case a boolean query is answered with false but the expected answer is true 5 7 Non standard Inferences RacerPro 2 0 provides an implementation of the LCS operator least common subsumer for the description logic ALE with unfoldable T boxes Furthermore the MSC k most sp
181. g qualitative spatial networks 143 range restriction 66 RCC consistency 143 INDEX INDEX RCC constraint checking 144 RCC query 144 RCC substrate 143 RDF edge query 92 RDF instance query 87 RDF node query 87 Reasoning in Secondary Memory 188 referencing a data substrate node 136 region connection calculus 143 retraction 185 retrieving concrete domain values 101 role chains in queries 95 role hierarchy 65 Role Hierarchy tab 53 role query atom 88 role query atom with features 91 role query atom with negated role 89 Roles tab 51 rule 125 rule antecedent 125 rule application 125 161 rule application strategy 161 rule consequence 125 rule engine 125 157 rule firing 161 rule life cycle 161 rule postcondition 125 rule precondition 125 rule strategy 161 rules and pseudo nominals 128 rules and the concrete domain 127 scalable query answering 164 semantic cache 177 semantic web 5 semantically identical individuals 91 semi structured data 133 services 6 7 set at a time mode 157 Shell tab 48 signature 62 Site license 206 socket interface 20 spatial query 144 spatial reasoning 143 spatial reasoning substrate 143 spatio thematic query 144 stored defined query 181 stored QBox 181 stored substrate 181 substrate 133 substrate layer 133 221 222 substrate persistency 181 substrate query 135 SWRL 71 T boxes tab 50 Taxonom
182. g subscription and individual names 5 4 1 An Application Example The idea is illustrated in the following example taken from a document retrieval scenario In some of the examples presented below the result returned by RacerPro is indicated and discussed If the result of a statement is not discussed then it is irrelevant for understanding the main ideas of the publish subscribe mechanism First a T box document ontology is declared in tbox document ontology define concrete domain attribute isbn define concrete domain attribute number of copies sold implies book document implies article document implies computer science document document implies computer science book and book computer science document implies compiler construction book computer science book implies and min number of copies sold 3000 computer science document computer science best seller In order to manage assertions about specific documents an A box current documents is defined with the following statements The A box current documents is the current A box to which subsequent statements and queries refer The set of subscriptions w r t the current A box is initialized in abox current documents document ontology init subscriptions With the following set of statements five document individuals are declared and published i e the documents are potential results of subscription based instance retrieval queries Ce
183. ge price of all the books This is a little bit more tricky but works in nRQL as well retrieve lambda nil let prices flatten retrieve told value if exists price x x book dont show head projection operators p t average book price float reduce prices length prices true query dont show lambdas p t average book price 15 0 The trick here is to use the always true query body true query in order to let nRQL first evaluate the lambda body since lambda bodies are only valid in nRQL heads but not available as first order statements in RacerPro thus the lambda simply acquires all the prices of the individual books and then computes and returns the average price as expected Please refer to the chapter on nRQL in the RacerPro User Guide in order to learn how to implement even more efficient versions of these queries Functional programming statements cannot only be used in Lambda terms in queries but also at toplevel evaluate let x Often user defined query format output must be generated from query results e g HTML reports This is easy with nRQL as well For example the result of the query retrieve x y and x person x y has_pet y cat 4 1 THE NRQL LANGUAGE 149 on the famous people pets owl KB is x http cohse semanticweb org ontologies people Fred y http cohse semanticweb org ontologies people Tibb
184. gies com unnamed owl gt lt owl Ontology rdf about gt lt owl Class rdf ID person gt lt owl DatatypeProperty rdf ID age gt lt rdfs domain rdf resource person gt lt rdf type rdf resource http www w3 org 2002 07 owl FunctionalProperty gt lt rdfs range rdf resource http www w3 org 2001 XMLSchema int gt lt owl DatatypeProperty gt lt owl FunctionalProperty rdf ID name gt lt rdfs lt rdfs range rdf resource http www w3 org 2001 XMLSchema string gt domain rdf resource person gt 142 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL lt rdf type rdf resource http www w3 org 2002 07 owl DatatypeProperty gt lt owl FunctionalProperty gt lt person rdf ID b gt age rdf datatype http www w3 org 2001 XMLSchema int gt 45 lt age gt name rdf datatype http www w3 org 2001 XMLSchema string gt betty lt name gt lt person gt lt person rdf ID a gt name rdf datatype http www w3 org 2001 XMLSchema string gt betty lt name gt lt age rdf datatype http www w3 org 2001 XMLSchema int gt 35 lt age gt lt person gt lt person rdf ID c gt name rdf datatype http www w3 org 2001 XMLSchema string gt michael lt name gt lt age rdf datatype http www w3 org 2001 XMLSchema int gt 35 lt age gt lt person gt lt rdf RDF gt Let us assume this OWL document is stored as a file under dtp owl FULL RESET OKAY
185. given the information at hand Description logics are also important if data descriptions are to be queried with respect to varying T boxes or ontologies Note that this is a common scenario in modern information technology infrastructure Due to the rapid pace in technology evolution also the vocabulary used to access data descriptions changes quite frequently New concepts are introduced and can be set into relation to older terminology using description logics or semantic web ontologies There are numerous papers describing how description logic in general and RacerPro in partic ular can be used to solve application problems Without completeness one can summarize that applications come from the following areas e Semantic Web Semantic Grid ontology representation and logic based information retrieval e Electronic Business e g reason about services descriptions e Medicine Bioinformatics e g represent and manage biomedical ontologies e Natural Language Processing and Knowledge Based Vision e g exploit and combine multiple clues coming from low level vision processes in a semantically meaningful way e Process Engineering e g represent service descriptions e Knowledge Engineering e g represent ontologies e Software Engineering e g represent the semantics of UML class diagrams e Event recognition e g given a set of temporal propositions about basic events coming from low level image sequence analysis processes
186. gt on page 56 Fig 3 1 INV lt role expression1 gt Note a feature can be used for lt R gt as well lt role expression gt gt lt role expression1 gt NOT lt role expression1 gt lt OWL datatype property gt gt see lt R gt on page 56 Fig 3 1 Note role used as datatype property p must return T for lt R gt lt OWL annotation property gt gt see R on page 56 Fig 3 1 Note role used as annotation property p must return T for R lt prediate expression gt gt see lt CDC gt on page 57 Fig 3 2 lt CD predicate gt Note means either use lt CDC gt syntax or use lt CD predicate gt syntax lt CD prediate gt EQUAL UNEQUAL STRING STRING lt gt gt n eu gt lt lt gt won BOOLEAN BOOLEAN lt gt lt concept expression gt gt see lt C gt on page 56 Fig 3 1 Syntax of data substrate nodes and edge labels lt data substrate label gt gt lt conjunction of data items gt lt conjunction of data items gt gt lt data literal gt lt disjunction of data items gt lt disjunction of data items gt lt data literal gt 4 1 THE NRQL LANGUAGE lt data literal gt gt lt symbol data literal gt gt lt character data literal gt gt lt string data literal gt gt lt numeric data literal gt gt 155 lt data literal gt symbol data literal lt character
187. h allows for this kind of constraint checking on OWL documents Note add role assertions for datatype properties is crucial here otherwise the query will not succeed and return NIL SAME AS Query Atoms These atoms are binary We already mentioned that queries such as retrieve betty betty woman are internally rewritten into retrieve betty and same as betty betty betty woman A SAME AS query atom can be used to enforce a binding of a variable e g betty to an ABox individual e g betty or to enforce that two non injective variables are bound to the same or to a different ABox individual Please note that SAME AS works purely syntactically If you want to know which pair of ABox individuals must always be interpreted as the same domain individual of the interpretation domain in the models of a KB then you must use the NRQL EQUAL ROLE in a role query atom see the Section on role query atoms The following examples require no further explanations full reset OKAY FULL RESET gt instance i top gt instance j top gt retrieve x same as x i I gt retrieve x y same as NIL gt retrieve x y same as x 7y J JD X D Y 1 gt retrieve x same as x 7y same as j J Y gt retrieve same as i j NIL gt retrieve same as i i T In
188. haining way This facility can also be used for computing what should be added to an A box to make an assertion be entailed abduction Depending on the rule this could involve the addition of new individuals to the A box In the following we present an example involving the detection of a pole vault event full reset in knowledge base test define primitive role near define primitive role has part disjoint pole bar disjoint pv in start phase pv in turn phase 5 2 RULE FORMALISM EXTENDED TO SUPPORT ABDUCTION define rule x y near and z z x y z z x has part y has part pole human pole vault pv in start phase define rule x y near and z z x y z z x has part y has part bar human pole vault pv in turn phase instance p1 pole instance hi human Given the statements in this knowledge base one can ask the following query retrieve with explanation pi hi near final consistency checking p t The answer is t CC tuple new inds IND 2 hypothesized assertions related IND 2 p1 has part instance IND 2 pole vault instance IND 2 pv in start phase related IND 2 h1 has part 187 The answer is t as expected and the result returned by RacerPro suggests that there is one way to achieve this answer One new individual is required IND 2 In addition a set of hypothesized assertions to achieve the positive ans
189. hat these lists of lists of data literals must be interpreted as conjunctions of disjunc tions of data literals There there are also API functions and macros for deleting a substrate node or edge as well as various other substrate related API functions Please consult the Reference Manual Querying the Hybrid Representation nRQL can now be used to query the hybrid represen tation Here is our first hybrid query gt retrieve x y and x and human some collegue teacher x y collegue x Michael Wessel CC X MICHAEL Y RALF Note that the variable y has been bound to an ABox individual whereas x has been bound to a substrate node The variable y is an ordinary nRQL A Boz variable whereas is a so called substrate variable see rule lt data substrate query object gt Page 150 Whenever we use a variable or individual prefixed with an asterix it is assumed that this object is from the substrate realm and must therefore be bound to a substrate node Otherwise the object is from the ABox realm and must therefore be bound to an ABox individual Thus with respect to the example the variable x ranges over the set of nodes in the data substrate whereas the variable y ranges over the set of A Box individuals Moreover these ABox and substrate variables are bound in parallel Whenever a binding for x is made a binding of the corresponding substrate variable x is automatically established
190. he full reset command to RacerPro which then disposes all 48 CHAPTER 2 USING RACERPRO AND ITS INTERFACES its A boxes T boxes Queries Rules OWL Ontologies etc but also resets the RacerPorter GUI clears the histories and session context etc However Full Reset only affects the active profile and its corresponding server A very important button is the Load button The load function can even transmit a file to a remote RacerPro server which does not have access to the file system on which RacerPorter is running However this will only work if this remote server is running in the so called unsafe mode You can see from the profiles list whether the connected server is running in unsafe mode If the server has been started by RacerPorter then you can specify in the profile editor whether this server should be started in unsafe mode see checkbox Start RacerPro in Unsafe Mode Load accepts files with the following extensions owl rdf funct racer krss lisp For OWL files you will be asked whether a set of auxiliary OWL axioms shall be created from the OWL file Answer with Yes if you wish to edit or browser the axioms with the help of the Axioms tab However axiom objects need some additional memory The Shell tab This tab offers textual command based interaction with RacerPro for advanced users The syntax of the native RacerPro commands to be entered into the shell is do
191. he Edit Profile dialog Additional server command line arguments can be specified Note that these additional arguments will apply to freshly started RacerPro servers only and will not affect already running RacerPro servers A profile contains more information than meets the eye information which cannot be edited with the profile editor A profile also contains the session context e g the current shell content the shell history and the navigator history as well as the state of the RacerPorter GUI e g the status of the check boxes and other GUI gadgets controlling visualization options This session specific information is used to revert the state of the RacerPorter GUI to a previous state if a previously used profile is reactivated again Note that all though the session specific information is not made persistent when the profile is saved from the profiles editor the visualization options specified in a profile are in fact made persistent This is how the four default profiles differ they provide different default settings for various visualization options depending on the size of the A boxes T boxes under consideration The Connect button is used to connect disconnect to from the RacerPro server specified in the currently active profile The whole set of profiles shown in the Profiles tab The profiles can be saved into a profiles file made persistent from the profile editor with the OK amp Save Pro
192. he ABox then this value cannot be retrieved Note that RacerPro also permits the specification of told values using attribute filler alice 80 age An anonymous concrete domain object will be created which then plays the same role as alice age Thus also told values specified by means of attribute filler can be retrieved Retrieving Told Values from the Concrete Domain So how can we now actually retrieve the age of alice We already mentioned that the following query does not work retrieve alice age alice age age since age is not a role but a concrete domain attribute To solve this retrieval problem we can proceed as follows First according to our discussion above add constrained alice alice age age constraints alice age 80 to the file family racer As always enter full reset and reload the file family racer into RacerPro Now the head projection operators come into play 4 1 THE NRQL LANGUAGE 103 retrieve alice age alice told value age alice alice an age will give us ALICE AGE ALICE ALICE AGE C TOLD VALUE AGE ALICE 80 Note that RacerPro has returned a much more complex binding list ALICE is the binding of the variable ALICE By applying the age attribute projection operator to the binding of ALICE we get a list of concrete domain objects which are fillers of this concrete domain attribute in this case ALICE AGE Finally the told
193. he object vectors and as such the lexicographic order matters Consider the following examples gt full reset OKAY FULL RESET gt prepare abox query and x woman y person QUERY 1 READY TO RUN gt prepare abox query and b woman a person QUERY 2 READY TO RUN gt query equivalent p query 1 query 2 NIL 333 Note The object vector of QUERY 1 is lt x y gt and the vector 333 of QUERY 2 is lt a b gt due to lexicographic reordering 333 Thus the INTERNAL answer sets of these queries are not 333 equivalent According to these vectors the tuples in 333 the internal answerset of QUERY 1 have type 333 lt WOMAN PERSON gt whereas the tuples in QUERY 2 333 have type lt PERSON WOMAN gt Thus the queries are 333 not equivalent since the sets are unequal Lets rename the variables in the query prepare abox query and a woman b person QUERY 4 READY TO RUN gt query equivalent p query 1 query 4 T Finally some more complex examples demonstrating the utility of the query entailment checker Please ensure that family racer has been loaded prepare abox query betty woman QUERY 1 READY TO RUN gt prepare abox query betty mother QUERY 2 READY TO RUN gt query entails p query 1 query 2 NIL gt query entails p query 2 query 1 d gt prepare abox query charles human QUERY 3 READY TO RUN
194. he presented combo boxes An item which is selected from such a combo box list will be inserted in the editor at the current cursor position In case PLURAL is used for the attribute description e g DESCRIPTIONS instead of DESCRIPTION more than one valid concept description expression may be entered into the corresponding editor field Simply separate the different expression by some whitespace e g space or newline Sometimes only the axioms which mention a certain concept role individual shall be selected For example suppose you are looking for all individual specific axioms which mention a certain individual Or suppose you are looking for all class axioms referring to a certain class The current selected objects concepts roles individual can be exploited for this purpose This is what the button Select Axioms using c i r does E g suppose you are interested in the SubClass axioms which mention the concept cat First ensure that cat is a current selected concept This can be achieved for example with the help of the Concepts or Taxonomy tab First press the button Clear Sel Concepts and Clear Sel Roles as well Then select the cat concept it becomes the current concept Switch back to the Axioms tab Deselect all axiom types in the axiom type selector and select only the SubClassAxiom type Next push the button Select Axioms using c i r
195. he standardized resource description format RDF Last but not least the system can also be used as a satisfiability tester for modal logics such as Km with axioms The RacerPro User s Guide is intended for different audiences i e students of computer science who participate in research efforts about semantic technologies or for developers of semantic web applications with interests in description logic reasoning interoperability of the RacerPro reasoner with current semantic web standards as well as APIs for programming semantic web applications Given the diversity of the semantic web research field this document is not intended as an in troductory first level source of information Some chapters might require additional background knowledge We suggest to follow the provided references in case some terms are new to the reader and encourage the reader to also use the virtually endless number of online resources provided by the semantic web community As a beginner you should probably start with the examples provided in Chapter 2 As a Prot g user there is also excellent material available from the project s web site You might also want to follow the Prot g examples explained in Section 2 4 Before you try to run any of the examples explained in this document please make sure that your RacerPro system is properly installed and the server is running For more information about the available software editions and various licenses plea
196. her cases Racer syntax is expected If the extension of your input file does not have an appropriate extension you can specify the syntax with the options owl dig owllink rdfs instead of f e With o filename RacerPro can be instructed to write output to filename rather than to the console e Use the option q filename to specify a file with queries extension racer only e p lt port number gt specifies the port for TCP connections e g for LRacer and JRacer see above e http lt port number gt specifies the port for HTTP connections e g for the DIG interface see above e socket retries n specifies the number of retries that RacerPro uses for starting com munication sockets if they are still in use e httplogdir directory specifies the logging directory see above e nohttpconsolelog disables console logging for HTTP connections see above e ef lt external format gt defines the external format the RacerPro server uses for socket communication e g utf8 is a possible value 36 CHAPTER 2 USING RACERPRO AND ITS INTERFACES fef lt external format gt defines the external format the RacerPro server uses for file input e g Qutf8 is a possible value With the option profile lt profile name gt the protocol for HTTP communication is spec ified use e g owllink for using the OWLlink protocol You can use owllink input syntax sexpr or owllink input syntax functional to
197. here is another issue If argument query bodies of a UNION reference different variables then nRQL will ensure that each argument references the same variables even if the arguments have identical arities For example the query 4 1 THE NRQL LANGUAGE 111 retrieve x y union x woman y man will be rewritten into retrieve x y union and x woman y top and x top y man The variable names matter since each differently named variable creates a new axis in an n dimensional tuple space The result of the previous query will be CCCoX EVE Y DORIS EVE Y CHARLES EVE Y BETTY EVE Y ALICE DORIS Y EVE DORIS Y CHARLES DORIS Y BETTY DORIS Y ALICE BETTY Y DORIS BETTY Y EVE BETTY Y CHARLES BETTY Y ALICE ALICE Y DORIS ALICE Y EVE ALICE Y CHARLES ALICE Y BETTY As expected this is simply the union of the two component queries gt retrieve x y and x woman y top CC X EVE Y DORIS Y BETTY ALICE Y BETTY EVE Y DORIS BETTY Y DORIS ALICE Y DORIS EVE Y CHARLES DORIS Y CHARLES BETTY Y CHARLES ALICE Y CHARLES DORIS Y EVE
198. hich is internal part of the RacerPro server The main features of this engine are Cost based heuristic optimizer A facility to define queries A simple rule mechanism In the following we only speak of queries most described func tionality also applies to rules Queries and rules are maintained as objects within the engine Thus the engine offers life cycle management for queries etc Multi processing of queries More than one query can be answered simultaneously concur rently Support for different querying modes Set at a time mode In this mode the answer to a query is delivered in one big bunch as a set The nRQL API works in a synchronous fashion in this mode which means that the API is blocked not available until the current answer has been computed and is returned to the client Tuple at a time mode In this mode the answer to a query is computed and retrieved incrementally tuple by tuple The API then works in a asynchronous fashion A client can request additional tuples of a query answer one by one True multiprocessing of queries is available in this mode since the API is not blocked if a query is submitted to the nRQL engine 84 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL This mode works either lazy computing the next tuple only on demand or eager pre computing next tuple s in the background even though they have not been requested by the client yet The lazy mod
199. ibImlib so 1 9 14 user lib libImlib so 2 4 Other Graphical Client Interfaces In this section we present open source Java based graphical client interfaces for the RacerPro Server First we will give a short presentation of the Prot g system with RacerPro as a backend reasoner and then the coordinated use of Prot g and RacerPorter is sketched 2 4 1 Prot g Prot g may be used as another graphical interface for RacerPro Prot g is available from http protege stanford edu and can be used to graphically construct T boxes or ontologies and A boxes This section describes the use of RacerPro with version 4 2 of Prot g Thus from here on when referring to Prot g we refer specifically to Prot g 4 2 The first time you enter Prot g you have to install the RacerProTG Reasoner in order to use RacerPro as the reasoner for Prot g In order to install the plugin use the Check for plugins option in the File menu then select RacerProTG Reasoner see Figure 2 29 and install it The next time you start Prot g you are allowed to choose RacerPro as a reasoner to do this use the Reasoner menu to select RacerPro and click on Start Reasoner The plug in offers way to configure the connection to RacerPro to do so go to the Preferences dialog window from the File menu and choose the tab of RacerPro As can be seen in Figure 2 30 the plug in allows to set the pre
200. ich an individual stands a member of the set of objects described by a specified concept The individual is then called an instance of the concept e Instance retrieval w r t an A box and a T box Find all individuals from an A box such that the objects they stand for can be proven to be a member of a set of objects described by a certain query concept e Retrieval of tuples of individuals instances that satisfy certain conditions w r t an A box and a T box e Computation of the direct types of an individual w r t an A box and a T box Find the most specific concept names from a T box of which a given individual is an instance e Computation of the fillers of a role with reference to an individual w r t an A box and a T box e Check if certain concrete domain constraints are entailed by an A box and a T box e Computation of the least concept description of an individual defined in an A box A service which is also called most specific concept MSC k where k defines a nesting level of existential restrictions RacerPro provides another semantically well defined query language nRQL new Racer Query Language which also supports negation as failure numeric constraints w r t attribute values of different individuals substring properties between string attributes etc In order to support special OWL features such as annotation and datatype properties special OWL querying facilities have been incorporated into nRQL RacerPro suppor
201. ich you copy the file jracer jar in testi you should already find the directories src and bin After returning to Eclipse you refresh the display to show the lib directory see Figure 2 10 Then select jracer jar in the lib subdirectory do a right click and add the file to the project s build path menu item Add to Build Path see Figure 2 11 With a right click on the src directory create a new package test see Figures 2 12 and 2 13 Then right clicking on the package test you create a new file with name Test java Figure 2 14 Double click this file and copy the code of the example into the window see Figure 2 15 If necessary change the value of the variable filename according to your installation Then start RacerPro for instance using RacerPorter such that RacerPro runs on the local host and provides its services using port 8088 the default see Figures 2 16 and 2 17 If RacerPorter is connected to RacerPro press the button Disconnect see Figure 2 16 in order to allow you 22 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Java Eclipse Users rm Documents workspace racer users guide ral Quick Access e Create a Java Project Gi D E Tasklist 52 D Create a Java project in the workspace or in an external location d fs e x el mere fi 332 rare f Use default location Location Users rm Documents workspace racer users guide test1
202. ienced and Directions Workshop Chantilly Virginia October 2009 volume 529 of CEUR Workshop Proceedings 2009 A Pease and I Niles IEEE Standard Upper Ontology A progress report Knowledge Engineering Review Special Issue on Ontologies and Agents 17 65 70 2002 http www ontologyportal org Evren Sirin From wine to water Optimizing description logic reasoning for nominals In In Proceedings of KR 2006 2006 9099 pages 90 99 2006 R Van Der Straeten Inconsistency Management in Model Driven Engineering An Approach using Description Logics PhD thesis Vrije Universiteit Brussel 2005 Sudoku in OWL http www mindswap org aditkal sudoku D Tsarkov I Horrocks and P F Patel Schneider Optimizing terminological reasoning for expressive description logics J of Automated Reasoning 39 3 277 316 2007 A Y Turhan On the Computation of Common Subsumers in Description Logics PhD thesis TU Dresden Institute for Theoretical Computer Science 2008 M Wessel Solving Sudoku problems using Abox reasoning http www sts tu harburg de people mi wessel papers sudoku racer M Wessel Flexible und konfigurierbare Software Architekturen f r datenintensive ontolo giebasierte Informationssysteme PhD thesis Hamburg University of Technology 2008 ISBN 978 3 8325 2162 2 M Wessel M Luther and R M ller What happened to bob semantic data mining of context histories In Proc of the 2009 International Worksh
203. ierarchy ABox Graph Query i Queries Rules Def Queries Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http a com ontology TBox t filev C Program 20Files RacerPro 20 Preview examples swri fami ABox a file C Program s20Files RacerPro 20 Preview examples swrl fami Concept c 0 Role r Individual i Axiom ax Request prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology y hasChild h prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontologysy hasSibling 7 not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology y hasSibling not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology amp y hasParent 7 not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology amp y hasParent 7 not accurate ready to run NO prepare abox rule and http a com ontology x Person http a com ontologysx http a com ontology y hasSibling 7 not accurate ready to run NO prepare abox rule and http a com ontology amp y Person http a com ontologysty http a com ontologys amp z
204. illers of these annotation properties are plain strings these told values can be retrieved with nRQL nRQL can be used to retrieve the fillers of annotation properties OWL annotation datatype or object properties are handled in a similar way as told values of concrete domain objects see above Consider the following OWL KB snippet in which two annotation properties annot1 and annot2 are declared header information etc excluded as well as some instances lt owl DatatypeProperty rdf ID annoti gt lt rdfs range rdf resource http www w3 org 2001 XMLSchema string gt lt rdf type rdf resource http www w3 org 2002 07 owl AnnotationProperty gt lt owl DatatypeProperty gt lt owl ObjectProperty rdf ID annot2 gt lt rdf type rdf resource http www w3 org 2002 07 owl AnnotationProperty gt lt owl ObjectProperty gt c rdf ID i gt annot2 rdf resource j gt lt r rdf resource j gt lt r rdf resource k gt annoti rdf datatype http www w3 org 2001 XMLSchema string gt Annotation lt annot1 gt lt c gt Thus the three instances i j k of the class C are defined The annotation datatype property annot2 is defined for i with the value Annotation Moreover i and j are set into relation using annotation object property annot1 108 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL We can now retrieve the told values of these annotation properties as follows retrieve a
205. implementation of the semantic web rule language SWRL is provided with RacerPro 2 0 such that rules may be specified as part of an OWL document in SWRL syntax syntax restrictions apply see below see also below for a description of the semantics of rules The following services are provided for OWL ontologies and RDF data descriptions e Load ontologies specified in OWL 2 format An HTTP client for retrieving ontology resources from the web is integrated Multiple resources can be imported into one ontology e Check the consistency of an OWL ontology and a set of data descriptions e Find implicit subclass relationships induced by the axioms of the ontology e Find synonyms for properties roles classes concepts or instances individuals e Query extensional information collected from OWL RDF documents OWL instances and their interrelationships using a SPARQL query processing system or for more expressive queries using the Racer specific query language nRQL e Incremental query answering for information retrieval tasks retrieve the next n results of a query With this feature RacerPro supports the adaptive use of computational resource Answers which require few computational resources are delivered first and user applications can decide whether computing all answers is worth the effort e Support for specific locales and external formats e g for Asian character sets 1 2 2 RacerPro as a Knowledge Representation and Reasoning
206. in text to RDF OWL files and those in RacerPro syntax The editor offers a simple syntax sensitive support by displaying text in different colors and by indicating closing parenthesis At the bottom of the window status lines are displayed that are typical to Emacs They indicate a keystroke combination and give other feedback to user interaction in its first line The bottom line shows more general information the connected RacerPro server if actively connected is shown first As usual for Emacs like editors a modification indicator is shown next means buffer unmodified means buffer modified Then buffer related information follows to the right name of the edited file recognized syntax of the content XML for RDF OWL files Lisp for RacerPro files and Fundamental for all others as well as the path of the imported file Please notice that the editor is similar to Emacs and therefore not behaving like typical Windows based text processor For instance browsing through the text with the help of the window scroll bar may move the cursor too Also you can not select the text by holding down the shift key and move the cursor with the arrow keys Rather highlight the text by clicking and shift dragging the mouse over the interesting passages then right click the mouse to select if you want to copy or cut the text from the window Remember that the control key especially the control C keystroke combination has a differ
207. in the following example timenet retrieve overtake obji vw2 t1 t2 Now only bindings for the variable 0bj1 are returned C 0bji vwi ti 10 29 t2 41 60 obji vwi ti 10 29 t2 41 60 In a future version a forward chaining application of event rules will be supported so there is no need to repeatedly cycle through all known events using respective queries Racer Systems offers consulting for industrial partners who need event recognition w r t expressive background ontologies Appendix A Editions and Licenses 1 Editions Racer Systems provides several different editions of the Racer technology RacerPro RacerPro is a server for description logic OWL inference services With RacerPro you can implement industrial strength projects as well as doing research on knowledge basis and develop complex applications If you do not have a valid license you are allowed to use RacerPro but some restrictions apply RacerPorter The Porter to RacerPro aka RacerPorter is the graphical user client for Rac erPro RacerPorter uses the TCP IP network interface to connect to one or more RacerPro servers and helps you manage them You can load knowledge bases switch between different taxonomies inspect your instances visualize T Boxes and A Boxes manipulate the server and much more Rac erPorter is already included in the installer versions of RacerPro for Windows and Mac OS X and separately availa
208. in two phases e In phase one the so called cheap tuples will be returned e followed by the expensive tuples in phase two The cheap tuples can be delivered without using RacerPro s ABox retrieval functions These tuples are computed from nRQL s internal data structures and are computed as if nRQL were used in set nrql mode 1 or set nrql mode 2 Thus the tuples which are delivered in phase one of set nrql mode 4 are exactly the same as if nRQL were used in set nrql mode 1 The same applies to the relationship between set nrql mode 5 and set nrql mode 2 In phase two after the cheap tuples are exhausted nRQL will switch to the complete retrieval mode In this mode computation of tuples might take considerably longer These tuples are therefore called the expensive tuples The expensive tuples are computed using RacerPro s ABox retrieval functions 4 2 THE NRQL QUERY PROCESSING ENGINE 167 The Warning Token nRQL can be advised to deliver a so called phase two starts warning token before phase two starts informing the application or user that the next call to get next tuple will invoke RacerPro s expensive ABox retrieval functions and might thus eventually take longer However delivery of this warning token is optional Please refer to the Reference Manual for more details and inspect the following example session Completeness of Modes 4 and 5 Please note that like mode 3 modes 4 and 5 are complete The ove
209. inner init nil for a delicious dinner Imported ontologies are automatically loaded from the corresponding web server Make sure you are connected to the Internet or use the mirror functionality if you are offline mirror lt url speci gt lt another url or local filename gt Examples In LRacer or RacerMaster you have to quote the symbol dinner 5 6 EXPLANATION 201 mirror http www w3 org TR 2004 REC owl guide 20040210 wine rdf home users rm wine rdf mirror http www w3 org TR 2004 REC owl guide 20040210 wine rdf http localhost 8081 examples wine rdf Mirror statements might be placed in a RacerPro init file In RacerPorter you can abbreviate the display of OWL names with the check box Simplify Names 5 6 Explanation The development of ontologies that use highly expressive constructs is by no means a trivial task thus the implicit consequences that a newly added axiom might cause to other axioms in the ontology are not obvious For this reason an explanation facility is helpful to support the ontology engineer in understanding which axioms of the ontology both in the teminological i e T box part as well as in the assertional part i e A box part are causing incoherences RacerPro provides explanations for unsatisfiable concepts for subsumption relationships either unwanted or unexpected and for unsatisfiable A boxes An example for an unsatisfiable A box is shown in the followin
210. ioms and terminologies It pro vides a read eval print loop shell for interactively extending and querying one or more RacerPro servers or for inspecting for instance explanation results for certain inferences For the user s con venience a complete Emacs style text editor is provided to edit nRQL queries or miniLisp function definitions Query results bindings for variables can be interactively inspected and A boxes can interactively explored in the A box inspector showing told and inferred assertions 1 2 Different views on RacerPro 1 2 1 RacerPro as a Semantic Web Reasoning System and Information Repos itory The semantic web is aimed at providing new machine understandable web resources or by aug menting existing resources with machine understandable meta data An important aspect of fu ture systems exploiting these resources is the ability to process OWL documents OWL ontologies Ontologies may be taken off the shelf or may be extended for domain specific purposes domain specific ontologies extending core ontologies For doing this a reasoning system is required as part of the ontology editing system RacerPro can process OWL Lite OWL DL as well as OWL See http sourceforge net projects ontolisp 6 CHAPTER 1 INTRODUCTION 2 ontologies knowledge bases OWL ontologies are processed with approximations for individuals mentioned in class expressions User defined XML datatypes are not yet supported An
211. ions e g the big T boxes profile specifies a max depth whereas the small T boxes profile specifies unbounded depth etc The same distinction applies to the Big A boxes vs Small A boxes profiles w r t A box visualization options The Role Hierarchy tab This tab works analogous to the Taxonomy tab and should not require any further explanation Nodes in the graph represent synonym role names and edges direct role subsumption relationships Please note that different to the Taxonomy tab there is no Top and Bottom role Roles can be selected and deselected by clicking on the nodes Multi selection is supported and works as expected The A box Graph tab This tab is slightly more complicated than the Role Hierarchy tab and the Taxonomy tab since it allows to focus on roles as well as on individuals Thus focus options are present for roles as well as for individuals In the A box graph nodes represent individuals and edges represent told and or inferred logi cally entailed role assertions So an R labeled edge between node i and j represents a role assertion R i j or related i j R assertion in RacerPro syntax Individuals can be selected and deselected by clicking on the nodes Multi selection is supported and works as expected Edges cannot be selected although it would make sense in order to select roles this will be supported in a future version of RacerPort
212. ions for Linux Windows and Mac OS X are available for 2 990 00 Euro all other versions start at 9 990 00 Euro Desktop license A desktop license allows one user to run RacerPro on a single machine while all computation takes place on that local host Usage from an another machine via the network is prohibited This license is ideal for evaluation in a commercial environment as well as for an academic researcher who wants to have a non time limited license at hand RacerPorter is included in this license Available for 32bit versions of Windows Linux or Mac OS X No software maintenance is included or available for a Desktop license however bug fixes will be provided see Terms and Conditions below The license fee is 990 00 Euro a volume discount is available starting with five licenses when purchased with the same order Classroom license If you are are teacher or trainer you probably want to have your personal license for your daily business e g research preparation of courses and the like But you also have to have a license of RacerPro for each computer system used by the attendees of your seminars Hence you have demand for a classroom license which covers your personal Desktop License as well as up to 15 additional systems typically used only for attendees of lectures Available for 32bit versions of Windows Linux or Mac OS X A Classroom license also includes one year of software updates and upgrades see Terms a
213. iption to the channel i e the registration of the query can also be easily done using the JRacer interface as indicated with the following code fragment we assume RacerPro runs at node racer racer systems com on port 8088 public class Subscription public static void main String argv RacerServer racer new RacerServer www racer systems com 8088 String res try racer openConnection res racer send subscribe q 1 Book rm sts tu harburg de 8080 racer closeConnection System out println res F catch Exception e e printStackTrace The connection to the RacerPro server is represented with a client object of class RacerSocketClient The client object is used to send messages to the associated RacerPro server using the message send Control flow stops until RacerPro acknowledges the subscription 5 5 OWL INTERFACE 199 5 5 OWL Interface RacerPro can read RDF RDFS and OWL files see the function owl read file and friends described below Information in an RDF file is represented using an A box in such a way that usually triples are represented as related statements i e the subject of a triple is represented as an individual the property as a role and the object is also represented as an individual The property rdf type is treated in a special way Triples with property rdf type are represented as concept assertions RacerPro does not represent meta level knowledge in the theory bec
214. is answered The function abox consistent is not to be called if set nrql mode 1 is called see above The following sequence of statements provides for fastest execution times Reasoning is only com plete for ALE with simple GCIs and A boxes for which there exists a filler for every exists restriction offline phase full reset set nrql mode 1 enable optimized query processing set unique name assumption t time load data time prepare abox time prepare racer engine online phase retrieve Nevertheless it might be useful to use this mode for information retrieval problems see also Chapter 4 Chapter 4 The New RacerPro Query Language nRQL In this chapter of the user guide we will describe an expressive ABox query language for RacerPro called nRQL nRQL is an acronym for new Racer Query Language pronounce Nercle Previous versions have been called RQL in order to avoid confusion with an RDF query language we have changed the name nRQL can be used to e query RacerPro ABoxes e query RacerPro T Boxes query RDF documents query OWL documents Thus nRQL is e an expressive ABox query language for the very expressive DL ALCQHIr D e an RDF query language e an OWL query language nRQL allows for the formulation of conjunctive queries In nRQL query query variables are used which will be bound to those ABox individuals that satisfy the query Queries will make
215. is very likely that they are the result of modeling errors 1 2 DIFFERENT VIEWS ON RACERPRO 7 e Determine the parents and children of a concept w r t a T box The parents of a concept are the most specific concept names mentioned in a T box which subsume the concept The children of a concept are the most general concept names mentioned in a T box that the concept subsumes Considering all concept names in a T box the parent or children relation defines a graph structure which is often referred to as taxonomy Note that some authors use the name taxonomy as a synonym for ontology e Determine the least common subsumer LCS of a set of concepts w r t a T box The LCS is the most specific concept that subsumes a set of concepts in other words the concept description that represents the properties that all the elements of the set have in common Note that whenever a concept is needed as an argument for a query not only predefined names are possible instead concept expressions allow for adaptive formulation of queries that have not been anticipated at system construction time If also an A box is given among others the following types of queries are possible e Check the consistency of an A box w r t a T box Are the restrictions given in an A box w r t a T box too strong i e do they contradict each other Other queries are only possible w r t consistent A boxes e Instance testing w r t an A box and a T box Is the object for wh
216. ith fever For the reals RacerPro supports linear equations and inequations Thus we could add the following statement to the knowledge base in order to make sure the relations between the two attributes temperature fahrenheit and temperature celsius is properly represented implies top temperature fahrenheit 1 8 temperature celsius 32 If a concept seriously ill human 1 is defined as equivalent seriously ill human 1 and human gt temperature fahrenheit 107 6 68 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES RacerPro recognizes the subsumption relationship with human with fever and the synonym rela tionship with seriously ill human In an A box it is possible to set up constraints between individuals This is illustrated with the following extended A box signature atomic concepts teenager roles Gons attributes individuals eve doris 0bjects temp eve temp doris constrained eve temp eve temperature fahrenheit constrained doris temp doris temperature celsius constraints 7 temp eve 102 56 temp doris 39 5 For instance this states that eve is related via the attribute temperature fahrenheit to the object temp eve The initial constraint temp eve 102 56 specifies that the object temp eve is equal to 102 56 Now asking for the direct types of eve and doris reveals that both individuals are instances of human with fever In the following A box there is an inc
217. l sets of answer tuples are com pared and not the resulting answer sets which are returned to the user The tuples of the internal answer set of the body and x person y top are also typed in this case the type is lt person top gt This means the first element of each tuple has type person and the second element has type top since the object vector is lt x y gt For the query body and y person x top the object vector is also lt x y gt Thus the internal result tuples have type lt top person gt Given this example it is obvious that these internal tuple sets are not in a subset relationship to one another or even equal Thus there holds no query entailment subsumption relationship between the two queries The situation is even more complex when checking for entailment of two queries having different object vectors In this case the variables from the second query which is assumed to be the more general one are renamed in order to match the names in the vector of the first query the more specific one However individuals are never renamed Given the first query and the variable renamed second query then a query and query neg query2 is constructed and checked for consistency with the query consistency checker If this query is inconsistent then query1 entails query2 174 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Renaming of variables is done according to the positions of the variables in t
218. le form Note however that all examples can be processed in a similar way with XML based interfaces provided by RacerPro 2 1 Sample Session There are various ways to interact with RacerPro through GUIs such as RacerPorter and Prot g through the command line interface shell or by storing a set of commands in a batch file In this section we will show first how to use RacerPro in combination with the RacerPorter interface and afterwards with how to interact with the command line Before starting the sample session localize the files containing the knowledge base that we will be using These files are the family racer which contains the T box and A box parts and the family queries racer which contains queries Both files can be found in the folder named examples native of the RacerPro distribution The following code is found in the file family racer 333 initialize the knowledge base 333 with a T box name family and an A box name smith family in knowledge base family smith family Supply the signature for this knowledge base signature atomic concepts person human female male woman man parent mother father grandmother aunt uncle sister brother roles has child parent has descendant has descendant transitive t has sibling has sister parent has sibling has brother parent has sibling has gender feature t individuals alice betty charles doris eve Domain amp range restricti
219. lex 4 2 10 The nRQL Persistency Facility Internally nRQL maintains a so called substrate data structure for each RacerPro ABox which has been queried This ABox associated substrate data structure contains index structures and other auxiliaries needed for query answering Computation of these index structures is triggered on demand if needed The first time a query is posed to a certain ABox which has not seen a nRQL query before nRQL creates a corresponding substrate for the ABox as well as all its index structures Thus answering the first query to an ABox takes considerably longer than subsequent queries to the same ABox In order to avoid recomputation of these index structures it is possible to dump store the complete substrate data structure into a file The API functions store substrate for abox and store substrate for current abox do this for you You can also dump all sub strates store all substrates Restoring substrates is easy as well restore substrate restore all substrates Please consult the Reference Manual for more details on these API functions Dumping a substrate will always automatical dump the associated ABox and TBox as well Moreover there can be defined queries see Section 4 1 4 defined for the corresponding TBox as well as an Query Repository see Section 4 2 8 associated with this substrate The queries in the QBox serve as an additional cache All this information is automatically included in the
220. lex Queries So far we have introduced the and union neg and inv query constructors for complex query bodies Thus nRQL allows for the orthogonal composition of arbitrarily boolean query bodies For processing purposes nRQL will bring these boolean query bodies into Negation Normal form NNF In an NNF query the NEG operator appears only in front of query atoms The semantics of the original query is preserved by this transformation Moreover the queries are then brought into Disjunctive Normal Form DNF for optimization purposes This transformation might result in an exponential blowup in query size We would like to inform the user of this potential performance pitfall 4 1 THE NRQL LANGUAGE 119 PROJECT TO The Projection Operator for Query Bodies Consider the query retrieve x and x x y r y d on the ABox instance a c instance b d instance c top related a b r which gives us the expected answer A During the evaluation of the body and x c x y r y 2D bindings for x and y are computed Internally nRQL computes an answer set for this conjunctive query body which is simply a list set of pairs listing bindings for x and y in this example the internal answer set is CA B The final answer X A is then computed by projecting the tuples to the variables mentioned in the head in this case to x Thus the pairs are projected to their first co
221. link httpxml binding for an HTTP based communication protocol RacerPro implements OWLlink directly and does not need an adapter as others reasoners see http owllink owlapi sourceforge net for a more detailed introduction RacerPro protocol owllink Instructs RacerPro to use the OWLlink protocol using the default HTTP port 8088 The default OWLlink syntax is XML In order to use the functional syntax start RacerPro as follows RacerPro protocol owllink owllink input syntax functional You can also use RacerPro protocol owllink owllink input syntax sexpr if you prefer the sexpr syntax The option owllink output syntax with the obvious semantics is also available 2 2 3 Options for RacerPro Server Various options allow you to control the behavior of RacerPro Under Windows we have to distin guish between RacerPro options and window manager options see below Under Windows you have to use the separator before specifying options even if there are no window manager options used e Use the option h to get the list of possible options and a short explanation Use this option in combination with the window manager option p see below e As indicated above the options f filename can be used for reading knowledge bases from a file The extension of filename is used to discriminate the syntax to be used possible extensions for corresponding syntaxes are racer owl owllink rdfs rdfs In all ot
222. ll be reactivated as soon as the request has been satisfied and the answer is available However RacerPorter is still alive and you can indeed continue working you can either connect to another RacerPro server using a different profile continue editing with RacerEditor or switch to the Log tab to see what s going on etc If you haven t changed the active profile RacerPorter automatically switches back to the original tab when then result is available If you have continued working with a different profile RacerPorter notifies you that the background request issued by the other sessions has now returned a result and asks whether it should switch back to the original session profile and tab to inspect the result The shell offers automatic pretty printing and reindentation of user input However if the Don t modify user input is enabled in the the active profile see profile editor then user input is not pretty printed since users might feel as being patronized By default pretty printing of user input is disabled The current communication with RacerPro is also visualized in the request and response status fields appropriate colors are used to visualize the different stages of such a communication first 50 CHAPTER 2 USING RACERPRO AND ITS INTERFACES the request is send then RacerPro is busy then the result is received over the socket finally the result is parsed etc note that errors can occur at any time in such a processi
223. ll this function offline to save computational resources at query answering time In addition you can call prepare racer engine to compute index structures for query answering Again this function is to be used offline to save computational resource for answering the first query e If multiple queries are to be answered and each query will probably be more specific than previous ones use the directive enable subsumption based query processing The T box is then classified once the first query is answered e If you use nRQL it is possible to instruct RacerPro to use less costly algorithms for query answering see also Chapter 4 This can be done by calling set nrql mode 1 In this case query answering is complete only for hierarchies T boxes with very sim ple axioms If for every exists restrictions declared in the T box there exists an explicit filler declared in the A box you can instruct RacerPro to speedup query answering even more by calling enable optimized query answering Note that it is necessary that you call Cenable optimized query answering before you read the OWL files comprising the knowledge base e The function abox consistent can be explicitly called Before the first instance retrieval query is answered the A box in question is checked for consistency You might want to call this 80 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES function offline to save computational resource when the first query
224. lue satisfies predicate http www owl ontologies com unnamed owl al X DTP VALUE 35 Y http www owl ontologies com unnamed owl c Y DTP VALUE 35 X http www owl ontologies com unnamed owlitc X DTP VALUE 35 Y http www owl ontologies com unnamed owl al Y DTP VALUE 35 gt retrieve x x dtp value y y dtp value and x x dtp value owl datatype role http www owl ontologies com unnamed owl name y 7 y dtp value owl datatype role lhttp www owl ontologies com unnamed owl name x dtp value y dtp value satisfies predicate string lt http www owl ontologies com unnamed owl b X DTP VALUE betty Y http www owl ontologies com unnamed owl c Y DTP VALUE michael http www owl ontologies com unnamed owl a X DTP VALUE betty Y http www owl ontologies com unnamed owl c Y DTP VALUE michael gt retrieve x x dtp value and x x dtp value owl datatype role http www owl ontologies com unnamed owl name x dtp value predicate search ael http www owl ontologies com unnamed owl c X DTP VALUE michael An interesting feature of the mirror data substrate is that variables such as x dtp value can now be bound to told values of OWL datatype or annotation fillers This is due to the fact that the told values are accessible as
225. ly firerule and x a x b instance x and a b However in the other direction if an ABox concept assertion such as instance i and a b is encountered then also instance i a and instance i b will be added in order to achieve a minimal degree of completeness Thus retrieve x x a and retrieve x x b will succeed Regarding the relational structure of the ABox which is spawned by the role assertions nRQL is only complete in this mode if there are no at most number restrictions present in the Abox and if there are no features used Thus nRQL will be complete up to the description logic ACCHT p concerning the relational structure of the ABox even in this incomplete mode This means the effects of role hierarchies transitively closed roles and inverse roles are completely captured If you consider to query a plain relational structure and you don t need a TBox with labeled nodes for example a big graph representing a public transportation network with a few 10 000 nodes or the like then this is the nRQL setting you will need and which is complete enough for your application You could also use the data substrate if neither transitively closed roles and role hierarchies etc are needed 4 2 THE NRQL QUERY PROCESSING ENGINE 165 In order to enable this mode enter set nrql mode 0 2 Told information querying plus exploited TBox information for concept names Mode 1 This is like the p
226. me domain individual in all models of the KB Sometimes one also wants to know which pairs of ABox individuals must not necessarily be mapped to the same domain individual gt retrieve x y neg x y nrql equal role I K X I Y J X K Y DD X J Y 105 Note that Y J J Y K is missing and that gt retrieve x y neg x y nrql equal role I Y X I Y Y D X J Y DD necessarily produces the same answer Currently it is not possible to use the negated NRQL EQUAL ROLE y not nrgl equal role will raise an error Querying OWL KBs RDF Data with Role Query Atoms In the OWL realm so called object properties are the equivalent of roles Consider the following OWL document rdf RDF xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns xsd http www w3 org 2001 XMLSchema xmlns rdfs http www w3 org 2000 01 rdf schema 4 1 THE NRQL LANGUAGE 93 xmlns owl http www w3 org 2002 07 owl xmlns http www owl ontologies com unnamed owl xml base http www owl ontologies com unnamed owl gt lt owl Ontology rdf about gt lt owl Class rdf ID person gt lt owl ObjectProperty rdf ID hasChild gt lt rdfs domain rdf resource person gt lt rdfs range rdf resource person gt lt owl ObjectProperty gt person rdf ID margrit gt lt hasChild gt lt perso
227. mily queries racer concept ancestors mother concept descendants man all transitive roles individual individual individual individual instance doris woman types eve fillers alice has descendant direct types eve concept instances sister 2 1 SAMPLE SESSION 13 Aug rae UN Profiles Shell TBoxes ABoxes Concepts Roles Individuals Assertions Axioms Taxonomy Role Hierarchy ABox Graph Query 10 Queries Rules Def Queries gt Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n NIL TBox t default ABox a default Concept c 0 Role r 0 Individual i 0 Axiom ax 0 Request M i gebmamespacepref es Response Classic Layout lt lt 414 gt Detetean Recover FulReset 7 Simpify Arg Comp RacerPro is processing Mali Abort Request Profile Name Defau Comm Status Server C Host Port Version Auto Conn Unsafe preserve 127 0 0 1 8088 2 0 NOT CONNECTED UNKNOWN localhost 8088 UNKNOWN YES 3 Localhost Small TBoxes Big ABoxes NO NOT CONNECTED UNKNOWN localhost 8088 UNKNOWN YES UNKNOWN 4 Localhost Small TBoxes Small ABoxes NO NOT CONNECTED UNKNOWN localhost 8088 UNKNOWN YES UNKNOWN Show Manual EdiProfie Copy Profile Delete Profile Editor Open in Editor License Details Disconnect Start RacerPro Shut
228. mized reasoning algorithms for nominals will only be part of a future version of RacerPro Using nominals might be even tricky Consider the following knowledge base equivalent shabby car all has color shabby color equivalent redish object some has color one of orange red instance car 1 and redish object not some has color one of orange instance car 2 and redish object not some has color one of orange Now assume some information of the color of car 1 is available car 1 is an old car instance car 1 all has color shabby color It is obvious that due to the use of nominals car 2 is a shabby car as well T his is probably unintended and is most likely a modeling error 3 8 HINTS ON MODELING AND REASONING WITH RACERPRO 77 3 8 3 Open World Assumption As other description logic systems RacerPro employs the Open World Assumption OWA for reasoning This means that what cannot be proven to be true is not believed to be false Given the T box and A box of the family example see the previous chapters a standard pitfall would be to think that RacerPro is wrong considering its answer to the following query individual instance alice at most 2 has child RacerPro answers NIL However NIL does not mean NO but just cannot be proven w r t the information given to RacerPro Absence of information w r t a third child is not interpreted as there is none this would be the Closed World Assumpti
229. mponents which specify the bindings for x since the head of the example query is x moreover head projection operators etc are applied The projection to the variables mentioned in the head is usually the last step in the query processing chain However for some queries it is required that a projection operation is applied somewhere in between in the processing chain Suppose you want to retrieve the C instances which do not have known R successors which are instances of D Thus you want to get the complement of previous query answer we want to find a query which returns X B X C In a first attempt we try retrieve x neg and x c x y which is equivalent to retrieve x union and neg x c top y neg x y r and neg y d top x please refer to the section on UNION However in this query a projection to x will be applied to the complement of the set A B which is the set B A B C C A C B A C note that the pairs B B A A and C C are missing since x are injective variables The projection to x then gives us X X 0D which is not what we want The problem here is that the complement operator NEG has been applied to a two dimensional set which again naturally yields a two dimensional set and then the projection is applied The solution to the retrieval problem is to apply the complement operator NEG after the p
230. ms Taxonomy Role Hierarchy Graph Query 10 Queries Rules Def Queries Log About Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n http a com ontology TBox t filev C Program 20Files RacerPro 20 Preview examples swri fami ABox a filev C Program 20Files RacerPro 20 Preview examples swri fami Concept c 0 Role r 0 Individual i 0 Axiom ax 0 Request 130 alkconceptassertions forndividual httpilacom ontolog Response MROCACHEMT OO Classic Layout 46145 gt Delete an Recover FunReset 7 Simpify Arg Comp MARY hasParent P SuE hasBrother P amp JOHN SUE hasBrother We JOHN Labes V Auto Update F Show Top Role Oniy Sel Succs F Trans Roles Data Filers Request Graph Display Graph ResetGraph PrntGraph Allinds Cur Sel nds AlRoles Cur Role Sel Roles Hor Ver UNBOUNDE v Search amp Select F SelFrst Clear Sel Inds ClearSel Roles Descr ind DirectTypes AnTypes Delete Selected Info 18 abox consistent file C Program 26Files RacerPro 26 Preview examples swrl family surl owl 19 gt t Figure 3 7 A box Graph of RacerPorter before applying the un
231. n 3 ANT EC define primitive role RN range D T E V RN D RacerPro Syntax DL notation define primitive role RN domain C 3 RN T EC define primitive role RN range D T E RN D implies role RN RN RN C implies role RN RN4 RNn41 RN o o RN C RN Figure 3 5 Domain or range restrictions and role axioms expressed via GCIs RacerPro offers the declaration of domain and range restrictions for roles These restrictions for primitive roles can be either expressed with GCIs see the examples in Figure 3 5 cf 13 or declared via the keywords domain and range For role axioms the standard acyclicity condition applies 40 Other role axiom declaration forms are e symmetric RN e asymmetric RN e transitive RN e reflexive RN e irreflexive RN e functional RN e inverse RN RNo 3 5 Concrete Domains RacerPro supports reasoning over natural numbers N integers Z reals R complex numbers C and strings For different sets different kinds of predicates are supported N linear inequations with order constraints and integer coefficients Z interval constraints R linear inequations with order constraints and rational coefficients Strings equality and inequality 3 5 CONCRETE DOMAINS 67 For the users convenience rational coefficients can be specified in floating point notation They are automatically transformed into their rational equivalents e g 0 75 is transformed i
232. n be reused resp referenced and its body inserted with the substitute keyword retrieve a b substitute mother of a b or using an alternative syntax retrieve a b a b mother of Given the definition of the mother of query both queries simply expand into retrieve a b and a woman a b has child In the expression substitute mother of a b the parameters a b are called the actual parameters The number of actual parameters must always match the number of formal parameters in the referenced definition i e in the definition defquery mother of x y Note that the formal parameters x y in the definition of mother of have been renamed to match the actual parameters a b Thus the result is 4 1 THE NRQL LANGUAGE 121 ALICE B CHARLES A ALICE B BETTY BETTY EVE A BETTY B DORIS If one is not interested in the bindings of a certain formal parameter then one can simple use NIL as an actual parameter as well Thus the bindings of the corresponding variable in the definition are ignored retrieve mother substitute mother of mother NIL or using the alternative syntax retrieve mother mother NIL mother of RacerPro replies ALICE MOTHER BETTY A defined query can be used at any position where a query body is accepted For example you can NAF negate a defined query retrieve 7a b neg
233. n proved useful to really find interesting object classifications as well as interesting events for making decisions In the industrial context RacerPro was used for driver assistance 50 e g knowledge based intersection assistance 49 and visual information fusion 22 Event recognition was also explored in the BOEMIE project 54 15 17 as well as in the Con textWatcher project 66 65 In the former approach RacerPro was extended with CLP R like techniques for dealing with quantitative information where in the latter approach the expressivity of nRQL is explored for qualitative event recognition Another very interesting approach in this context is the use of nRQL as a target language for compiling linear temporal logic LTL event descriptions and using assertional reasoning provided by RacerPro for solving the actual event recognition problem 2 Stream based processing of data descriptions based on incremental interpretation using abduction operators based on decription logics and logic programming was investigated with RacerPro in the CASAM project for multimedia annotation see http www casam project eu 10 CHAPTER 1 INTRODUCTION Chapter 2 Using RacerPro and its Interfaces In this section we present a first example for the use of RacerPro We use the so called KRSS based interface rather than the XML or OWL RDF interface in order to directly present the declaration and results of queries in a brief and human readab
234. n rdf ID michael gt lt hasChild gt lt person gt lt rdf RDF gt In this KB the individual http www owl ontologies com unnamed owl michael is the filler of the http www owl ontologies com unnamed owl hasChild object property of the individual http www owl ontologies com unnamed owl margrit Object properties are mapped to roles thus simple role query atoms such as retrieve x x http www owl ontologies com unnamed owl haschild will work for object properties http www owl ontologies com unnamed owl margrit http www owl ontologies com unnamed owl michael Note that nRQL also provides facilities to query for the fillers of OWL annotation and OWL datatype properties see below Explicit and Implicit Role Fillers Since nRQL uses the active domain semantics you can only retrieve those role fillers which are explicitly modeled as individuals in the ABox Suppose that the concept mother is defined as follows define concept mother and woman some has child person and that there is the following ABox instance jenny mother instance susan mother related susan peter has child Thus both susan and jenny are known to be mothers As such this implies that both must have in every model of the KB an individual as a filler of the has child role since mother implies some has child person However if you use 94 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL
235. na Italy pages 29 44 Springer Verlag 2001 V Haarslev R M ller and M Wessel The description logic ALCNHR extended with concrete domains A practically motivated approach In R Gor A Leitsch and T Nipkow editors International Joint Conference on Automated Reasoning IJCAR 2001 June 18 23 Siena Italy pages 29 44 Springer Verlag 2001 V Haarslev M ller and M Wessel The description logic ALCNH p extended with concrete domains A practically motivated approach In R Gor A Leitsch and T Nipkow editors Automated Reasoning First International Joint Conference IJCAR 01 Siena Italy June 18 28 2001 Proceedings volume 2083 of Lecture Notes in Artificial Intelligence pages 29 44 Berlin 2001 Springer Verlag V Haarslev R Moller and M Wessel Querying the semantic web with Racer nRQL In Proceedings of the K1 2004 International Workshop on Applications of Description Logics ADL 04 Ulm Germany September 24 2004 V Haarslev R Moller and M Wessel Description logic inference technology Lessons learned in the trenches In I Horrocks U Sattler and F Wolter editors Proc International Workshop on Description Logics 2005 B Hollunder and F Baader Qualifying number restrictions in concept languages In Proc of the 2nd Int Conf on the Principles of Knowledge Representation and Reasoning KR 91 pages 335 346 1991 M Horridge and S Bechhofer The OWL API A Java A
236. names and an edge between two nodes represents a direct subsumer of relationship Also assume that the following laws hold 1 Assume that each node x has a name The name of the node is the name of the equivalence class 2 However the name of this node might be any element from the equivalence class 2 For each node x representing an equivalence class r and each member z x in this equiv alence class assume that the predicate x holds thus x x is true Since z r also x x holds 3 The edges in this taxonomy representing the direct subsumer of relationship are labeled with has_child that is has_child x y holds iff x is a direct subsumer of y 4 Let has parent be the inverse relationship of has child and has descendant be the transitive closure of has_child Let has_ancestor be the inverse relationship of has descendant Obviously such a relational structure can also be seen as an ABox A has_child x y edge is represented with a role membership axiom related x y has child and for each the concept membership axiom instance x x is added and if y is in concept synonyms x then also instance x y is added for all such y But please note that the name of the node x might be any element from the equivalence class of z We will call this ABox which is constructed according to the four laws the taxonomy ABox Note that his taxonomy ABox is not a real ABox It is obvious that we can now query this very spe
237. ncept CN C Concept definitions state the equality between a concept name and a concept term DL notation CN C RacerPro syntax define concept CN Concept axioms may be cyclic in RacerPro There may also be forward references to concepts which will be introduced with define concept or define primitive concept in subsequent axioms The terminology of a RacerPro T box may also contain several axioms for a single concept So if a second axiom about the same concept is given it is added and does not overwrite the first axiom 3 4 Role Axioms In contrast to concept axioms role declarations are unique in RacerPro There exists just one declaration per role name in a knowledge base If a second declaration for a role is given an error is signaled If no signature is specified undeclared roles are assumed to be neither a feature nor a transitive role and they do not have any superroles The set of all roles R includes the set of features F and the set of transitive roles R The sets F and Rt are disjoint All roles in a T box may also be arranged in a role hierarchy The inverse of a role name RN can be either explicitly declared via the keyword inverse e g see the description of define primitive role or referred to as inv RN Features also called attributes restrict a role to be a functional role e g each individual can only have up to one filler for this role Transitive Roles are transitively closed roles If t
238. nces of not grandmother Since charles is the only individual for which membership in not grandmother can be proven see above X CHARLES is not in the answer set since a NAF negated atom and its non NAF negated variant are always complementary Negation as Failure for Role Query Atoms The neg operator can also be applied to role query atoms Again a role query atom and its NAF negated variant are complementary to one another Thus since retrieve x y x y has child yields the 5 tuples X BETTY Y DORIS X BETTY Y EVE X CHARLES Y EVE X ALICE Y BETTY C X ALICE Y CHARLES on family racer its NAF negated variant retrieve x y neg x y has child returns the remaining 15 tuples note that we have 5 individuals in the ABox thus there must be 5 4 20 pairs of individuals if injective variables are used X EVE Y BETTY X EVE Y DORIS C X EVE Y CHARLES C X EVE ALICE C X BETTY Y CHARLES 4 1 THE NRQL LANGUAGE 115 X BETTY ALICE X DORIS EVE X DORIS Y BETTY X DORIS Y CHARLES X DORIS Y ALICE X CHARLES Y BETTY X CHARLES Y DORIS X CHARLES Y ALICE X ALICE EVE X ALICE DORIS The query retrieve x y union x y neg x y R will always return the set of all pairs of individuals from an ABox minus the ones
239. ncing concept names Thus if the ABox contains for example instance betty OR woman mother Racer Pro will compute the equivalent concepts and concept ancestors of this concept OR woman mother from the TBox and add these to the ABox as well in this case instance betty woman and instance betty human etc But carefully For big ABoxes containing many different concept expressions this process might take a long time since each of this concept expressions must be classified into the TBox In order to enable this mode enter set nrql mode 2 4 Complete RacerPro ABox reasoning Mode 3 We don t need to discuss this mode since it is the default mode and has been discussed all the time in this manual In order to enable this mode enter set nrql mode 3 5 See below for an explanation of set nrql mode 4 and set nrql mode 5 6 If you use set nrql mode 6 then this mode behaves like set nrql mode 3 Thus mode 6 is a complete mode However mode 6 might be faster than mode 3 See below for an explanation Please note that the incomplete modes will only achieve a certain degree of completeness if you restrict yourself to concept query atoms which use only concept names instead of arbitrary concept expressions If you insist on using complex concepts in the concept query atoms of your nRQL queries then the complete nRQL modes will be needed An Example Demonstrating the Different nRQL Modes Please edit the original
240. nd Conditions below The 32 bit versions for Linux Windows and Mac OS X are available for 3 990 00 Euro Site license For environments where more desktops and or servers will be installed we offer the site licensing of RacerPro applications The licensing organization may use an arbitrary number of desktop or network servers in one building If the licensee controls more than one building one site license covers locations only within reasonable proximity to each other given that they are located in the same state country Available for 32bit versions of Windows Linux or Mac OS X for Sun and other branded UNIX workstations with 32bit or 64bit as well as 64bit Linux environments A Site license also includes one year of software updates and upgrades see Terms and Conditions below The 32 bit versions for Linux Windows and Mac OS X are available for 9 990 00 Euro all other versions start at 25 000 00 Euro RacerPro on other platforms RacerPro is available for a wide variety of platforms While the standard licensing schemes cover typical 32bit systems we provide individual licensing options for other 32bit systems and also for 64bit large scale computing environments Typically available for A 2 LICENSES 207 Sun Spare Solaris and AMD Opteron Linux systems Please contact us for more information about other supported platforms See above for prices for Network and Site Licenses for Sun and Linux A site license for RacerPr
241. nd convenient shell with shell history completion facility pretty printing and syntax coloring e An Emacs compatible editor with buffer evaluation mechanism Supports KRSS OWL 2 RDF OWL2 Functional SPARQL e The transmission of KBs or editor buffers to remote RacerPro servers e A box T box and role hierarchy visualization facilities e Advanced focus and update control mechanisms e A clipboard mechanism for information interchange and focus control e Multiple session multi connection awareness e g work with a different server while a taxonomy graph is computed in the background e n asynchronous multi threaded non blocking GUI 2 3 1 Distribution of GUI elements Each tab has a uniform organization which we believe makes the GUI consistent and comprehen sible With the exceptions of the Log tab and the About tab each tab has six areas Figure 2 27 shows the Taxonomy tab based on this tab let us describe the six areas 1 The tabs area It shows the available tabs Profiles Shell T boxes A boxes Concepts Roles Individuals Assertions Taxonomy Role Hierarchy A box Graph Query IO Queries Rules Def Queries Log and About tab 2 The status display There is a general notion of current selected objects employed in Rac erPorter e g current T box current A box current concept current individual and so on These current objects are shown in the corresponding fields in the st
242. nd queries and retrieve result sets incrementally from the server or with the push mode clients subscribe conjunctive queries and receive notifications about elements in the result set incrementally 27 1 2 DIFFERENT VIEWS ON RACERPRO 5 1 1 3 Interfaces RacerPro can be used as a server application in a network wide context see Section 2 2 In addition to raw TCP communication interfaces with APIs for Java JRacer OWLAPI Common Lisp LRacer and also C RacerPro supports the OWLlink communication interface 53 56 a successor of DIG 8 RacerPro supports various OWL 2 syntaxes namely RDF XML as well as OWL functional syntax See again Figure 1 1 for an overview of the RacerPro system architecture A standardized query language for RacerPro is SPARQL RacerPro also supports many extensions in a KRSS like syntax e g the nRQL query language publish subscribe interface etc RacerPro implements the OWLAPI 37 for Java and additionally a plugin for Prot g 4 is available 55 Ontologies can be read from files or can be retrieved from the web as well as from an RDF triple store managed by the built in AllegroGraph system version 3 from Franz Inc 1 AllegroGraph can be used to store materialized inferences and also provides for a powerful query language based on SPARQL syntax 1 AllegroGraph can store very large A boxes for which users need nRQL query answering The RacerPro inference server can be programmed in a func
243. ndmother However due to the open world semantics charles is the only individual for which this can be proven If we consider betty then someday betty may become a grandmother or she already is and we just do not have complete knowledge about her Currently it is just not known that betty is a grandmother So suppose we want to know which individuals are currently not known to be instances of grandmother This is were NAF comes into play To retrieve the individuals for which Racer Pro cannot prove that they are instances of grandmother we will use a NAF negated concept query atom as follows 114 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL retrieve x NEG x grandmother RacerPro replies X DORIS X EVE X CHARLES X BETTY Note that the NEG is placed around the entire atom and that the answer is complementary to the answer set returned by retrieve x x grandmother In general for any concept C the query retrieve x union x C neg x C will always return the set of all ABox individuals Moreover retrieve x x not C will always return a subset of retrieve x neg x C Things get tricky if NAF is used in combination with classic true negation Consider retrieve x neg x not grandmother which returns DORIS X EVE X BETTY X ALICE We have been asking for all individuals for which RacerPro cannot prove that they are in sta
244. necessary if you work with RacerPorter since the current RacerPorter T box as shown in the status display will always be supplied as an argument to all T box specific commands invoked by RacerPorter The A boxes tab This tab lists the available A boxes on the connected RacerPro server and provides some general information about each A box such as the name of the A box whether it is consistent and or realized which associated T box it has the number of individuals the utilized description logic the number of concept and role assertions etc The A boxes tab works analogous to the T boxes tab Note that RacerPro also has a current A box result of current abox The situation regarding the differences between the current RacerPorter A box shown in the status display and the current RacerPro A box is analogous to the T boxes tab see above Some A box specific commands can be invoked with command buttons The Concepts tab This tab lists the available concept names also called OWL classes atomic concepts in the current RacerPorter T box The concepts are sorted alphabetically The tab can show either all show only the defined show only the primitive or show only the unsatisfiable concepts in the T box Selected concepts are shown highlighted the concepts in the clipboard If the Sel First checkbox is turned on then the selected concepts are at the top of the list If Sel Only is on then o
245. ned that variables can only be bound to ABox individuals but never to concrete domain objects or even values from the concrete domain The same applies to fillers of OWL annotation and OWL datatype properties which are elements in the domain of a primitive XML Schema datatype e g xsd int Thus to retrieve concrete domain objects or these told values the head projection operators can be used With them we can retrieve the told value of the age concrete domain attribute of the individual alice Some Terminology from the Concrete Domain Let us explain some terminology first First we want to fix the age which is a concrete domain attribute of type cardinal of alice in family racer This can be achieved in a number of ways 1 The age of alice can be specified with a concept membership axiom such as instance alice age 80 in the ABox Note that age 80 is an ordinary concept expression 2 Alternatively a concrete domain object can be added to the ABox constrained alice alice age age The object alice age is a so called concrete domain object which is the f ler of the age concrete domain attribute of alice The admissible concrete domain values of this concrete domain object alice age can then be constrained by adding constraints alice age 80 In this case 80 is called a told concrete domain value This told value can be retrieved with a nRQL head projection operator If we just have instance alice age 80 in t
246. new ABox individual lt name gt Note that the rule with empty antecedence firerule instance new ind some concept yields ERROR PARSER ERROR OBJECT NEW IND NOT MENTIONED IN QUERY BODY Please use firerule instance new ind new ind some concept instead 4 1 THE NRQL LANGUAGE 127 Rules and the Concrete Domain As demonstrated rules can can among other things add new concept assertions as well as new role membership assertions to an ABox Rules can also be used to address the concrete domain part of a RacerPro ABox This means you can add constrained as well as constraints assertions with rules Moreover the syntax for the constraints which is inherited from the RacerPro API function constrained entailed p has been extended so that also head projection operators are valid as arguments Please consider the following examples gt full reset OKAY FULL RESET gt define concrete domain attribute age type cardinal AGE gt firerule instance new ind a an age INSTANCE A AN AGE gt firerule instance new ind b an age CINSTANCE AN AGE gt firerule and x an age y an age constrained x new ind age of x age constrained new ind age of age how many 1 CCCONSTRAINED B AGE OF B AGE CONSTRAINED A AGE OF A AGE gt firerule and a an age b an age constraints age b 30 age a C
247. ng chain The T boxes tab This tab lists the available T boxes on the RacerPro server specified by the active profile and provides some general information about each T box the name of the T box whether the T box is classified the number of role and concept names present in the T box whether the T box has cyclic definitions whether it has a so called Meta Constraint indicating that reasoning with the T box may be hard the employed description logic the number of roles and the names of the A boxes which reference this T box The current T box is highlighted in the list returned by current tbox and is shown between lt lt lt markers In general the content of the T box specific tabs i e the concepts tab the roles tab the taxonomy tab and the role hierarchy tab depend on the RacerPorter T box and NOT on the current RacerPro T box Thus it is NOT necessary to change the current T box and thus the state of the RacerPro server in order to inspect another T box Just select click on another T box in the T boxes tab Use the main left mouse button to select the current RacerPorter T box T box specific commands invoked by RacerPorter e g via command buttons such as Describe are always applied to the current RacerPorter T box not to the current RacerPro T box If you really want to change the current RacerPro T box use the Set Server T box button But in general this will not be
248. ng threads of these queries are consuming CPU time computing the next tuple s Retrieve this list with the API function running queries 4 2 THE NRQL QUERY PROCESSING ENGINE 161 b Queries which are currently waiting sleeping A query will sleep wait if it has been started in lazy mode until the next tuple is requested by the user or application The list of waiting queries can be retrieved with the API function waiting queries 4 A list of already processed terminated inactive queries A query is put on this list if its answer set has been computed exhaustively or if a timeout has been reached if the query has been aborted via the API function abort query or if the maximum number of requested tuples has been computed To get this list use the API functions processed queries inactive queries or terminated queries they are all equivalent It is possible to put a processed query back to the list of ready queries This is also true for rule This is especially useful for rules if a rule has to be fired applied more than once See reprepare query reprepare rule 4 2 3 The Life Cycle of a Rule The same six different lists are also maintained for nRQL rules RacerPorter provides the Rules tab which can be used to inspect and manage the rules as well as their current states The corresponding API functions are named 1 all rules 2 prepared rules ready rules equivalent 3 active rules a running rules b
249. nly the selected concepts are shown note that this might result in an empty list if no concepts are selected Concepts can be selected and deselected as usual use the main left mouse button Multi selection is supported The last selected concept always becomes the current concept note how the Concept field in the status display changes when you de select concepts The small number behind the current concept in the status display shows the total number of selected concepts the cardinality of the set of selected concepts Concepts can be selected with the help of the Search amp Select field as well The selection can be cleared with the Clear Sel Concepts button Some concept specific commands can be invoked by command buttons and either apply to the current RacerPorter concept e g Concept Query or to the selected concepts e g Select Parents Note that the Concept Query button allows you to retrieve the instances of the current 2 3 RACERPORTER IN DETAILS 51 concept The retrieved instances will automatically become selected individuals see Individuals tab The Roles tab This tab lists the roles in the current RacerPorter T box and their corresponding inverses It works analogous to the Concepts tab The list either shows all roles shows only the transitive roles shows only the functional roles etc depending on the selection of the provided radio buttons Multi selecti
250. nnotations http www owl ontologies com unnamed owl annot1 x x an http www owl ontologies com unnamed owl annot1 RacerPro returns TOLD VALUE http www owl ontologies com unnamed owl annot1 X Annotation and retrieve x x y http www owl ontologies com unnamed owl annot2 returns http www owl ontologies com unnamed owl i http www owl ontologies com unnamed owl j Again annotations is just syntactic sugar for told value 41 3 Complex Queries After having discussed the available query atoms and the structure of a nRQL head which may contain head projection operators we can continue with the specification of the valid nRQL query bodies A nRQL body is inductively defined as being either a single query atom or as a complex query body which is constructed by supplying component query bodies as arguments to the following query constructors which are denoted in prefix syntax e AND is an n ary constructor which is used for the formulation of conjunctive queries The arguments of the AND are called conjuncts e UNION can be used to compute the union of the answer sets of the argument query bodies The arguments of the UNION are called disjuncts e NEG implements a negation as failure semantics e INV can be used to reverse all role query atoms eventually present in the argument query body this constructor is rarely needed e PROJECT TO ist th
251. nodes in the mirror data substrate Moreover retrieval conditions can be specified which are otherwise impossible to specify for example in the last query we were searching for datatype values being fillers of the http www owl ontologies com unnamed owl name property that satisfy the predicate predicate search ael thus we are searching for substrings These predicates don t exist as concrete domain predicates for reasons of decidability However they can easily be offered in the data substrate since query answering reduces to model checking here which is fine for data such as told values in OWL documents Moreover since a mirror data substrate is just a special kind of data substrate see previous subsection nodes and edges can of course be added manually by using the already discussed constructors data node data edge etc The full data substrate API applies here please consult the Reference Manual The RCC Substrate Querying RCC Networks The so called Region Connection RCC Calculus offers means for describing and reasoning about qualitative spatial relationships between spatial objects To support applications which have to represent domain objects having a spatial character we are supplying yet another type of substrate The so called RCC substrate is a special kind of data substrate The Purpose of the RCC Substrate An RCC substrate allows for the creation and querying of so called RCC networks
252. nother application has modified the state of the connected RacerPro server Next to the history navigator two checkboxes are included the Simplify and the Arg Comp checkbox If the Simplify checkbox is enabled then namespace prefixes in OWL URIs and long filename di 2 3 RACERPORTER IN DETAILS 43 rectory prefixes are truncated and abbreviated with the prefix syntax Please note that denotes the current namespace You can define additional prefixes with the help of the shell and the define prefix command e g define prefix racer http www racer systems com By default the items to be displayed in this area e g in the Concepts tab are sorted alphabetically If the Arg Comp arguments completion checkbox is enabled then RacerPorter will collect the results of executed RacerPro commands in order to present them as input arguments in shell interactions In general it the tab key is pressed in the shell a pop up menu is presented offer ing possible completions This includes operator names as well as arguments provided argument completion was enabled 4 The tab specific area This area changes according to the selected tab We describe the different tabs and their functionalities in Section 2 3 4 In general there is a set of tab specific buttons below the tab specific main area The Taxonomy and the A box Graph tabs use graph panes
253. nths is not given explicitly Neverthe less asking concept instances month inleapyear yields feb 2000 whereas asking for concept instances not month inleapyear returns feb 2003 In addition one could check the number of days constraint entailed lt gt days in feb 2003 29 constraint entailed days in feb 2000 29 In both cases the answer is true Concrete domain ttributes are considered as typed since they can either have fillers of type cardinal integer real complex or string The same attribute cannot be used in the same T box such that both types are applicable e g min has age 18 and gt has age 18 are not allowed If the type of an attribute is not explicitly declared its type is implicitly derived from its use in a T box A box An attribute and its type can be declared with the signature form see above or by using the KRSS like form define concrete domain attribute If an attribute is declared to be of type complex is can be used in linear in equations However if an attribute is declare to be of type real or integer it is an error to use this attribute in terms for nonlinear polynoms In a similar way currently an attribute of type integer may not be used in a term for a linear polynoms either If the coefficients are integers then cardinal natural number including 0 for the type of attributes may be used in a linear polynom Furthermore attributes of type string may not be used on polynoms
254. nto 3 4 In the following we will use the names on the left hand side of the table to refer to the corresponding concrete domains Names for values from concrete domains are called objects The set of all objects is referred to as O Individuals can be associated with objects via so called attributes names or attributes for short Note that the set A of all attributes must be disjoint to the set of roles and the set of features Attributes can be declared in the signature of a T box see below The following example is an extension of the family T box introduced above In the example the concrete domains Z and R are used signature atomic concepts teenager roles attributes integer age equivalent teenager and human min age 16 equivalent old teenager and human min age 18 Asking for the children of teenager reveals that old teenager is a teenager A further extensions demonstrates the usage of reals as concrete domain signature atomic concepts teenager roles attributes integer age real temperature celsius real temperature fahrenheit equivalent teenager and human min age 16 equivalent old teenager and human min age 18 equivalent human with fever and human gt temperature celsius 38 5 equivalent seriously ill human and human gt temperature celsius 42 0 Obviously RacerPro determines that the concept seriously ill human is subsumed by human w
255. nts Home bin java Sep 27 2012 2 30 2 I Applications RacerPro 2 0 preview examples owl people pets owl Racer Message STDOUT Concept Ihttp cohse semanticweb org ontologies people animall causes a cycle in TBox l Applications top bottom http cohse semanticweb org ontologies people lorry_driver writable Smart Insert 12 50 Figure 2 19 The output is printed to the Console window 27 28 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Sending raw strings to the RacerPro server is simple but rather cumbersome from a software engineering point of view Therefore as part of JRacer RacerPro provides a simple API with Java classes and methods for creating and manipulating axioms in ontologies and for invoking inference services An example is given below package test import com racersystems jracer public class Test2 public static void main String argv String ip 127 0 0 1 int port 8088 RacerClient racer new RacerClient ip port try racer openConnection racer fullReset racer owlapiNewReasoner test racer owlapiNewOntology test racer owlapiAutoAddAxiomsTo test racer owlapiGetOWLClassAssertionAxiom d j racer owlapiGetOWLObjectPropertyAssertionAxiom j r k racer owlapiLoadOntology test System out println racer tboxCoherentP test System out println racer aboxConsistentP test racer close
256. o s answer is given below subscribe client 4 book CLIENT 4 DOCUMENT 2 CLIENT 4 DOCUMENT 4 CLIENT 4 DOCUMENT 5 The query of client 4 is answered with three documents Next we discuss an example demon strating that sometimes subscriptions do not lead to an immediate answer w r t the current A box subscribe client 2 computer science best seller The result is O Although document 7 is an instance of computer science best seller this individual has already been indicated as a result of a previously subscribed query In order to continue our example we introduce two additional documents one of which is a computer science best seller state instance document 8 computer science best seller constrained document 8 isbn 8 isbn constraints equal isbn 8 8234567 instance document 9 book constrained document 9 isbn 9 isbn constraints equal isbn 9 9234567 The publish subscribe mechanism requires that these documents are published state publish document 8 publish document 9 The RacerPro system handles all publish statements within a state as a single publish statement and answers the following as a single list of subscription individual pairs CLIENT 1 DOCUMENT 9 CLIENT 2 DOCUMENT 8 CLIENT 3 DOCUMENT 8 CLIENT 4 DOCUMENT 9 5 4 THE PUBLISH SUBSCRIBE MECHANISM 197 Now client 2 also get information about instances of computer science best seller Note that document 8 is an instance of
257. o a file init racer and start RacerPro with the following option RacerPro init init racer 3 9 Evaluating RacerPro and Configuring Reasoning Modes After the declaration of a T box or an A box RacerPro can be instructed to answer queries Pro cessing the knowledge base in order to answer a query may take some time The standard inference mode of RacerPro ensures the following behavior Depending on the kind of query RacerPro tries to be as smart as possible to locally minimize computation time lazy inference mode For instance in order to answer a subsumption query w r t a T box it is not necessary to classify the T box However once a T box is classified answering subsumption queries for atomic concepts is just a lookup Furthermore asking whether there exists an atomic concept in a T box that is inconsistent tbox coherent p does not require the T box to be classified either In the lazy mode of inference the default RacerPro avoids computations that are not required concerning the current query In some situations however in order to globally minimize processing time it might be better to just classify a T box before answering a query eager inference mode A similar strategy is applied if the computation of the direct types of individuals is requested RacerPro requires as precondition that the corresponding T box has to be classified If the lazy inference mode is enabled only the individuals involved in a direct types
258. o for the target platform is necessary More conditions and addi tional fees may apply Please contact us for more information about the availability RacerPro on other platforms like IBM or HP Terms and Conditions All prices are in Euro and without taxes shipping costs and expenses Given prices are calculated for electronic delivery download Furthermore value added tax and other excise dues may be applicable to your individual purchase If you are in doubt or in case need an official offer please contact us for a quote All active licenses are entitled to receive bug fix releases of the licensed version as long as this version is the current release version Owners of Network Classroom or Site licenses additionally get software updates free of charge dur ing the first year after purchase software maintenance Following that period software updates are offered for an additional fee Alternatively we offer software maintenance contracts for a yearly charge of about 25 of the initial license fee which will cover updates and upgrades within the second and subsequent years after purchase Neither on site service nor individual consulting or support are included in software maintenance Before ordering please check the intended operating system with us Before the purchase we will provide access to the General Terms and Customer License Agreement documents 208 APPENDIX A EDITIONS AND LICENSES Appendix B Acknowledgments RacerP
259. o use so called data predicates The recognized predicates are summarized on Page 150 see rule data query predicate For example consider the following query retrieve x michael and bind individual michael michael x has collegue x teacher x age predicate lt 40 4 1 THE NRQL LANGUAGE 137 which returns RALF MICHAEL MICHAEL Here we have been looking for the colleagues of the data node michael which are teachers for which a corresponding data substrate node exists which also satisfies the data substrate query expression age predicate lt 40 Thus the label of such a node must contain the symbol age and there must be an other data literal x which satisfies logically implies the validity of the expression lt x 40 if x is substituted with a literal from the label of this node In general data substrate predicate expressions can be used in data substrate node query atoms as well as in data substrate edge query atoms Note that the ordinary data literals e g age in this example can also be viewed as denoting equality predicates e g predicate equalp age in this case Another example demonstrates that predicates are available which are not offered in the concrete domain of RacerPro for example we can search for nodes that have string on their labels that contain the substring Michael gt retrieve x x predicate search Michael MICHAEL
260. of the application are called the state display of RacerPorter They indicate the current state of RacerPorter NOT of RacerPro Selecting for example a T box from the T boxes list panel updates the T box field in the state display The same applies to the other fields of the state display The state is used to indicate the current object which is to be inspected or queried with RacerPorter for example the Individuals tab will always show the individuals of the A box in the state display the Taxonomy tab will always show the taxonomy of T box in the state display etc Note that selecting an A box T box from the A boxes T boxes pane does NOT change the current abox resp current tbox of RacerPro Use the buttons Set Server T box and Set Server A box for this purpose if you really want to change the state of the RacerPro server The current abox and current tbox of the RacerPro server is indicated in the T boxes resp A boxes tab by marking the T boxes resp A boxes name like this gt gt gt DEFAULT lt lt lt 2 3 3 RacerEditor RacerPorter also includes an Emacs style text editor called RacerEditor which you can use to view edit and process your knowledge bases To open the editor just press the button Open in Editor in the Shell or in the Profiles tab and select a text file that should be read into the editor You can open virtually any file with the editor from pla
261. of the concept woman Thus retrieve x x woman asks RacerPro for all instances of the concept name woman from the current abox which is smith family note that the TBox of this ABox is family These instances are successively bound to the variable x Thus the answer is EVE DORIS ALICE X BETTY Terminology Query Head and Query Body The query body is satisfied if the variable x is bound to Eve to Doris to Alice or to Betty Racer has returned a list of binding lists Each binding list lists a number of variable value pairs The format of these returned binding lists is specified by the query head In this case the head of the query is x and the query body or query expression is given by the single concept query atom x woman The set of objects mentioned in the query head must be a subset of the set of objects referenced in the query body An empty query head is permitted see below The Active Domain Semantics A so called active domain semantics is employed for the vari ables Variables can only be bound to explicitly modeled ABoz individuals in the current ABox Please note that there is no guarantee on the order in which the possible bindings are delivered Currently there are no ordering functions available What is the semantics of the atom x woman It is equivalent to concept instances woman which returns BETTY ALICE EVE DORIS A concept query atom x C for an arbit
262. ohse semanticweb org ontologies people Dewey T cohse semanticweb org ontologies people Walt ines cohse semanticweb org ontologies people Huey RETE semanticweb org ontologies people Minniel Figure 2 22 T hird example with output printed to the Console window 2 2 THE RACERPRO SERVER 33 Java OWLAPI Interface The Manchester OWLAPI is also supported by RacerPro You can download the respecitve jar files from http www racer systems com products download As shown in Figure 2 23 you can set up the project as described for JRacer and you need to put owlapi bin jar and racer jar NB not jracer jar but racer jar onto the build path of the project package test import com org org org import import import import racersystems racer semanticweb owlapi apibinding semanticweb owlapi model semanticweb owlapi reasoner java util Set public class example public static void main String args String DOCUMENT IRI file Applications RacerPro 202 0 examples owl people pets owl try OWLOntologyManager manager OWLManager createOWLOntologyManager IRI docIRI IRI create DOCUMENT IRI OWLOntology ont manager loadOntologyFromOntologyDocument docIRI OWLReasonerFactory reasonerFactory new ReasonerFactory ConsoleProgressMonitor progressMonitor new ConsoleProgressMonitor OWLReasonerConfiguration config new SimpleConfigurati
263. older than alice retrieve y y alice constraint age age gt RacerPro replies NIL Role and Feature Chains in Constraint Query Atoms constraint query atom such as x y constraint age age gt retrieves the set of all tuples x y such that the value filler of the age attribute of the first argument in the tuples which is bound to x is greater than gt the value filler of the age attribute of the second argument of the tuple which is bound to y Instead of using two single concrete domain attribute names like age age it is also possible to use role chains of arbitrary length such that the last argument in each chain is a concrete domain attribute Let us consider an example using feature chains Note that a feature is just a functional role Again we need to modify the signature of the family racer KB It should now read like this signature roles has child parent has descendant inverse has parent domain parent range person features has father parent has parent range father has mother parent has parent range mother 96 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL That means add the has father and has mother features and modify the has child role such that its inverse is named has parent Then add the following ABox assertions at the end of the file related betty alice has mother related charles alice has mother related doris betty has mother rela
264. ole term R Negation as Failure for Constraint Query Atoms As for the role query atoms a negated constraint query atom returns the complement of its non NAF negated variant Since retrieve x y x y constraint has father age age returns EVE Y CHARLES note that charles is the father of eve we will get the remaining 19 tuples from retrieve x y neg x y constraint has father age age 4 1 THE NRQL LANGUAGE 117 Negated SAME AS Query Atoms NAF A negated SAME AS query atom simply enumerates the complemented of its positive variant Since retrieve x same as x eve returns EVE we can get all other individuals but eve with retrieve x neg same as x eve which consequently returns X CHARLES X BETTY X ALICE X DORIS NAF Negated Query Atoms Referencing Individuals What is the semantics of a NAF atom which references ABox individuals We already mentioned that a query atom and its NAF negated counterpart always behave dually Consider the query retrieve betty betty top which is rewritten into retrieve betty and same as betty betty betty top and thus gives use the answer BETTY BETTY As a consequence since betty top returns a singleton answer set BETTY BETTY we should expect that neg betty top behaves in fact like a variable enumerating all individuals that are not betty retrieve
265. on CWA It might be the case that there will be an assertion related alice william has child added to the A box later on Thus the answer NIL is correct but has to be interpreted in the sense of cannot be proven Note that it is possible to add the assertion instance alice at most 2 has child to the A box Given this the A box will become inconsistent if another individual e g william is declared to be a child of alice Many users asked for a switch such that RacerPro automatically closes roles However this problem is ill defined A small example should suffice to illustrate why closing a role or even a KB is a tricky problem Assume the following axioms disjoint a b c instance i and some r a some r b some r c some r d related i j r Now assume the task is to closed the role r for the individual i Just determining the number of fillers of r w r t i and adding a corresponding assertion at most 1 r to the A box is a bad idea because the A box gets inconsistent Due to the T box the minimum number of fillers is 3 But should we add at most 1 r or at most 1 r and a b c The first one might be too strong because of i being an instance of some r d What about d Would it be a good idea to also add at most 1 r d If yes then the question arises how to determine the qualifier concepts used in qualified number restrictions 3 8 4 Closed World Assumption Due to the non monotonic nature of the clos
266. on of a temporary file on the machine on which RacerPro is running 3 OWL Function mode In this mode Ctrl Shift f can be used If you want to evaluate SPARQL queries in native syntax then it is important to note that SPARQL queries are enclosed between blank lines one before and one after the query since otherwise start and end of the SPARQL query cannot be detected To evaluate a single SPARQL query put the cursor on the query and press Ctrl Shift s In case you are working with OWL you often want to work with an axiomatic auxiliary represen tation of your OWL KB RacerPro can create so called OWL axiom objects from the content of an OWL file The created axioms can then be inspected end edited conveniently with the axioms editor provided in the Axioms tab OWL axiom objects can also be created automatically if an OWL buffer is evaluated Ctrl Shift y Ctrl Shift f from the editor It is determined by the active profile whether an OWL buffer evaluation request creates auxiliary OWL axioms see checkbox Create Axioms by Default Note that reasoning will also work without these auxiliary OWL axioms However the presence of the OWL axioms is required if the OWL KB or OWL file shall be edited in the Axioms tab on an axiomatic level Please note that axiom objects may require a lot of memory if the OWL KB is big and thus contains a lot of axioms 2 3 RACERPORTER IN DETAILS 4T 2 3 4 Tabs in RacerPorter The Profiles tab
267. on of roles is supported The last selected role becomes the current role and selected roles are highlighted The Individuals tab This tab lists the individuals in the current RacerPorter A box and works analogous to the Concepts tab Multi selection is supported The last selected individual becomes the current individual and selected individuals are highlighted as usual The Assertions tab This tab presents the A box assertions contained in the current Racer Porter A box Depending on the selection of the radio buttons different kinds of assertions are shown concept assertions role assertions attribute assertions constraint assertions annotation concept assertions and annotation role assertion in case of OWL A boxes Assertions can be selected and deselected as usual Multi selection is supported However there is no current assertion but only a set of selected assertions The selected assertions can be deleted with the Delete Selected button However in general this kind of editing should be performed with the Axioms tab in case an OWL KB is edited The Axioms tab This tab offers a convenient and powerful interactive graphical OWL2 axiom browsing axiom inspection and axiom editing OWL2 axioms for OWL KBs can be either created by hand with the New Axiom button or au tomatically during load of an OWL file see Load button The RacerPro internal OWL parser is invoked by Load The f
268. on progressMonitor OWLReasoner reasoner reasonerFactory createReasoner ont config boolean consistent reasoner isConsistent System out println Consistent consistent System out println Nn Node lt OWLClass gt bottomNode reasoner getUnsatisfiableClasses Set lt OWLClass gt unsatisfiable bottomNode getEntitiesMinusBottom if unsatisfiable isEmpty 4 System out println The following classes are unsatisfiable for OWLClass cls unsatisfiable System out println cls else System out println There are no unsatisfiable classes System out printin n reasoner dispose catch Exception e e printStackTrace The packages in the code are not hierarchical although the names suggest this You need three imports for the OWLAPI 34 CHAPTER 2 USING RACERPRO AND ITS INTERFACES Java test2 src test example java Eclipse Users rm Documents workspace racer users guide lee 8 Gs m se Pom Quick Access 18 Package Explorer 3 as jexamplejava 22 J Test3 java n n test1 ned Y src import com racersystems racer S Y Brest import java util Set gt D Testjava Find import semanticweb owlapi apibinding _ P import org semanticweb owlopi model import org semanticweb owlopi reasoner gt Test2 java gt 0 Te
269. ons for roles implies top all has child person 11 12 CHAPTER 2 USING RACERPRO AND ITS INTERFACES implies some has child top parent implies some has sibling top or sister brother implies top all has sibling or sister brother implies top all has sister some has gender female implies top all has brother some has gender male Axioms for relating concept names implies person and human some has gender or female male disjoint female male implies woman and person some has gender female implies man and person some has gender male equivalent equivalent equivalent equivalent equivalent equivalent equivalent equivalent parent and person some has child person mother and woman parent father and man parent grandmother and mother some has child some has child person aunt and woman some has sibling parent uncle and man some has sibling parent brother and man some has sibling person Sister and woman some has sibling person instance alice mother related alice betty has child related alice charles has child instance betty mother related betty doris has child related betty eve has child instance charles brother related charles betty has sibling instance charles at most 1 has sibling related doris eve has sister related eve doris has sister The following code is found in the file fa
270. onsistency since the temperature of 102 56 Fahrenheit is identical with 39 5 Celsius constrained eve temp eve temperature fahrenheit constrained doris temp doris temperature celsius constraints temp eve 102 56 temp doris 39 5 gt temp eve temp doris We present another example that might be important for many applications dealing with dates The following declarations can be processed with Racer The predicates divisible and not divisible are defined for natural numbers and are reduced to linear inequations internally define concrete domain attribute year type cardinal define concrete domain attribute days in month type cardinal implies Month and gt days in month 28 lt days in month 31 equivalent month inleapyear and Month divisible year 4 or not divisible year 100 divisible year 400 equivalent February and Month lt days in month 29 3 6 INDIVIDUAL ASSERTIONS AND A BOXES 69 or not month inleapyear days in month 29 or month inleapyear days in month 28 Next we assume some instances of February are declared instance feb 2003 February constrained feb 2003 year 1 year constrained feb 2003 days in feb 2003 days in month constraints year 1 2003 instance feb 2000 February constrained feb 2000 year 2 year constrained feb 2000 days in feb 2000 days in month constraints year 2 2000 Note that the number of days for both mo
271. op on Description Logics DL 2010 Waterloo Canada May 4 7 pages 161 172 2010 J W Freeman Improvements to Propositional Satisfiability Search Algorithms PhD thesis Department of Computer and Information Science University of Pennsylvania 1995 J W Freeman Hard random 3 SAT problems and the Davis Putnam procedure Artificial Intelligence 81 183 198 1996 J G mez Romero J M A Patricio and J M Molina Towards the implementation of an ontology based reasoning system for visual information fusion In 8rd Annual Sk vde Workshop on Information Fusion Topics SWIFT 2009 Sk vde Sweden Oct pages pp 5 10 2009 V Haarslev and R Moller Expressive ABox reasoning with number restrictions role hierar chies and transitively closed roles In Proc of the 7th Int Conf on Principles of Knowledge Representation and Reasoning KR 2000 pages 273 284 Morgan Kaufmann Los Altos 2000 V Haarslev and R Moller High performance reasoning with very large knowledge bases A practical case study In B Nebel editor Proceedings of Seventeenth International Joint Conference on Artificial Intelligence IJCAI 01 pages 161 166 2001 V Haarslev and R Moller Optimizing reasoning in description logics with qualified num ber restrictions In Proceedings International Workshop on Description Logics DL 2001 Stanford USA 1 3 August pages 142 151 2001 V Haarslev and R Moller Optimization strategies fo
272. op on Description Logics DL 2009 Oxford United Kingdom volume 477 of CEUR Workshop Proceedings 2009 M Wessel M Luther and M Wagner The difference a day makes recognizing impor tant events in daily context logs In Proceedings of the International Workshop on Contexts and Ontologies Representation and Reasoning C O RR volume 298 of CEUR Workshop Proceedings 2007 M Wessel and R M ller A high performance semantic web query answering engine In I Horrocks U Sattler and F Wolter editors Proc International Workshop on Description Logics 2005 M Wessel and R Moller A flexible DL based architecture for deductive information systems In G Sutcliffe R Schmidt and S Schulz editors Proc IJCA R 06 Workshop on Empirically Successful Computerized Reasoning ESCoR pages 92 111 2006 M Wessel and R Moller Design principles and realization techniques for user friendly in teractive and scalable ontology browsing and inspection tools In International Workshop on OWL Experiences and Directions OWLED 2007 2007 J Wu and V Haarslev Planning of axiom absorption In Proceedings of the 2008 International Workshop on Description Logics DL 2008 Dresden Germany 2008 216 BIBLIOGRAPHY 71 Zuo and V Haarslev High performance absorption algorithms for terminological reasoning In Proceedings of the 2006 International Workshop on Description Logics DL 2006 Lake District UK pages 159 166 2006
273. or it can consider the complement of B wrt A We see this strategy as an implementation of a local closed world LCW assumption However as time evolves authors for documents determined by the above mentioned query indeed might become known In others words the set B will probably be extended In this case the agent is responsible for implementing appropriate backtracking strategies of course The LCW example demonstrates that the RacerPro publish and subscribe interface is a very general mechanism which can also be used to solve other problems in knowledge representation 3 8 5 Unique Name Assumption In addition to the Open World Assumption it is possible to instruct RacerPro to employ the Unique Name Assumption UNA This means that all individuals used in an A box are assumed to be mapped to different elements of the universe i e two individuals cannot refer to the same domain element Hence adding instance alice at most 1 has child does not identify betty and charles but makes the A box inconsistent Due to our experience with users we would like to emphasize that most users take UNA for granted but are astonished to learn that OWA is assumed rather than CWA However in order to be compliant with the semantics of OWL RacerPro does not apply the unique name assumption by default If you want this use the following statement before asking any queries set unique name assumption t You might want to put this directive int
274. or the third argument is nil indicating that direct types are not to be included in the MSC k output Given this boolean argument is specified there can be a fourth argument the A box which defaults to the current A box 5 8 Event Recognition In some applications it might be interesting to state that assertions are valid only within a certain time interval This is not possible with standard description logic systems There are several research results available on qualitative temporal reasoning in the context of description logics RacerPro can support qualitative temporal reasoning as part of the nRQL system compare the section on RCC substrates in the User s Guide In addition in some cases quantitative information about time intervals might be available and could be relevant for query answering RacerPro now also supports A box query answering w r t assertions that are associated with specifications for time intervals The following example shows the main idea in knowledge base traffic analysis define primitive role r inverse r implies car vehicle implies volkswagen car instance vw1 volkswagen instance vw2 volkswagen instance ralf pedestrian related vw2 vwi r define event assertion move vwi 7 80 204 CHAPTER 5 ADDITIONAL FACILITIES define event assertion move vw2 3 70 define event assertion move ralf 3 70 define event assertion approach vwi vw2 10 30 define event assertion b
275. ort 8088 are ok If you want to have a logging file provide the required path Once making the required changes press the OK button The example presented in Figure 2 31 shows a screenshot of Prot g with the Family knowledge base The knowledge base was exported from RacerPro using the OWL syntax see the function save kb OWL files can be manipulated with Prot g In Figure 2 31 the concept uncle is selected concepts are called classes in Prot g See the restric tions displayed in the asserted conditions window and compare the specification with the KRSS syntax used above see the axiom for uncle Note that the class window displays both obvious subclass relationships as well as implicit class subsumption relationships see Class hierarchy in ferred in Figure 2 31 The later are provided due to the reasoning services from RacerPro By using the reasoning services from RacerPro unsatisfiable concept names are marked if there are any and implicit subsumption relationships between concept names are found Figure 2 31 shows implicit subsumption relationships for instance an uncle is also a brother while from the tab 2 4 OTHER GRAPHICAL CLIENT INTERFACES 57 Start RacerPro automatically owvz Use integrated RacerPro 2 0 0 20110226 Use external RacerPro C Enable logging Connect to running RacerPro Remote Adress Remote Port Figure 2 30 Setting the preference
276. ote that nRQL has deduced that 333 X is in fact a mother not only a woman gt describe query last QUERY 1 ACCURATE PROCESSED RETRIEVE X AND X Y ANO1 HAS CHILD Y ANO1 AND HUMAN PERSON X AND WOMAN MOTHER 33 This is the realized query body Note that nRQL has used the TBox to add logically implied conjuncts syntactically to the query expression You can also get to original query gt describe query last nil QUERY 1 ACCURATE PROCESSED RETRIEVE X AND X WOMAN X Y HAS CHILD 4 2 THE NRQL QUERY PROCESSING ENGINE 181 HUMAN gt retrieve x and x woman x all has descendant man x y has child y human NIL gt describe query last QUERY 2 ACCURATE PROCESSED RETRIEVE X AND X Y ANO1 HAS CHILD 1 AND HUMAN MAN X AND WOMAN ALL HAS DESCENDANT MAN MOTHER Note that nRQL has deduced that Y must be a man and that X is a mother Since a realized query contains more syntactically explicit information the search for answer tuples can eventually be more constrained and thus eliminate candidate bindings for variables which otherwise would be considered So called thrashing a term borrowed from constraint programming is thus minimized However candidate generation for variable bindings will also be more expensive since the concepts used in concept query atoms will be more comp
277. our response time if you help us by providing such information on request Of course we will try to work on your issue as soon as possible However due to the probably existing time lag between your location and ours or due to the existing work load our response may take up to two business days We will acknowledge the receipt of your inquiry and in most cases give you further instructions or an estimate of the processing time 2 2 5 Online Reference Manual The reference manual is now available online see Figures 2 24 and 2 25 Make sure a RacerPro server is started Use you favorite web browser to view http localhost 8080 reference toplevel html A collection of all functions provided by RacerPro is available un der http localhost 8080 all functions html Help on function arguments is also provided by RacerPorter see the example shown in Figure 2 26 2 2 THE RACERPRO SERVER 39 RacerPro Reference Manual E Input Output Functions The RacerPro API SA The OWLIink Interface The DIG Interface erver tin MiniL Figure 2 24 RacerPro Reference Manual specific sections 40 CHAPTER 2 USING RACERPRO AND ITS INTERFACES eoo RacerPro Reference Manual v Section All Functions Please choose Figure 2 25 RacerPro Reference Manual alphabetical list Promes Boxes ABoxes Roles indivi Asse Axioms Role ABOX Quer Quer Det Log
278. ox relationship 4 1 THE NRQL LANGUAGE e abox role relationship e abox attribute relationship e abox told value relationship 141 In addition some additional markers are added in case the ABox has been created from an OWL KB e owl annotation e owl annotation concept assertion e owl annotation relationship e owl annotation object relationship e owl annotation datatype relationship e owl annotation datatype object e owl annotation value e owl datatype value e owl datatype role Using the Mirror Data Substrate on OWL Documents Especially in the case of OWL KBs the additional querying functionality offered by means of a data mirror substrate can be valuable since OWL KBs tend to contain a lot of annotations and told XML Schema datatype data values With the data substrate mirror you can query for resources which whose fillers of an OWL annotation property contain a certain substring etc The mirror data substrate allows you to evaluate certain predefined predicates over the set of OWL annotations Let us again consider the following OWL example KB lt xml version 1 0 gt lt rdf RDF xmlns xmlns xmlns xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xsd http www w3 org 2001 XMLSchema rdfs http www w3 org 2000 01 rdf schema owl http www w3 org 2002 07 owl xmlns http www owl ontologies com unnamed owl xml base http www owl ontolo
279. p a com ontolog a Active Ontology Entities Classes Object Properties Data Properties Individuals OWLViz DL Query Ontology annotations 0888 Annotations H Rules Man y Person x hasChild x 8 hasSon x Man y Person x hasSibling x y 8 hasBrother x Person x hasParent x 7y hasSister 7y 7z hasAunt x 7z Person x Woman y hasSibling x 8 hasSister x y Person y hasConsort y z hasParent x hasParent x z Person y hasChild y x hasChild y z DifferentFrom x z hasSibling x z Man y Person x hasParent x hasFather x Person x hasSibling x hasSon y z hasNephew z z Person x Woman y hasParent x y hasMother x y Person x Woman y hasChild x 8 hasDaughter x Person x hasBrother y hasParent x hasUncle x z Person x hasDaughter 7y z hasSibling x 8 hasNiece x 72 Imported ontologies 0888 Direct Imports 2 Figure 5 1 Rules in Prot g Rules are required because for some purposes OWL is not expressive enough Rather than just adding statements to the A box whenever preconditions are satisfied as suggested above in some cases it makes sense to just ask whether the head is entailed by an A box rules are applied in a backward c
280. plication receiving this message from RacerPro as a return result can then decide how to inform the client appropriately In future releases of RacerPro subscriptions can be extended with information about how the retrieval events are to be signaled to the client T his will be done with a proxy which is currently under development The example is continued with the following statements and two new subscriptions state instance document 6 computer science document constrained document 6 isbn 6 isbn constraints equal isbn 6 6234567 publish document 6 5 4 THE PUBLISH SUBSCRIBE MECHANISM 195 state subscribe client 2 computer science document subscribe client 3 computer science best seller The last statement returns two additional pairs indicating the retrieval results for the instance retrieval query subscription of client 2 CLIENT 2 DOCUMENT 5 CLIENT 2 DOCUMENT 6 Next information about another document is declared T he new document is published state instance document 7 computer science document constrained document 7 isbn 7 isbn constraints equal isbn 7 7234567 constrained document 7 number of copies sold 7 number of copies sold constraints equal number of copies sold 7 4000 publish document 7 The result of the last statement is CLIENT 2 DOCUMENT 7 CLIENT 3 DOCUMENT 7 The new document document 7 is in the result set of the query subscribed by client 2 and client 3 Note
281. pose For example the statement data node michael michael age 34 and man age 34 some has knowledge DL does three things 1 Creates a data substrate node named michael 2 labels this node with the description michael age 34 which is a conjunction of three data literals 134 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL 3 creates an ABox individual called michael and finally 4 adds the concept assertion instance michael and man age 34 some has knowledge DL to the ABox associated with this data substrate Note that not only symbols are valid as names for data substrate nodes but also numbers charac ters and even strings As already demonstrated data substrate nodes can be associated with individuals from an ABox This is done by simply giving equal names to the substrate node michael and the associated ABox individual michael However creation of a corresponding ABox individual is optional It is thus possible to create data nodes which do not have associated ABox individuals and vice versa Populating the Hybrid Representation In general RacerPro s reasoning is completely unaf fected by the presence of an associated data substrate layer Thus you might ask what is it good for at all The answer to this question is that you can use nRQL to query the hybrid representation nRQL is a hybrid query language Let us consider the following example KB full reset in tbox te
282. r instance retrieval In Proceedings of the International Workshop on Description Logics DL 2002 CEUR Electronic Workshop Proceedings http ceur ws org Vol 53 2002 V Haarslev and R M ller Incremental query answering for implementing document retrieval services In Proceedings of the International Workshop on Description Logics DL 2003 Rome Italy September 5 7 pages 85 94 2003 BIBLIOGRAPHY 213 28 29 30 31 32 33 34 35 36 37 V Haarslev and R Moller Optimization techniques for retrieving resources described in OWL RDF documents First results In Proc of the 8th Int Conf on Principles of Knowledge Representation and Reasoning KR 2004 2004 V Haarslev and R Moller Optimization techniques for retrieving resources described in OWL RDF documents First results In Ninth International Conference on the Principles of Knowledge Representation and Reasoning KR 2004 Whistler BC Canada June 2 5 pages 163 173 2004 V Haarslev and R Moller The revival of structural subsumption in tableau based description logic reasoners In Proceedings of the 2008 International Workshop on Description Logics DL 2008 2008 V Haarslev R M ller and A Y Turhan Exploiting pseudo models for TBox and ABox reasoning in expressive description logics In R Gor A Leitsch and T Nipkow editors International Joint Conference on Automated Reasoning IJCAR 2001 June 18 23 Sie
283. rStringArgument String Racer RacerSymbolArgument String Race returnBoolean RacerResult 5 boolean send StringBuilder RacerResult sendRaw String String setPrintWarningMessages boolean B simpleParse String String transferFile String String void acerClientException class tacerKeyword class acerList class tacerLiteral class tacerNull class acerNumber class acerResult class tacerString class e D Test java 52 package test import com racersystems jracer public class Test epublic static void main String argv String ip 127 0 0 1 int port 8088 String filename Applications RacerPro 2 0 preview examples owl RacerClient racer new RacerClient ip port try racer openConnection 0 amp Task List X amp S9 e w BI Find All P Acti Connect Mylyn 23 Connect to your task and ALM tools or create a local task System out println racer sendRaw owl read file filename System out println racer sendRaw all atomic concepts racer closeConnection catch Exception e e printStackTrace Problems Javadoc Declaration EJ Console 3 B Outline 53 em Bi 4wxewx HB test Test main String void x 5s B r3 terminated Test Java Application System Library Java JavaVirtualMachines 1 6 0 jdk Conte
284. rall set of tuples delivered is the same as in mode 3 The only difference is that delivery of tuples is arranged in two phases and that mode 4 and 5 are lazy and incremental However tuples will not be duplicated Mode 5 will eventually return more tuples in phase 1 than mode 4 but the overall returned set of tuples is Identical Mode 4 and 5 Cannot be Used for Queries with NEG Please note that only queries that do not make use of the NEG operator can take advantage of the two phase query processing mode the reason is that if an incomplete answer is computed for the argument query body of NEG in mode 1 then the set difference yields already too many tuples in mode 1 thus the answer would be incorrect If nRQL is in mode 4 5 or 6 and a query is posed containing NEG then nRQL will answer this query using mode the incremental tuple at a time mode 3 Two Phase Tuple Computation Example Session Please modify the original family racer file as follows Replace the assertions instance alice mother with instance alice and human grandmother instance betty mother with instance betty or mother grandmother and add related eve jane has child Enter full reset and reload the KB Using mode 4 nRQL behaves like this gt set nrql completeness 4 OKAY MODE 4 gt describe query processing mode MODE 4 TUPLE AT A TIME MODE LAZY TWO PHASE QUERY PROCESSING MODE DELIVER PHASE TWO WARNING TOKENS gt
285. rary concept C has the same semantics as concept instances C Instead of a simple concept name such as woman we can of course also use a complex concept term for C e g and human some has gender female 4 1 THE NRQL LANGUAGE 87 Queries with individuals Suppose we just want to know if there are any woman at all modeled in the current ABox We could simply query with retrieve x woman and RacerPro replies T which means yes This query has an empty head such a query never returns any bindings but only a boolean answer T or NIL T is returned if any satisfying binding can be found and NIL otherwise We already mentioned that query atoms use objects Since ABox individuals are objects it is also possible to use an ABox individual instead of a variable Suppose we just want to know if betty is a woman retrieve betty woman RacerPro replies T and consequently we get NIL for retrieve betty man Other nRQL Peculiarities Certain names are reserved in nRQL and thus cannot be used to identify ABox individuals having the same name please consult symbol in the EBNF specifica tion Section 4 1 9 If ABox individuals are listed in the query head then they will be included in the returned binding lists as well since the head always specifies the format of the returned binding lists retrieve betty betty woman RacerPro replies BETTY BETTY The answer BETTY BETTY i
286. rete integer values 1 2 3 are defined as fillers of the http a com ontology p1 datatype property Let us now demonstrate how to retrieve these told values as well as how to specify retrieval conditions on the datatype values to be retrieved The attribute projection operators can be used for datatype properties as follows retrieve x told value http www owl ontologies com unnamed owl p1 x x http www owl ontologies com unnamed owl test yields http www owl ontologies com unnamed owl i CC TOLD VALUE http www owl ontologies com unnamed owl p1 X 1 2 3 as if http www owl ontologies com unnamed owl p1 were a concrete domain attribute In stead of told value also fillers datatype fillers told values or told fillers can be used Please consult the EBNF specification in Section 4 1 9 To enable the specification of complex retrieval conditions on the fillers of such datatype properties we have extended the RacerPro concept syntax The basic Idea is that datatype properties can be used in a similar way like concrete domain attributes in concept expressions For example retrieve x datatype fillers http www owl ontologies com unnamed owl p1 x x at least http www owl ontologies com unnamed owl p1 and min 0 max 5 not equal 4 will be recognized as a valid query The answer is again http www owl ontologies com unnamed owl i CC TOLD VALUE
287. revious setting but now the TBox information is taken into account for concept membership assertions of the form instance i C where C is a concept name If C is a concept name then nRQL will use the classified TBox to compute the set of atomic concept synonyms as well as the set of atomic concept ancestors and put these as implied concept membership assertions into the ABox as well For example if the ABox is instance betty mother then also instance betty woman will be added since woman is a member of atomic concept ancestors mother The resulting upward saturated ABox is then queried like in the previous setting If a concept membership assertion uses a top level AND then the same process will be applied recursively for the atomic conjuncts of this AND Note that in contrast to the previous setting retrieve x x woman now correctly returns X BETTY However this technique will still fail for the query retrieve x and woman human In the latter case the next setting might help Again please note that you have the nRQL rules available to syntactically augment the ABox In order to enable this mode enter set nrql mode 1 3 Told information querying plus exploited TBox information for all concepts Mode 2 Like the previous setting but now the atomic concept synonyms and ancestors will also be computed for arbitrary concept membership assertions not only for concept membership assertions refere
288. ries 128 nRQL API 157 nRQL EBNF 150 nRQL engine 157 nRQL grammar 150 nRQL mode 164 nRQL mode 0 164 nRQL mode 1 165 nRQL mode 2 165 nRQL mode 8 165 nRQL mode 4 165 nRQL mode 5 165 nRQL mode 6 165 nRQL modes 157 165 nRQL persistency 181 nRQL syntax 150 number restriction 63 219 220 object 85 open world assumption 77 optimization strategies 78 options 35 OWL 199 OWL annotation property filler query 105 OWL annotation property value query 105 OWL constraint checking 97 OWL constraint query atom 97 OWL datatype property filler query 105 OWL datatype property value query 105 OWL instances query 87 OWL mirror 137 141 OWL object property filler query 92 OWL query 87 92 97 105 141 predicate 136 predicate query 136 preferences 44 primitive concept 65 Profiles tab 47 projection 119 projection operator 119 pseudo nominal 128 publish subscribe mechanism 193 QBox 177 qualitative spatial reasoning 143 Queries Rules tab 54 query API 157 query atom 86 query body 86 query cache 177 query conjunct 109 query consistency 171 query disjunct 110 query engine 157 query entailment 173 query head 86 101 query inconsistency 171 query inference 171 Query IO tab 54 query life cycle 160 query predicate 136 query realization 180 query realizer 180 query reasoning 171 query repository 177 query subsumption 173 queryin
289. ring color red string color green define concept traffic light and a color colorful object instance traffic light 1 traffic light instance traffic light 2 traffic light instance traffic light 3 traffic light instance traffic light 4 traffic light constrained traffic light 1 color traffic light 1 color constrained traffic light 2 color traffic light 2 color 76 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES constrained traffic light 3 color traffic light 3 color constrained traffic light 4 color traffic light 4 color constraints string color traffic light 1 color traffic light 3 constraints string color traffic light 2 color traffic light 4 constraints string lt gt color traffic light 1 color traffic light 2 constraints string lt gt color traffic light 2 red constraint entailed string color traffic light 2 green constraint entailed string color traffic light 4 green constraint entailed string color traffic light 1 red constraint entailed string color traffic light 3 red The four queries at the end all return t for true although only indefinite information is explicitly stated the color of traffic light 2 is not red Thus only green remains and due to the other constraints the colors of the other traffic lights are determined It is obvious that instead of string values one could have used nominals However opti
290. ro first 38 CHAPTER 2 USING RACERPRO AND ITS INTERFACES As a registered RacerPro user you may send your questions and bug reports to the following e mail address support racer systems com If you want to submit a bug report or a question about a certain behavior of RacerPro please attach the logfile to your e mail Of course the logfile should cover the session in which the error occurred Logging including a stack backtrace in case of an error is enabled by starting the executable as follows under Windows RacerPro exe log filename debug or under Unix RacerPro log filename debug Please include at least this information in your correspondence e Your personal name and the name of your organization e Your operating system Your contact data including telephone number The logfile see above The RacerPro build number Your transaction ID or the short license string e A description of your problem and the environment where it occurred In case you have problems with the license file license racerlicense you can start RacerPro with the option license lt license file gt This prints information about the file lt license file gt More detailed information is printed with dump license info lt filename gt Please send also this information We may need additional information about your setup or some of the data files you process to simulate the reported error condition You will greatly decrease
291. ro is based on scientific results presented in publications about theoretical and practical work on KRIS FaCT and other description logic systems See for instance 5 13 88 42 47 48 43 45 46 40 We would like to thank the team at Franz Inc http www franz com for their collaboration and for the support in making RacerPro one of the fastest and most expressive commercial OWL RDF and description logic reasoning systems The graphical user interface RacerPorter is built with the development environment from Lispworks Ltd http www lispworks com Special thanks go to Michael Hiilsen Britta Hummel Thorsten Liebig Marko Luther and Ragnhild van der Straeten for testing RacerPro in demanding applications We also would like to thank Olaf Noppens for providing the Prot g plugin for RacerPro and to Ronald Cornet for providing an earlier interface for Racer called RICE The XML RDF based part of the input interface for RacerPro is implemented using the Wilbur Se mantic Web Toolkit written by Ora Lassila For more information on Wilbur and the Wilbur source code see http wilbur rdf sourceforge net RacerPorter is built with Lispworks Common Lisp For most versions of RacerPro the DIG server interface is implemented with AllegroServe For some special versions of RacerPro however the HTTP server for the DIG interface of RacerPro is imple mented with CL HTTP which is developed and owned by John C Mallery
292. rojection to x has been carried out However then we must use an explicit projection operator in the query body since the projection is no longer the last required processing step for this query We can use the project to operator for query bodies as follows 120 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL retrieve x neg project to x and x y 4 which returns the desired result B C Instead of project to also project and pi can be used as keywords We already mentioned that the atom has known successor R is in syntactic sugar for project to x x y R and thus neg has known successor R is equivalent to neg project to x x R 4 1 4 Defined Queries nRQL offers a simple macro mechanism for the specification of defined queries For example we can associate the symbol mother of with the head x y of arity 2 and the body and x woman x y has child by using the defquery facility defquery mother of x y and x woman x y has child RacerPro replies MOTHER OF to indicate that the definition has been stored Formal and Actual Parameters The list x y in the mother of definition is called the list of formal parameters of the defini tion Such a list formal parameter list differs from a query head since only objects variables and individuals are allowed and no head projection operators are permitted A defined query ca
293. roperties Individuals OWLViz DL Query Class hierarchy Class hierarchy inferred Annotations Usage v Thing Annotations Nothing i comment i Cheesey V egetableTopping e C This class will be inconsistent This is because we have given it 2 disjoint parents which means it i America could never have any members as nothing can simultaneously be a CheeseTopping anda 2 E VegetableTopping NB Called ProbelnconsistentTopping in the ProtegeOWL Tutorial en p gt DomainConcept 9 9 9 9 e England label i France CoberturaDeQueijoComVegetais pt Germany eia gt ValuePartition Description CheeseyVegetableTopping Equivalent classes Nothing Superclasses CheeseTopping VegetableTopping Inherited anonymous classes Members m Reasoner active V Show Inferences Figure 2 32 The pizza ontology loaded and classified by RacerPro within Prot g For demonstration purposes the editors of the pizza ontology nicely documented the ontology to understand the inconsistencies As the annotations of the class CheesyVegetableTopping describes see Figure 2 32 the class is inconsistent due to a disjointness axiom between two of the parent classes of the CheesyVegetableTopping class On the lower pane the description of the selected class is shown and the parent classes are specified which are Chees
294. rtainly hidden individuals can be marked as such with special concept names and in queries they might explicitly be excluded by conjoining the negation of the marker concept automatically to the query concept However from an implementation point of view this can be provided much more efficiently if the mechanism is built into the retrieval machinery of RacerPro 194 CHAPTER 5 ADDITIONAL FACILITIES state instance document 1 article publish document 1 instance document 2 book constrained document 2 isbn 2 isbn constraints equal isbn 2 2234567 publish document 2 instance document 3 book constrained document 3 isbn 3 isbn constraints equal isbn 3 3234567 publish document 3 instance document 4 book constrained document 4 isbn 4 isbn constraints equal isbn 4 4234567 publish document 4 instance document 5 computer science book constrained document 5 isbn 5 isbn constraints equal isbn 5 5234567 publish document 5 Now we assume that a client subscribes to a certain instance retrieval query state subscribe client 1 book The answer returned by RacerPro is the following CLIENT 1 DOCUMENT 2 CLIENT 1 DOCUMENT 3 CLIENT 1 DOCUMENT 4 CLIENT 1 DOCUMENT 5 RacerPro returns a list of pairs each of which consists of a subscriber name and an individual name In this case four documents are found to be instances of the query concept subscribed and the name client 1 An ap
295. rver machine and develop your application on a less expensive portable computer Let us assume the LRacer directory is stored under Lracer Start your favorite Com mon Lisp system and evaluate load Lracer lracer sysdcl lisp Then evaluate compile load racer Lracer to compile and load LRacer You have to use the pathname that corresponds to your LRacer distribution directory of course Afterwards you can import the package RACER into your own package or access RacerPro directly from the Common Lisp User package and the Lisp listener The variable default racer host can be set to a string denoting the host on which the RacerPro server run the default is localhost You can set the tcp port for the RacerPro server by setting the variable default racer tcp port default value is 8080 You can explicitly open a server connection with the function open server connection In order to close the server connection use the function close server connection See also the macro with server connection However explicitly opening a server is not necessary it just reduces the network overhead for multiple server calls 2 2 THE RACERPRO SERVER 35 OW Llink Interface In a similar way as the direct TCP socket interfaces the RacerPro HTTP interfaces can be used from application programs and graphical interfaces in order to communicate with the RacerPro reasoner OWLlink is W3C member submission http www w3 org Submission owl
296. ry atom For example the data substrate node michael matches the query atom x Michael Wessel because the label of michael contains Michael Wessel as a conjunct and thus logically implies the query expression Michael Wessel Similarly the node description a b 1 2 3 will match the query atom x a b c 123 1 2 2 3 since a b 1 2 3 implies a b sc 123 1 2 2 3 note that 1 2 means 1 or 2 and c denotes the character c Since data query expressions are conjunctions in CNF the query retrieve x x age 34 is equivalent to retrieve y and x age x 34 Referencing Data Substrate Nodes It is possible to refer to specific nodes in the substrate by naming them in the query as it is possible to refer to specific ABox individuals in queries In order to distinguish an ABox individual in a query from the name of a data substrate node used within a query the latter ones are prefixed with as well However is not part of the name of the data substrate node but only used for referencing the node For example we can reference the substrate node michael in a nRQL query with the object name michael gt retrieve michael michael age 34 MICHAEL MICHAEL Using Data Query Predicates So far we have only used simple data literals like age 34 Michael Wessel as conjuncts in the CNF of data substrate query expressions However nRQL also offers you t
297. s x http cohse semanticweb org ontologies people Minnie http cohse semanticweb org ontologies people Tom Suppose this result shall be presented as an HTML table together with some additional information about the query which has been posed In principle it is easy to generate a HTML file using with open output file and print format statements to write some HTML However this results in ugly code For this reason some syntactic sugar is available The following query will generate an HTML file example html which is shown in Figure 4 1 MiniLisp Output Mozilla Firefox Datei Bearbeiten Ansicht Chronik Lesezeichen Extras Hilfe O file home mi wes 7 gt openSUSE Getting Started 51 Headlines MiniLisp Output Query Head x y Query Body AND y http cohse semanticweb org ontologies peoplestcat x y http cohse semanticweb org ontologies people has_pet x http cohse semanticweb org ontologies people person Query Answer Result Tuple No 1 x http cohse semanticweb org ontologies peoplestF red httpv cohse semanticweb org ontologies people Tibbs Result Tuple No 2 x httpv cohse semanticweb org ontologies people Minnie httpv cohse semanticweb org ontologies people T om Suchen indent 1 Abw rts Aufwarts Hervor Fertig e Figure 4 1 Generated HTML Page evaluate let res
298. s However conceptually age would either be an object of type cardinal or a so called concrete domain object Since these are not ABox individuals it is impossible to bind a nRQL variable to such an object Nevertheless it is possible to retrieve the individual ages of the family members please consult Section 4 1 2 A special set of so called head projection operators is offered for this purpose Inverted Roles Role query atoms can also be inverted retrieve mother child inv mother child has child is equivalent to retrieve mother child child mother inv has child Of course the answer will be the same as for retrieve mother child mother child has child Thus inverted roles are only provided for the sake of completeness Querying for Semantically Equal Individuals The NRQL EQUAL ROLE Please consider the ABox constructed as the result of executing the following sequence of statements we denote the prompt of RacerPorter or another RacerPro client with gt and the answer of RacerPro in the following line full reset OKAY FULL RESET gt define primitive role f feature t gt related f gt related f 92 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL We have constructed an ABox in which j and k denote the same individual in the domain of discourse they are semantically equal although they have different names Since k and j are fillers of a feature
299. s a woman Moreover the amount of information which is mirrored for the ABox individuals and the ABox related statements is computed according to the current nRQL mode see the documentation of set nrql mode in the Reference Manual For example using nRQL mode 0 only the told syntactic information from the ABox is used for the concept membership assertions However for the related axioms also the effects of the role hierarchy are taken into account Mode 1 is like mode 0 but also the atomic concept ancestors and the atomic concept synonyms are added to the labels of the substrate nodes In mode 2 additionally also the concept synonyms and ancestors for complex concept membership assertions are asserted to the labels of the nodes Thus if we use in mirror data box test enable smart abox mirroring in the above example then the label of alice will additionally contain human and the edge label of the edge between alice and betty also contains is relative due to the role hierarchy gt node label alice WOMAN HUMAN TOP TOP ABOX OBJECT ABOX INDIVIDUAL gt edge label alice betty C ABOX RELATIONSHIP ABOX ROLE RELATIONSHIP HAS CHILD IS RELATIVE Markers Used in the Mirror Data Substrate In general the following set of markers is used For the nodes e abox object e abox individual e abox concrete domain object e abox concrete domain value For the edges e abox object e ab
300. s are performed that are required for answering queries For instance in order to answer a query for the parents of a concept the T box must be classified However for answering an instance retrieval query this is not necessary and therefore RacerPro does not classify the T box in the standard inference mode Nevertheless if multiple instance retrieval queries are to be answered by RacerPro it might be useful to have the T box classified in order to be able to compute an index for query answering Considering a single query RacerPro cannot determine whether computing an index is worth the required computational resources Therefore RacerPro can be instructed about answering strategies for subsequent queries e In order to ensure a T box is classified you can use the statement classify tbox amp optional tbox name e To compute an index for fast instance retrieval for an A box you can call compute index for instance retrieval amp optional abox name Computing an index is usually a costly process so this should be done offline After having computed an index for an A box one might use the persistency services of RacerPro to dump the internal A box data structures for later reuse The index computation process is also known as A box realization and you can also call the function realize abox amp optional abox name to achieve the same effect e The function prepare abox can be used to compute index structures for an A box You can ca
301. s enter The command is then reexecuted More over commands in the command history are numbered To reexecute command with number lt n gt simply enter lt n gt and press enter Syntax requirements Now consider the following syntax requirements when writing on the shell tab The shell is tailored for KRSS commands in Lisp syntax therefore commands always start with When entering a complex command spanning multiple lines you can simply press enter to start a fresh line RacerPorter will not send the command to RacerPro until the last closing parenthesis has been entered We provide parenthesis matching convenient multi line input as well as pretty printing The shell also recognizes SPARQL queries which have a different syntax For entering SPARQL queries spanning multiple lines use Ctrl Enter When the SPARQL query is complete press Enter The needed for the specification of pathnames on Linux or Mac is on Alt z Apple z The current RacerPorter T box A box concept etc as indicated in the status display are available as bindings of special variables use t a c etc as documented in the status display For 2 3 RACERPORTER IN DETAILS 49 7 example use describe tbox t to supply the current RacerPorter T box as an argument to the describe tbox function Furthermore the results of the last three RacerPro commands executed via the shell are available as bindings of the three spe
302. s father gives us CC X CHARLES Y BETTY X CHARLES Y ALICE X CHARLES Y EVE X CHARLES Y DORIS X BETTY Y ALICE X BETTY Y EVE X BETTY Y DORIS X ALICE Y BETTY X ALICE EVE X ALICE Y DORIS C X EVE Y C X EVE Y ALICE C X EVE Y DORIS X DORIS Y BETTY X DORIS Y ALICE X DORIS Y EVE Please note that only female persons appear as bindings for y The role expression not has father is an example for a negated role However please note that the computational complexity of this feature is rather high Thus the extensive use of negated roles might be unadvantageous 4 1 THE NRQL LANGUAGE 91 Features and Attributes in Roles Query Atoms Please note that you may only use roles or role terms in role query atoms However also features classify as roles these are functional roles However concrete domain attributes are not permitted If define concrete domain attribute age type cardinal had been defined as a concrete domain attribute meant to represent the ages of the individual family members then you cannot use the following query to retrieve the ages of the family members retrieve person person age RacerPro will raise an error NRQL ERROR PARSER ERROR UNRECOGNIZED EXPRESSION PERSON AGE AGE As explained variables in nRQL can only be bound to ABoz individual
303. s important consequences as we will see in the following example Let us assume we have class names French Italian Wine drinker Not wine drinker and French or italian For the latter two classes the following necessary and sufficient conditions are specified French or italian French U Italian Not wine drinker Wine drinker The individual john is an instance of Not wine drinker and French or Italian Thus for john we have indefinite information More over if the following rules are specified Rule 1 French x Wine drinker x Rule 2 Italian x Wine drinker x the ontology would be inconsistent with first order semantics There are two worlds to consider Assume john is a French citizen then he must be an instance of Wine drinker due to Rule 1 But he is declared to be an instance of Not wine drinker In the other possible world john is an instance of Italian Again due to the rules he must be a Wine drinker which results in a contradiction In the rule semantics one can neither prove that john is an instance of Italian nor can one prove that john is an instance of French Thus the rules are not applied and the ontology remains consistent In order to achieve the same effect as in the first order semantics in this case a rule with precondition Not wine drinker could be added 3 7 SPECIFYING RULES 73 due Profiles shell TBoxes ABoxes Concepts Roles Individuals Assertions Axio
304. s interfaces either RacerPro specific ones maximum expressivity or standardized ones maximum portability A graphical interface called RacerPorter is provided for interacting with the server as well as for submitting server extensions and queries See Figure 1 1 for an overview on the system architecture It should be noted that RacerPro can be extended using a simple plugin mechanism For the users convenience parts of the RacerPro code are open source and can be used to extend the RacerPro reasoning server In an ontology based application usually multiple representation languages are used for different purposes The backbone is a a description logic language for defining the terminological or in tensional part of a knowledge base which is often extended with other logical languages for the extensional part such as for instance logic programming rules the region connection calculus for aspects of spatial reasoning or Allen s interval algebra for aspects of temporal reasoning just to name a few 64 While terminological reasoning T box reasoning is supported with many optimizations the RacerPro system is tailored to applications which build on the exploitation of assertional reasoning A box reasoning The main idea is that A boxes are not static parts of the ontology but are efficiently generated on the fly referring to a shared T box which is processed only once T boxes ontologies and A boxes are maintained using the
305. s like retrieve but first comes the body and then the head Thus x is bound to a c instance Using this binding it is checked by means of a TBox subquery tbox retrievel whether the individual bound to x is also an instance of any subclass of c If this is the case the result tuple resp the current binding of x is rejected see the special reject token otherwise the result tuple is constructed and returned The returned result tuples make up the final result set Please note that the combination of lambda expressions and reject token gives you the ability to define arbitrary used defined filter predicates which are executed efficiently since they are directly on the RacerPro server Finally let us consider how aggregation operators can be implemented Consider the following book store scenario full reset instance b1 book instance b2 book related bi ai has author related bi a2 has author related b2 a3 has author 148 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL define concrete domain attribute price type real instance bi price 10 0 instance b2 price 20 0 We can now determine the number of authors of the single books with the following query retrieve x lambda book let authors retrieve a book has author length authors x x book dont show lambdas p t gt x bi 2 x b2 1 Another interesting question might be to ask for the avera
306. s returned instead of BETTY BETTY as probably ex pected since the query is internally rewritten into retrieve betty and same as betty betty betty woman See below for an explanation of the SAME AS query atom Querying OWL KBs RDF Data with Concept Query Atoms OWL KBs and RDF data can be queried with concept query atoms as well Consider the following OWL document defining one instance michael of class person and one instance book123 of class book lt xml version 1 0 gt rdf RDF xmlns rdf http www w3 org 1999 02 22 rdf syntax ns xmlns xsd http www w3 org 2001 XMLSchema xmlns rdfs http www w3 0rg 2000 01 rdf schemait 88 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL xmlns owl http www w3 org 2002 07 owl xmlns http www owl ontologies com unnamed owli xml base http www owl ontologies com unnamed owl gt lt owl Ontology rdf about gt lt owl Class rdf ID person gt lt owl Class rdf ID book gt lt person rdf ID michael gt lt book rdf 123 gt lt rdf RDF gt With nRQL we can easily retrieve the instances of http www owl ontologies com unnamed owl person retrieve x x http www owl ontologies com unnamed owl person RacerPro replies http www owl ontologies com unnamed owl michael It is important to use the pipes retrieve x x http www owl ontologies com unnamed owl michael
307. s somehow incomplete Consider the concept and gt age 18 age 20 If age is concrete domain attribute of type cardinal or integer then age must be 19 Thus 19 could somehow be regarded as a told value as well However there is no way for RacerPro or nRQL to return this value as told value since RacerPro can only check the satisfiability of a concrete domain constraint system but not compute its solutions even if it could it would not be possible to return these solutions as single values in most cases However told value in nRQL is slightly more complete than the API function told value since the effect of equality statements is analyzed and taken into account Consider this example 4 1 THE NRQL LANGUAGE 105 full reset define concrete domain attribute age type cardinal constrained a a age age constrained b b age age constrained c c age age constraints a age b age b age c age c age 10 If we use the told value API function we will only get b age c age 10 as answers to told value a age told value b age told value c age even though 10 would be a more complete answer in all three cases With nRQL we can get 10 for all three told values retrieve x age x told value age x x an age RacerPro replies X C AGE TOLD VALUE AGE X 10 B X B AGE TOLD VALUE AGE X 10 C X CC AGE X A A
308. s this list Note that queries which have been started in set at a time mode appear on this list as well To manage this list use delete query delete all queries etc As long as a query is on this list the API functions will know the Id of the query and as such it is possible to access the query 2 Queries which are ready to run but have not been started yet The queries on this list are called ready queries or prepared queries No query answering thread has been created for them yet If you use retrieve queries will be started automatically and put on the list of active queries see below It is possible to apply the API function execute query to queries which are ready to run In order to put a query to this list use the API function macro prepare abox query instead of retrieve If you want to know whether a specific query is on this list call query ready p or query prepared p on the Id of the queries To retrieve the list of prepared queries use the API functions ready queries or prepared queries they are equivalent 3 A list of active queries These queries have been started There is a query answering thread associated with each query which is either currently running thus consuming CPU time or currently sleeping To get the list of active queries use the API function active queries Thus the list of active queries is further partitioned into the following two lists a Queries which are currently running The query answeri
309. s to Prot g to connect to RacerPro IK family file C Program 20Files RacerPro 20 Preview examples owl family owl C Program Files RacerPr 20 Preview examples owl family owi x File Edit Ontologies Reasoner Tools Refactor Tabs View Window Help a family 1 20 20 1 l Active Ontology Entities Classes Object Properties Data Properties individuals OWLViz DL Query if a Annotations Equivalent classes man and has sibling some parent Superclasses brother Inherited anonymous classes bas child only person brother or sister parent has sibling only brother bhas sister only has gender some female or mot has sibling some Thing bas brother only has gender some male or mot has child some Thing Figure 2 31 Prot g displaying the Family knowledge base The class uncle is selected and in the subwindow for inferred conditions are shown graphically Class hierarchy uncle is a subclass of man When selecting the different tabs in Prot g it is possible to view the told and the inferred axioms of the knowledge base by changing to the tab with the note inferred 58 CHAPTER 2 USING RACERPRO AND ITS INTERFACES 2 4 2 Using Prot g and RacerPorter in Combination Prot g
310. se more expressive language fragments Inference services for A boxes are influenced by many earlier DL systems for instance CLASSIC 11 12 In these systems the query language for finding individuals is based on concept descriptions and thus rather limited see 9 10 In addition in order to effective answer queries in CLASSIC the most specific concept names of which individuals are instances are computed in advance A box realization In contrast RacerPro was designed in such a way that the user can decide whether to compute index structures in advance or on the fly 29 Research on RacerPro has focused on concept based instance retrieval 26 as well as on a more expressive form of queries namely grounded conjunctive queries 34 35 The new Racer Query Language nRQL pronounced niracle and to be heard as miracle was one of the first expressive query languages for DL systems see Section 4 for a description of nRQL providing conjunctive queries 16 with variables ranging over named domain objects negation as failure a projection operator as well as group by and aggregation operators The formal semantics of nRQL was described in 67 68 Interestingly much later a query language semantics based on a different viewpoint was described in 14 However nRQL is nowadays seen as an implementation of the approach proposed in 14 It should be emphasized that RacerPro supports query answering with the pull mode clients se
311. se read the Appendix A of this document and check the ReadMe file that comes with the software or check our web site for further information You should also have the interactive GUI for RacerPro RacerPorter installed properly While generic knowledge editing environments such as Prot g have their merits a reasoner specific GUI gives you more control RacerPorter is in a sense unique as it is the only reasoner specific graphical user interface for ontology based software development that supports debugging in the context of 2 CHAPTER 1 INTRODUCTION reasoning applied to large knowledge bases When developing your knowledge bases you should use RacerPorter to inspect them in order to better understand the structure and implications of your data descriptions RacerPorter s visualization browsing and edition tools are quite useful not only for editing and displaying concepts taxonomies axioms and so forth RacerPorter is also helpful for managing multiple RacerPro servers Software developers who want to use RacerPro as a reasoning back end will want to have a closer look into Section 2 2 for more information about possible application scenarios and for further information about how to integrate RacerPro into software system design This document contains various hyperlinks useful to navigate through the user guide they are distinguished by their colors Green is used for citations pink for URLs and red for all other references within the
312. sed systems type 2 2 THE RACERPRO SERVER 19 RacerPro f family racer q family queries racer Under Windows you want to suppress the display of the RacerPro window The command is slightly different RacerPro c f family racer q family queries racer The option separates window management options from RacerPro options A window option we use here is c which suppress the display of the RacerPro window which is not useful in batch mode For debugging under Windows the window option p is useful RacerPro p f family racer q family queries racer If an error occurs you can read the error message in the shell window The option h prints some information about the usage of the program RacerPro see Figure 2 7 RacerPro p h usage C Programme RacerPro 26 Preview RacerPro exe h silent p silent do not produce diagnostic output f read input from specified filename xml gt XML syntax rdfs gt RDFS syntax owl gt OWL syntax other q read queries from specified filename p xml read input from specified XML filename and generate XML output ex rdfs read input from specified RDFS filename owl read input from specified OWL filename owllink read input from specified OWLlink filename dig read input from specified DIG filename p port number used by clients default 8888 proxy to specify a proxy server e g http www myproxy com 86 http http port number used by clients default 868
313. some time since the query processing thread is not put to sleep Thus in order to avoid deadlock situations nRQL will eventually not allow you to start a query at all If such a deadlock situation is encountered by nRQL execute query will return immediately with an appropriate error message gt FULL RESET OKAY FULL RESET DEFINE PRIMITIVE ROLE R DOMAIN C RANGE NOT C 36 0KAY INSTANCE I C OKAY INSTANCE J C OKAY INSTANCE K D OKAY INSTANCE L C OKAY PROCESS TUPLE AT A TIME OKAY PROCESSING TUPLE AT A TIME ENABLE LAZY TUPLE COMPUTATION OKAY LAZY MODE ENABLED gt RETRIEVE X C QUERY 1 RUNNING gt GET NEXT TUPLE LAST WARNING KB HAS CHANGED gt GET NEXT TUPLE LAST X I gt ACTIVE QUERIES QUERY 1 gt RETRIEVE X Y X Y NOT R WARNING DENIED DUE TO DEADLOCK PREVENTION THE FOLLOWING QUERIES WILL NOT TERMINATE AUTOMATICALLY SINCE THEY HAVE BEEN STARTED IN LAZY INCREMENTAL MODE QUERY 1 QUERY 2 DENIED DUE TO DEADLOCK PREVENTION 170 gt GET NEXT TUPLE CX J gt GET NEXT TUPLE X L gt GET NEXT TUPLE EXHAUSTED CHAPTER 4 LAST LAST LAST THE NEW RACERPRO QUERY LANGUAGE NRQL gt RETRIEVE X Y X Y NOT R QUERY 3 RUNNING gt GET NEXT TUPLE CX 1 J gt GET NEXT TUPLE LAST LAST WARNING KB HAS CHANG
314. soning mechanism offered by nRQL for queries are incomplete and yet experimental they are still useful The incompleteness in the query consistency checker is caused by NAF If you don t use NAF in your query then the consistency check is quite complete However the dual situation arises for the tautology checker Here is an example session demonstrating the utility of nRQL s reasoning facilities Again we have used the original family racer KB but we have entirely removed the signature statement and added the following role declarations instead define primitive role has descendant transitive t inverse descendant of define primitive role has child parent has descendant inverse has parent domain parent range person define primitive role has parent parent descendant of disjoint man woman Then nRQL should behave as follows gt report inconsistent queries OKAY REPORTING INCONSISTENT QUERIES gt report tautological queries OKAY REPORTING TAUTOLOGICAL QUERIES retrieve x and x woman x man WARNING QUERY 1 IS INCONSISTENT INCONSISTENT 172 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL gt prepare abox query x and x woman x not mother x y has child y person NRQL WARNING QUERY 3 IS INCONSISTENT QUERY 3 READY TO RUN gt execute query query 3 INCONSISTENT gt prepare abox query and x wom
315. sourceforge net Found license file C Program Files RacerPro 26 Preview license racerlicense This copy of RacerPro is licensed to Irma Sofia Espinosa Peraldi Technische Universitaet Hamburg Harburg Harburger Schlossstrasse 26 21673 Hamburg DE Initial license generated on November 83 2010 18 22 for 1 9 8 Desktop Educational for X86 Win32 This license is valid up to version 2 6 999 This license is valid until April 38 2611 23 59 This timelimited license expires in 147 days 4 hours and 16 minutes HTTP service enabled for http localhost 8080 TCP service enabled for http localhost 8688 External format of 8688 is e cr latini base External format of 8088 is e cr latini base Figure 2 6 A screenshot of the RacerPro server started under Windows Depending on the arguments provided at startup the RacerPro executable supports different modes of operation It offers a file based interface a socket based TCP stream interface and a stream interface 2 2 1 The File Interface If your knowledge bases and queries are available as files use the file interface of RacerPro i e start RacerPro with the option f In the following we assume that you have RacerPro on your search path and that you are providing the correct search path for the racer files According to the distributions the files used in the following examples are found under examples native In your favorite shell on Unix ba
316. specify the OWLlink syntax Ditto for owllink output syntax Processing knowledge bases in a distributed system can cause security problems The Rac erPro server executes statements as described in the sections below Statements that might cause security problems are save tbox save abox and save kb Files may be generated at the server computer By default these functions are not provided by the RacerPro server If you would like your RacerPro server to support these features startup RacerPro with the option u for unsafe You also have to start RacerPro with the option u if you would like to display or edit OWL files with RacerEditor and use the facility Evaluate OWL File If RacerPro is used in the server mode the option init filename defines an initial file to be processed before the server starts up For instance an initial knowledge base can be loaded into RacerPro before clients can connect The option n allows for removing the prefix of the default namespace as defined for OWL files See Chapter 5 5 for details The option t seconds allows for the specification of a timeout This is particularly useful if benchmark problems are to be solved using the file interface The option debug is useful for providing bug reports If an internal error occurs when RacerPro is started with debug a stack backtrace is printed See Section 2 2 4 about how to send a bug report Specify the option m or x to save some memory by in
317. st implies man human implies professor teacher implies teacher human define primitive role collegue inverse collegue Let us now associate the ABox test with a data substrate dat a substrate is always associated with the ABox which has the same name as the data substrate Thus we will use in data box test to create a data substrate with the name test which will be automatically associated to the ABox we have just created in abox test in data box test We can now populate the substrate and the ABox data node michael Michael Wessel age 34 and man some has knowledge DL data node ralf Ralf Moeller age 38 and professor some has knowledge DL Create an edge between Michael and Ralf and label this edge with the description 333 this is a description has collegue Moreover a related michael ralf collegue axiom is added to the associated ABox test 4 1 THE NRQL LANGUAGE 135 data edge michael ralf this is a description has collegue collegue We can ask for a description of the current substrate as well as inspect the labels of the created objects gt describe current substrate TEST TYPE THEMATIC SUBSTRATE DATA SUBSTRATE ASSOCIATED ABOX TEST ASSOCIATED TBOX TEST NO OF NODES 2 gt node label michael Michael Wessel AGE 34 edge label michael ralf this is a description HAS COLLEGUE Again note t
318. st the display options to all individuals Inds and select a depth for example depth 3 The graph can show told and implicit assertions 2 1 2 Using RacerPro from the Command Line To run the example just start RacerPro by double clicking the program icon or alternatively type RacerPro as a command in a shell window TypeRacerPro f examples native family racer q examples native family queries ra cer into a shell window in order to see the results under Windows type RacerPro f examples native family racer q examples native family queries racer see Figure 2 5 The following section describes more details on how to use RacerPro from the command line We assume that RacerPro is on the search path of your operating system 2 1 SAMPLE SESSION 17 cerPorter Profiles shen TBoxes ABoxes Concepts Roles individuals Assertions Axioms Taxonomy Role Hierarchy ABox Graph Query 10 Queries Rules Def Queries Log About Active Profile 1 Localhost Big TBoxes Big ABoxes Namespace n NIL TBox t family ABox a smith family Concept c 0 Role r 0 Individual i 0 Axiom ax 0 Request 77 indvidualdirecttypes evelsmithiamih Response Cissic Layout ic lt e e gt gt Recover 7 E Arg comp RacerPro is processing
319. st3 java P BRE System Library JavaSE 1 6 Y B Referenced Libraries public class example gt i jracer jar gt Sib public static void main String args VWrest2 src String DOCUMENT IRI file Applications RacerProX202 0X20preview examples owl people pets owl Connect Mylyn Y Brest try Connect to your ta gt example java OWLOntologyManager manager OWLManager createOWLOntologyManager ALM tools or create gt BRE System Library JavaSE 1 6 IRI docIRI IRI create DOCUMENT IRI aa gt p Referenced Libraries OWLOntology ont manager loadOntologyFromOntologyDocument docIRI OWLReasonerFactory reasonerFactory new ReasonerFactory oul x o S owlapi bin jar ConsoleProgressMonitor progressMonitor new ConsoleProgressMonitor a racer jar OWLReasonerConfiguration config new SimpleConfiguration progressMonitor BANO OWLReasoner reasoner reasonerFactory createReasoner ont config ES boolean consistent reasoner isConsistent test System out printIn Consistent consistent example System out println Wn Smain Stringth Node lt OWLClass gt bottomNode reasoner getUnsatisfiableClasses Set lt OWLClass gt unsatisfiable bottomNode getEntitiesMinusBottom if Clunsatisfiable isEmptyO System out println The following classes are unsatisfiable for OWLCloss cls unsatisfiable System out println cls Y else System out printIn There
320. stribution under the path examples swrl In Figure 3 6 the ids of the various SWRL rules are shown We will execute the rule with Id Def hasUncle 6 which in a simplified rep resentation looks as follows Person x hasParent x y hasBrother y z hasUncle x z Various semantics have been proposed for rule languages Rules have a body and a head If there exists a binding for the variables in the body such that the predicates either unary or binary predicates are possible in SWRL are satisfied then the predicate comprising the head also holds The predicates in the body see the left hand side of the arrow in the rule above are also called the precondition and the head see the right hand side of the arrow in the rule above is the consequence Variables are bound to a finite set of individuals namely those explicitly mentioned in the ontology Downloaded from http protege cim3 net file pub ontologies family swrl owl family swrl owl and edited for the purposes of this example 72 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES or A box The question is whether given a specific binding for variables the precondition has to be satisfied in one world or in all worlds We call the former semantics the first order semantics whereas the latter is called the rule semantics RacerPro applies the rule semantics This can be seen as an advantage or as a disadvantage To continue with the example now
321. structing Racer that the KRSS interface is not used for manipulating axioms This is particularly useful if the OWLAPI is used since axioms are maintained as part of the OWLAPI itself With una you can force RacerPro to apply the unique name assumption Sometimes for debugging purposes it is useful to inspect the commands your application sends to RacerPro Specify log filename to print logging information into a file see also the command logging on to switch logging on dynamically Specify temp lt directory gt if you would like to change the default directory for temporary files the default is temp under Unix based systems and the value of the environment variable TEMP or TMP under Windows Sometimes using the option silent is useful if you want to suppress any diagnostic output RacerPro supports the DIG protocol with some extensions For instance RacerPro interprets the DIG specification generated by Prot g in such a way that DIG attributes are treated as datatype properties in order to match the semantics of OWL Thus by default DIG attributes do not imply at most one filler If you have an application that relies on DIG 1 1 specify the option dig11 to instruct RacerPro to obey the original semantics of DIG attributes In case you have problems with the license file license racerlicense you can start RacerPro with the option license lt license file gt This prints information about the file lt license file gt More
322. substitute mother of a b or use retrieve 7a b neg b mother of which naturally expands into retrieve a b neg and a woman a b has child an this query is equivalent to retrieve a b union and neg a woman b top neg a b has child Sometimes it might be necessary to put a project to operator around the referenced defined query as already discussed retrieve a neg project to a b mother of Syntactically Ambiguous Queries Please note that the query retrieve a b a b mother of is syntactically ambiguous given the definition of mother of The expression is syntactically in distinguishable from a role query atom since mother of might be a role name as well The same problem occurs for concept query atoms where the second argument of the atom can either refer to a concept name or to a defined unary query In these cases nRQL will output a warning such as 122 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL WARNING MOTHER OF EXISTS IN TBOX DEFAULT ASSUMING YOU ARE REFERRING TO THE ROLE MOTHER OF informing you that the query is ambiguous but then assume that you are referring to the role or the concept with that name and not the defined query Otherwise you must use the substitute operator to disambiguate These ambiguities obviously cannot appear for definitions having more than 2 formal parameters Moreover substitute is
323. substrate node is created in the mirror e for each ABox individual e for each concrete domain object and e for each concrete domain value Edges are created in the mirror for e related as well as for e constrained axioms In order to be able to distinguish the type of a data substrate object special markers are added to the labels of these objects e The label of a data substrate node which has been created for an ABox individual will contain the special marker abox individual as a conjunct recall that data labels are descriptions in CNF e The label of node representing a concrete domain objects will contain the marker abox concrete domain object 4 1 THE NRQL LANGUAGE 139 e The label of a node representing a concrete domain value will contain the value itself as well as the marker abox concrete domain value Moreover the node also has the value as its name The related constrained and constraints Abox assertions give rise to appropriately labeled edges in the substrate connecting the different types of substrate nodes Whereas a related role assertion axiom would result in a data substrate edge connecting two nodes of type abox individual a constrained assertion would create an edge between an abox individual and an abox concrete domain object etc The following query demonstrates the use of the different markers for querying purposes retrieve x y T name of y T age of y T tv 1
324. t is possible to materialize in a triple store what can be computed by applying reasoning w r t a background ontology such that later on the results are available to all applications which may or may not use reasoning It is possible to optimized index data structures for subsequent query answering evaluate let db open triple store test directory C test ts use triple store db kb name test kb ignore import t materialize inferences test kb db db directory C test ts A box t index p t Ad hoc Querying with SPARQL Queries can also be specified in the SPARQL language and can be executed with or without reasoning w r t background ontologies sparql retrieve PREFIX lubm lt http www lehigh edu zhp2 2004 0401 univ bench owl gt SELECT x y WHERE y rdf type lumb Publication y lumb publicationAuthor x x lumb member0f http www DepartmentO UniversityO edu x rdf type lubm GraduateStudent v This is the SPARQL pendant to the first query in the example above Note that there is no need to store the OWL ontology in the triple store With RacerPro you can access your existing triple store with various different OWL ontologies An ontology can be put into a file or can possibly be retrieved from the Web A triple store is then opened an queries are answered w r t this triple store The triple store corresponds to the A box in this case 5 4 THE PUBLISH SUBSCRIBE MECHANISM 193 5 4 The
325. ta substrate query object gt gt lt data substrate query variable gt lt data substrate query individual gt lt data substrate query variable gt gt lt symbol gt symbol lt data substrate query individual gt gt lt symbol gt Syntax of head projection operators lt head projection operator gt lt attribute name gt lt abox query object gt TOLD VALUE lt attribute name gt lt abox query object gt TOLD VALUE TOLD VALUES 152 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL DATATYPE FILLER DATATYPE FILLERS FILLER FILLERS TOLD FILLER TOLD FILLERS ANNOTATION ANNOTATIONS lt QWL datatype property gt lt OWL annotation property gt lt abox query object gt lt symbol gt gt any LISP symbol e g huhu foobar http a com ontoly a WITH THE FOLLOWING EXCEPTIONS T NIL BIND INDIVIDUAL INV NOT NEG AND INTERSECTION OR UNION CAP CUP RACER SATISFIES TOP BOTTOM CONSTRAINT HAS KNOWN SUCCESSOR PROJECT PROJECT TO PI SUBSTITUTE INSERT SAME AS EQUAL INTERSECTION UNION CAP CUP NRQL EQUAL ROLE Query bodies and atoms lt query body gt gt lt empty query body gt abox query atom lt substrate query atom gt PROJECT TO PROJECT PI lt def query head gt lt query body gt AND CAP INTERSECTION lt query body gt
326. te Selected Info 5 retrieve x y 2 and x y http www lehigh edu 7Ezhp2 2 6604 6461 univ bench owltadvisor x z http www lehigh edu 7Ezhp2 2664 6461 univ bench owl takesCourse y z http www lehigh edu 7Ezhp2 2664 6461 univ bench owl teacher Of x http www lehigh edu 7Ezhp2 2 664 6461 univ bench owl GraduateStudent y http www lehigh edu 7Ezhp2 2664 6461 univ bench owl AssistantProfessor z http www lehigh edu 7Ezhp2 2 664 6461 univ bench owl GraduateCourse 5 gt http vwu Department6 University6 edu GraduateStudent76 y http www Department6 University6 edu AssistantProfessor5 z http www Department8 University8 edu GraduateCourseA Figure 5 4 A box Graph 192 CHAPTER 5 ADDITIONAL FACILITIES pretrieve x y z and x y http www lehigh edu 7Ezhp2 2004 0401 univ bench owl advisor x z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl takesCourse y z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl teacherOf x http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateStudent http www lehigh edu 7Ezhp2 2004 0401 univ bench owl AssistantProfessor z http www lehigh edu 7Ezhp2 2004 0401 univ bench owl GraduateCourse close triple store In addition i
327. ted eve betty has mother related eve charles has father for the sake of KB brevity Enter full reset and reload the file family racer into RacerPro Now that we have the features has mother and has father we can query for persons whose father is older than their mother retrieve x x x constraint has father age has mother age gt RacerPro replies EVE Note that has father age and has mother age are role feature chains ended by concrete domain attributes as required T he chains can be of arbitrary length retrieve x x x constraint has father has mother age has mother has mother age RacerPro replies X EVE The query succeeds since betty and charles are actually siblings but also have a common child eve for the sake of KB brevity We can use true role chains instead of features retrieve x y x y constraint has child has child age has child age RacerPro replies C X ALICE Y BETTY X ALICE Y CHARLES Please note that you can even use role terms instead of single roles in these chains Thus even negated and inverted roles are allowed 4 1 THE NRQL LANGUAGE 97 Complex Predicate Expressions So far we have only used simple predicate names like in constraint query atoms You can also use complex predicate expressions Suppose you want to find out who is at least 40 years older than whom Thus there must be a di
328. tes e update download and install online updates e update from URL default http www racer systems com Note again that under Windows RacerPro options have to be separated with from window manager options see the next section for an example The following options are important to control the behavior or the console window e The option p make the console windows persistent i e you have to explicitly close the window This is useful to read error messages e The option c instructs RacerPro not to open the console window This option is useful for file based operation of RacerPro batch mode 2 2 4 How to Send Bug Reports Although RacerPro has been used in some application projects it might be the case that you detect a bug with respect to a particular knowledge base In this case please send us the knowledge base together with the query as well as a description of the RacerPro version and operating system It would be helpful if the knowledge base were stripped down to the essential parts to reproduce that bug Before submitting a bug report please make sure to download the latest version of RacerPro Sometimes it might happen that answering times for queries do not correspond adequately to the problem that is to be solved by RacerPro If you expect faster behavior please do not hesitate to send us the application knowledge base and the query or queries that cause problems In any case get the latest version of RacerP
329. th NEG is constructed In fact we do not want to have the complement of and substitute mother of m c man 4 1 THE NRQL LANGUAGE 123 which is the expression union and neg x woman top c neg x c has child and neg man top x but the complement of project to m and substitute mother of m c c man which is the expression neg project to x union and neg x woman top c neg x c has child and neg c man top x See also Section 4 1 3 for the discussion of project to Thus we must use retrieve x neg project to x substitute mother of male child x to get the desired result X CHARLES X DORIS X JAMES X EVE X BETTY The API for Defined Queries There are various nRQL API functions for accessing and manipulating the defined queries Please refer to the Reference Manual It is not yet possible to define TBox queries However defined queries can be used for rules as well Defined Queries Belong to the TBox Please note that the definitions are not global but local By default the defined queries are put into a data structure according to the current tbox Thus if the current TBox changes the definitions are changing too If you want to put a definition into a TBox other than the current one you can supply an optional keyword argument tbox to defquery and related API functions and macros The
330. therefore a keyword and thus cannot be used to refer to an individual name Thus you should not have an individual named substitute in an ABox which you intend to query with nRQL Using Defined Queries in Query Definitions Of course it is possible to use defined queries in query definitions However cyclic definitions are prohibited Consider defquery mother of male child m and substitute mother of m c c man retrieve x substitute mother of male child x RacerPro replies ALICE Again the alternative syntax can be used defquery mother of male child m and m c mother of c man retrieve x x mother of male child Problems with NAF negated Defined Queries Let us discuss a problem which is related to NAF negated defined queries Suppose we want to know who is not a mother of a male child Since we have just defined a query mother of male child x we will first come up with the query retrieve x neg substitute mother of male child x But this query returns the unintended answer CC X CHARLES X JAMES X DORIS X EVE X BETTY X ALICE Since ALICE is included in answer of retrieve x x mother of male child we have expected that X ALICE would be missing from the answer of retrieve x neg x mother of male child This problem can again be resolved by applying one more projection operator before the complement wi
331. tional language called miniLisp For instance query results can be postprocessed by the miniLisp interpreter running functional pro grams being sent to the server such that query results can be sent in application specific XML formats to client programs via the built in RacerPro web server The language miniLisp is designed in such way that termination of miniLisp programs is guaranteed and miniLisp can be used to specify rather complex queries and server extensions while the reasoning server is running The functional language miniLisp can be extended by application programs e g in the same sense that application programs can generate Javascript program on the fly and send them to the browser In combination with a miniLisp for manipulating query results on the server nRQL queries en sure that it is not necessary to transfer large sets of A box assertions from the inference server to application programs For more complex extensions RacerPro supports a plugin interface Thus compiled programs can encode arbitrary algorithms on the RacerPro server Plug ins have been used for instance for developing non standard inference algorithms 62 Using the open source library OntoLisp large parts of the RacerPro code for syntactically processing ontologies are publicly available Ontolisp can be used for developing new reasoners as well various Common Lisp systems are supported The graphical interface RacerPorter 69 can be used to explore ax
332. tributes of type real have to be in the form of linear inequa tions with order relations where the attribute names play the role of variables If an expression is built with the rule for aexpr4 see Figure 3 2 a so called nonlinear constraint is specified In this case only equations and inequations lt gt but no order constraints gt gt lt lt are allowed and the attributes must be of type complex If an expression is built with the rule for aexpr5 see Figure 3 2 a so called cardinal linear constraint is specified i e attributes are constrained to be a natural number including zero RacerPro also supports a concrete domain for representing equations about strings with predicates string and string lt gt The use of concepts with concrete domain expressions is illustrated with examples in Section 3 5 For the declaration of types for attributes see also Section 3 5 DL notation RacerPro syntax Concrete filler exists restriction JA Tp a A or an A No concrete filler restriction VA lp no A Integer predicate exists restriction JA min min A z with z Z JA maz max A z djA equal A z Real predicate exists restriction JA Aa P CP aexpr aexpr with P gt gt lt e An all restriction of the form YA1 A4 P is currently not directly supported However it can be expressed as a disjunction VA4 Lp Ll LIVAs Lp LIHA 3 3 Con
333. trieve Multi selection of result items individuals or concept names is supported The Queries Rules tab This is a simple list display Queries and rules are maintained as objects similar to T boxes and A boxes by RacerPro As such queries and rules have a complex life cycle and a state This tab is used to manage queries and rules as well as their states Queries and rules are A box specific The list shows basic information about the loaded queries for the current RacerPorter A box Each query has an ID a state etc Moreover the list can be advised to display only queries rules in certain states It is thus possible to focus exclusively on queries rules which have terminated which are currently running which are prepared and thus ready to run etc The list supports only single selection Thus only one current query rule can be selected see status field Query Rule and variable qor Some query rule specific commands are available via buttons Note that the commands are applied to the current query rule as indicated by the Query Rule field in the status display The Defined Queries tab A defined query is a simple macro for a complex nRQL query body Defined queries must by acyclic This tab simply lists all query definitions Defined queries are T box specific Some commands to maintain the definitions are provided as buttons as well The list supports only single selection Thus only one current de
334. ts loading triples from secondary memory e g as provided by the AllegroGraph triple store http www franz com 8 CHAPTER 1 INTRODUCTION 1 3 Application Areas For all software systems and in particular for a knowledge representation and reasoning engine it holds that the system architecture is influenced by typical application areas for which it should be most effective This is true also for the RacerPro system a practical software system for building knowledge based systems for demanding application scenarios ranging from autonomous agents on the semantic web to knowledge based software engineering Description logic systems are no databases Although one can use RacerPro for storing data using A boxes probably databases provide better support with respect to persistency and transactions However databases can hardly be used when indefinite information is to be handled in an applica tion e g John was seen playing with a ball but I cannot remember it was soccer or basket ball so he must be a soccer player or a basket ball player Thus rather dealing with data description logics systems deal with data descriptions which might possibly involve indefinite knowledge about particular domain objects Being able to deal with indefinite information of this kind is important when information about data comes in from various sources and in situations where sources are for instance used to exclude certain cases that are possible
335. tuple is called The thread computing the tuples which is called the query answering thread in the following is put to sleep and get next tuple re awakes it e In the so called eager incremental mode the query answering is not put to sleep Instead it continues to compute tuple after tuple even if the application has not yet requested these future tuples These tuples are put into a queue for future requests The API behaves the same for both modes In both cases the query answering thread dies when all tuples have been computed or when the query is manually aborted by the user or if a timeout is reached or the maximal number of requested tuples bound is reached The query becomes inactive then 4 2 2 The Life Cycle of a Query A query has a life cycle It is created then made active computes tuples eventually goes to sleep will be reactivated compute some more tuples etc and eventually dies RacerPorter provides the Queries tab which can be used to inspect and manage the queries as well as their current states Internally the nRQL engine maintains a number of lists to maintain the life cycles of queries similar to the scheduler found in operating systems 1 A list of all queries This list includes queries which have not yet been started queries which are currently running or waiting and queries which have already been processed and thus been terminated A corresponding API function named all queries return
336. ually by pushing the appropriate Clear Sel button before a fresh Search amp Select is performed The graph panes are more complicated to handle since they allow to specify focus layout as well as update options In the case of the A box Graph pane one can determine which individuals and which edges are displayed Thus for both individuals and roles the focus can be set to the current objects to the selected objects or to all objects Selected objects are highlighted Selected items will appear on the top of the list if the Sel First checkbox is enabled e g selected concepts are listed before the other concepts in the Concepts tab Sometimes one wants to focus only on the selected objects This is the purpose of the Sel Concepts Sel Roles or Sel Inds checkbox Additional buttons allow to specify whether the graph display shall be updated automatically if the focus or layout options changes or whether the user determines when an update is performed In the latter case the user first uses the button Request Graph to acquire the information from RacerPro phase 1 Once the graph is available the Display Graph button becomes enabled if pushed the graph layout is computed and displayed phase 2 Both phases can be canceled and different focus and layout options selected subsequently if they should take too long Some of the push buttons send commands to a connected
337. ulk data from relational databases would qualify for the incomplete modes In order to query such a potentially huge but simply structured ABox nRQL can be configured in such a way that it uses only the syntactic told information from the ABox for query answering Thus query answering can be implemented using plain relational lookup techniques and no or only very cheap reasoning is required It is also possible to take TBox information into account however in this case the TBox should be classified first in order to get as many answers as possible The nRQL Modes in Detail The nRQL engine offers the following degrees of completeness for query answering which are now discussed in oder of increasing completeness 1 Told information querying Mode 0 In this setting to answer a nRQL query only the syntactic told information from an ABox will be used which is given by the ABox assertions For example if an ABox contains the assertion instance betty mother then retrieve x x mother will correctly return X BETTY but the query retrieve x x woman will FAIL since this information is not explicitly given in the ABox The mode is therefore severely incomplete For example for instance i a instance i b either retrieve x x a and retrieve x x b will return X I but the query retrieve x x and a b fails as well In principle you could write a nRQL rule to augment the ABox syntactical
338. umber of delivered answer tuples can be bounded a timeout is settable and the incomplete modes are available Also permutations of answer tuples can be excluded Support for maintaining and querying so called hybrid representations A so called substrate representation layer can be associated with an ABox to create a layered hybrid representa tion The data substrate as well as the RCC substrate are currently available and works for OWL Once created the hybrid representation can be queried with nRQL nRQL is a hybrid query language Thus some atoms in a hybrid nRQL query address the ABox whereas the other query atoms address the substrate representation which is associated with the ABox to be queried Expressive means e g certain predicates for constraint checking which cannot be allowed in the ABox part of nRQL due to reasons of decidability are offered in the substrate part of a hybrid nRQL query The substrate query atoms can be used for constraint and model checking purposes For example if an RCC substrate RCC network is associated with an ABox then RCC constraint checking is supported though nRQL Note that the specific characteristics of qualitative spatial RCC relationships cannot be adequately represented and enforced in the ABox thus specific facilities representation and querying facilities such as the RCC substrate are offered Reasoning on queries This functionality is currently still experimental and incomplete
339. umber restrictions 43 DL notation RacerPro syntax At most restriction lt nR at most n R At least restriction gt R at least R Exactly restriction nR exactly n R n R C at most n R C n R C at least n R C n R C exactly n R C Qualified at most restriction Qualified at least restriction Qualified exactly restriction I IV IA Actually the exactly restriction exactly n R is an abbreviation for the concept term and at least n R at most m R and exactly n R is an abbreviation for the concept term and at least n R C at most n R C 64 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES There are two concepts implicitly declared in every T box the concept top T denotes the top most concept in the hierarchy and the concept bottom L denotes the inconsistent concept which is a subconcept to all other concepts Note that 1 can also be expressed as C LI 2C 4C In RacerPro T is denoted as top and L is denoted as bottom Concrete domain concepts state concrete predicate restrictions for attribute fillers see Fig ure 3 2 RacerPro currently supports three unary predicates for integer attributes min max equal six nary predicates for real attributes gt gt lt lt lt gt a unary existential predicate with two syntactical variants a or an and a special predicate restriction disallowing a concrete domain filler no The restrictions for at
340. unction owl read file e g owl read file lt file owl gt maintain owlapi axioms t can create OWL axioms automatically during the parsing of an OWL document or created during the evaluation of an OWL buffer with the RacerEditor An OWL axiom object is simply a record like data structure an object which has an ID a type and various axiom type specific attributes With the axiom type selector on the left side the types of axioms to be displayed in the list on the right side is determined Note that axiom types are organized in a class hierarchy Some axiom types are abstract Axioms of abstract axiom classes cannot be created Axioms are contained in an ontology container Each ontology container contains a set of axioms Moreover an ontology container is contained in a so called reasoner container Each reasoner con tainer corresponds to a RacerPro KB a T box A box pair with same name An axiom in an ontology container can either be loaded or unloaded A loaded axiom is considered for reasoning with the T box A box which corresponds to the reasoner container There is one default reasoner container which is called the OWLAPI KB reasoner Please note that there is also a corresponding T box A box with that name The reasoner and ontology containers can be selected from the combo boxes showing the current reasoner and current ontology container The content of the ontology combo box depends on the current reasoner container
341. upport these scenarios from a GUI point of view Figure 1 1 RacerPro System Architecture The T box an A box refers to can also be changed but obviously this requires complete reprocessing of the assertions in the A box 4 CHAPTER 1 INTRODUCTION 1 1 2 Description and Query Languages Ontologies are based on fragments of first order logic for describing a shared conceptualization of a domain using concept and role descriptions called classes and properties in OWL respectively The initial representation language of RacerPro was ACCNH p D 23 and RacerPro was the first system which efficiently supported concrete domains for T box and A box reasoning 31 32 RacerPro was then extended to also support inverse roles and qualitative number restrictions 36 as part of the description logic DL SHTQ 44 a practically relevant subset of OWL Role axioms SRTQ 40 are another language construct that has been integrated into RacerPro Since RacerPro supports concrete domains effectively it was found that nominals SHOTQ 41 were not of utmost importance for RacerPro users 35 Since multiple A boxes should refer to a single T box preprocessed and indexed offline before A box query answering A box assertions should not introduce implicit subsumption relationships a design principle that is in general broken if nominals are supported RacerPro does support nominals from a syntactical point of view in terms of the OWL langu
342. use of arbitrary concept and role terms TBoxes or OWL class definitions supply the domain specific vocabulary to be exploited in the queries However nRQL offers much more than plain old conjunctive queries The features of the nRQL language can be summarized as follows e Complex queries are built from query atoms nRQL offers concept query atoms role query atoms constraint query atoms and SAME AS query atoms as well as some auxiliary query atoms Query atoms are combined to form complex queries with the query constructors and union neg and project to 8l 82 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL e nRQL has a well defined syntax and clean compositional semantics We claim that the language is easy to understand since users of RacerPro are already familiar with the notion of logical entailment nRQL only offers so called must bind or distinguished variables which range solely over the individuals of an ABox resp individuals of an RDF OWL document Thus a concept query atom such as x mother has exactly the same semantics as concept instances mother A variable is only bound to an ABox individual if this individual satisfies the query Satisfies means that the query resulting from substituting all variables with their bindings is logically entailed by the KB Purely existentially quantified statements there exists a filler of the has child role of x such that can be made by exploiting th
343. values of these concrete domain objects are retrieved using TOLD VALUE AGE ALICE This yields a list of concrete domain values 80 Of course also variables can be used retrieve x age x told value age x x and human an age gt age 30 RacerPro replies CC X ALICE CAGE ALICE HUHU ALICE AGE C TOLD VALUE AGE X NO TOLD VALUE 80 X BETTY AGE NO KNOWN CD OBJECTS C TOLD VALUE AGE X NO KNOWN CD OBJECTS X CHARLES AGE X NO KNOWN CD OBJECTS TOLD VALUE AGE X NO KNOWN CD OBJECTS Please note that we can use ordinary concept query atoms such as x and human an age gt age 30 to specify rather complex retrieval conditions on the fillers The same applies to OWL datatype properties see below The Attribute Projection Operator in More Detail The attribute projection operator age alice retrieves the concrete domain objects from the ABox which are known to be fillers of the age concrete domain attribute of alice This operator is available for each concrete domain attribute defined in the referenced TBox Thus retrieve alice age alice bind individual alice returns ALICE AGE ALICE ALICE AGE 104 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL In case there is more than one concrete domain object filler for the age attribute of alice e g if we also add constrained alice huhu age to the K
344. waiting rules 4 processed rules terminated rules inactive rules all equivalent Note that there is yet no module which automatically checks for applicable rules and applies them automatically The rules have to be fired manually However the API function applicable rules returns the rules which can fire 4 2 4 How to Implement Your Own Rule Application Strategy nRQL does not offer a fixed rule application strategy other than the simple strategy add all consequences of a rule to an ABox This strategy works only if nRQL rules are used in the so called set at a time mode In the set at a time mode all computed produced rule consequences can be added auto matically to an ABox if nRQL is in add rule consequences automatically mode All com puted rule consequences will be added to the ABox after the rule has terminated In case dont add rule consequences automatically mode is used the computed set of rule conse quences will be memorized and later add chosen sets of rule consequences can be called on this rule to change the ABox by adding the memorized rule consequences produced by this rule although nothing is really chosen here please read further However it is also possible to use the incremental tuple at a time mode for rules In this case the nRQL API supports you with appropriate functions which you will need in order to implement domain specific rule application strategies As in the incremental query ans
345. wer String RacerRes parsingTest RacerResult popWith String void pushWith String Object void RacerBooleanArgument boolean b racerCall Object RacerResult racerCallString Object StringBuil RacerStringArgument String Racer RacerSymbolArgument String Race returnBoolean RacerResult booleai returnBoolean String boolean send StringBuilder RacerResult sendRaw String String setPrintWarningMessages boolean simpleParse String String transferFile String String void acerClientException class tacerKeyword class tacerList class acerLiteral class tacerNull class tacerNumber class acerResult class acerString class ees D Test java 25 2 2 THE RACERPRO SERVER package test import com racersystems jracer public class Test epublic static void main String ar I la terminated Test Java Application System Library Java JavaVirtu String ip 127 0 0 1 int port 8088 String filename Applicatior RacerClient racer new RacerCl try racer openConnection System out println racer s System out println racer s racer closeConnection catch Exception e e printStackTrace Problems Javadoc B Declaration Debug Run History Run As Run Configurations Debug History Debug As Debug Configurations IA All References 2 All Instances Instance Count Watch
346. wer is indicated Multiple ways to pos itively answer the query are possibly generated in other cases If the optional keyword ar gument final consistency checking p t is used RacerPro checks if the A box would re main consistent if the hypothesized assertion were added to the A box The additional option incremental consistency checking p t might be more efficient in some cases intermediate checks but there is some overhead with multiple consistency checks Now assume that there are some additional assertions added as in the following example full reset in knowledge base test define primitive role near define primitive role has part disjoint pole bar 188 CHAPTER 5 ADDITIONAL FACILITIES disjoint pv in start phase pv in turn phase define rule x y near and z x has part z y has part x pole y human z pole vault z pv in start phase define rule x y near and z x has part z y has part x bar y human z pole vault z pv in turn phase instance p1 pole instance h1 human instance 1 pole vault instance 1 pv in start phase related e1 p1 has part related hi has part Given the statements in this knowledge base on can ask the query from above again retrieve with explanation pi hi near final consistency checking p t The answer is now t tuple new inds hypothesized assertions This means pi h1 near would
347. wering modes instead of returning the whole set of sets of rule consequences at once in a bunch one big set nRQL will incrementally return one set of rule consequences constructed after the other one at a time 162 CHAPTER 4 THE NEW RACERPRO QUERY LANGUAGE NRQL Thus in the tuple at a time mode the next set of rule consequences must be explicitly requested with get next set of rule consequences Then nRQL can be advised to memorize this computed set of rule consequences with choose current set of rule consequences In case nRQL is in add rule consequences automatically mode the chosen sets of rule consequences are added automatically to the ABox after the last set has been delivered and the rule is processed Other wise the API function add chosen sets of rule consequences must be used to add the chosen sets of consequence manually However this function cannot be called until the rule terminates Please note that an aborted rule never adds rule consequences to an ABox Let us consider an example session gt full reset OKAY FULL RESET process tuple at a time OKAY PROCESSING TUPLE AT A TIME gt instance betty woman NIL instance doris woman NIL gt prepare abox rule x woman x mother related x new ind child of x has child RULE 1 READY TO RUN Vv ready rules RULE 1 gt applicable rules RULE 1 gt get next set of rule consequences rule 1
348. wers of the argument queries retrieve x x C and retrieve x x not C Note that due to the Open World Semantics there can be individuals which can neither be proven to be instances of the concept C nor be proven to be instances of the concept NOT C For example consider the ABox instance i top Onthis ABox retrieve x union x c x not c returns NIL but retrieve x x or c not c returns of course x i NEG The Negation As Failure Constructor A NEG constructor is provided which implements a Negation as Failure NAF Semantics NAF is especially useful for measuring the completeness of the modeling in an ABox which is impor tant for many applications Users will probably be familiar with the PROLOG logic programming language which also offers NAF NAF is quite different from classic true negation The following discussions will make this clear Negation as Failure for Concept Query Atoms Consider this query to family racer retrieve x x grandmother RacerPro replies X ALICE Thus RacerPro can prove that alice is a grandmother Fine If we now use a negated concept in the concept query atom in this query retrieve x x NOT grandmother then we get X CHARLES since charles is a man and thus he cannot be a grandmother RacerPro is able to prove that charles is an instance of not grandmother given the definitions of man and gra
349. which are excluded due to injective variables for all role terms R Suppose we are now looking for people without known explicitly modeled children Unfortunately the query retrieve x neg x has child will not solve the task since the answer is X EVE X BETTY X DORIS X CHARLES X ALICE However we already know that only betty has children doris and eve What has gone wrong nRQL has first computed the answer of x y has child Then the set difference w r t the set of all pairs of individuals was constructed Finally a projection to the first component of these pairs was carried out Since as we have already seen the answer to neg x y has child also includes the pairs X BETTY Y ALICE the projection to x also includes betty In a next attempt we try the query retrieve x x not some has child top which yields NIL What has gone wrong Again due to the open world semantics if an individual in the ABox does not have a known has child successor then this does not mean that there cannot be any children at all for this individual There is just no known such child Again we will need the NEG operator instead of NOT retrieve x neg x some has child top which then yields CC X DORIS X EVE However there is a problem with this query as well Suppose that instance doris mother is added to the Abox Thus if we query again with retrieve
350. wo pairs of individuals IN and IN and IN and IN3 are related via a transitive role R then IN and IN3 are also related via R Role Hierarchies define super and subrole relationships between roles If R is a superrole of Re then for all pairs of individuals between which holds R4 must hold too The properties of a declared role induced by its superrole are shown in Figure 3 4 The table should be read as follows For example if a role RN is declared as a simple role and it has a feature EN as a superrole then RN will be a feature itself The combination of a feature having a transitive superrole is not allowed and features cannot be transitive Note that transitive roles and roles with transitive subroles may not be used in number restrictions 66 CHAPTER 3 MODELING LANGUAGES AND BASIC REASONING SERVICES Superrole RN RIR WE Subrole RN R RIR F declared as RE RE RT element of F F lll a F Figure 3 4 Conflicting declared and inherited role properties RacerPro does not support role terms as specified in the KRSS However a role being the conjunc tion of other roles can as well be expressed by using the role hierarchy cf 13 The KRSS like declaration of the role define primitive role RN and RN RN2 can be approximated in RacerPro by define primitive role RN parents RN RN2 KRSS DL notation define primitive role RN domai
351. x is created on demand if needed The QBox serves as a hierarchical cache The service is still experimental and should be considered an non essential add on For each new query to be answered its set of most specific subsumers as well as its most general subsumes are computed This process is called query classification The QBox can be seen as a taxonomy for queries similar to the taxonomy which is computed from a TBox Once a query has been classified cached answer sets from its parent and children queries in that QBox will exploited for optimization purposes as tuple caches The incompleteness of the query entailment check is not an issue here since the QBox is only used as a cache and thus for optimization purposes If a classified query must be executed then the cached answer sets of parent queries direct sub suming queries can be utilized as superset caches and the cached answers sets of child queries direct subsumed queries will be exploited as subset caches In case the QBox already contains an equivalent query with a cached answer set this set will be returned immediately The query entailment check which is used for query classification is stricter than the one discussed in the previous Section Here we additionally require that the object vectors must have equal length Otherwise the queries cannot be in a QBox subsumption entailment relationship to one another This is due to the fact that we want to exploit cach
352. y C Interface Connect Mylyn E Copy Qualified Name G Enum Connect to your task and Paste sv G Annotation bale X Delete g Source Folder 19 Java Working Set Remove from Context XEL C5 Folder a Build Path gt File Source XES gt g Untitled Text File An outline is not available Refactor JUnit Test Case Import Task A t Export 4 Example Refresh F5 _ Assign Working Sets Other MN Run As gt Debug As gt Validate Add Remove Lisp Nature E Javadoc 9 Declaration veg Compare With Restore from Local History Resource Path Location Type 1 Maven gt Team _ Properties 1 src test Figure 2 12 Create a new package ooo Java Eclipse Users rm Documents workspace racer users guide Tc l 44 ES I Package Explorer 53 Ex m E Task List 22 gt 2 8 e Yi testi aoo sre gt B JRE System Library JavaSE 1 6 Java Package Find gt All gt Acti V Bi Referenced Libraries Create a new Java package gt jracer jar Y lib gy jracer jar Creates folders corresponding to packages Source folder test1 src Connect Mylyn 2 to your task and oT Neo cums C Create local task Outline 2 H v An outline is not available Type src test Figure 2 13 Call the package test 2 2 THE RACERPRO
353. y r So the query body retrieves all x y individuals which stand in an R relationship for each x tuple one more line is attached to the file test csv Regarding point 2 let us illustrate how combined TBox ABox queries can be used to retrieve the direct instances of a concept which has been requested by many users Let us create two concepts and such that is a sub concept child concept of full reset gt okay full reset define concept c some r top OKAY Vv define concept and e gt OKAY We can verify that d is indeed a child concept of c using a so called TBox query tbox retrieve x c x has child gt d Let us create two individuals so that i and j are instances of c moreover j is also an instances of d 4 1 THE NRQL LANGUAGE 147 Uu related i j r OKAY Vv related j k r gt OKAY instance j e gt OKAY retrieve x x c gt j Cx 1 retrieve x x d gt j Thus both i j c instances However only i is a direct instance We can retrieve these direct instances of c as follows retrievel c CC lambda x if some lambda subclass retrieve x subclass flatten tbox retrievel c subclass has child C lambda subclass subclass subclass reject x x x gt 1 Basically retrievei i
354. y tab 52 TBox query 129 Terms and Conditions 207 told value query 101 transitive role 65 tuple at a time mode 157 two phase query processing 166 unary query atom 85 unique name assumption 70 78 value restriction 62 variable 85 warning token 166 INDEX
Download Pdf Manuals
Related Search
Related Contents
AL5000 Service Manual-116476-11-03-08 MANUEL de SERVICE TECHNIQUE INSTRUCTIONS DE L`ELECTRO-TESTEUR ELIT-1000 Series - Mouser Electronics USER MANUAL Manual del usuario Page 1 Page 2 Page 3 平成2 6年度 富谷町立明石台小学校放課後 Copyright © All rights reserved.
Failed to retrieve file