CSE-291: Ontologies in Data & Process Integration Department of Computer Science & Engineering Department of Computer Science & Engineering University of California, San Diego University of California, San Diego CSE-291: Ontologies in Data CSE-291: Ontologies in Data Integration Integration Spring 2004 Spring 2004 Bertram Lud Bertram Lud ä ä scher scher [email protected][email protected]
24
Embed
CSE-291: Ontologies in Data & Process Integration Department of Computer Science & Engineering University of California, San Diego CSE-291: Ontologies.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
CSE-291: Ontologies in Data & Process Integration
Department of Computer Science & Engineering Department of Computer Science & Engineering University of California, San DiegoUniversity of California, San Diego
CSE-291: Ontologies in Data IntegrationCSE-291: Ontologies in Data IntegrationSpring 2004Spring 2004
• Non-logical symbols:Non-logical symbols:– propositional variables p, q, r, ... – signature: set of propositional variables = {p, q, r, ...}
• Formation rules for well-formed formulas (wff)Formation rules for well-formed formulas (wff)– an atomic formula (propositional variable) is a formula– if F, G are formulas, so are:
• FG, F G, F, FG , FG, F
propositional logic<logic> (or "propositional calculus") A system of symbolic logic using symbols to stand for whole propositions and logical connectives. Propositional logic only considers whether a proposition is true or false. In contrast to predicate logic, it does not consider the internal structure of propositions. http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?propositional+logic
• An An interpretationinterpretation I I over a signature over a signature is a mapping is a mapping– I: {true, false} , associating a truth value to every
propositional variable
• Truth tablesTruth tables describe how to extend describe how to extend I I from atomic to from atomic to composite formulas (Boolean Algebra):composite formulas (Boolean Algebra):– FG, F G, F, FG , FG
CSE-291: Ontologies in Data & Process Integration
Boolean Algebra, Truth TablesBoolean Algebra, Truth Tables
Reasoning in Propositional LogicReasoning in Propositional Logic
• A formula F is … A formula F is … – valid if it is true for all interpretations I
– satisfiable if it is true for some interpretation I
– unsatisfiable if it is true for no interpretation I
• Try these:Try these:1. p q
2. p p
3. p p
4. p p
5. p p
6. p p
CSE-291: Ontologies in Data & Process Integration
Reasoning in Propositional LogicReasoning in Propositional Logic
• Def. “models” relationship “|=”: Def. “models” relationship “|=”: – If a formula F evaluates to true for an interpretation I then
I is called a model of F; written I |= F – I is a model of {F1,…, Fk}, written I |= {F1,…, Fk},if I is a
model of each Fj
• Automated deduction setting: Automated deduction setting: – Show that A1,,…, An (axioms) imply T (theorem), that is,
every model of the axioms is also a model of the theorem:– That is: if I |= {A1,,…, An } then I |= T– Short: {A1,,…, An } |= T– Often: Show that A1 … An T is unsatisfiable
• We need a procedure / reasoning algorithm:We need a procedure / reasoning algorithm:– Predicate Calculus (in fact calculi: resolution, tableaux, …)
CSE-291: Ontologies in Data & Process Integration
ExampleExample
• {p, p {p, p q } |= q q } |= q– Truth table
– Resolution
– Tableaux
CSE-291: Ontologies in Data & Process Integration
Example: Reasoning with Binary Decision TreesExample: Reasoning with Binary Decision Trees(see also: Binary Decision Diagrams, or BDDs)(see also: Binary Decision Diagrams, or BDDs)
0
A
1 0
A
1
0
B
1
0
A
0
B
1
if-false if-true
false true
AA … … BB A A B B
0
A
1
0
B
1
A
… … BB A A B B
0
B
1
11
A
0
if-false if-true
AA
true false
CSE-291: Ontologies in Data & Process Integration
Syntax of First-Order Logic (FO)Syntax of First-Order Logic (FO)
Semantics of Predicate LogicSemantics of Predicate Logic• Let Let DD be a non-empty be a non-empty domaindomain (a.k.a. (a.k.a. universe of discourseuniverse of discourse). A ). A structurestructure is a is a
pair pair II = (= (DD,I), with an ,I), with an interpretationinterpretation I that maps ... I that maps ...– each constant symbols c to an element I(c) D– each predicate symbol p/k to a k-ary relation I(p) Dk,– each function symbol f/k to a k-ary function I(f): DkD
• Let Let II be a structurebe a structure, , : : VarsVars D D a a variable assignmentvariable assignment. A valuation . A valuation valvalI,I,
maps maps TermTerm to to D D and and FmlFml to {to {truetrue, , falsefalse}}– valI, (x) = (x) ; for x Vars– valI, (f(t1,...,tk)) = I(f)( valI, (t1),..., valI, (tk) ) ; for f(t1,...,tk) Term – valI, (p(t1,...,tk)) = I(p)( valI, (t1),..., valI, (tk) ) ; for p(t1,...,tk) At – valI, (F G) = valI, (F) and valI, (G) are true ; for F,G Fml
– valI, (F G) = valI, (F) or valI, (G) is true ; for F,G Fml
– valI, ( F) = true (false) if valI, (F) is false (true) ; for FFml– valI, ( x F) = valI,[x/t] (F) is true for some t D ; for FFml
– valI, ( x F) = valI,[x/t] (F) is true for all t D ; for FFml
CSE-291: Ontologies in Data & Process Integration
ExampleExample
Formula F = Formula F = x man(x) x man(x) person(x). person(x).
Domain D = {b, h, c, d, e}Domain D = {b, h, c, d, e}
Let’sLet’s pick an interpretation I: pick an interpretation I: I(bill) = b, I(hillary) = h, I(chelsea) = c
I(person) = {b, h, c}
I(man) = {b}
Under this I, the formula F evaluates to Under this I, the formula F evaluates to truetrue..
• If we choose IIf we choose I’ like I but I’(man) = {b,d}, then F evaluates to ’ like I but I’(man) = {b,d}, then F evaluates to falsefalse
• Thus, I is a Thus, I is a model model of F, while I’ is not:of F, while I’ is not:– I |= F I’ |=/= F
CSE-291: Ontologies in Data & Process Integration
FO Semantics (cont’d)FO Semantics (cont’d)
• F F entailsentails G (G is a G (G is a logical consequencelogical consequence of F) if every model of F) if every model of F is also a model of G: F |= Gof F is also a model of G: F |= G
• F is F is consistent consistent or or satisfiablesatisfiable if it has at least one model if it has at least one model
• F is F is valid valid or a or a tautology tautology if every interpretation of F is a model if every interpretation of F is a model
Proof TheoryProof Theory: :
Let F,G, ... be FO Let F,G, ... be FO sentences sentences (no free variables). (no free variables).
Then the following are equivalent:Then the following are equivalent:
1.1. F_1, ..., F_k |= GF_1, ..., F_k |= G
2.2. F_1 F_1 ... ... F_k F_k G is valid G is valid
3.3. F_1 F_1 ... ... F_k F_k G is unsatisfiable (inconsistent) G is unsatisfiable (inconsistent)
CSE-291: Ontologies in Data & Process Integration
Proof TheoryProof Theory
• A A calculus calculus is formal proof system to establish is formal proof system to establish – F1,…, Fk |= T
• via formal (syntactic) via formal (syntactic) derivationsderivations – F1,…, Fk |– ... |– T, where the “|–” denotes allowed proof steps
• First-order logic is “semi-decidable”:First-order logic is “semi-decidable”:– the set of valid sentences is recursively enumerable, but not recursive
(decidable)
• Some inference engines:Some inference engines:– http://www.semanticweb.org/inference.html
CSE-291: Ontologies in Data & Process Integration
Querying vs. ReasoningQuerying vs. Reasoning
• Querying: Querying: – given a DB instance I (= logic interpretation), evaluate a query
expression (e.g. SQL, FO formula, Prolog program, ...)– boolean query: check if I |= (i.e., if I is a model of ) – (ternary) query: { (X, Y, Z) | I |= (X,Y,Z) } => check happyFathers in a given database
• Reasoning:Reasoning:– check if I |= implies I |= for all databases I, – i.e., if => – undecidable for FO, F-logic, etc.– Descriptions Logics are decidable fragments concept subsumption, concept hierarchy, classification semantic tableaux, resolution, specialized algorithms
CSE-291: Ontologies in Data & Process Integration
Reasoning ExampleReasoning Example
• (1) p(0)(1) p(0)• (2) (2) x p(x) x p(x) p(s(x)) p(s(x))
• (3) p(s(s(0))). (3) p(s(s(0))).
• We want to show that (1) & ... & (2) implies (3)We want to show that (1) & ... & (2) implies (3)• Approach: assume Approach: assume negationnegation of (3) and show that it of (3) and show that it
leads to a contradiction with {(1), (2)}leads to a contradiction with {(1), (2)}– Question: Why is this sound?
CSE-291: Ontologies in Data & Process Integration
““Types” of FormulasTypes” of Formulas
(() rule for ) rule for F = F = x: A(X,...)x: A(X,...)substitute a -variable X withan arbitrary term t
(() rule for F = ) rule for F = A A B B(and other conjunctions)(and other conjunctions)
(() rule for F = ) rule for F = A A B B(and other disjunctions)(and other disjunctions)
(() rules for F = ) rules for F = x: A(X,...) x: A(X,...) substitute a -variable X with a new constant c