JTP A Query Answering System For Knowledge Represented in DAML

23
JTP JTP A A Query Answering System Query Answering System For Knowledge For Knowledge Represented in DAML Represented in DAML 7/12/02 Richard Fikes Richard Fikes Gleb Frank Jessica Jenkins Gleb Frank Jessica Jenkins Knowledge Systems Laboratory Knowledge Systems Laboratory www.ksl.stanford.edu www.ksl.stanford.edu

description

JTP A Query Answering System For Knowledge Represented in DAML. Richard Fikes Gleb Frank Jessica Jenkins. Knowledge Systems Laboratory Stanford University www.ksl.stanford.edu. 7/12/02. Hybrid Reasoning for Answering Queries. JTP has a hybrid reasoning architecture - PowerPoint PPT Presentation

Transcript of JTP A Query Answering System For Knowledge Represented in DAML

Page 1: JTP A  Query Answering System For Knowledge Represented in DAML

JTPJTPAA Query Answering System Query Answering System

For KnowledgeFor Knowledge

Represented in DAMLRepresented in DAML

7/12/02

Richard FikesRichard Fikes

Gleb Frank Jessica JenkinsGleb Frank Jessica Jenkins

Knowledge Systems LaboratoryKnowledge Systems Laboratory

Stanford UniversityStanford University

www.ksl.stanford.eduwww.ksl.stanford.edu

Page 2: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

2

Hybrid Reasoning for Answering QueriesHybrid Reasoning for Answering Queries JTP has a hybrid reasoning architectureJTP has a hybrid reasoning architecture

First-order logic model elimination theorem proverFirst-order logic model elimination theorem prover

Suite of special purpose reasonersSuite of special purpose reasoners

Dispatchers and APIs for reasonersDispatchers and APIs for reasoners

Infers query answers that are logical constantsInfers query answers that are logical constants Explicitly mentioned in the KB, orExplicitly mentioned in the KB, or

Defined in DAML+OILDefined in DAML+OIL

Implemented in JAVAImplemented in JAVA

Available from the WebAvailable from the Web Used by SAIC in ARDA’s AQUAINT programUsed by SAIC in ARDA’s AQUAINT program

Used by UWF and NAI in DARPA’s UltraLog programUsed by UWF and NAI in DARPA’s UltraLog program

To be used by BBN in DARPA’s DAML programTo be used by BBN in DARPA’s DAML program

Page 3: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

3

JTP’s DAML+OIL ReasonerJTP’s DAML+OIL Reasoner Precomputes most query answers as KB is loadedPrecomputes most query answers as KB is loaded

Enables rapid replies to queriesEnables rapid replies to queries

Based on the axiomatic semantics for DAML+OILBased on the axiomatic semantics for DAML+OIL

Compiles axioms into forward chaining actionsCompiles axioms into forward chaining actions

E.g., the following axiom:E.g., the following axiom:

(=> (and (oneOf ?c ?l) (item ?l ?x)) (=> (and (oneOf ?c ?l) (item ?l ?x))

(type ?x ?c))(type ?x ?c))

compiles into an action thatcompiles into an action that

> Fires whenever a class C is asserted to be “oneOf” a list L.Fires whenever a class C is asserted to be “oneOf” a list L.

> Activates an action thatActivates an action that

– Fires when an object X is asserted to be an “item” of L.Fires when an object X is asserted to be an “item” of L.

– Asserts that X is type C.Asserts that X is type C.

Efficiently stores DAML+OIL sentences (triples)Efficiently stores DAML+OIL sentences (triples)

E.g., linking of values of transitive properties such as subClassOfE.g., linking of values of transitive properties such as subClassOf

Page 4: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

4

Recent DevelopmentsRecent Developments Usability improvements for KB testing and debuggingUsability improvements for KB testing and debugging

Support for rapid reloading and changing of developing KBsSupport for rapid reloading and changing of developing KBs> Load multiple KB modules with Load multiple KB modules with checkpointingcheckpointing after each load after each load

> ““untelluntell” command using “undo”, “redo”, and checkpoints” command using “undo”, “redo”, and checkpoints

Significant reduction in time required to load KBsSignificant reduction in time required to load KBs

Hierarchical display of reasoning explanationsHierarchical display of reasoning explanations Includes template-based “natural language” descriptionsIncludes template-based “natural language” descriptions

E.g., “(usedEncryptionAlgorithm C-001 A)” displayed asE.g., “(usedEncryptionAlgorithm C-001 A)” displayed as

“ “Algorithm A is used to encrypt communication C-001”Algorithm A is used to encrypt communication C-001”

Added classifier to DAML+OIL reasonerAdded classifier to DAML+OIL reasoner Developing reasoners for time-dependent answersDeveloping reasoners for time-dependent answers

Based on a reusable time ontology developed at KSLBased on a reusable time ontology developed at KSL

Expanding inferences made by DAML+OIL reasoner Expanding inferences made by DAML+OIL reasoner

Page 5: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

5

Negation Using ComplementsNegation Using Complements DAML+OIL does not include explicit negationDAML+OIL does not include explicit negation

I.e., cannot say “(not …)” in DAML+OILI.e., cannot say “(not …)” in DAML+OIL

Negation is related to complements via these axioms:Negation is related to complements via these axioms: ““If NC is the complement of C, then X is not type C exactly when X If NC is the complement of C, then X is not type C exactly when X

is type NC.” is type NC.”

(=> (complementOf ?c ?nc) (=> (complementOf ?c ?nc) (<=> (<=> (not (type ?x ?c)) (not (type ?x ?c)) (type ?x ?nc))) (type ?x ?nc)))

““If R is the class of all objects that have Y as a value of property P If R is the class of all objects that have Y as a value of property P and NR is the complement of R, then Y is not a value of P for X and NR is the complement of R, then Y is not a value of P for X exactly when X is type NR.” exactly when X is type NR.”

(=> (and (onProperty ?r ?p) (=> (and (onProperty ?r ?p) (hasValue ?r ?y)(hasValue ?r ?y) (complementOf ?r ?nr))(complementOf ?r ?nr)) (<=> (<=> (not (holds ?p ?x ?y))(not (holds ?p ?x ?y)) (type ?x ?nr))) (type ?x ?nr)))

Page 6: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

6

Inferring Negations Using ComplementsInferring Negations Using Complements

Consider the defining axiom for toClass restrictionsConsider the defining axiom for toClass restrictions

““If R is the class of objects all of whose values of P are type C, X is If R is the class of objects all of whose values of P are type C, X is type R, and V is a value of P for X, then V is type C.”type R, and V is a value of P for X, then V is type C.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c) (=> (and (onProperty ?r ?p) (toClass ?r ?c)

(type ?x ?r) (holds ?p ?x ?v))(type ?x ?r) (holds ?p ?x ?v)) (type ?v ?c))(type ?v ?c))

That axiom is equivalent to the following:That axiom is equivalent to the following:

““If R is the class of objects all of whose values of P are type C, X is If R is the class of objects all of whose values of P are type C, X is type R, and V is not type C, then V is not a value of P for X.”type R, and V is not type C, then V is not a value of P for X.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c) (=> (and (onProperty ?r ?p) (toClass ?r ?c)

(type ?x ?r) (not (type ?v ?c)))(type ?x ?r) (not (type ?v ?c)))

(not (holds ?p ?x ?v)))(not (holds ?p ?x ?v)))

Page 7: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

7

Inferring Negations Using ComplementsInferring Negations Using Complements The axiom:The axiom:

““If R is the class of objects all of whose values of P are type C, X is type R, If R is the class of objects all of whose values of P are type C, X is type R, and V is not type C, then V is not a value of P for X.”and V is not type C, then V is not a value of P for X.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c) (=> (and (onProperty ?r ?p) (toClass ?r ?c) (type ?x ?r) (not (type ?v ?c)))(type ?x ?r) (not (type ?v ?c)))

(not (holds ?p ?x ?v)))(not (holds ?p ?x ?v)))

is equivalent to:is equivalent to:

““If R is the class of objects all of whose values of P are type C, X is type R, CC If R is the class of objects all of whose values of P are type C, X is type R, CC is the complement of C, V is type CC, R2 is the class of objects that have V is the complement of C, V is type CC, R2 is the class of objects that have V as a value of P, and CR2 is the complement of R2, then X is type CR2.”as a value of P, and CR2 is the complement of R2, then X is type CR2.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c)(=> (and (onProperty ?r ?p) (toClass ?r ?c) (type ?x ?r)(type ?x ?r) (complementOf ?c ?cc) (type ?v ?cc)(complementOf ?c ?cc) (type ?v ?cc) (onProperty ?r2 ?p) (hasValue ?r2 ?v)(onProperty ?r2 ?p) (hasValue ?r2 ?v) (complementOf ?r2 ?cr2))(complementOf ?r2 ?cr2))

(type ?x ?cr2)))(type ?x ?cr2)))

which can be used as a forward chaining rule. (!)which can be used as a forward chaining rule. (!)

Page 8: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

8

Compiling Actions For ComplementsCompiling Actions For Complements JTP compiles implicative normal form sentences into forward JTP compiles implicative normal form sentences into forward

chaining actionschaining actions(=> (and L1 … Ln) Lx)(=> (and L1 … Ln) Lx)

is compiled into an action that fires when an Li is assertedis compiled into an action that fires when an Li is asserted

Rule compiler will be expanded as follows:Rule compiler will be expanded as follows: Produce redundant forms of each inputProduce redundant forms of each input

(=> (and L1 … Li-1 Li+1 … Ln (not Lx)) (=> (and L1 … Li-1 Li+1 … Ln (not Lx)) (not Li))(not Li))

Replace negations by complementsReplace negations by complements

(=> (and L1 … Li-1 Li+1 … Ln (=> (and L1 … Li-1 Li+1 … Ln … … (complement …) (type …) … (complement …)) (complement …) (type …) … (complement …)) (type …))(type …))

Produce forward chaining actions from the redundant formsProduce forward chaining actions from the redundant forms> Essentially adds actions that fire when (not Lx) is assertedEssentially adds actions that fire when (not Lx) is asserted

Page 9: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

9

Subclass Hierarchy Inferred By JTPSubclass Hierarchy Inferred By JTP

(Union C1 … Cn) (Union C1 … Cn) == ~(Intersect ~C1 … ~Cn) ~(Intersect ~C1 … ~Cn)

(Union (Subset C1 … Cn))(Union (Subset C1 … Cn))

CiCi

(Intersect (Subset C1 … Cn))(Intersect (Subset C1 … Cn))

(Intersect C1 … Cn) (Intersect C1 … Cn) == ~(Union ~C1 … ~Cn) ~(Union ~C1 … ~Cn)

Page 10: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

10

Recognizing IndividualsRecognizing Individuals JTP uses forward chaining to recognize individualsJTP uses forward chaining to recognize individuals Example identifying forward chaining actions:Example identifying forward chaining actions:

““If X is type CSUB and CSUB is a subclass of CSUPER, then X is type If X is type CSUB and CSUB is a subclass of CSUPER, then X is type CSUPER.”CSUPER.”

(=> (and (subClassOf ?csub ?csuper) (type ?x ?csub)) (=> (and (subClassOf ?csub ?csuper) (type ?x ?csub))

(type ?x ?csuper)(type ?x ?csuper)) )

““If the range of property P is R and Y is a value of P for some X, then Y If the range of property P is R and Y is a value of P for some X, then Y is type R.”is type R.”

(=> (and (range ?p ?r) (holds ?p ?x ?y)) (=> (and (range ?p ?r) (holds ?p ?x ?y)) (type ?y ?r)(type ?y ?r)))

““If the domain of property P is D and X has a value for P, then X is type If the domain of property P is D and X has a value for P, then X is type D.”D.”

(=> (and (domain ?p ?d) (holds ?p ?x ?y)) (=> (and (domain ?p ?d) (holds ?p ?x ?y)) (type ?x ?d)(type ?x ?d)))

““If X is equivalent to Y and X is type C, then Y is type C.”If X is equivalent to Y and X is type C, then Y is type C.”(=> (and (equivalentTo ?x ?y) (type ?x ?c)) (=> (and (equivalentTo ?x ?y) (type ?x ?c)) (type ?y ?c)(type ?y ?c)))

Page 11: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

11

Forward Chaining Recognition ActionsForward Chaining Recognition Actions

““If X is an instance of every item on L and C is the intersection of the If X is an instance of every item on L and C is the intersection of the items on L, then X is an instance of C.”items on L, then X is an instance of C.”

(=> (and (intersectionOf ?c ?l)(=> (and (intersectionOf ?c ?l) (forall ?i (=> (item ?l ?i) (type ?x ?i))))(forall ?i (=> (item ?l ?i) (type ?x ?i)))) (type ?x ?c)(type ?x ?c)))

““If class C is oneOf list L and X is an item of L, then X is type C.”If class C is oneOf list L and X is an item of L, then X is type C.”

(=> (and (oneOf ?c ?l) (item ?l ?x)) (=> (and (oneOf ?c ?l) (item ?l ?x)) (type ?x ?c)(type ?x ?c)))

““If R is the class of all objects for which all values of property P are If R is the class of all objects for which all values of property P are type C, X is type R, and V is a value of P for X, then V is type C.” type C, X is type R, and V is a value of P for X, then V is type C.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c)(=> (and (onProperty ?r ?p) (toClass ?r ?c)

(type ?x ?r) (holds ?p ?x ?v))(type ?x ?r) (holds ?p ?x ?v))

(type ?v ?c)(type ?v ?c)))

Page 12: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

12

Recognizing Individuals In ComplementsRecognizing Individuals In Complements

New compiler will produce recognition actions (!)New compiler will produce recognition actions (!) ExamplesExamples

““If R is the class of objects all of whose values of P are type C, X is type R, and V If R is the class of objects all of whose values of P are type C, X is type R, and V is a value of P for X, then V is type C.”is a value of P for X, then V is type C.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c) (=> (and (onProperty ?r ?p) (toClass ?r ?c) (type ?x ?r) (holds ?p ?x ?v))(type ?x ?r) (holds ?p ?x ?v))

(type ?v ?c))(type ?v ?c))

From that axiom the compiler produces:From that axiom the compiler produces:

““If R is the class of objects all of whose values of P are type C, X is type R, CC is If R is the class of objects all of whose values of P are type C, X is type R, CC is the complement of C, V is type CC, R2 is the class of objects that have V as a the complement of C, V is type CC, R2 is the class of objects that have V as a value of P, and CR2 is the complement of R2, then X is type CR2.”value of P, and CR2 is the complement of R2, then X is type CR2.”

(=> (and (onProperty ?r ?p) (toClass ?r ?c) (type ?x ?r)(=> (and (onProperty ?r ?p) (toClass ?r ?c) (type ?x ?r) (complementOf ?c ?cc) (type ?v ?cc)(complementOf ?c ?cc) (type ?v ?cc) (onProperty ?r2 ?p) (hasValue ?r2 ?v)(onProperty ?r2 ?p) (hasValue ?r2 ?v) (complementOf ?r2 ?cr2))(complementOf ?r2 ?cr2))

(type ?x ?cr2)))(type ?x ?cr2)))

Page 13: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

13

Recognizing Individuals In ComplementsRecognizing Individuals In Complements

Examples of recognition actions the new compiler will produceExamples of recognition actions the new compiler will produce ““If Csub is a subclass of Csuper and X is type Csub, then X is type Csuper.”If Csub is a subclass of Csuper and X is type Csub, then X is type Csuper.”

(=> (and (subClassOf ?csub ?csuper) (type ?x ?csub)) (=> (and (subClassOf ?csub ?csuper) (type ?x ?csub))

(type ?x ?csuper)) (type ?x ?csuper))

From that axiom the compiler produces:From that axiom the compiler produces:

““If Csub is a subclass of Csuper, C-Csub is the complement of Csub, C-If Csub is a subclass of Csuper, C-Csub is the complement of Csub, C-Csuper is the complement of Csuper, and X is type C-Csuper, then X is type Csuper is the complement of Csuper, and X is type C-Csuper, then X is type C-Csub.”C-Csub.”

(=> (and (subClassOf ?csub ?csuper)(=> (and (subClassOf ?csub ?csuper) (complementOf ?ccsub ?csub)(complementOf ?ccsub ?csub) (complementOf ?ccsuper ?csuper)(complementOf ?ccsuper ?csuper) (type ?x ?ccsuper))(type ?x ?ccsuper))

(type ?x ?ccsub)))(type ?x ?ccsub)))

Page 14: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 14

Cryptographic Policy Example

• In this DAML ontology, CommunicationActionBetweenAG1AndAG2 is the class of all actions in which the action is performedBy AG1 and hasDestination AG2.

http://ksl.stanford.edu/DAML/ultralog/CryptographicPolicies1.daml

• There is a restriction on the class that all communications between these two groups must be encrypted with encryption scheme A.

Page 15: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 15

A Specific Communication Instance

• Communication-001 is an instance of a communication between group AG1 and group AG2.

• Note:

• Communication-001 is not asserted to be an instance of CommunicationActionBetweenAG1AndAG2

• Communication-001 is not asserted to be encrypted.

Page 16: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 16

Here, we ask JTP what algorithm Communication-001 was encrypted with:

And the answer is….

A (!)

Page 17: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 17

Proof BrowserThe proof, displayed in the Proof Browser, explains how JTP figured out that the encryption algorithm used was A.

In the left pane is the entire proof tree. In the right pane is a detailed view of the selected proof.

Page 18: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 18

Here, we see that Communication-001 has the value “A” for the property usedEncryptionAlgorithm because Communication-001 is an instance of the anonymous restriction Anon_7, and Anon_7 specifies that all of its

instances must have “A” as a value of usedEncryptionAlgorithm.

Page 19: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 19

Communication-001 is an instance of Anon_7 because it is an instance of CommunicationActionBetweenAG1AndAG2, and CommunicationActionBetweenAG1AndAG2 is a subclass of Anon_7.

But why is Communication-001 an instance of CommunicationActionBetweenAG1AndAG2?

Page 20: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 20

Communication-001 is an instance of both Anon_5 and Anon_6. There is a rule which states that if a resource is an instance of both Anon_5 and Anon_6, then it must be an instance of CommunicationActionBetweenAG1AndAG2.

This rule was created by a special-purpose forward-chaining action. It was created because CommunicationActionBetweenAG1AndAG2 is defined to be the intersectionOf the list Anon_8, and Anon_5 and Anon_6 are the items in Anon_8.

Page 21: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 21

Communication-001 is an instance of the restriction Anon_6 because it has a value AG1 for the property performedBy.

Page 22: JTP A  Query Answering System For Knowledge Represented in DAML

04/19/23 22

Similarly, Communication-001 is an instance of Anon_5 because it has a value AG2 for the property hasDestination.

Page 23: JTP A  Query Answering System For Knowledge Represented in DAML

Knowledge Systems Laboratory, Stanford University

23

JTP SummaryJTP Summary Hybrid reasoning system for query answeringHybrid reasoning system for query answering Special purpose reasoner for DAML+OILSpecial purpose reasoner for DAML+OIL Easily extendable by adding special purpose reasonersEasily extendable by adding special purpose reasoners Current and recent developmentsCurrent and recent developments

Usability improvements for KB testing and debuggingUsability improvements for KB testing and debugging

Hierarchical display of reasoning explanationsHierarchical display of reasoning explanations> Includes template-based “natural language” descriptionsIncludes template-based “natural language” descriptions

Added classifier to DAML+OIL reasonerAdded classifier to DAML+OIL reasoner

Developing reasoners for time-dependent answersDeveloping reasoners for time-dependent answers> Based on a reusable time ontology developed at KSLBased on a reusable time ontology developed at KSL

Expanding inferences made by DAML+OIL reasonerExpanding inferences made by DAML+OIL reasoner> Reasoning with complementsReasoning with complements

> Recognizing individualsRecognizing individuals