Home

RACER User's Guide and Reference Manual Version 1.6.1

image

Contents

1. Description Syntax Arguments Values Examples See also Gets all pairs of individuals that are related via the specified relation retrieve related individuals R abor R abor yole term ABox object List of pairs of individual names retrieve related individuals has pet find abox peanuts characters may yield Charlie Brown Snoopy John Arbuckle Garfield Function individuals related p on page related individuals macro Description Syntax Arguments Values Examples See also Gets all pairs of individuals that are related via the specified relation related individuals R amp optional ABN abox name current abox R role term ABN ABox name List of pairs of individual names retrieve related individuals has pet find abox peanuts characters may yield Charlie Brown Snoopy John Arbuckle Garfield Function individuals related p on page 67 retrieve individual filled roles function Description Syntax Arguments Values Examples See also This function gets all roles that hold between the specified pair of individu als retrieve individual filled roles IN IN aboz IN individual name of the predecessor IN5 individual name of the role filler abor ABox object List of role terms retrieve individual filled roles Charlie Brown Snoopy find abox peanuts characters F
2. 335 Betty is mother of Doris and Eve instance betty mother related betty doris has child related betty eve has child Charles is the brother of Betty and only Betty instance charles brother related charles betty has sibling 335 Closing the role has sibling for charles instance charles at most 1 has sibling Doris has the sister Eve related doris eve has sister 333 Eve has the sister Doris related eve doris has sister B Integrated Sample Knowledge Base This section shows an integrated version of the family knowledge base 333 the following forms are assumed to be contained in a 333 file racer examples family kb lisp in knowledge base family smith family 73 signature atomic concepts person human female male woman man parent mother father grandmother aunt uncle sister brother roles has descendant transitive t has child parent has descendant has sibling has sister parent has sibling has brother parent has sibling has gender feature t individuals alice betty charles doris eve domain range restrictions for roles implies top all has child person 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 the concepts implies person and
3. List of role terms 61 role parents KRSS macro Description Gets the roles from the TBox that directly subsume the given role in the role hierarchy Syntax role parents R amp optional TBN tbox name current tbox Arguments R role term TBN TBox name Values List of role terms atomic role parents function Description Gets the roles from the TBox that directly subsume the given role in the role hierarchy Syntax atomic role parents R tbox Arguments R role term tbox TBox object Values List of role terms loop over tboxes function Description Iterator function for all TBoxes Syntax loop over tboxes tbox variable loop clause Arguments tboz variable variable for a TBox object loop clause loop clause all tboxes function Description Returns the names of all known TBoxes Syntax all tboxes Values List of TBox names 62 all atomic concepts function Description Returns all atomic concepts from the specified TBox Syntax all atomic concepts amp optional tbox current tbox Arguments thor TBox object Values List of concept names Remarks all atomic concepts find tbox my tbox all roles function Description Returns all roles and features from the specified TBox Syntax all roles amp optional tbox current tbox Arguments thor TBox object Values List of role terms Examples all roles
4. concept descendants C amp optional TBN tbox name current tbox C TBN concept term TBox name List of name sets This macro return the transitive closure of the macro concept children 57 atomic concept descendants function Description Syntax Arguments Values Remarks Gets all atomic concepts of a TBox which are subsumed by the specified concept atomic concept descendants C thor C concept term tbox TBox object List of name sets Returns the transitive closure from the call of atomic concept children concept ancestors KRSS macro Description Syntax Arguments Values Remarks Gets all atomic concepts of a TBox which are subsuming the specified con cept concept ancestors C amp optional TBN tbox name current tbox C concept term TBN TBox name List of name sets This macro return the transitive closure of the macro concept parents atomic concept ancestors function Description Syntax Arguments Values Remarks Gets all atomic concepts of a TBox which are subsuming the specified con cept atomic concept ancestors C tbox C concept term tbox TBox object List of name sets Returns the transitive closure from the call of atomic concept parents 58 concept children KRSS macro Description Gets the direct subsumees of the specified concept in the TBox Syntax concept children
5. Examples define concept Grandmother and Mother some has child Parent define disjoint primitive concept KRSS macro Description This axiom states the disjointness of a group of concepts Syntax define disjoint primitive concept CN GNL C Arguments CN concept name GNL group name list which lists all groups to which CN belongs to among other concepts All elements of each group are declared to be disjoint C concept term that is implied by CN Remarks This function is just supplied to be compatible with the KRSS Examples define disjoint primitive concept January Month exactly 31 has days define disjoint primitive concept February Month and at least 28 has days at most 29 has days 30 add concept axiom function Description This function adds a concept axiom to a TBox Syntax add concept axiom thor Cj Ch amp key inclusion p nil Arguments thor TBox object C4 C5 concept term inclusion p boolean indicating if the concept axiom is an inclusion axiom GCI or an equality axiom The default is to state an inclusion Values thor Remarks RACER imposes no constraints on the sequence of concept axiom declara tions with add concept axiom i e forward references to atomic concepts for which other concept axioms are added later are supported in RACER add disjointness axiom function Description This function adds a disjointness concept axiom to a TBox Syntax add disjointness axiom
6. concept instances KRSS macro Description Gets all individuals from an ABox that are instances of the specified concept Syntax concept instances C amp optional ABN abox name current abox Arguments C concept term ABN ABox name Values List of individual names retrieve concept instances function Description Gets all individuals from an ABox that are instances of the specified concept Syntax retrieve concept instances C abox Arguments C concept term abor ABox object Values List of individual names individual fillers KRSS macro Description Gets all individuals that are fillers of a role for a specified individual Syntax individual fillers IN R amp optional ABN abox name current abox Arguments IN individual name of the predecessor R role term ABN ABox name Values List of individual names Examples individual fillers Charlie Brown has pet individual fillers Snoopy inv has pet 66 retrieve individual fillers function Description Syntax Arguments Values Examples Gets all individuals that are fillers of a role for a specified individual retrieve individual fillers IN R abor IN individual name of the predecessor R role term abor ABox object List of individual names retrieve individual fillers Charlie Brown has pet find abox peanuts characters retrieve related individuals function
7. equivalent C C35 Concept disjointness axioms state the disjointness between several concepts Disjoint concepts do not have instances in common DL notation C1 1 NC L RACER syntax disjoint Cj Cp Actually a concept equation C1 C can be expressed by the two GCIs C4 E Cy and Cz E C The disjointness of the concepts Cj C 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 RACER 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 concept term DL notation CN E C RACER syntax define primitive concept CN C Concept definitions state the equality between a concept name and a concept term DL notation CN C RACER syntax define concept CN C Concept axioms may be cyclic in RACER There may also be forward references to con cepts which will be introduced with define concept or define primitive concept in subsequent axioms The terminology of RACER TBox 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 fir
8. macro Description Syntax Arguments Values Remarks See also Checks if the two concepts are equivalent in the given TBox concept equivalent C1 C5 amp optional tbor current tbox C4 C5 concept term tbox TBox object Returns t if C and C5 are equivalent concepts in tbox and nil otherwise For testing whether two concept terms are equivalent with respect to a TBox tboz Function atomic concept synonyms and function concept subsumes p on page 42 on page 42 concept equivalent p function Description Checks if the two concepts are equivalent in the given TBox Syntax concept equivalent p C C5 thor Arguments Ci C5 concept terms tbox TBox object Values Returns t if C and C5 are equivalent concepts in tbor and nil otherwise Remarks For testing whether two concept terms are equivalent with respect to a TBozx tbox If the equality is to be tested without reference to a TBox nil can be used See also Function atomic concept synonyms on page and function concept subsumes p on page macro concept disjoint Description Syntax Arguments Values Remarks Checks if the two concepts are disjoint e g no individual can be an instance of both concepts concept disjoint C1 C2 amp optional thor current tbox C4 C5 concept term tbor TBox object Returns t if C and C5 are disjoint with respect to tbor and nil otherwise For testi
9. R role term or feature term stream open stream object Values tbox or abox The description is written to stream 8 2 ABox Retrieval 64 individual direct types KRSS macro Description Syntax Arguments Values Gets the most specific atomic concepts of which an individual is an instance individual direct types IN amp optional ABN abox name current abox IN ABN ABox name individual name List of name sets most specific instantiators function Description Syntax Arguments Values Gets the most specific atomic concepts of which an individual is an instance most specific instantiators IN abox IN abox individual name ABox object List of name sets individual types KRSS macro Description Syntax Arguments Values Remarks Gets all atomic concepts of which the individual is an instance individual types IN optional ABN abox name current abox IN ABN ABox name individual name List of name sets This is the transitive closure of the KRSS macro individual direct types instantiators function Description Syntax Arguments Values Remarks Gets all atomic concepts of which the individual is an instance instantiators IN abor IN abor individual name ABox object List of name sets This is the transitive closure of the function most specific instantiators 65
10. role term tbox TBox object Values Returns t if the role R is a feature in tbox and nil otherwise feature macro Description Checks if R is a feature in the specified TBox Syntax feature R amp optional TBN tbox name current tbox Arguments R role term TBN TBox name Values Returns t if the role R is a feature in TBN and nil otherwise cd attribute p function Description Syntax Arguments Values Checks if AN is a concrete domain attribute in the specified TBox cd attribute p AN amp optional tbox current tbox AN tbox attribute name TBox object Returns t if AN is a concrete domain attribute in thor and nil otherwise cd attribute macro Description Syntax Arguments Values Checks if AN is a concrete domain attribute in the specified TBox cd attribute AN amp optional TBN tbox name current tbox AN TBN attribute name TBox name Returns t if the role AN is a concrete domain attribute in TBN and nil otherwise AT symmetric p function Description Syntax Arguments Values Checks if R is symmetric in the specified TBox symmetric p A amp optional tbox current tbox R role term tbox TBox object Returns t if the role R is symmetric in tbor and nil otherwise symmetr ic macro Description Syntax Arguments Values Checks if R is symmetric in the specified TBox symmetric R a
11. 72 73 73 1 Introduction The RACERELystem is a knowledge representation system that implements a highly opti mized tableaux calculus for a very expressive description logic It offers reasoning services for multiple TBoxes and for multiple ABoxes as well The system implements the descrip tion logic ACCQHT p also known as SHTQ see Horrocks et al 2000 This is the basic logic ALC augmented with qualifying number restrictions role hierarchies inverse roles and transitive roles RACER supports the specification of general terminological axioms A TBox may contain general concept inclusions GCIs which state the subsumption relation between two con cept terms Multiple definitions or even cyclic definitions of concepts can be handled by RACER RACER supports most of the functions specified in the Knowledge Representation System Specification KRSS for details see Patel Schneider and Swartout 93 RACER is implemented in ANSI Common Lisp and has been developed at the University of Hamburg 2 Obtaining and Running RACER 2 1 System Installation For the Macintosh execute the self extracting archive lt filename gt sea For UNIX and Windows systems decompress the archive file after downloading For UNIX use the command gzip dc lt filename gt tar gz tar xf Under Windows unzip the file lt filename gt zip This creates the files and directories of the distribution Then follow the instructions in the file readm
12. C amp optional TBN tbox name current tbox Arguments C concept term TBN TBox name Values List of name sets Remarks Is the equivalent macro for the KRSS macro concept offspring which is also supplied in RACER atomic concept children function Description Gets the direct subsumees of the specified concept in the T Box Syntax atomic concept children C tbox Arguments C concept term tbor TBox object Values List of name sets concept parents KRSS macro Description Gets the direct subsumers of the specified concept in the T Box Syntax concept parents C amp optional TBN tbox name current tbox Arguments C concept term TBN TBox name Values List of name sets atomic concept parents function Description Gets the direct subsumers of the specified concept in the T Box Syntax atomic concept parents C thor Arguments C concept term tbox TBox object Values List of name sets 59 role descendants KRSS macro Description Syntax Arguments Values Remarks Gets all roles from the TBox that the given role subsumes role descendants R amp optional TBN tbox name current tbox R role term TBN Box name List of role terms This macro is the transitive closure of the macro role children atomic role descendants function Description Syntax Arguments Values Remarks Gets all roles from t
13. T Box name xml read tbox file function Description Syntax Arguments Values Remarks Examples A file in XML format containing TBox declarations is parsed and the result ing TBox is returned xml read tbox file pathname pathname is the pathname of a file TBox object Only XML descriptions which correspond the so called FaCT DTD are parsed everyting else is ignored xml read tbox file project TBoxes tbox one xml 21 rdfs read tbox file function Description Syntax Arguments Values Remarks Examples A file in RDFS format containing TBox declarations is parsed and the re sulting TBox is returned rdfs read tbox file pathname pathname is the pathname of a file TBox object Only RDFS descriptions are parsed everyting else is ignored rdfs read tbox file project TBoxes tbox one rdfs 4 2 ABox Management in abox macro Description The ABox with this name is taken or generated and bound to current abox If a TBox is specified the ABox is also initialized Syntax in abox ABN amp optional TBN tbox name current tbox Arguments ABN ABox name TBN name of the TBox to be associated with the ABox Values ABox object named ABN Remarks If the specified TBox does not exist an error is signaled Usually this macro is used at top of a file containing an ABox This macro can also be used to create new ABoxes If the ABox is to be continued in another fil
14. TBoxes includes the conceptual modeling of concepts and roles as well The modelling 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 7 containing the role name 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 2The signature does not have to be specified explicitly in RACER 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 Boolean terms build concepts by using the boolean operators DL notation RACER syntax Negation aC not C Conjunction CM MC and Ci Cy Disjunction CiU UC Cor Cj Ch Qualified restrictions state that role fillers have to be of a certain concept Value restric tions 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 specified concept DL notation RACER syntax 4 R C some R C V R C all R C Exists restriction Value restriction 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
15. and its synonyms list of concept children name sets each entry being a list of a concept child of CN and its synonyms Examples taxonomy my TBox may yield Gtop O quadrangle tetragon quadrangle tetragon top rectangle diamond rectangle quadrangle tetragon bottom diamond quadrangle tetragon bottom Grbottom rectangle diamond O See also Function atomic concept parents function atomic concept children on page 56 concept synonyms macro Description Syntax Arguments Values Remarks See also Returns equivalent concepts for the specified concept in the given TBox concept synonyms CN amp optional thor tbox name current tbox CN tbox concept name TBox object List of concept names The name CN is not included in the result Function concept equivalent p on page 43 atomic concept synonyms function Description Syntax Arguments Values Remarks See also Returns equivalent concepts for the specified concept in the given TBox atomic concept synonyms CN tbox CN tbox concept name TBox object List of concept names The name CN is not included in the result Function concept equivalent p on page concept descendants KRSS macro Description Syntax Arguments Values Remarks Gets all atomic concepts of a TBox which are subsumed by the specified concept
16. are two kinds of assertions Concept assertions state that an individual IN is an instance of a specified concept C Role assertions state that an individual IN is a role filler for a role R with respect to an individual IN 9 Attribute assertions state that an object ON is a filler for a role R with respect to an individual IN Constraints state relationships between objects of the concrete domain In RACER the unique name assumption holds this means that all individual names used in an ABox 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 RACER system each ABox refers to a TBox The concept assertions in the ABox are interpreted with respect to the concept axioms given in the referenced TBox The role assertions are also interpreted according to the role declarations stated in that TBox When a new ABox is built the TBox to be referenced must already exist The same TBox may be referred to by several ABoxes If no signature is used for the TBox the assertions in the ABox may use new names for roled4lor concepts which are not mentioned in the TBox 3 7 Inference Modes After the declaration of a TBox or an ABox RACER can be instructed to answer queries Processing the knowledge base in order to answer a query may take some time The standard inference mode of RACER ensures the following behavior Depending on the kin
17. declared if range is bound to nil parents provides a list of superroles for the new role The role RN has no superroles if parents is bound to nil If only a single superrole is specified the keyword parent may alternatively be used see the examples This function combines several KRSS functions for defining properties of a role For example the conjunction of roles can be expressed as shown in the first example below A role that is declared to be a feature cannot be transitive A role with a feature as a parent has to be a feature itself A role with transitive subroles may not be used in number restrictions define primitive role conjunctive role parents R 1 R n define primitive role has descendant transitive t inverse descendant of parent has child define primitive role has children inverse has parents domain parent range children Macro signature on page 17 Section 3 3 land Figure 7 on page 10 for domain and range restrictions 32 define primitive attribute KRSS macro with changes Description Syntax Arguments Remarks Examples See also Defines an attribute define primitive attribute AN amp key symmetric nil inverse nil domain nil range nil parents nil AN attribute name symmetric if bound to t declares that the new role is a symmetric This is equivalent to declaring that the new role s inverse is the role itself inverse provides a name f
18. find tbox my tbox all features function Description Returns all features from the specified TBox Syntax all features amp optional tbor current tbox Arguments thor TBox Values List of feature terms all transitive roles function Description Syntax Arguments Values Returns all transitive roles from the specified TBox all transitive roles optional tbor current tbox tbor TBox object List of transitive role terms 63 describe t box function Description Generates a description for the specified TBox Syntax describe tbox amp optional thor current tbox stream standard output Arguments thor TBox object or TBox name stream open stream object Values tbox The description is written to stream describe concept function Description Generates a description for the specified concept used in the specified TBox or in the ABox and its TBox Syntax describe concept CN amp optional tbox or abox current tbox stream standard output Arguments bor or abox TBox object or ABox object CN concept name stream open stream object Values tbox or abox The description is written to stream describe role function Description Generates a description for the specified role used in the specified TBox or ABox Syntax describe role R amp optional tbox or abox current tbox stream standard output Arguments tbozr or abox TBox object or ABox object
19. 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 parent and person some has child person equivalent mother and woman parent equivalent father and man parent equivalent grandmother and mother some has child some has child person equivalent aunt and woman some has sibling parent equivalent uncle and man some has sibling parent equivalent brother and man some has sibling person equivalent sister and woman some has sibling person Alice is the mother of Betty and Charles instance alice mother related alice betty has child related alice charles has child Betty is mother of Doris and Eve instance betty mother related betty doris has child related betty eve has child 74 Charles is the brother of Betty and only Betty instance charles brother related charles betty has sibling 335 Closing the role has sibling for charles instance charles at most 1 has sibling Doris has the sister Eve related doris eve has sister Eve has the sister Doris related eve doris has sister References Buchheit et al 93 M Buchheit F M Donini amp A Schaerf Decidable Reasoning in Ter minological Knowledge Representation Systems in Journal of Artificial Intelligence Research 1 pp 109 138 1993 Haarslev and M
20. ller 2000 Haarslev V and M ller R 2000 Expressive ABox reasoning with number restrictions role hierarchies and transitively closed roles in Proceedings of Seventh International Conference om Principles of Knowledge Representation and Reasoning KR 2000 Cohn A Giunchiglia F and Selman B editors Brecken ridge Colorado USA April 11 15 2000 pages 273 284 Horrocks et al 99a I Horrocks U Sattler S Tobies Practical Reasoning for Descrip tion Logics with Functional Restrictions Inverse and Transitive Roles and Role Hier archies Proceedings of the 1999 Workshop Methods for Modalities M4M 1 Ams terdam 1999 Horrocks et al 99b I Horrocks U Sattler S Tobies A Description Logic with Transitive and Converse Roles Role Hierarchies and Qualifying Number Restrictions Technical Report LTCS 99 08 RWTH Aachen 1999 Horrocks et al 2000 Horrocks I Sattler U and Tobies S 2000 Reasoning with indi viduals for the description logic SHZQ In MacAllester D editor Proceedings of the 17th International Conference on Automated Deduction CADE 17 Lecture Notes in Computer Science Germany Springer Verlag Patel Schneider and Swartout 93 P F Patel Schneider B Swartout Description Logic Knowledge Representation System Specification from the KRSS Group of the ARPA Knowledge Sharing Effort November 1993 The paper is available as http www db research bell labs com user
21. object has been realized Syntax abox realized p amp optional abor current abox Arguments abor ABox object Values Returns t if abox has been realized and nil otherwise abox realized macro Description Returns t if the specified ABox object has been realized Syntax abox realized amp optional ABN abox name current abox Arguments ABN ABox name Values Returns t if ABN has been realized and nil otherwise 7 5 ABox Queries abox consistent p function Description Checks if the ABox is consistent e g it does not contain a contradiction Syntax abox consistent p amp optional abor current abox Arguments abor ABox object Values Returns t if abox is consistent and nil otherwise abox consistent macro Description Checks if the ABox is consistent Syntax abox consistent amp optional ABN abox name current abox Arguments ABN ABox name Values Returns t if the ABox ABN is consistent and nil otherwise Remarks This macro uses abox consistent p 52 check abox coherence function Description Syntax Arguments Values Checks if the ABox is consistent If there is a contradiction this function prints information about the culprits check abox coherence amp optional abox current abox stream standard output abor ABox object stream Stream object Returns t if abox is consistent and nil otherwise individual instanc
22. pfps papers Kkrss spec ps 75 Index auto classify auto realize bottom current abox current tbox top abox consistent p abox consistent abox name 27 abox realized p abox realized add attribute assertion add concept assertion add concept axiom add constraint assertion add disjointness axiom add role assertion add role axioms alc concept coherent all aboxes all atomic concepts all concept assertions all concept assertions for individual all features 63 all individuals all role assertions 70 all role assertions for individual in domain 69 all role assertions for individual in range all roles all tboxes all transitive roles assertion atomic concept ancestors 58 atomic concept children atomic concept descendants 58 atomic concept parents atomic concept synonyms 57 atomic role ancestors atomic role children atomic role descendants atomic role inverse 76 atomic role parents attribute bottom cd attribute p cd attribute cd object p cd object check abox coherence check tbox coherence classify tbox clone ABox clone TBox 20 clone abox clone tbox concept axioms concept definition 9 concept equation 9 concept term concept ancestors concept children concept descendants concept disjoint p concept disjoint concept equivalent p concept equivalent concept instances 66 concept is primitive p c
23. soea d waow a AU e EE a forget role assertion define distinct individual a TII ee pue d Ru pP E NEM SE dun xd Ran pa a acra Eod RUE AR ar T rrr constrained 6 Reasoning Modes auto classifyx auto realize 7 Evaluation Functions and Queries 7 1 Queries for Concept Terms a concept satisfiable concept satisflaDle D usa msg Ge ee x EUER NE e E YU E ep cencept subsumes cencept subsumes p concept equivalent ii 30 30 31 31 31 32 33 34 34 35 35 35 35 36 36 37 37 38 38 38 38 39 39 39 40 40 40 40 40 40 41 41 41 42 42 43 ano e UPE a CREE paa dea de pirado LR EIN GR T CIT brune A ee ee ere eae t Dd LU eU UNE FU EUN UN QU a d E du o Rd E iaa ETE dde uy a atp AAA AAA By aie peg Ae ee a A E E ip Bh are Ea ae ED e Bee Sa ae e od Mr bi dt oo eS BBE bt dBi ose BS he A DANI iden pope a hee ee aan rm eas e Tr PM A T E Capita aioe UP ae gre ae an ae a Da ape ee S79 Sek ese De ec T DP QE dodo Ec ASA CP AD AAA chee xy Gt RE s dur aude qd Kop oe BESS rrr E pos donc e edis qt 2c en A ci M P ere iv oe eran a DS A E Simas RAR raia ee eo eee o a a a ed dino de a a is o a a ce RA A e oe ee A Ne NS o daa dos eel ia sk Dn ks
24. supported The default is create A Box object A file may contain several ABoxes The usual way to load an ABox file is to use the Lisp function load Examples save abox project ABoxes abox one lisp save abox project ABoxes final abox lisp find abox abox one if exists error forget abox function Description Delete the specified ABox from the list of all ABoxes Usually this enables the garbage collector to recycle the memory used by this ABox Syntax forget abox abox Arguments abor isa ABox object or ABox name Values The name of the removed ABox Examples forget abox family 24 delete abox macro Description Delete the specified ABox from the list of all ABoxes Usually this enables the garbage collector to recycle the memory used by this ABox Syntax delete abox ABN Arguments ABN is a ABox name Values The name of the removed ABox Remarks Calls forget abox Examples delete abox family delete all aboxes function Description Delete all known ABoxes Usually this enables the garbage collector to recycle the memory used by these ABoxes Syntax delete all aboxes Values List containing the names of the removed ABoxes create abox clone function Description Returns a new ABox object which is a clone of the given ABox The clone keeps the assertions and the state from its original but new declarations can be added without modifying the original ABox This functi
25. te oe da eth oa esd peg Sota gree deba ota SS pe EEE EE ee ee MEE r eee 8 Retrieval 8 1 TBoxRetreval ess ve A A is nes ea ee er eee de on ers BE eee eee pee TUM TE Trev H a a ie ee ee ala SU PPS UR ee ONA it Dak te ara Woe ek es Ree di s n a rg oad Oh ashe ad way ea ewe ee dad TT PT rmm n 52 53 53 53 54 54 54 55 55 55 55 56 56 56 56 57 57 57 58 58 58 59 59 59 59 60 60 60 61 61 61 62 62 62 62 63 63 C a ee ah aed a ature Ae hen ee ta A ee ee eras PEE RE E ee Ee eo a ee a ee a S oo Bo ee Oh ee ek vs ee a o To Ee es eee RA E E E Ghee a eee a 8 2 ABoxHRetrieval rocr A IMEEM a SA E A oe hos A Oh ee a oe eG Ad aa aes eee sh ee hae ee ee oe n O ae Pad e dd adt d Habd SE SP PL Cee ap oe Ge aes bree OOo ae Le aay ee Sed ee Eee ee oe eed Crh eee beans oat eee ad atea ose Penne ee Se eens bi Ree oe a ee ee ee NES beast ye Aida ph a se ge oP a 9 hee eee been tue RUP Be dai a rrr T rwm Ba e Sc E E EET A KRSS Sample Knowledge Base Al KRSS Sample TBoaxl 0000000000000 0000004 A2 KRSS Sample ABox ees B Integrated Sample Knowledge Base vi 63 63 64 64 64 64 65 65 65 65 66 66 66 67 67 67 68 68 68 69 69 69 69 70 70 70 71 71 71
26. ABN TBN in knowledge base TBN ABN optional name cl user TBN Box name ABN ABox name name Package name in knowledge base peanuts peanuts characters current abox special variable Description The variable current abox refers to the current ABox object It is set by the function init abox or by the macros in abox and in knwoledge base 23 save abox function Description Syntax Arguments Values Remarks If a pathname is specified an ABox is saved to a file In case a stream is specified the ABox is written to the stream the stream must already be open and the keywords if exists and if does not exist are ignored save abox pathname or stream amp optional abox current abox amp key syntax krss transformed nil if exists supersede Gif does not exist create pathname or stream is the name of the file or an output stream abor ABox object syntax indicates the syntax of the TBox only krss is currently imple mented transformed if bound to t the ABox is saved in the format it has after preprocessing by RACER if exists specifies the action taken if a file with the specified name already exists All keywords for the Lisp function with open file are sup ported The default is supersede if does not exist specifies the action taken if a file with the specified name does not yet exist All keywords for the Lisp function with open file are
27. TBox name or a TBox object atomic concepts is a list of all the concept names roles is a list of all role declarations transitive roles is a list of transitive role declarations features is a list of feature declarations attributes is a list of attributes declarations See also Definition of macro signature current tbox special variable Description The variable current tbox refers to the current TBox object It is set by the function init tbox or by the macro in tbox 17 save tbox function Description Syntax Arguments Values Remarks Examples If a pathname is specified a TBox is saved to a file In case a stream is specified the TBox is written to the stream the stream must already be open and the keywords if exists and if does not exist are ignored save tbox pathname or stream amp optional tbox current tbox amp key syntax krss transformed nil if exists supersede Gif does not exist create pathname or stream is the pathname of a file or an output stream tbox TBox object syntax indicates the syntax of the TBox only krss is currently imple mented transformed if bound to t the T Box is saved in the format after preprocess ing by RACER if exists specifies the action taken if a file with the specified name already exists All keywords for the Lisp function with open file are sup ported The default is supersede if does not exi
28. User s Guide and Reference Manual Version 1 6 1 Volker Haarslev and Ralf Moller University of Hamburg Univ of Appl Sciences in Wedel Computer Science Department Computer Science Department Vogt Kolln Str 30 Feldstrasse 143 22527 Hamburg German 22880 Wedel Germany haarslev informatik uni hamburg de rmoeller fh wedel de Contents 1 Introduction November 20 2001 3 RACER Knowledge Bases 3 1 Concept Language o oo aa a a 4 Knowledge Base Management Functions ge heck ee vee Te ele Se AR Bee oe RE RO EG Gat FT ae 4 1 TBox Management 2 2 2 ll e ess oF e ta o 0 o og 12 13 13 14 eee peony dd lensure tbox signature cerca TET T TC er TERE hak e aca s An AAA ee ia SETTEO TET lensure abox signature TTS sapins ee Pr TP c hr d Mni n da TENA 5 Knowledge Base Declarations O ep ie A TIE TEN rr Tm define primitive concept 16 17 17 18 18 19 19 20 20 21 21 21 22 22 22 23 23 23 23 24 24 25 25 25 26 26 27 27 27 27 27 28 28 28 29 29 29 define concept Tre se sl eh E add role axioms 5 4 Concrete Domain Attribute Declarati0dl define concrete domain attributel 5 5 Assertions A add concept assertion forget concept assertion 2 2 2 2 2 2 2 nado de ue ia Geo q Tu add role assertion sss ans
29. ame current tbox TBN TBox name Returns t if the specified TBox has been classified otherwise it returns nil 50 tbox coherent p function Description Syntax Arguments Values Remarks This function checks if there are any unsatisfiable atomic concepts in the given TBox tbox coherent p amp optional thor current tbox tbor TBox object Returns nil if there is an inconsistent atomic concept otherwise it returns t This function calls check tbox coherence if necessary tbox coherent macro Description Syntax Arguments Values Remarks Checks if there are any unsatisfiable atomic concepts in the current or spec ified TBox tbox coherent amp optional TBN tbox name current tbox TBN TBox name Returns t if there is an inconsistent atomic concept otherwise it returns nil This macro uses tbox coherent p 7 4 ABox Evaluation Functions realize abox function Description Syntax Arguments Values Remarks This function checks the consistency of the ABox and computes the most specific concepts for each individual in the ABox realize abox amp optional abor current abox abor ABox object abox This Function needs to be executed before queries can be posed If the TBox has changed and is classified again the ABox has to be realized too 51 abox realized p function Description Returns t if the specified ABox
30. ations can be used The order of axioms and assertions does not matter because forward references can be handled by RACER The macros for knowledge base declarations add the concept axioms and role declarations to the current tbox and the assertions to the current abox 5 1 Built in Concepts top top concept Description The name of most general concept of each TBox the top concept T Syntax top Remarks The concepts top and top are synonyms These concepts are elements of every TBox 27 bottom bottom concept Description The name of the incoherent concept the bottom concept L Syntax bottomx Remarks The concepts bottom and bottom are synonyms These concepts are ele ments of every TBox 5 2 Concept Axioms This section documents the macros and functions for specifying concept axioms The dif ferent concept axioms were already introduced in section Please note that the concept axioms define primitive concept define concept and define disjoint primitive concept have the semantics given in the KRSS specification only if they are the only concept axiom defining the concept CN in the terminology This is not checked by the RACER system implies macro Description Defines a GCI between C1 and C5 Syntax implies Cj C5 Arguments Ci C5 concept term Remarks C states necessary conditions for C5 This kind of facility is an addendum to the KRSS specification Examples im
31. current tbox tbor TBox object This function needs to be executed before queries can be posed 49 check t box coherence function Description Syntax Arguments Values Remarks This function checks if there are any unsatisfiable atomic concepts in the given TBox check tbox coherence optional tbox current tbox tbor TBox object Returns a list of all atomic concepts in tbox that are not satisfiable i e an empty list NIL indicates that there is no additional synonym to bottom This function does not compute the concept hierarchy It is much faster than classify tbox so whenever it is sufficient for your application use check tbox coherence This function is supplied in order to check whether an atomic concept is satisfiable during the development phase of a TBox There is no need to call the function check tbox coherence if for instance a certain ABox is to be checked for consistency with abox consistent p tbox classified p function Description Syntax Arguments Values It is checked if the specified TBox has already been classified tbox classified p amp optional tbor current tbox tbor TBox object Returns t if the specified TBox has been classified otherwise it returns nil tbox classified macro Description Syntax Arguments Values It is checked if the specified TBox has already been classified tbox classified amp optional TBN tbox n
32. d of query RACER 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 TBox it is not necessary to classify the TBox However once a TBox is classified answering subsumption queries for atomic concepts is just a lookup Furthermore asking whether there exists an atomic concept in a TBox that is inconsistent tbox coherent p does not require the TBox to be classified either In the lazy mode of inference the default RACER 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 TBox before answering a query eager inference mode A similar strategy is applied if the computation of the direct types of individuals is requested RACER requires as precondition that the corresponding TBox has to be classified If the lazy inference mode is enabled only the individuals involved in a direct types query are realized 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 TBox Note that this might lead to surprising query results e g the set of subconcepts for T contains concepts not mentioned in the TBox in any concept axiom Therefore we recommend to use a signature declaration see below These concepts are assumed to be atomic co
33. do not have any transitive subroles are allowed in number restrictions see also the comments in Horrocks et al 99a Horrocks et al 99b DL notation RACER syntax At most restriction lt nR at most n R At least restriction gt nR at least n R Exactly restriction n R exactly n R Qualified at most restriction lt n R C at most n R C Qualified at least restriction gt n R C at least n R C Qualified exactly restriction n R C exactly n R C Actually the exactly restriction exactly n R is an abbreviation for the concept term and at least n R at most n R and exactly n R C is an abbreviation for the concept term and at least n R C at most n R C There are two concepts implicitly declared in every TBox 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 T L can also be expressed as C LI 2C CM 5C In RACER T is denoted as top and L is denoted as bottom 3For KRSS compatibility reasons RACER also supports the synonym concepts top and bottom CDC a AN an AN no AN min AN integer max AN integer gt aexpr aexpr gt aexpr aexpr lt aexpr aexpr lt aexpr aexpr aexpr aexpr aexpr AN real aexpri aexpr1 aexpri aexpr1 real AN real AN Figure 5 RACER concrete domain concepts and attribute expre
34. e KRSS macro Description Syntax Arguments Values Checks if an individual is an instance of a given concept with respect to the current abox and its TBox individual instance IN C amp optional abor abox name current abox IN individual name C concept term abor ABox object Returns t if IN is an instance of C in abox and nil otherwise individual instance p function Description Syntax Arguments Values Checks if an individual is an instance of a given concept with respect to an ABox and its TBox individual instance p IN C abor IN individual name C concept term abor ABox object Returns t if IN is an instance of C in abox and nil otherwise 53 individuals related macro Description Checks if two individuals are directly related via the specified role Syntax individuals related IN IN R amp optional abor current abox Arguments IN individual name of the predecessor IN5 individual name of the role filler R role term abor ABox object Values Returns t if IN4 is related to IN2 via Rin abor and nil otherwise individuals related p function Description Checks if two individuals are directly related via the specified role Syntax individuals related p IN IN R abor Arguments IN individual name of the predecessor IN individual name of the role filler R role term abor ABox object Values R
35. e the TBox must not be specified again The specified ABox is the current abox until in abox is called again or the variable current abox is manipulated directly The TBox of the ABox is made the current tbox Examples in abox peanuts characters peanuts instance Schroeder Piano Player See also Macro signature on page l17 22 init abox function Description Syntax Arguments Values Remarks Initializes an existing ABox or generates a new ABox and binds it to the variable current abox During the initialization all assertions and the link to the referenced TBox are deleted init abox abor amp optional tbor current tbox abox ABox object to initialize tbox TBox object associated with the ABox abox The tbox has to already exist before it can be referred to by init abox ensure abox signature function Description Syntax Arguments See also Defines the signature for an ABox and initializes the ABox ensure abox signature abox amp key individuals nil objects nil abor ABox object individuals is a list of individual names objects is a list of concrete domain object names Macro signature on page LT lis the macro counterpart It allows to specify a signature for an ABox and a TBox with one call in knowledge base macro Description Syntax Arguments Examples This form is an abbreviation for the sequence in tbox TBN in abox
36. e the memory used by these TBoxes Syntax delete all tboxes Values List containing the names of the removed TBoxes and a list of names of optionally removed ABoxes Remarks All ABoxes are also deleted 19 create tbox clone function Description Syntax Arguments Values Remarks Examples Returns a new TBox object which is a clone of the given TBox The clone keeps all declarations from its original but it is otherwise fresh i e new declarations can be added This function allows one to create new TBox versions without the need to reload the already known declarations create tbox clone thor amp key new name nil overwrite nil tbox is a TBox name or a TBox object new name if bound to a symbol this specifies the name of the clone A new unique name based on the name of tbox is generated otherwise overwrite if bound to t an existing TBox with the name given by new name is overwritten If bound to nil an error is signaled if a TBox with the name given by new name is found TBox object The variable current tbox is set to the result of this function create tbox clone my TBox create tbox clone my TBox new name my clone overwrite t clone tbox macro Description Syntax Arguments Values Remarks Examples See also Returns a new TBox object which is a clone of the given TBox The clone keeps all declarations from its original but it is ot
37. e examples in Figure cf Buchheit et al 93 or declared via the keywords domain and range e g see the description of define primitive role in Section page 33 3 4 Concrete Domains Racer supports reasoning over the integers Z and the rationals Q in combination with linear inequations However for the convenience of the users the rational numbers are speci 10 fied in floating point notation and automatically transformed into their rational equivalents e g 0 75 is transformed into 3 4 Therefore the term real is used as type designator although the reasoning is based on Q Names for values from these 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 TBox see below The following example is an extension of the family TBox introduced above 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 attrib
38. e induced by its superrole are shown in Figure 6 The table should be read as follows For example if a role RN4 is declared as a simple role and it has a feature RN as a superrole then RN will be a feature itself Superrole RN RIRE F Subrole RN R RIR F declared as R REIR element of F F F F Figure 6 Conflicting declared and inherited role properties 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 RACER does not support role terms as specified in the KRSS However a role being the conjunction of other roles can as well be expressed by using the role hierarchy cf Buchheit et al 93 The KRSS like declaration of the role define primitive role RN and RN RN5 can be approximated in RACER by define primitive role RN parents RN RN KRSS DL notation define primitive role RN domain C A RN T C C define primitive role RN range D T C V RN D RACER Syntax DL notation define primitive role RN domain C A RN T C C define primitive role RN range D T E V RN D Figure 7 Domain and range restrictions expressed via GCIs RACER offers the declaration of domain and range restrictions for roles These restric tions for primitive roles can be either expressed with GCIs see th
39. e provided For macro forms the T Box or ABox arguments are optional If no T Box or ABox is specified the current tbox or current abox is taken respectively However for the functional counterpart of a macro the TBox or ABox argument is not optional For functions which do not have macro coun terparts the TBox or ABox argument may or may not be optional Furthermore if an argument tbox or abox is specified in this documentation a name a symbol can be used as well C CN top bottom not C and Cj Cn or Cj C4 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 CDC R RN inv RN Figure 4 RACER concept and role terms for concrete domain concepts CDC see Fig ure B 3 RACER Knowledge Bases In description logic systems a knowledge base is consisting of a TBox and an ABox The conceptual knowledge is represented in the TBox and the knowledge about the instances of a domain is represented in the ABox For more information about the description logic SHZQ supported by RACER see Horrocks et al 2000 Note that RACER assumes the unique name assumption for ABox individuals see also Haarslev and Moller 2000 where the logic supported by RACER s precursor RACE is described The unique name assumption does not hold for the description logic SHZQ as introduced in Horrocks et al 2000 3 1 Concept Language The content of RACER
40. e txt found in the directory lt filename gt It is important that you load the file 1oad racer lisp from the Lisp Listener Do not evaluate or compile this file This file declares logical pathnames which are used in the example TBoxes 2 2 Sample Session All the files used in this example are in the directory racer examples The queries are in the file family queries lisp 333 the following forms are assumed to be contained in a 333 file racer examples family tbox lisp 333 initialize the TBox family in tbox family RACER stands for Reasoner for ABoxes and Concept Expressions Renamed 333 supply the signature for this TBox 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 domain range restrictions for roles implies top all has child person 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 the concepts implies person and human some has gender or female male disjoint female male implies woman and person some has
41. elated with a concrete domain object via an attribute add attribute assertion abor IN ON AN abor ABox object IN individual name ON concrete domain object name as the filler AN attribute name add attribute assertion find abox family eve temp eve temperature fahrenheit 39 constrained macro Description Adds a concrete domain attribute assertion to an ABox Asserts that an individual is related with a concrete domain object via an attribute Syntax constrained IN ON AN Arguments IN individual name ON concrete domain object name as the filler AN attribute name Remarks Calls add attribute assertion Examples constrained eve temp eve temperature fahrenheit 6 Reasoning Modes auto classify special variable Description Possible values are lazy eager lazy verbose eager verbose nil See also Section 3 7 on page auto realize special variable Description Possible values are lazy eager lazy verbose eager verbose nil See also Section 3 7 Jon page 7 Evaluation Functions and Queries 7 1 Queries for Concept Terms 40 concept satisfiable macro Description Checks if a concept term is satisfiable Syntax concept satisfiable C amp optional tbor current tbox Arguments C concept term tbox TBox object Values Returns t if C is satisfiable and nil otherwise Remarks For testing whether a concept term is
42. ent tbox Arguments CN concept name tbor TBox object Values Returns t if CN is a name of a known primitive concept and nil otherwise concept is primitive macro Description Checks if CN is a concept name of a so called primitive concept in the specified T Box Syntax concept is primitive p CN amp optional TBN tbox name current tbox Arguments CN concept name TBN TBox name Values Returns t if CN is a name of a known primitive concept and nil otherwise 44 alc conce pt coherent function Description Syntax Arguments Remarks Tests the satisfiability of a Km K4 m or S4 m formula encoded as an ALC concept alc concept coherent C key logic K C concept term logic specifies the logic to be used K modal Kin K4 modal K4 all roles are transitive 84 modal S4 m all roles are transitive and reflexive If no logic is specified the logic K is chosen This function can only be used for ALC concept terms so number restrictions are not allowed 7 2 Role Queries role subsumes KRSS macro Description Checks if two roles are subsuming each other Syntax role subsumes Ri Ro amp optional TBN tbox name current tbox Arguments Hj role term of the subsuming role Ro role term of the subsumed role TBN TBox name Values Returns t if Rj is a parent role of Ro role subsumes p function Description Checks if two ro
43. es if parents is bound to nil Values tbox Remarks For each role RN there may be only one call to add role axioms per TBox See also Section 8 3 land Figure 7 on page 10 for domain and range restrictions 5 4 Concrete Domain Attribute Declaration 34 define concrete domain attribute macro Description Syntax Arguments Remarks Examples See also Defines a concrete domain attribute define concrete domain attribute AN amp key type integer AN attribute name type can be either bound to integer or real Calls add role axioms define concrete domain attribute has age type integer define concrete domain attribute has weight type real Macro signature on page 17 and Section 5 5 Assertions instance KRSS macro Description Builds a concept assertion asserts that an individual is an instance of a concept Syntax instance IN C Arguments IN individual name C concept term Examples instance Lucy Person instance Snoopy and Dog Cartoon Character add concept assertion function Description Builds an assertion and adds it to an ABox Syntax add concept assertion abor IN C Arguments abor ABox object IN individual name C concept term Values abor Examples add concept assertion find abox peanuts characters Lucy Person add concept assertion find abox peanuts characters Snoopy and Dog Cartoon Character 35 forget concept as
44. escription Adds a role to a TBox Syntax add role axioms thor RN amp key cd attribute nil transitive nil feature nil symmetric nil reflexive nil inverse nil domain nil range nil parents nil Arguments thor TBox object to which the role is added RN role name cd attribute if bound to t declares that RN is a concrete domain attribute transitive if bound to t declares that RN is transitive feature if bound to t declares that RN is a feature symmetric if bound to t declares that RN is asymmetric This is equivalent to declaring that the new role s inverse is the role itself reflexive if bound to t declares that RN is reflexive currently only sup ported for ALCH If feature is bound to t the value of reflexive is ignored inverse provides a name for the inverse role of RN is equivalent to inv RN The inverse role of RN has no user defined name if inverse is bound to nil domain provides a concept term defining the domain of role RN equivalent to adding the axiom implies at least 1 RN C if domain is bound to the concept term C No domain is declared if domain is bound to nil range provides a concept term defining the range of role RN equivalent to adding the axiom implies top all RN D if range is bound to the concept term D No range is declared if range is bound to nil parents providing a single role or a list of superroles for the new role The role RN has no superrol
45. eturns t if JN is related to IN via R in abox and nil otherwise See also Function retrieve individual filled roles on page 68 Function retrieve related individuals on page individual equal KRSS macro Description Checks if two individual names refer to the same domain object Syntax individual equal IN IN amp optional abor current abox Arguments IN IN individual name abor abox object Remarks Because the unique name assumption holds in RACER this macro always returns nil for individuals with different names This macro is just supplied to be compatible with the KRSS 54 individual not equal KRSS macro Description Checks if two individual names do not refer to the same domain object Syntax individual not equal IN IN amp optional abor current abox Arguments IN IN individual name abor abox object Remarks Because the unique name assumption holds in RACER this macro always returns t for individuals with different names This macro is just supplied to be compatible with the KRSS individual p function Description Checks if IN is a name of an individual mentioned in an ABox aboz Syntax individual p IN amp optional abox current abox Arguments IN individual name abox ABox object Values Returns t if JN is a name of an individual and nil otherwise individual macro Description Checks if IN is a name of an individual mentioned i
46. 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 i as gender h as brother has sibling has sister as descendant Lhas child Figure 1 Role hierarchy for the family TBox r denotes the internally defined universal role denotes features denotes transitive roles The RACER Session om eee ED E 7 l oman sister ound woman Figure 2 Concept hierarchy for the family TBox 333 load the TBox CL USER 1 1oad racer examples family tbox lisp Loading racer examples family tbox lisp T s some TBox queries are all uncles brothers CL USER 2 concept subsumes brother uncle T 333 get all super concepts of the concept mother This kind of query yields a list of so called name sets Sa which are lists of equivalent atomic concepts CL USER 3 concept ancestors mother PARENT WOMAN PERSON TOP TOP HUMAN 333 get all sub concepts of the concept man CL USER 4 concept descendant
47. guments Remarks This macro retracts a set of ABox statements forget amp body forms forms is a sequence of instance or related assertions For answering subsequent queries the index structures for the ABox will be recomputed i e some queries might take some time e g those queries that require the realization of the ABox 5 6 Concrete Domain Assertions 38 add constraint assertion function Description Builds a concrete domain predicate assertion and adds it to an ABox Syntax add constraint assertion abor constraint Arguments abor ABox object constraint constraint form Remarks The syntax of concrete domain constraints is described in Section page a and in Figure 3 page B Examples add constraint assertion find abox family gt temp eve 102 56 constraints macro Description This macro asserts a set of concrete domain predicates for concrete domain objects Syntax constraints amp body forms Arguments forms is a sequence of concrete domain predicate assertions Remarks Calls add constraint assertion The syntax of concrete domain con straints is described in Section 3 1 page 6 and in Figure B pagel8 Examples constraints temp eve 102 56 temp doris 38 5 gt temp eve temp doris add attribute assertion function Description Syntax Arguments Examples Adds a concrete domain attribute assertion to an ABox Asserts that an individual is r
48. he TBox that the given role subsumes atomic role descendants R tbox R role term tbox TBox object List of role terms This function is the transitive closure of the function atomic role descendants role ancestors KRSS macro Description Syntax Arguments Values Gets all roles from the T Box that subsume the given role in the role hierar chy role ancestors R amp optional TBN tbox name current tbox R yole term TBN Box name List of role terms 60 atomic role ancestors function Description Syntax Arguments Values Gets all roles from the TBox that subsume the given role in the role hierar chy atomic role ancestors R tbox R yole term tbor TBox object List of role terms role children macro Description Syntax Arguments Values Remarks Gets all roles from the T Box that are directly subsumed by the given role in the role hierarchy role children R amp optional TBN tbox name current tbox R yole term TBN Box name List of role terms This is the equivalent macro to the KRSS macro role offspring which is also supplied by the RACER system atomic role children function Description Syntax Arguments Values Gets all roles from the TBox that are directly subsumed by the given role in the role hierarchy atomic role children R thor R role term tbox TBox object
49. herwise fresh i e new declarations can be added This function allows one to create new TBox versions without the need to reload the already known declarations clone tbox TBN amp key new name nil overwrite nil TBN is a TBox name new name if bound to a symbol this specifies the name of the clone A new unique name based on the name of tbox is generated otherwise overwrite if bound to t an existing TBox with the name given by new name is overwritten If bound to nil an error is signaled if a TBox with the name given by new name is found TBox object The function create tbox clone is called clone tbox my TBox clone tbox my TBox new name my clone overwrite t Function create tbox clone on page 20 find tbox function Description Syntax Arguments Values Remarks Examples Returns a TBox object with the given name among all TBoxes find tbox TBN amp optional errorp t TBN is the name of the TBox to be found errorp if bound to t an error is signaled if the TBox is not found T Box object This function can also be used to get rid of TBoxes or to rename T Boxes as shown in the examples find tbox my TBox Getting rid of a TBox setf find tbox tbox1 nil Renaming a T Box setf find tbox tbox2 tbox1 tbox name function Description Syntax Arguments Values Finds the name of the given TBox object tbox name tbozx tbox TBox object
50. idual names objects is a list of object names Usually this macro is used at top of a file directly after the macro in knowledge base in tbox or in abox Actually it is not necessary in RACER to specify the signature but it helps to avoid errors due to typos Signature for a TBox signature atomic concepts Character Baseball Player roles has pet has dog parents has pet domain human range dog has coach feature t attributes integer has age real has weight 16 Signature for an ABox signature individuals Charlie Brown Snoopy objects age of snoopy Signature for a TBox and an ABox signature atomic concepts Character Baseball Player roles has pet has dog parents has pet domain human range dog has coach feature t attributes integer has age real has weight individuals Charlie Brown Snoopy objects age of snoopy See also Section Sample Session on page Bland page For role definitions see define primitive role on page 33 for feature definitions see def ine primitive attribute on page 33 for attribute de finitions see def ine concrete domain attribute on page 85 ensure tbox signature function Description Defines the signature for a TBox and initializes the TBox Syntax ensure tbox signature thor amp key atomic concepts nil roles nil transitive roles nil features nil attributes nil Arguments thor is a
51. 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 feaver In the following Abox there is an inconsistency 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 3 5 Concrete Domain Attributes Attributes are considered as typed since they can either have fillers of type integer or real The same attribute cannot be used in the same TBox such that both types are applicable e g min has age 18 and gt has age 18 If the type of an attribute is not explicitly declared its type is implicitly derived from its use in a TBox ABox An attribute and its type can be declared with the signature form see above and in Section page L7 or by using the KRSS like form def ine concrete domain attribute see Section page 35 12 3 6 ABox Assertions An ABox contains assertions about individuals The set of individual names or individuals for brevity Z is the signature of the ABox The set of individuals must be disjoint to the set of concept names and the set of role names There
52. iption Retracts a role assertion from an ABox Syntax Arguments Values Remarks Examples forget role assertion abox IN IN R abox IN IN R abox ABox object individual name of the predecessor individual name of the filler role term For answering subsequent queries the index structures for the ABox will be recomputed i e some queries might take some time e g those queries that require the realization of the ABox forget role assertion find abox peanuts characters Charlie Brown Snoopy has pet forget role assertion find abox peanuts characters Linus Lucy inv has brother 37 define distinct individual KRSS macro Description Syntax Arguments Values Remarks This statement asserts that an individual is distinct to all other individuals in the ABox define distinct individual IN IN name of the individual IN Because the unique name assumption holds in RACER all individuals are distinct This function is supplied to be compatible with the KRSS specifi cation state KRSS macro Description Syntax Arguments Remarks This macro asserts a set of ABox statements state amp body forms forms is a sequence of instance or related assertions This macro is supplied to be compatible with the KRSS specification It realizes an implicit progn for assertions forget macro Description Syntax Ar
53. led again or the variable current tbox is manipulated directly Examples in tbox peanuts implies Piano Player Character See also Macro signature on page 15 init tbox function Description Syntax Arguments Values Remarks Generates a new TBox or initializes an existing TBox and binds it to the vari able current tbox During the initialization all user defined concept ax ioms and role declarations are deleted only the concepts top and bottom remain in the TBox init tbox tbor tbox TBox object tbox This is the way to create a new TBox object signature macro Description Syntax Arguments Remarks Examples Defines the signature for a knowledge base If any keyword except individuals or objects is used the current tbox is initialized and the signature is defined for it If the keyword individuals or objects is used the current abox is initial ized If all keywords are used the current abox and its TBox are both initialized signature amp key atomic concepts nil roles nil transitive roles nil features nil attributes nil individuals nil objects nil atomic concepts is a list of all the concept names specifying C roles is a list of role declarations transitive roles is a list of transitive role declarations features is a list of feature declarations attributes is a list of attributes declarations individuals is a list of indiv
54. les are subsuming each other Syntax role subsumes p A Ro thor Arguments Hj role term of the subsuming role Ro role term of the subsumed role tbox TBox object Values Returns t if Rj is a parent role of R 45 role p function Description Checks if R is a role term for a role in the specified TBox Syntax role p R amp optional tbox current tbox Arguments R role term tbox TBox object Values Returns t if R is a known role term and nil otherwise role macro Description Checks if R is a role term for a role in the specified TBox Syntax role R optional TBN tbox name current tbox Arguments R role term TBN TBox name Values Returns t if R is a known role term and nil otherwise transitive p function Description Checks if R is a transitive role in the specified TBox Syntax transitive p R amp optional tbor current tbox Arguments R role term tbox TBox object Values Returns t if the role R is transitive in tbox and nil otherwise transitive macro Description Checks if R is a transitive role in the specified T Box Syntax transitive R optional TBN tbox name current tbox Arguments R role term TBN TBox name Values Returns t if the role R is transitive in TBN and nil otherwise 46 feature p function Description Checks if R is a feature in the specified TBox Syntax feature p R amp optional thor current tbox Arguments R
55. ll has child person 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 the concepts define primitive concept person and human some has gender or female male define disjoint primitive concept female gender top define disjoint primitive concept male gender top define primitive concept woman and person some has gender female define primitive concept man and person some has gender male define concept parent and person some has child person define concept mother and woman parent define concept father and man parent define concept grandmother and mother some has child some has child person define concept aunt and woman some has sibling parent define concept uncle and man some has sibling parent define concept brother and man some has sibling person define concept sister and woman some has sibling person 72 A 2 KRSS Sample ABox 333 the following forms are assumed to be contained in a 333 file racer examples family abox krss lisp 333 initialize the ABox smith family and use the TBox family in abox smith family family 335 Alice is the mother of Betty and Charles instance alice mother related alice betty has child related alice charles has child
56. mp optional TBN tbox name current tbox R role term TBN Box name Returns t if the role R is symmetric in TBN and nil otherwise reflexive p function Description Syntax Arguments Values Checks if R is reflexive in the specified TBox reflexive p R amp optional tbor current tbox R yole term tbor TBox object Returns t if the role R is reflexive in thor and nil otherwise reflexive macro Description Syntax Arguments Values Checks if R is reflexive in the specified TBox reflexive R amp optional TBN tbox name current tbox R role term TBN Box name Returns t if the role R is reflexive in TBN and nil otherwise 48 atomic role inverse function Description Syntax Arguments Values Returns the inverse role of role term R atomic role inverse R tbox R role term tbox TBox object Role name or term for the inverse role of R role inverse macro Description Syntax Arguments Values Remarks Returns the inverse role of role term R role inverse R amp optional TBN tbox name current tbox R role term TBN Box name Role name or term for the inverse role of R This macro uses atomic role inverse 7 3 TBox Evaluation Functions classify tbox function Description Syntax Arguments Remarks Classifies the whole T Box classify tbox amp optional tbox
57. n an ABox ABN Syntax individual IN amp optional ABN abox name current abox Arguments IN individual name ABN ABox name Values Returns t if IN is a name of an individual and nil otherwise cd object p function Description Checks if ON is a name of a concrete domain object mentioned in an ABox aboz Syntax cd object p ON optional abor current abox Arguments ON concrete domain object name abor ABox object Values Returns t if ON is a name of a concrete domain object and nil otherwise 55 cd object macro Description Checks if ON is a name of a concrete domain object mentioned in an ABox ABN Syntax cd object ON amp optional ABN abox name current abox Arguments ON concrete domain object name ABN ABox name Values Returns t if ON is a name of a concrete domain object and nil otherwise 8 Retrieval If the retrieval refers to concept names RACER always returns a set of names for each concept name A so called name set contains all synonyms of an atomic concept in the TBox 8 1 TBox Retrieval taxonomy function Description Returns the whole taxonomy for the specified TBox Syntax taxonomy amp optional tbor current tbox Arguments thor TBox object Values A list of triples each of it consisting of a name set the atomic concept CN and its synonyms list of concept parents name sets each entry being a list of a concept parent of CN
58. ncepts 13 The inference behavior of RACER can be controlled by setting the value of the variables auto classify and auto realize for TBox and ABox inference respectively The lazy inference mode is activated by setting the variables to the keyword lazy Eager inference behavior can be enforced by setting the variables to eager The default value for each variable is lazy verbose which means that RACER prints a progress bar in order to indicate the state of the current inference activity if it might take some time If you want this for eager inferences use the value eager verbose If other values are encountered the user is responsible for calling necessary setup functions not recommended We recommend that TBoxes and ABoxes should be kept in separate files If an ABox is revised by reloading or reevaluating a file there is no need to recompute anything for the TBox However if the TBox is placed in the same file reevaluating a file presumably causes the TBox to be reinitialized and the axioms to be declared again Thus in order to answer an ABox query recomputations concerning the TBox might be necessary So if different ABoxes are to be tested they should probably be located separately from the associated TBoxes in order to save processing time During the development phase of a TBox it might be advantageous to call inference services directly For instance during the development phase of a TBox it might be useful to check
59. ng whether two concept terms are disjoint with respect to a TBox tboz If the disjointness is to be tested without reference to a TBox nil can be used concept disjoint p function Description Syntax Arguments Values Remarks Checks if the two concepts are disjoint e g no individual can be an instance of both concepts concept disjoint p Ci C2 tbox C4 C5 concept term tbor TBox object Returns t if C and C5 are disjoint with respect to tbor and nil otherwise For testing whether two concept terms are disjoint with respect to a TBox tboz If the disjointness is to be tested without reference to a TBox nil can be used 43 concept p function Description Checks if CN is a concept name for a concept in the specified TBox Syntax concept p CN amp optional thor current tbox Arguments CN concept name tbor TBox object Values Returns t if CN is a name of a known concept and nil otherwise concept macro Description Checks if CN is a concept name for a concept in the specified TBox Syntax concept CN amp optional TBN current tbox Arguments CN concept name TBN TBox name Values Returns t if CN is a name of a known concept and nil otherwise concept is primitive p function Description Checks if CN is a concept name of a so called primitive concept in the specified T Box Syntax concept is primitive p CN amp optional tbox curr
60. on allows one to create new ABox versions without the need to reload and reprocess the already known assertions Syntax create abox clone abor amp key new name nil overwrite nil Arguments abor is an ABox name or an ABox object new name if bound to a symbol this specifies the name of the clone A new unique name based on the name of abox is generated otherwise overwrite if bound to t an existing ABox with the name given by new name is overwritten If bound to nil an error is signaled if an ABox with the name given by new name is found Values ABox object Remarks The variable current abox is set to the result of this function Examples create abox clone my ABox create abox clone my ABox new name abox clone overwrite t 25 clone abox macro Description Returns a new ABox object which is a clone of the given ABox The clone keeps the assertions and the state from its original but new declarations can be added without modifying the original ABox This function allows one to create new ABox versions without the need to reload and reprocess the already known assertions Syntax clone abox ABN amp key new name nil overwrite nil Arguments ABN is an ABox name new name if bound to a symbol this specifies the name of the clone A new unique name based on the name of aboz is generated otherwise overwrite if bound to t an existing ABox with the name given by new name is o
61. oncept is primitive concept offspring concept p concept parents concept satisfiable p concept satisfiable concept subsumes p concept subsumes 41 concept synonyms concept concrete domain attribute concrete domain restriction conjunction of roles constrained constraints copy ABox copy TBox create abox clone create tbox clone define concept define concrete domain attribute define disjoint primitive concept define distinct individual define primitive attribute 83 define primitive concept define primitive role delete ABox delete ABoxes delete TBox delete TBoxes delete abox delete all aboxes delete all tboxes delete tbox describe abox describe concept describe individual describe role describe tbox disjoint disjoint concepts 9 29 30 domain restriction ensure abox signature ensure tbox signature equivalent exists restriction 7 feature 9 B3 feature p feature find abox find tbox forget forget abox forget concept assertion forget role assertion 87 forget tbox GCI implies in abox TT in knowledge base in tbox individual direct types individual equal individual fillers individual instance p individual instance individual not equal individual p 55 individual types individual individuals related p individuals related 54 inference modes init abox init tbox instance instantia
62. ons for individual in domain function Description Returns all role assertions for an individual from the specified ABox in which the individual is the role predecessor Syntax all role assertions for individual in domain IN amp optional abor current abox Arguments IN individual name abor ABox object Values List of role assertions Remarks Returns only the role assertions explicitly mentioned in the ABox not the inferred ones See also Function all role assertions on page 70 69 all role assertions for individual in range function Description Returns all role assertions for an individual from the specified ABox in which the individual is a role successor Syntax all role assertions for individual in range IN amp optional abor current abox Arguments IN individual name abor ABox object Values List of assertions See also Function all role assertions on page 70 all concept assertions function Description Returns all concept assertions from the specified ABox Syntax all concept assertions amp optional abor current abox Arguments abor ABox object Values List of assertions all role assertions function Description Returns all role assertions from the specified ABox Syntax all role assertions optional abor current abox Arguments IN individual name abor ABox object Values List of assertions See also Function all concept asser
63. or the inverse role of AN This is equivalent to inv AN The inverse role of AN has no user defined name if inverse is bound to nil domain provides a concept term defining the domain of role AN This is equivalent to adding the axiom implies at least 1 AN C if domain is bound to the concept term C No domain is declared if domain is bound to nil range provides a concept term defining the range of role AN This is equivalent to adding the axiom implies top all AN D if range is bound to the concept term D No range is declared if range is bound to nil parents provides a list of superroles for the new role The role AN has no superroles if parents is bound to nil If only a single superrole is specified the keyword parent may alternatively be used see examples This macro is supplied to be compatible with the KRSS specification It is re dundant since the macro define primitive role can be used with feature t This function combines several KRSS functions for defining properties of an attribute An attribute cannot be transitive A role with a feature as a parent has to be a feature itself define primitive attribute has mother domain child range mother parents has parents define primitive attribute has best friend inverse best friend of parent has friends Macro signature on page Section 3 3 land Figure Z on page 10 for domain and range restrictions 33 add role axioms function D
64. ox queries 333 Is Doris a woman CL USER 7 individual instance doris woman T 335 Of which concepts is Eve an instance CL USER 8 individual types eve SISTER WOMAN PERSON HUMAN TOP TOP 333 get all direct types of eve CL USER 9 individual direct types eve SISTER 333 get all descendants of Alice CL USER 10 individual fillers alice has descendant DORIS EVE CHARLES BETTY 333 get all instances of the concept sister CL USER 11 concept instances sister DORIS BETTY EVE In the Appendix different versions of this knowledge base can be found In Appendix on page 71 you find a version in KRSS syntax and in Appendix B on page 73 a version where the TBox and ABox are integrated 2 3 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 IN Object name LCN List of concept names R Role term abor ABox object RN Role name tbox TBox object AN Attribute name n A natural number ABN ABox name real A real number TBN TBox name integer An integer number All names are Lisp symbols the concepts are symbols or lists Please note that for macros in contrast to functions the arguments should not be quoted The API is designed to the following conventions For most of the services offered by RACER macro interfaces and function interfaces ar
65. plies Grandmother and Mother Female implies and some has sibling Sister some has sibling Twin exactly 1 has sibling and Twin all has sibling Twin sister 28 equivalent macro Description States the equality between two concept terms Syntax equivalent Cj 65 Arguments Ci C5 concept term Remarks This kind of concept axiom is an addendum to the KRSS specification Examples equivalent Grandmother and Mother some has child Parent equivalent and polygon exactly 4 has angle and polygon exactly 4 has edges disjoint macro Description This axiom states the disjointness of a set of concepts Syntax disjoint CN CN Arguments CNy CN concept names Examples disjoint Yellow Red Blue disjoint January February November December define primitive concept KRSS macro Description Syntax Arguments Remarks Examples Defines a primitive concept define primitive concept CN C CN C concept name concept term C states the necessary conditions for CN define primitive concept Grandmother and Mother Female define primitive concept Father Parent 29 define concept KRSS macro Description Defines a concept Syntax define concept CN C Arguments CN concept name C concept term Remarks Please note that in RACER definitions of a concept do not have to be unique Several definitions may be given for the same concept
66. s man UNCLE BOTTOM BOTTOM BROTHER FATHER 333 get all transitive roles in the TBox family CL USER 5 all transitive roles HAS DESCENDANT 333 the following forms are assumed to be contained in a 333 file racer examples family abox lisp 333 initialize the ABox smith family and use the TBox family in abox smith family family 333 supply the signature for this ABox signature individuals alice betty charles doris eve 335 Alice is the mother of Betty and Charles instance alice mother related alice betty has child related alice charles has child 335 Betty is mother of Doris and Eve instance betty mother related betty doris has child related betty eve has child Charles is the brother of Betty and only Betty instance charles brother related charles betty has sibling 333 Closing the role has sibling for Charles instance charles at most 1 has sibling Doris has the sister Eve related doris eve has sister Eve has the sister Doris related eve doris has sister doris has child betty mother has has sister child alice mother has sibling EYE charles and brother at most 1 has sibling Figure 3 Depiction of the ABox smith family with the explicitly given information being shown The RACER Session now load the ABox CL USER 6 1oad racer examples family abox lisp Loading racer examples family abox lisp T Ria some AB
67. satisfiable with respect to a T Box tboz If satisfiability is to be tested without reference to a TBox nil can be used concept satisfiable p function Description Checks if a concept term is satisfiable Syntax concept satisfiable p C tbox Arguments C concept term tbox TBox object Values Returns t if C is satisfiable and nil otherwise Remarks For testing whether a concept term is satisfiable with respect to a T Box tboz If satisfiability is to be tested without reference to a TBox nil can be used concept subsumes KRSS macro Description Checks if two concept terms subsume each other Syntax concept subsumes C C5 amp optional tbor current tbox Arguments Ci concept term of the subsumer Ca concept term of the subsumee tbox TBox object Values Returns t if Cj subsumes C2 and nil otherwise Al concept subsumes p function Description Syntax Arguments Values Remarks See also Checks if two concept terms subsume each other concept subsumes p Cj C2 thor C concept term of the subsumer Ca concept term of the subsumee tbox TBox object Returns t if C subsumes C2 and nil otherwise For testing whether a concept term subsumes the other with respect to a TBoz tbozx If the subsumption relation is to be tested without reference to a TBox nil can be used Function concept equivalent p on page and function atomic concept synonyms on page concept equivalent
68. sertion function Description Retracts a concept assertion from an ABox Syntax forget concept assertion abox IN C Arguments abor ABox object IN individual name C concept term Values abor Remarks For answering subsequent queries the index structures for the ABox will be recomputed i e some queries might take some time e g those queries that require the realization of the ABox Examples forget concept assertion find abox peanuts characters Lucy Person forget concept assertion find abox peanuts characters Snoopy and Dog Cartoon Character related KRSS macro Description Builds a role assertion asserts that two individuals are related via a role or feature Syntax related IN IN2 R Arguments IN individual name of the predecessor IN individual name of the filler R arole term or a feature term Examples related Charlie Brown Snoopy has pet related Linus Lucy inv has brother 36 add role assertion function Description Adds a role assertion to an ABox Syntax add role assertion abor IN IN R Arguments abor ABox object IN individual name of the predecessor IN individual name of the filler R role term Values abor Examples add role assertion find abox peanuts characters Charlie Brown Snoopy has pet add role assertion find abox peanuts characters Linus Lucy inv has brother forget role assertion function Descr
69. ssions Concrete domain concepts state concrete predicate restrictions for attribute fillers see Figure B RACER currently supports two unary predicates for integer attributes min max five nary predicates for real attributes gt gt lt lt 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 attributes of type real have to be in the form of linear inequations where the attribute names play the role of variables The use of these concepts is illustrated in Section 3 4 DL notation RACER 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 2 Real predicate exists restriction JA1 An P CP aexpr aexpr with P gt gt lt lt An all restriction of the form VA1 An P is currently not directly supported However it can be expressed as disjunction VA1 Lp Ll U VAS Lp U JA1 An P 3 2 Concept Axioms and Terminology RACER supports several kinds of concept axioms General concept inclusions GCIs state the subsumption relation between two concept terms DL notation Cy E Ca RACER syntax implies Ci C Concept equations state the equivalence between two concept terms DL notation C1 C5 RACER syntax
70. st specifies the action taken if a file with the specified name does not yet exist All keywords for the Lisp function with open file are supported The default is create TBox object A file may contain several T Boxes The usual way to load a TBox file is to use the Lisp function load save tbox project TBoxes tbox one lisp save tbox project TBoxes final tbox lisp find tbox tbox one if exists error forget tbox function Description Syntax Arguments Values Remarks Examples Delete the specified TBox from the list of all TBoxes Usually this enables the garbage collector to recycle the memory used by this TBox forget tbox thor tbor is a TBox object or TBox name List containing the name of the removed T Box and a list of names of option ally removed ABoxes All ABoxes referencing the specified TBox are also deleted forget tbox smith family 18 delete tbox macro Description Delete the specified TBox from the list of all TBoxes Usually this enables the garbage collector to recycle the memory used by this TBox Syntax delete tbox TBN Arguments TBN is a TBox name Values List containing the name of the removed TBox and a list of names of option ally removed ABoxes Remarks Calls forget tbox Examples delete tbox smith family delete all tboxes function Description Delete all known TBoxes Usually this enables the garbage collector to recycl
71. st axiom 3 3 Role Declarations In contrast to concept axioms role declarations are unique in RACER 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 R are disjoint All roles in a TBox 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 in Section page 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 two pairs of individuals IN and IN and IN and IN 3 are related via a transitive role R then JN and IN3 are also related via R Role Hierarchies define super and subrole relationships between roles If E is a super role of Ro then for all pairs of individuals between which R holds R must hold too In the current implementation the specified superrole relations may not be cyclic If a role has a superrole its properties are not in every case inherited by the subrole The properties of a declared rol
72. t whether i D can be added without causing an inconsistency In this case it might be faster not to addi C directly but to check whether individual instance i and C not D returns t The reason is that in this case the index structures for the ABox are not recomputed 14 4 Knowledge Base Management Functions This section documents the functions for managing TBoxes and ABoxes and for specifying queries racer read file function Description A file in Racer format as described in this document containing TBox and or ABox declarations is loaded Syntax racer read file pathname Arguments pathname is the pathname of a file Remarks This function is only available in the server version of Racer It is intended to load TBox and or ABox declarations using Racer s Lisp syntax Only the statements described in this document are accepted Examples racer read file project onto kb my knowledge base lisp 4 1 TBox Management in tbox macro Description The TBox with the specified name is taken or a new TBox with that name is generated and bound to the variable current tbox Syntax in tbox TBN key init t Arguments TBN is the name of the TBox init boolean indicating if the TBox should be initialized Values TBox object named TBN Remarks Usually this macro is used at top of a file containing a TBox This macro can also be used to create new TBoxes The specified TBox is the current tbox until in tbox is cal
73. thor CN GN Arguments thor TBox object CN concept name GN _ group name Values tbox 5 3 Role Declarations 31 define primitive role KRSS macro with changes Description Syntax Arguments Remarks Examples See also Defines a role define primitive role RN amp key transitive nil feature nil symmetric nil reflexive nil inverse nil domain nil range nil parents nil RN role name transitive if bound to t declares that the new role is transitive feature if bound to t declares that the new role is a feature symmetric if bound to t declares that the new role is a symmetric This is equivalent to declaring that the new role s inverse is the role itself reflexive if bound to t declares that the new role is reflexive currently only supported for ALCH If feature is bound to t the value of reflexive is ignored inverse provides a name for the inverse role of RN This is equivalent to inv RN The inverse role of RN has no user defined name if inverse is bound to nil domain provides a concept term defining the domain of role RN This is equivalent to adding the axiom implies at least 1 RN C if domain is bound to the concept term C No domain is declared if domain is bound to nil range provides a concept term defining the range of role RN This is equivalent to adding the axiom implies top all RN D if range is bound to the concept term D No range is
74. tions for individual on page 69 70 describe abox function Description Syntax Arguments Values Generates a description for the specified A Box describe abox amp optional abox current abox stream standard output abor ABox object stream open stream object abox The description is written to stream describe individual function Description Syntax Arguments Values Generates a description for the individual from the specified ABox describe individual IN amp optional abor current abox stream standard output IN individual name abor ABox object stream open stream object IN The description is written to stream A KRSS Sample Knowledge Base The following knowledge base is specified in KRSS syntax It is a version of the knowledge base used in the Sample Session on page L 71 A 1 KRSS Sample TBox 333 the following forms are assumed to be contained ina 333 file racer examples family tbox krss lisp 333 initialize the TBox family in tbox family init t the roles define primitive role has child parents has descendant define primitive role has descendant transitive t define primitive role has sibling define primitive role has sister parents has sibling define primitive role has brother parents has sibling define primitive attribute has gender domain amp range restrictions for roles implies top a
75. tors load ABox loop over aboxes 68 loop over tboxes most specific instantiators 65 name set number restriction 7 primitive concept 9 racer read file range restriction RDFS rdfs read tbox file read Racer file read RDFS TBox file read XML TBox file realize abox reflexive p reflexive 48 related related individuals 67 rename ABox rename TBox retraction retrieve concept instances retrieve direct predecessors 68 retrieve individual filled roles 68 retrieve individual fillers retrieve related individuals 67 role hierarchy role ancestors role children role descendants role inverse role offspring role p role parents role subsumes p role subsumes role 46 save TBox save abox save tbox signature 6 signature state subrole 33 superrole symmetric p symmetric taxonony 56 tbox tbox classified p tbox classified tbox coherent p tbox coherent tbox name top transitive role transitive p transitive unique name assumption value restriction XML xml read tbox file 78
76. unction individuals related p on page retrieve direct predecessors function Description Syntax Arguments Values Examples Gets all individuals that are predecessors of a role for a specified individual retrieve direct predecessors R IN abor R role term IN individual name of the role filler abor ABox object List of individual names retrieve direct predecessors has pet Snoopy find abox peanuts characters loop over aboxes function Description Syntax Iterator function for all ABoxes loop over aboxes abor variable loop clause Arguments aboz variable variable for a ABox object loop clause loop clause 68 all aboxes function Description Returns the names of all known ABoxes Syntax all aboxes Values List of ABox names all individuals function Description Returns all individuals from the specified ABox Syntax all individuals amp optional abor current abox Arguments abor ABox object Values List of individual names all concept assertions for individual function Description Returns all concept assertions for an individual from the specified ABox Syntax all concept assertions for individual IN amp optional abor current abox Arguments IN individual name abor ABox object Values List of concept assertions See also Function all concept assertions on page all role asserti
77. utes 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 feaver and human gt temperature celsius 38 5 equivalent seriously ill human and human gt temperature celsius 42 0 Obviously Racer determines that the concept seriously ill human is subsumed by human with feaver For the reals Racer 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 11 equivalent seriously i11 human 1 and human gt temperature fahrenheit 107 6 Racer recognizes the subsumption relationship with human with feaver and the synonym relationship with seriously ill human In an ABox it is possible to set up constraints between individuals This is illustrated with the following extended ABox signature atomic concepts teenager roles attributes individuals eve doris objects temp eve temp doris constrained eve temp eve temperature fahrenheit constrained doris temp doris temperature celsius constraints temp eve 102 56 temp doris 39 5 For
78. verwritten If bound to nil an error is signaled if an ABox with the name given by new name is found Values ABox object Remarks The function create abox clone is called Examples clone abox my ABox clone abox my ABox new name abox clone overwrite t See also Function create abox clone on page find abox function Description Finds an ABox object with a given name among all ABoxes Syntax find abox ABN amp optional errorp t Arguments ABN is the name of the ABox to be found errorp if bound to t an error is signaled if the ABox is not found Values ABox object Remarks This function can also be used to delete ABoxes or rename ABoxes as shown in the examples Examples find tbox my ABox Get rid of an ABox i e make the ABox garbage collectible setf find abox abox1 nil Renaming an ABox setf find abox abox2 abox1 26 abox name function Description Finds the name of the given ABox object Syntax abox name abox Arguments abor ABox object Values ABox name Examples abox name find abox my ABox tbox function Description Gets the associated T Box for an ABox Syntax tbox abos Arguments abor ABox object Values TBox object 5 Knowledge Base Declarations Knowledge base declarations include concept axioms and role declarations for the TBox and the assertions for the ABox The TBox object and the ABox object must exist before the functions for knowledge base declar
79. which atomic concepts in the TBox are inconsistent by calling check tbox coherence This service is usually much faster than calling classify tbox However if an application prob lem can be solved for example by checking whether a certian ABox 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 RACER ensures that the knowledge bases are in the ap propriate states This behavior usually guarantees minimum runtimes for answering queries 3 8 Retraction and Incremental Additions RACER offers constructs for retracting ABox assertions see forget forget concept assertion and forget role assertion If a query has been an swered and some assertions are retracted then RACER might be forced to realize the ABox again i e after retractions some queries might take some time to answer RACER also supports incremental additions to ABoxes i e assertions can be added even after queries have been answered However the internal data structures used for anwering queries are recomputed from scratch This might take some time If an ABox is used for hypothesis generation 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 ABox Now let us assume we can add C and afterwards want to tes

Download Pdf Manuals

image

Related Search

Related Contents

OPERATING INSTRUCTIONS Slide Badge Machine L R T  FERROLI ESPAÑA, S.A. - Ministerio de Hacienda  Especies de espacios transforma el MACBA  C r o n o t e r m o s t a t o s e t t i m a n a l e  PixDoc Manual  企画書をダウンロード    User manual - Océ  ISTRUZIONI PER L`USO  ダイケン 補修セットⅢ 取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file