Introduction to Semantic Web Rules & Policies
-
Upload
kuame-hancock -
Category
Documents
-
view
21 -
download
0
description
Transcript of Introduction to Semantic Web Rules & Policies
Introduction to Semantic Web Rules amp
PoliciesDaniel Olmedilla
L3s Research Center Hannover University
Programa de Postgrado en Ingenieriacutea Informaacutetica y de Telecomunicacioacuten (Maacutester y Doctorado)
Universidad Autoacutenoma de Madrid 3rd April 2008
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 2
About this lectureWhy this lecture
bull Lot of noise about the Semantic Web Lot of relevant papers and work on Semantic Web in last
years
bull Techniques and tools can be used in the context of adaptivity lifelong learning and competence development
bull Intelligent systemsagents need to be guided
bull Software agents Development is expensive Are static Are unflexible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 3
About this lecture Objectives
This lecture is intended to provide reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 4
About this lectureDisclaimer
The objective is to present the main ideas
not a full explanation of the theory that lays behind
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 5
About this lectureInteractive
And also important This is not
a conference presentation a monologue
Each module partially builds on concepts from previous modules
Exercises are provided in order to strength understanding
You are also encouraged to interrupt and
ASK Questionswhenever you need it
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 2
About this lectureWhy this lecture
bull Lot of noise about the Semantic Web Lot of relevant papers and work on Semantic Web in last
years
bull Techniques and tools can be used in the context of adaptivity lifelong learning and competence development
bull Intelligent systemsagents need to be guided
bull Software agents Development is expensive Are static Are unflexible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 3
About this lecture Objectives
This lecture is intended to provide reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 4
About this lectureDisclaimer
The objective is to present the main ideas
not a full explanation of the theory that lays behind
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 5
About this lectureInteractive
And also important This is not
a conference presentation a monologue
Each module partially builds on concepts from previous modules
Exercises are provided in order to strength understanding
You are also encouraged to interrupt and
ASK Questionswhenever you need it
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 3
About this lecture Objectives
This lecture is intended to provide reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 4
About this lectureDisclaimer
The objective is to present the main ideas
not a full explanation of the theory that lays behind
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 5
About this lectureInteractive
And also important This is not
a conference presentation a monologue
Each module partially builds on concepts from previous modules
Exercises are provided in order to strength understanding
You are also encouraged to interrupt and
ASK Questionswhenever you need it
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 4
About this lectureDisclaimer
The objective is to present the main ideas
not a full explanation of the theory that lays behind
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 5
About this lectureInteractive
And also important This is not
a conference presentation a monologue
Each module partially builds on concepts from previous modules
Exercises are provided in order to strength understanding
You are also encouraged to interrupt and
ASK Questionswhenever you need it
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 5
About this lectureInteractive
And also important This is not
a conference presentation a monologue
Each module partially builds on concepts from previous modules
Exercises are provided in order to strength understanding
You are also encouraged to interrupt and
ASK Questionswhenever you need it
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 6
About this lectureThe slides
Slides are wordy so they can be easily understood offline after the tutorial
More definitions and references are available in notes and hidden slides
Lecture is available from
httpwwwL3Sde~olmedillapresentations200820080403_UAM_Masterppt
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 7
OutlineLecture Overview
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 8
OutlineIntroduction
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 9
IntroductionWarming Up Problem
Institutions companies and people need to control the way they Make business Take decisions Offer their assets Etc hellip
Computers help us on our daily work performing tasks that we cannot perform (or we do it worse) automatically on our behalf
But generally we need to control how decisions and actions are taken
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 10
IntroductionWhat is a policy
In a very broad way a policy is defined as
a statement defining the behaviour of an entity
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 11
IntroductionPolicies are everywhere
B2B contracts eg quantity flexible contracts late delivery penalties
etc Negotiation
eg rules associated with auction mechanisms Security
eg access control policies Privacy
Information Collection Policies (aka ldquo P3P Privacy Policiesrdquo)
Obfuscation Policies Workflow management
What to do under different sets of conditions Context aware computing
What service to invoke to access a particular contextual attribute
Context-sensitive preferences[ by Norman Sadeh Semantic Web Policy Workshop panel ISWC 2005 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 12
Exercise 1Specify your own policies
How do you decide (in general terms) which transportation you use to come to the university
whether you share your
Homework
Pictures from your holidays in Hawaii
Your famous report so many companies are willing to pay for
whether you take a private call when being at work
which tasks you perform everyday at work
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 13
Exercise 1Problem (I)
Now imagine a system application or software agent couldshould decide on your behalf How do you tell such an agent how it should do it
The way we make business take decisions etc Is dynamic that is often changesEvolves with the time
We cannot re-code re-compile re-install a new software agent every time we change the way we take decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 14
Exercise 1Problem (II)
Furthermore we need that the system acting on our behalfdoes what we want
How do we tell it What if we make a mistake and tell
something wrong is contextual that is depends on many factors is ldquointelligentrdquo (does things as we would do
them) is not reserved only to millionaires
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 15
IntroductionThe goal
Build applicationsagents whereBehaviour is flexible
Can be changedupdated without re-coding re-compiling re-
installing etchellip In a costless manner
Can be managed by administratorsusers without needing to be computer experts
Can be understood by normal users
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 16
OutlineWhy the Semantic Web
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 17
Why the Semantic Web HTML in your browser
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 18
Why the Semantic Web HTML Markup
lth2gt Topics lth2gtltpgtEducational Principles ltbrgtKnowledge Management ltbrgtEducation Process Modeling ltbrgtLearning Design ltbrgtCompetence Development ltbrgthellipltpgtlth2gt Lecturers lth2gtltpgtAlbert Angehrn INSEAD France ltbrgtBoyan Bontchev Sofia University Bulgaria ltbrgtAlexandar Dimov Sofia University Bulgaria ltbrgtDai Griffiths University of Bolton United Kingdom ltbrgthellipltpgt
Markup forpresentation only
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 19
Why the Semantic Web HTML Limitations
HTML deals only with formatting of data
It does not provide information about the data it contains
Query engines do a great job but queries like Give me the list of subjects that the winter school will
deal with Return the affiliations of the lecturers in the winter school
are not possible on the current Web
Search on current Web is based on syntactic matching
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 20
Why the Semantic Web Current Web
bull Downloadable Resources identified by URLs untyped
bull Links href src limited non-descriptive
bull User Exciting world
semantics of the resource however gleaned from content
bull Machine processable Very little information available
significance of the links only evident from the context around the anchor [Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 21
Why the Semantic Web Semantic Web Definition
ldquoThe Semantic Web is an extension of the current web in which information is given well-defined meaning better enabling computers and people to work in cooperationrdquo
Tim Berners-Lee James Hendler Ora LassilaThe Semantic Web Scientific American May 17 2001
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 22
Why the Semantic Web The Semantic Web
bull Resources (any resource) Globally Identified by URIs Extensible Relational
bull Links Identified by URIs Extensible Relational
bull User Even more exciting world
richer user experience bull Machine
More processable information is available (Data Web)
bull Computers and people Work learn and exchange
knowledge effectively
[Eric Miller Weaving Meaning An Overview of The Semantic Web 2003 ]
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 23
OutlineLast Year Lecture
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last Year LectureThe Semantic Web Stack
XML Namespaces
URI UnicodeApr 3rd 2008 24Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureRDF foundations
XML Namespaces
URI Unicode
bull Share basic syntax with other Web standards URI unique identifiers Namespaces organizegroup identifiers XML reuse syntax and data types
Apr 3rd 2008 25Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureRDF Model
XML Namespaces
URI Unicode
bull Data model facility Evolution of hyperlinks Open extensible (open world assumption) Graph model Easy interconnection of
distributed data
Apr 3rd 2008 26Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureRDF Schema
XML Namespaces
URI Unicode
bull Facility for shared vocabulary Properties to share link types Classes to share resource types
Apr 3rd 2008 27Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureSPARQL
XML Namespaces
URI Unicode
bull Querying facility Flexible pattern matching No reasoning
Some reasoning support via entailment regime
Apr 3rd 2008 28Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureOWL Description Logic
XML Namespaces
URI Unicode
bull Reasoning facility Support complex ontology models Reasoning on class and instance level
on
tolo
gy
com
ple
xity
amount of data
Apr 3rd 2008 29Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureThe Semantic Web Stack
XML Namespaces
URI Unicode
Part of this year lecture
Apr 3rd 2008 30Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Last year lectureWarning (or clarification )
bull OWL Web Ontology Language
Ontology = OWL
Apr 3rd 2008 31Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 32
OutlineRule-Based Representation amp Reasoning
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 33
Rule-Based Representation and ReasoningWho uses logic
Aristoteles
Spock
Mathematicians
Computer scientists
You
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 34
Exercise 1Revisited (I)
Were your policies
declarative
That is they specify the what (conditions) but not the how (algorithm or process to satisfy them)
Eg HTML pages describe what the page should contain but not how to actually display the page on a computer screen
Eg a SQL select statement specifies the properties of the data to be extracted from a DB not the process of extracting the data
using inference rules
Eg If destination is in Europe then max price is hellip
Eg If distance is less than hellip then go by train
if not do you think they are more naturally modelled as rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 35
Rule-Based Representation and ReasoningRules are everywhere (I)
Rules of ethics for robots
1 A robot may not injure a human being or through inaction allow a human being to come to harm
2 A robot must obey orders given to it by human beings except where such orders would conflict with the First Law
3 A robot must protect its own existence as long as such protection does not conflict with the First or Second Law
[Isaac Asimov Runaround 1942 ]
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 36
Rule-Based Representation and ReasoningRules are everywhere (II)
Declarative
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 37
Rule-Based Representation and ReasoningRules are everywhere (III)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 38
Rule-Based Representation and ReasoningInference Rule (I)
Relation holding between premises (antecedent) and conclusions (consequent)
The conclusion is said to be inferable (or derivable or deducible) from the premises
We can infer new knowledge
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 39
Rule-Based Representation and ReasoningDeductive vs Inductive Reasoning
Deductive proceeds from general principles or premises to derive particular information (conclusions)
Example All apples are fruit All fruits grow on trees Therefore all apples grow on treesRemember Sherlock Holmes
Inductive the premises of an argument are believed to support the conclusion but do not ensure its truth
Makes generalizations (from empirical observations)
Example All observed crows are black Therefore all crows are black
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Rule-Based Representation and ReasoningSyntax of First Order Predicate Logic (FOL)
Logical Symbols punctuation connectives quantifiers variables
Signature Symbols n-ary function symbols (0-ary = constant) n-ary relation symbols
Termx Mary founder (x) founder (Web50)
Atommarried(Mary Tom) married(founder (y)Tom)
Formulaperson(Mary ) person(Tom) company(Web50)
x (company(x) person(founder (x) )
Apr 3rd 2008 40Universidad Autoacutenoma de Madrid
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Rule-Based Representation and ReasoningStandard Notions (FOL)
Boundfree1048576
( x [x p(x) q(x) ] [ r (x) x s(x)] )
Closed no free variables
Ground no variables
Propositional1048576
[p q] [ r s]
Apr 3rd 2008 41Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 42
Rule-Based Representation and ReasoningInference Rule (II)
Rule notation consequent larr antecedent
Stands for antecedent consequentthat is IF antecedent THEN consequent
Examples If someone is a man then he is mortal
mortal(X) larr man(X) If someone is in this lecture then heshe is a researcher
researcher(X) larr inThisLecture(X)It does not matter what X is the rule is always valid
Base for deductive reasoning
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Feb 21st 2008TENCompetence WS 43
Rule-Based Representation and ReasoningLogic Programming
Literalatom A negated atom A
ClauseA1 hellip Ak larr L1 hellip Ln atoms Ai literals Lj k ge 0 n ge 0
Apr 3rd 2008 43Universidad Autoacutenoma de Madrid
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 44
Rule-Based Representation and ReasoningExample information about your family
Assume an agent needs to know all the information about your closest relatives
How do you inform your agent about such information
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 45
Rule-Based Representation and ReasoningPossibility 1 Enumerate all the facts
Try to enumerate all that information for your agent
Tom is the father of MaryTom is the parent of MaryAlice is the sister of MaryMary is the sister of AliceClara is the sister of MaryMary is the sister of ClaraMary is the mother of AnneMary is the parent of Anne
Tom is the grandparent of AnneAlice is the aunt of AnneClara is the aunt of AnneClara is the mother of BobAlice is the aunt of BobMary is the aunt of BobTom is the grandparent of Bobhellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 46
Rule-Based Representation and ReasoningPossibility 2 facts + rules + deduction
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
AxiomsFacts
Inference Rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 47
Rule-Based Representation and ReasoningExercise 2 deductive reasoning
Given such a program write down the inferred new knowledge
Tom is the father of Mary father(lsquoTomrsquorsquoMaryrsquo) Alice is the sister of Mary sister(lsquoAlicersquorsquoMaryrsquo) Clara is the sister of Mary sister(lsquoClararsquorsquoMaryrsquo) Mary is the mother of Anne mother(lsquoMaryrsquolsquoAnnersquo) Clara is the mother of Bob mother(lsquoClararsquolsquoBobrsquo)
A parent is either a father or a motherparent(PC) larr father(PC) mother(PC)
The parent of your sister is your parentparent(PC) larr parent(PX) sister(XC)
The parent of a parent is a grandparentgrandparent(PC) larr parent(PX)
parent(XC) An aunt is the sister of a parent
aunt(AC) larr sister(AX) parent(XC)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 48
Rule-Based Representation and ReasoningExercise 2 solution
Given such a program write down the inferred new knowledge
From first rule Tom is the parent of Mary parent(lsquoTomrsquorsquoMaryrsquo) Mary is the parent of Anne parent(lsquoMaryrsquorsquoAnnersquo) Clara is the parent of Bob parent(lsquoClararsquorsquoBobrsquo)
From second rule (+ the first rule) Tom is the parent of Alice parent(lsquoTomrsquorsquoAlicersquo) Tom is the parent of Clara parent(lsquoTomrsquorsquoClararsquo)
From the third rule (+ the first and second) Tom is the grandparent of Anne
grandparent(lsquoTomrsquorsquoAnnersquo) Tom is the grandparent of Bob
grandparent(lsquoTomrsquorsquoBobrsquo)
From the forth rule (+ the first rule) Alice is the aunt of Anne aunt(lsquoAlicersquorsquoAnnersquo) Clara is the aunt of Anne aunt(lsquoClararsquorsquoAnnersquo) Mary is the aunt of Bob aunt(lsquoMaryrsquorsquoBobrsquo) Alice is the aunt of Bob aunt(lsquoAlicersquorsquoBobrsquo)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 49
Rule-Based Representation and ReasoningAdvantages
Declarative Infer implicit knowledgeCompact representationWell-defined semanticsAvailable proofsTruths that it establishes are absolute
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 50
Rule-Based Representation and ReasoningDisadvantages
Wrongly specified rules wrong implicit knowledge It must have some truths in hand before starting
Sometimes you donrsquot have them all Sometimes not all is true or false You need to specify all right rules
Otherwise underspecified programs
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 51
OutlineSemantic Web Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 52
Semantic Web PoliciesWhat is a policy Definitions
A statement defining the behaviour of an entity
An enforceable well-specified constraint on the performance of a machine-executable action by a subject in a given situation
A deliberate plan of action to guide decisions and achieve rational outcome(s)
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 53
Semantic Web PoliciesA broader notion of policy
The term policy covers SecurityPrivacy policies Trust management
Business rules
Quality of Service directives
Service-level agreements
Communication and conversation policies and more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 54
Semantic Web PoliciesAn e-learning scenario (I)
Exploiting agents to support collaborative learning in an on-line learning community
They offer means to handle this complex setting as we will learn from the following four scenarios
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 55
Semantic Web PoliciesAn e-learning scenario (II)
ldquoOnly my tutor is able to access myhomework My fellow students are able to access my lecture notes but not my homeworkrdquo
Access control
Security
Trust management
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 56
Semantic Web PoliciesAn e-learning scenario (III)
ldquoI want to be reminded two days before my homework is duerdquo
ldquoI want to get an SMS if my tutor extends a homeworkrsquos deadlinerdquo
Reactive Agentsbull Events (eg deadline
extension) trigger agent decisions
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 57
Semantic Web PoliciesAn e-learning scenario (IV)
ldquoWhile using my e-learning tool I only want to receive chat messages from my fellow students and my tutor Others get an automatic reply lsquoPlease contact me later I am busyrsquordquo
Communication Control
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 58
Semantic Web PoliciesAn e-learning scenario (V)
ldquoIn order to purchase learning material I use my Credit Card only with parties providing the lsquoOnline Security Certificatersquordquo
Agent NegotiationsPrivacy
Step 4
Step 1
Step 3
Step 2
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 59
Semantic Web PoliciesAn e-learning scenario Using policies
bull the whole system becomes more flexiblebull for different behavior change the policy (not the whole
software)bull communication in the community gets more
personalizedbull ldquoMy fellow students should not disturb
me when I am at workrdquobull automatically generated explanations
bull ldquoYou cannot send me a chat message because helliprdquo
bull ldquoYour tutoring agent alerts because helliprdquobull ldquoYou cannot access your fellowrsquos
homework because helliprdquobull policies are reactive
bull ldquoAs soon as I idle for two days send me helliprdquobull ldquoIf a deadline is extended then helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 60
Semantic Web PoliciesNaturally expressed as rules
If customers are younger than 26 give a 20 discount on international tickets
Up to 15 of network bandwidth can reserved if payment is done with an accepted credit card
Customers can rent a car if they are 18 or older and exhibit a driving license and a valid credit card
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 61
Semantic Web PoliciesBenefits
Explicit license for autonomous behaviourReusabilityEfficiencyExtensibilityContext-sensitivityVerifiabilitySupport for simple as well as sophisticated
agentsProtection from poorly-designed buggy or
malicious agentsReasoning about agent behaviour
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 62
Semantic Web PoliciesRequirements
Many policies one framework Integration with external sourcesPolicies as active objects
Executing actionsNegotiationsUser awareness and controlCooperative enforcement
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 63
Semantic Web PoliciesMany policies one framework
It is appealing to integrate all policies in one framework
One common infrastructure for interoperability and decision
making
Where policies can be harmonized amp coordinated
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 64
Exercise 1Revisited (II)
Were your policies requiring extra knowledge
Who are your colleagues and your professors
Who works in your project
What a valid credit card is
Distance between XYZ and the university is hellip XYZ is in Madrid I can not take the car if hellip time required for the trip from XYZ to the university would be hellip
referencing to properties of requesters
Sources of this information
All in our knowledge base
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 65
Semantic Web PoliciesIntegration with external systems
Policies are not islands
Decisions need data information and knowledge
Each organization has its own
Already available through legacy software and data
A realistic solution must interoperate with them
Third parties
Credit card sites for validity checking
External databases Variety of web resources
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 66
Semantic Web PoliciesPolicies are not only passive objects
Policies may specify Exchange of signed information (eg digital credentials) Event logging
Failed transactions must be logged Log downloads of new articles for one week
Communications and notifications Notify the administrator about repeated login failures
Workflow triggering such as (partly) manual registration procedures
ie Policies may specify actions To be interleaved with the decision process
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 67
Semantic Web PoliciesNegotiations
Step 1 Alice requests a service from Bob
Step 5 Alice discloses her VISA card credential
Step 4 Bob discloses his BBB credential
Step 6 Bob grants access to the serviceService
BobAlice
Step 2 Bob discloses his policy for the service
Step 3 Alice discloses her policy for VISA
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 68
Exercise 1Revisited (III)
Suppose
Your policy is given to you by your employer
You have to explain your policy
You submit a paper and you get ldquoRejectedrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 69
Semantic Web PoliciesUser awareness and control
Explain policies and system decisions Make rules amp reasoning intelligible to the common
user
Encourage people to personalize their policies Make it easy for users to write their own rules
Use natural language
ldquoAcademic users can download the files in folder historical_data whenever their creation date precedes 1942rdquo
Suitably restricted to avoid ambiguities
Fortunately users spontaneously formulate rules
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 70
Semantic Web PoliciesCooperative Policy Enforcement
Crucial for the success of a service
Never say (only) ldquonordquo
Encourage first-time users
Who dont know how to use your service
Explain policy decisions
Especially failures
Advanced queries Why not
Advanced queries How-to What-if
You canrsquot open this door but
you can ask Alice for permission
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 71
Semantic Web PoliciesSome solutions already available
Features available out of the boxExpressive policy languages and frameworks Integrated relational databases RDF stores
file systems requests time and location-aware packages etc
Execution of actions such as logging facilities exchange of credentials etc
Policy driven negotiations and preferencesAutomatically generated explanations
Demo at httppolicyL3Suni-hannoverde
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 72
OutlineReactive Policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 73
Reactive PoliciesEvent-Condition-Action (ECA) Policies
provide a more flexible notion of policies so far policies were not able to react
ie to handle events so far actions where only included as internal or
provisional actions not as a re-action usually of the form
ON eventIF conditionDO action
ON receiving new call IF user not availableDO automatic reply
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 74
Reactive PoliciesEvents
trigger the execution of a rule can be simple events
eg ldquoON receiving new callrdquo or more complex
ON receiving new calland at the same time another call comes inand there were no calls in the last 10 minutes
to define complex events we need an event algebra
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 75
Reactive PoliciesEvent algebra
Assume events happen at a certain point of time The algebra allows us to combine events to create more
complex ones Example operators
Both E1 and E2 happens at the same time E1 happened before E2 m events out of n happened in an arbitrary order E1 and E2 occurred and E2 did not occur hellip
the complexity of the event algebra used depends on the purpose of the ECA-based system
events have to be stored in a history in order to check against complex combination of events
algorithms for the detection and tracing of complex events are non trivial
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 76
Reactive PoliciesConditions
bull handled like the policies we had so farbull they may include external actions to prove the
conditionsuch as a database or web service queryeg ldquohellip if the there is snow in Innsbruck hellip
rdquobull they may include negotiations to prove the
condition such as ldquohellipif Credit Card is valid helliprdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 77
Reactive PoliciesActions
bull could be single actionsbull could also be combinations of actions
Sequential execution Do Action1 and then Action2 and then
Action3 Parallel execution
Do Action1 and Action2 at the same time More complex combinations possible
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 78
Reactive PoliciesDo you use them
Do you think this is nothing you need to know about
Do you think you have never used this
Do you think this is too complicated for any user to use
Does this sound familiar to you
ON new e-mail arrivalIF subject contains ldquo[SPAM]rdquoDO move e-mail to folder ldquofiltered_spamrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 79
Reactive PoliciesMany other applications
bull DB triggers incremental maintenance of data (databases XML RDF etc)
bull cleansing of input data streamsbull automatic repairs in case of constraint violationbull broadcasting of changes in documents to subscribersbull maintaining statistics about website usagebull Active databases (update correlated fields in case
others are updated)bull network managementbull business processes (specification and
implementation)bull And many more
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 80
Reactive PoliciesA communication example
Problem The behavior of a messenger is not well adjustable
Most of you probably know this
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 81
Reactive PoliciesProblem
bull arbitrary people bother you with chat messagesbull they may even call youbull for some of them you want to offer an answering
machinebull some you just want to block bull people send you files ndash how could you trust thembull the messenger allows other calls while you are
currently answering a callbull although your messenger stores the
birthdays of your friends you forget about them because it does not remind you
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 82
Reactive PoliciesA possible solution with ECA-policies (I)
Why not use ECA-policies to let your agent solve the problem for you
ON new receiving callIF caller is a friend of mine
ANDthere is no other currently ongoing call
DO accept call AND put it on the speakers
ON new receiving fileIF sender is a friend of mine
ORsender provides a certificate AND certificate is valid
DO accept file AND store it on folder ldquoreceived_filesrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 83
Reactive PoliciesA possible solution with ECA-policies (II)
Even an automatic birthday reminder
ON new day (timer raised once per day)
IF there is a person in the winter school list
AND
it is hisher birthday today
DO send a chat message with text ldquoHappy Birthdayrdquo
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 84
Reactive PoliciesExercise 3 ECA Policies
See given exercise sheet
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 85
Reactive PoliciesExercise 3 Solution
Actions executed
Pop up window with a reminder about the exam registration
First call to my skype client Second call to my wifersquos phone
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla
Whythe Semantic Web
Introduction
Semantic Web Overview
Rule-Based Representation amp Reasoning
Semantic Web Policies
Reactive Policies
ConclusionsSummary
Apr 3rd 2008Universidad Autoacutenoma de Madrid 86
OutlineConclusionsSummary
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 87
ConclusionsSummary (I)
Hopefully this tutorial helped you to get a brief idea about
reasons that motivated Semantic Web Research a basic understanding of rule-based representation a basic introduction to reasoning techniques a basic understanding of requirements of current
distributed systems a motivation for the use of policies a basic introduction to rule-based policies and their
applications a basic introduction to reactive policies
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 88
ConclusionsSummary (II)
Everyday systemsagents take over new tasks we would otherwise perform ourselves
They can do somemany of them faster and better than us
But they are not ldquointelligentrdquo as we are
We need to tell them what to dohow to behaveRule-based Policies + reasoning help you to do that Dynamically and allowing evolution Flexibly With well defined semantics and interoperability At low cost
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 89
ConclusionsSummary (III)
But
That brings in many new issues like Required expressiveness for an application
scenario Usability problems User Awareness Verificationvalidation of policies hellip
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 90
ConclusionsFinal message
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 91
References
bull RDF Primerhttpwwww3orgTRrdf-primer
bull Antoniou et al Rule-based policy specification Secure Data Management in Decentralized Systems Springer 2007httpwwwl3sde~olmedillapub20072007_bookDDMS_rule_policiespdf
bull Bonatti Olmedilla Rule-based policy representation and reasoning for the semantic web In Reasoning Web Third International Summer School 2007 Springerhttpwwwl3sde~olmedillapub20072007_ReasoningWeb-policiespdf
bull Antoniou et al (Eds) Reasoning Web 2007 Springer LNCS 4636 pp1ndash153
bull Bradshaw et al Making Agents Acceptable to people Intelligent technologies for information analysis Advances in agents data mining and statistical learning SpringerhttpwwwihmcusresearchprojectsKAoSbiit-jeffpdf
bull De Coi et al Exploiting policies in an open infrastructure for lifelong learning In EC-TEL Crete Greece Sep 2007 Springer httpwwwl3sde~olmedillapub20072007_ec-tel_policiespdf
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-
Daniel Olmedilla Apr 3rd 2008Universidad Autoacutenoma de Madrid 92
Questions
olmedillaL3Sde ndash httpwwwolmedillainfo
Thanks
- Introduction to Semantic Web Rules amp Policies
-