LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

30
L Logics for D Data and K Knowledge R Representation Exercise 3: DLs

Transcript of LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Page 1: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

LLogics for DData and KKnowledgeRRepresentation

Exercise 3: DLs

Page 2: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Outline Modeling Previous Logics DL RelBAC OWL Comprehensive

2

Page 3: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Modeling Procedure Abstraction of the world to a mental model

Clarify the domain of interest Clarify the relations

Choose/build a logic Build the theory of the mental model with the logic Reason about the theory

3

<?xml version=“1.0”?><!DOCTYPE rdf:RDF[…]><rdf:RDF…><Owl:Ontology…>…

</rdf:RDF>

Page 4: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

What distincts DL from Previous Logics? PL

Logical constructors Interpretations

ClassL Logical constructors Interpretations

Ground ClassL Individuals

DL All?

4

Page 5: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Summary of Previous Logics We Mentioned

5

PL ClassL Ground ClassL DL

Syn. Np Nc Nc, Ni Nc, Ni, Nr

∧ ⊓ ⊓ ⊓*

∨ ⊔ ⊔ ⊔*

*

⊤ ⊤ ⊤ ⊤

⊥ ⊥ ⊥ ⊥

→ ⊑ ⊑ ⊑*

↔ ≡ ≡ ≡*

Set Set

Fill Fill

∃∀

≤≥

Sem. ∆={true, false} ∆={e1, …} ∆={e1,…} ∆={e1,…}

Page 6: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Expressiveness of DL Binary Relations?

YES! Subsumption?

Of course!

More than concept subsumption!

Arbitrary! Else?

Some Only Number

6

Page 7: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Description Logics Propositional DL VS. ClassL

DL VS. Ground ClassL

Role Constructors ∃ ∀ ≤ ≥ ⊓⊔¬≡⊑

7

In addition to concept

constructors

Page 8: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

DL ModelingModel the following NL sentences with DLs.

“Children with only a single parent and no siblings”

Child⊓≤1hasParent⊓≥1hasparent⊓∀hasSibling.⊥ “Friends that likes foreign movies but only Disney

cartoons”

Friend⊓∃like.(Movie⊓Foreign)⊓∀like.(Cartoon⊓Disney) “A binary tree is a tree with at most two sub-trees that are

themselves binary trees.”

BTree≡Tree⊓≤2hasSubTree.BTree “The monkeys that can grasp the banana are those that

have climbed onto the box at position of the banana”

Monkey⊓∃get.Banana⊑∃hasClimbedOnto.(Box⊓∃atPositionOf.Banana)

8

Page 9: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

DL Reasoning: TBox Prove the following tautology:

¬(C D)≡¬C ¬D⊓ ⊔ ¬ R.C≡ R.¬C∀ ∃ Venn Diagrams

Concepts:

Universal, Arbitrary non-empty set, Empty set Relations:

Intersection, union, disjoint Tableaux

An algorithm to verify satisfiability. Rules:

and/or/some/only

9

Page 10: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

¬(C⊓D)≡¬C⊔¬D

10

C D

C D

CD

CD

C D

C D

CD

Page 11: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

¬∀R.C≡∃R.¬C

(¬∀R.C)I

=Δ-{x| ∀y R(x,y)→C(y) }

= {x|¬(∀y R(x,y)→C(y) )}

={x|∃y ¬(R(x,y)→C(y) )}

={x|∃y ¬(¬R(x,y)∨C(y) )}

={x|∃y R(x,y)∧¬C(y) )}

=(∃R.¬C)I

11

Page 12: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

DL Reasoning: ABox (1) Given the interpretation I with the domain ΔI={d,e,f,g}

{d,e,f}⊑A B(f) R(d,e) R(e,g)

S(g,d) S(g,g) S(e,f)

In which A,B are concept and R,S are roles.

Please find the instances of the ALC-concept C as A⊔B ∃S.¬A ∀S.A ∃S.∃S.∃S.∃S.A ∀T.A⊓∀T.¬A

12

e

gd

f

A

A A,B

R R

S

S

S

Page 13: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

DL Reasoning: ABox (2) Let an ABox A consists of the following assertions:

Likes(Bob, Ann) Likes(Bob, Cate)

Neighbor(Ann, Cate) Neighbor(Cate, David)

Blond(Ann) ¬Blond(David)

where Neighbor is a symmetric and transitive role.

Does A have a model? Is Bob an instance of the following concepts in all

models of A?

∃Likes.(Blond⊓∃Neighbor.¬Blond)

∃Likes.(∃Neighbor.(∀Neighbor.¬Blond))

13

Page 14: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise on Tableaux The tableaux is an algorithm to check satisfiability.

If all branches of your tableaux are open, then?

You cannot say it is valid! Why?

OWA! If all branches of your tableaux are closed, then?

You can say it is unsatisfiable What can we do with tableaux?

To prove the satisfiability of a concept.

14

Page 15: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Tableaux cont. Rules

⊓ ⊔ ∃ ∀…

Exercises1. Are these subsumptions valid?

∀R.A⊓∀R.B⊑∀R.(A⊓B) ∃R.A⊓∃R.B⊑∃R.(A⊓B)

Decide whether the following subsumption holds

¬∀R.A⊓∀R.C⊑T∀R.D

with T={C≡ (∃R.B)⊓¬A, D≡¬(∃R.A)⊓∃R.(∃R.B)}

15

Page 16: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

RelBAC: Domain Specific DLs Syntax

Nc: subject groups, object types; Ni: individual subjects, individual objects; Nr: permissions DL constructors and formation rules

Semantics Hierarchy Permission assignment Ground assignment Chinese Wall SoD High Level SoD Queries

16

Policies

Properties

Page 17: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

RelBAC Modeling “The LDKR course consists of:

For persons: Prof. Giunchiglia and TA Zhang as lecturers, Student Tin, Hoa, Parorali, Sartori, Chen, Gao, Lu, Zhang;

For online materials: syllabus, slides for lectures, references, exercises and keys, exam questions, results and marks.”

We know that, Slides can be updated only by professors or TA; Students can download all materials but only update

keys to exercises. Each student should upload exam result to the site that

TA can read and check for propose marks which will be finally decided by professor(s).

17

Page 18: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

LDKR Modeling Answer

18

Update Update

DownloadUpload

Page 19: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Chinese Wall Property Chinese Wall (CW)

“Originally no one has any access to anything; then some requests are accepted and someone is allowed to perform some operation on something; from then on, those has been allowed to access should not be allowed to access on those things arousing conflict of interests.”

Conflict of Interests (COI)

Resources in COI should be avoided access for disclosure of information about competing parties.

19

COI

COI

Page 20: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Modeling of the Chinese Wall Property Given a COI = {A1, …, An}, if one can access Ai,

then s/he should not be allowed to access the rest.

Suppose for Ai, the permission is Pi, then

⊔1≤i<j≤n Pi.Ai Pj.Aj∃ ⊓∃ ⊑⊥

20

Page 21: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

SoD Separation of Duties…

Intuition Definition

Semantic Details MEP MEO FA IFA

21

Page 22: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Mutually Exclusive Positions A ‘position’ is an organizational role denoting a

group of subjects such as employees, managers, CEOs, etc. Given a set of positions P = {P1, …, Pn}, where each Pi is a concept name: To enforce that a subject can be assigned to at most

one position among P.

To enforce that no subject can be assigned to all the positions in P.

To enforce that a subject can be assigned to at most m positions among P.

22

Page 23: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise of MEP In a bank scenario, customers sign checks; bank

clerks cash out the checks and managers monitor the checks.

MEP: ‘one can play at most one of the positions as customer, clerk and manager.’

23

Page 24: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise of MEP cont. MEP: ‘no one can play more all of the positions as

customer, clerk and manager.’

MEP: ‘one can play at most 1 of the positions as customer, clerk and manager.’

24

Page 25: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Mutually Exclusive Operations An `operation’ is a kind of permission that subjects

may be allowed to perform some `act’ on objects, such as Read, Download, etc. Given a set of operations giving rise to a MEO, OP = {Op1, …, Opn} (where each Opi is a DL role name), then, we distinguish two different kinds of MEO: To enforce that a subject cannot perform any two

operations in OP.

To enforce that a subject cannot perform any two operations in OP on the same object.

25

Page 26: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise of MEO Suppose a common file repository scenario: files are

objects, users are clients that visit the repository and permissions are read or write.

MEO: ‘one cannot read and write at the same time.’

MEO: ‘one cannot read and write at the same time on the same file.’

Notice the difference between the two MEO’s.

26

Page 27: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Functional Access and Inverse FA: A permission is functional iff it connects at most

one object in the range. If each user in U, has an FA, P, to an object in O, then

IFA: A permission is inverse functional iff it connects at most one subject in the domain. If each object in O, has and IFA, P-, from a user in U,

then

27

Page 28: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise of FA and IFA Give a scenario where FA and IFA are necessary.

Desktop usage in lab. Bank private manager/clerk service

28

Page 29: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

OWL OWL Lite: originally intended to support those users

primarily needing a classification hierarchy and simple constraints.

OWL DL: to provide the maximum expressiveness possible while retaining computational completeness, decidability and the availability of practical reasoning algorithms.

OWL Full: designed to preserve some compatibility with RDF Schema.

29

Syntax Semantics Expressiveness Computability

OWL Lite simple DL subset Hierarchy, simple constraints Efficient

OWL DL SHIO(D) DL Maximum possible expressiveness Exist

OWL RDF RDF Compatible with RDF Non

Page 30: LDK R Logics for Data and Knowledge Representation Exercise 3: DLs.

Exercise of OWL Refer to document specification…

30