Some Logical Nitty Gritty COMP34512 Uli Sattler ulrike.sattler@manchester.ac.uk (slides by Bijan Parsia bparsia@cs.man.ac.uk ) Wednesday, 12 March 14
Recall: RDFS--: Semantics • Two possible approaches – Direct Model Theory (an interpretation function) – By Translation (a translation function) Syntax Translation to FOL Interpretation (assuming Δ ) fluffy fluffy fluffy I ∈ Δ Cat Cat/1 i.e., Cat(x) Cat I ⊆ Δ Cat(fluffy) Cat(fluffy) fluffy I ∈ Cat I fluffy:Cat Cat ⊑ Mammal ∀ x(Cat(x) → Mammal(x)) Cat I ⊆ Mammal I Animal ≡ Animalia ∀ x(Animal(x) ↔ Animalia(x)) Animal I = Animalia I 2 Wednesday, 12 March 14
ALC : Semantics of expressions Syntax Translation to FOL Interpretation (assuming Δ ) f f f I ∈ Δ A A/1 i.e., A(var) A I ⊆ Δ p p/2 i.e., p(var1, var2) p I ⊆ Δ ╳ Δ C ⊓ D T(C,var) ∧ T(D,var) C I ∩ D I C ⊔ D T(C,var) ∨ Trans(D,var) C I ∪ D I ∃ p.C ∃ var’(p(var,var’) ∧ T(C,var’)) {x | ∃ y: <x,y> ∈ p I and y ∈ C I } ∀ P. C ∀ var’(p(var, var’) → T(C,var’)) {x | ∀ y: if <x,y> ∈ p I then y ∈ C I } var is always the variable or constant passed in var’ is always a new variable 3 Wednesday, 12 March 14
ALC : Semantics of axioms Syntax Translation to FOL Interpretation (assuming Δ ) C ⊑ D ∀ x(T(C,x) → T(D,x)) C I ⊆ D I C ≡ D ∀ x(T(C,x) ↔ T(D,x)) C I = D I C(f) T(C, f) f ∈ C I f:C p(f,s) T(p, f, s) <f I ,s I > ∈ p I <f,s>:p Note that we start the translation at the axiom level, which is where we set the first variable name (or constant). 4 Wednesday, 12 March 14
A Simple Example Wednesday, 12 March 14
Computability (vs. Computational and Implementational Complexity) A Case of Disjointness • In ALC we can force two classes to be disjoint – Tree SubClassOf: not Human – Contrast: Tree EquivalentTo: not Human • Slight syntactic extension: DisjointWith: – Tree DisjointWith: Human – What’s the effect on expression, computation, and cognition? – Issue! Common to have sets of disjoint classes • E.g., siblings (for covering) • Require ≈ n 2 disjointness axioms for n classes • Files dominated by disjointness axioms – Hard to edit – Hard to read – Significant load time issues 6 Wednesday, 12 March 14
Pairwise Disjointness • Sponge, Unicorn, Slug, Tree • Somewhat compact – Sponge DisjointWith: Unicorn, Slug, Tree – Unicorn DisjointWith: Sponge, Slug, Tree – Slug DisjointWith: Sponge, Unicorn, Tree – Tree DisjointWith: Sponge, Slug, Unicorn, • More compact (exploiting semantics): – Sponge DisjointWith: Unicorn, Slug, Tree – Unicorn DisjointWith: Slug, Tree – Slug DisjontWith: Tree • Tradeoffs for expression/computation/cognition? – Do they differ in what they say? – In WWC? BCC? ACC? – Is one more usable? 7 Wednesday, 12 March 14
N-ary Disjointness • Introduce an n-ary construct: DisjointClasses: • Very compact – DisjointClasses: Sponge, Unicorn, Slug, Tree – Expression of size n for n classes • Must take care in measuring size! • Rather “DRY” – Where does it get more complicated? – Does it ever get more complicated than the alternatives? • Tradeoffs for expression/computation/cognition? – Does this change expressivity? – Change WWC? BCC? ACC? • What if we implement it by preprocessing into pairwise disjointness? • What does it do to the input? – Is one more usable? 8 Wednesday, 12 March 14
Lessons Learned • n-ary and pairwise disjointness – Are polynomially interreducible • Thus no change in the asymptotic complexity classes • Can have large effect in practice – (Potentially) Affect different parts of processing • Big effect on cognition – But not 100% obvious – Size issues dominate • But, also, repetition – Performance effects can be high (on cognitive issues) • Waiting to download/load == wasted time for little gain – Workarounds helpful • But built in support best 9 Wednesday, 12 March 14
A more complex example Wednesday, 12 March 14
Examples thus far • Propositional vs. FOL – Inexpressive vs. very expressive – Decidable vs. semi-decidable • vs. ALC – Expressivity: PL < ALC << FOL • (The more expressive contains the less) • ALC with and without – binary disjoint axioms – n-ary disjointness axioms • Different extensions and restrictions – Additional constructors (e.g., min/max) – Additional axiom types (SubPropertyOf) – Patterns of use or axiom shape (“definitorial” axioms) – Semantic restrictions (named individuals) – Built-in functionality (datatypes) 11 Wednesday, 12 March 14
Two new constructors: min & max • Consider: – loves some Person – loves min 1 Person – loves max 1 Person – loves exactly 1 Person • More elaborate: – loves min 3 Person – loves max 2 Person – (loves min 3 Person) and (loves max 2 Cat) – (loves min 3 Person) and (loves max 2 Person) • ALCQ – ALC + min and max, the “counting quantifiers” – Expressivity ++ – “The same” computational complexity (more implementation burden) – Cognitive complexity... 12 Wednesday, 12 March 14
Complexity interlude • What is “having the same” complexity? – Having exactly the same resource function? – Being “polynomially reducible” • A problem P is polynomially reducible to problem Q iff – there is a function, f, s.t. for every instance of P, p – f(p) is in Q – |f(p)| is (at most) “polynomially bigger” than |p| » I.e., |p| = some polynomial over |f(p)| • Consider ALC with n-ary disjointness (“ALnC”) – f = for any KB in ALnC • For each DisjointClasses: axiom • replace with ≈ quadratic DisjointWith: axioms – Thus, ALnC is polynomially reducible to ALC • Thus, we don’t have a fundamental change in complexity • Though we might have a notable change! 13 Wednesday, 12 March 14
New Axiom Type: Transitivity • ALC + Transitive = S – loves Characteristics: Transitive – knows Characteristics: Transitive • Bijan knows Sean. Sean knows Claire. ==> Bijan knows Claire. – trusts Characteristics: Transitive – locatedIn Characteristics: Transitive – partOf Characteristics: Transitive • These can be combined with quantifiers – knows some Person – knows some (knows some Person) • We can add another axiom type – S + SubPropertyOf: = SH • No worries! 14 Wednesday, 12 March 14
Transitivity + Counting! • ALC + Transitive + min & max – partOf Characteristics: Transitive – (partOf exactly 4 Finger) and (part of exactly 1 Thumb) – partOf exactly 2 Hands – We’d like to infer: • (partOf exactly 8 Fingers) and (partOf exactly 2 Thumb) • PROBLEM –ALC + Transitive + Counting = Semi-decidable 15 Wednesday, 12 March 14
What to do? • Give up one or the other – But both are very useful – Transitivity: Part-Of or Located-In! – Number Restrictions: 4 fingers and 1 thumb! • Live with undecidability – ALCQ and SH are already EXPTIME Complete • “Practically” undecidable? – What is the impact on implementation design? – What is the impact on user interaction? • Find a middle ground – Can have transitive roles and counting in the same ontology • But not intertwined • Can only count non-transitive, i.e., simple roles – This is the choice that OWL (DL 1&2) made • Pattern of use restriction 16 Wednesday, 12 March 14
The Restriction • Only simple roles in the scope of a number restriction – P exactly 1 C – P exactly 1 C. P Characteristics: Transitive • An ObjectProperty is simple iff it is not transitive and has no transitive subroles – P exactly 1 C. Q SubPropertyOf: P. – P exactly 1 C. Q SubPropertyOf: P Characteristics: Transitive • No! Why sub properties? • Fairly severe restriction! – Bijan hasPart exactly 2 Legs. – Legs SubClassOf hasPart exactly 1 Foot – Those feet can’t be (implied to be) part of me! • And I can’t count them! 17 Wednesday, 12 March 14
Cognitive Complexity • There are workarounds – Two properties: hasPart and hasDirectPart – hasPart is transitive – Only count the latter – Manually propagate • Burdens – We don’t get what we want • Can’t count my thumbs! • We do get that my thumbs are part of me – Workarounds distort the modelling – Workarounds for lacking either are generally worse – Not a “motivated” or regular restriction • Combining two legal ontologies can yield an illegal one – Thus, not closed under union 18 Wednesday, 12 March 14
Recommend
More recommend