Upload
dotruc
View
213
Download
0
Embed Size (px)
Citation preview
Models of Distributed ReasoningMeghyn Bienvenu (CNRS – Univ. Paris Sud)
November 22, 2010
1. About this course
General course information.
• Time and place: Mondays 14h-17h in room FIRTECH
• Duration: 8 sessions, ending January 31st
• Instructors (in order of appearance):Meghyn Bienvenu, François Goasdoué, Philippe Chatalic,Laurent Simon, Philippe Dague, Pascal Poizat, Fatiha Zaidi
• Evaluation: 1/3 coursework + 2/3 final exam
1. About this course 3/44
Course plan.
1 Nov. 22 Introduction to the course2 Nov. 29 Propositional reasoning in P2P systems3 Dec. 6 Inconsistency-handling in P2P systems4 Dec. 13 RDFS querying in P2P setting5 Jan. 10 Distributed satisfiability algorithms6 Jan. 17 Distributed diagnosis algorithms7 Jan. 24 Web service composition8 Jan. 31 Web service verification
1. About this course 4/44
Format of coursework.
Coursework will be done in groups of two students.
Each pair of students will have two research articles (in English).
Each student will be responsible for one of the articles.
The group will deliver a five-page report consisting of:
• two-page summary of each article (individually prepared)
• a single page comparing and contrasting the two articles(jointly prepared)
1. About this course 5/44
Format of coursework, cont..
Each pair of articles relates to one session of the course.
Research reports will be handed in to the instructor associated withthe session.
A short interview will also be scheduled with the instructor.
Timing: reports due two sessions after corresponding session
Note: individual grades, based on the report and interview.
1. About this course 6/44
Distribution of articles.
Groups and articles will be decided today.
A handout with descriptions of the available articles will beprovided.
During the break: please try to find a partner and decide whichpairs of articles you are interested in.
At the end of the lecture, I will ask for your preferences and usethem to assign the articles.
1. About this course 7/44
2. Introduction to Distributed Reasoning
What is a distributed system?.
Group of computing devices which communicate via a network.
Different possible architectures:
Client-server
Example: mail server
Peer-to-peer
Example: file-sharing
2. Introduction to Distributed Reasoning 9/44
Reasoning and distributed systems.
Aim of this course:Investigate relationship between reasoning and distributed systems
Three perspectives on the interaction of these two areas:
1. How to extend traditional reasoning algorithms to adistributed context?
2. How to exploit distributed computing to improve theefficiency of reasoning algorithms?
3. What new reasoning tasks are relevant to distributed systems,and how can we solve them?
2. Introduction to Distributed Reasoning 10/44
Reasoning and distributed systems.
Aim of this course:Investigate relationship between reasoning and distributed systems
Three perspectives on the interaction of these two areas:
1. How to extend traditional reasoning algorithms to adistributed context?
2. How to exploit distributed computing to improve theefficiency of reasoning algorithms?
3. What new reasoning tasks are relevant to distributed systems,and how can we solve them?
2. Introduction to Distributed Reasoning 10/44
We will study various types of reasoning in distributed systems.
1 Nov. 22 Introduction to the course2 Nov. 29 Propositional reasoning in P2P systems3 Dec. 6 Inconsistency-handling in P2P systems4 Dec. 13 RDFS querying in P2P setting5 Jan. 10 Distributed satisfiability algorithms6 Jan. 17 Distributed diagnosis7 Jan. 24 Web service composition8 Jan. 31 Web service verification
2. Introduction to Distributed Reasoning 11/44
Reasoning in P2P systems.Peer data management systems
set of independent peers, each with its own knowledge base (KB),which may be expressed using its own vocabulary
______________________________________________________________________________________________________________
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2. Introduction to Distributed Reasoning 12/44
Advantages + disadvantages.Advantages over centralized data management systems:• flexibility: peers can enter and leave system• robustness: system does not depend on a central authority• personalization: each peer describes its data as it wishes• privacy: each peer controls its own data
Possible disadvantages (or rather challenges ):• since no peer has full view of the system,
can be hard to adapt centralized reasoning algorithms• peers may use different vocabularies, so need way of
translating information between peers• peers may disagree, so inconsistency-handling very important
2. Introduction to Distributed Reasoning 13/44
Advantages + disadvantages.Advantages over centralized data management systems:• flexibility: peers can enter and leave system• robustness: system does not depend on a central authority• personalization: each peer describes its data as it wishes• privacy: each peer controls its own data
Possible disadvantages (or rather challenges ):• since no peer has full view of the system,
can be hard to adapt centralized reasoning algorithms• peers may use different vocabularies, so need way of
translating information between peers• peers may disagree, so inconsistency-handling very important
2. Introduction to Distributed Reasoning 13/44
Propositional peer inference systems.
In the next two courses, we suppose peers have propositional KBs.
Why use propositional logic?
• simple yet powerful logic
• basis for study of other languages (e.g. RDF)
Reasoning task we will study: consequence finding (CF)
2. Introduction to Distributed Reasoning 14/44
Very brief review of propositional logic.Key concepts you should know from the “tronc commun”:
Syntax:conjunction (∧), disjunction (∨), negation (¬), implication (→),bi-implication (↔), literal, clause, term, conjunctive normal form(CNF), disjunctive normal form (DNF)
Semantics:model = assignment of truth value to each variable/atom,notions of satisfiability & logical consequence (entailment)
Proof systems:resolution rule (α ∨ x + β ∨ ¬x⇒ α ∨ β),principle of refutation, correctness, completeness
2. Introduction to Distributed Reasoning 15/44
Deduction vs. consequence finding.Deduction: test whether formula entailed
ϕψ
ϕ |= ψ ? yes
no
Consequence finding: generate entailed formulas
ϕ ϕ |= .... ? α
β
ω
δζ
Note: consequence finding more general than satisfiability / deduction2. Introduction to Distributed Reasoning 16/44
Consequence finding defined.
Of course, we don’t want to produce all consequences,since most are redundant or irrelevant.
So we generate a representative subset of them. Specifically:
prime implicates = logically strongest entailed clauses
Formally: a prime implicate of φ is a clause λ such that(a) φ |= λ
(b) there is no clause λ′ such that φ |= λ′ |= λ but λ ̸|= λ′
Consequence finding = generate formula’s prime implicates
2. Introduction to Distributed Reasoning 17/44
Consequence finding using resolution.We can use the resolution rule to do consequence finding.
1. Put input formula into CNF2. Apply resolution rule to get new clause3. Remove any subsumed clauses in the clause set4. Repeat steps 2 and 3 until no new clause can be produced
Important property: above procedure is complete(i.e. guaranteed to produce all prime implicates)
More sophisticated resolution algorithms can be used to moreefficiently generate only those prime implicates built from a givenvocabulary.
2. Introduction to Distributed Reasoning 18/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
a ∨ d ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
a ∨ d ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ cd ∨ e ¬c ∨ d
e ∨ ¬d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ c¬c ∨ d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ b ¬e ∨ ¬b ∨ c¬c ∨ d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
¬b ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
¬b ∨ c
a ∨ b ¬e ∨ ¬b ∨ c¬c ∨ d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
¬b ∨ c
a ∨ b ¬e ∨ ¬b ∨ c¬c ∨ d
d ∨ ¬b ∨ c
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
¬b ∨ c
a ∨ b¬c ∨ d
a ∨ d ∨ c
e
a ∨ c
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
a ∨ d ∨ c
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
e¬b ∨ d
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
¬b ∨ da ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
¬b ∨ da ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
ea ∨ d
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ d
¬b ∨ da ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
e
2. Introduction to Distributed Reasoning 19/44
Example: CF using resolution.
a ∨ d
¬b ∨ da ∨ c
¬b ∨ c
a ∨ b¬c ∨ d
e
No further resolutions or deletions possible, so we’re done!
Remaining clauses are exactly the prime implicates.
2. Introduction to Distributed Reasoning 19/44
Back to propositional P2P systems.
Basic setup:• each peer P has its own propositional KB,
using its own vocabulary VPI each peer’s theory is set of clausesI can assume variables of peer i are of the form i : v
• a peer can establish connections with other peers by declaringmappings, which relate its vocabulary to those of other peers
I formally: clauses using variables from different peersI e.g. pair of mappings ¬2 : b ∨ 1 : a and ¬1 : a ∨ 2 : b states
that variables 1 : a and 2 : b are equivalent
2. Introduction to Distributed Reasoning 20/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a
¬1 : a ∨ 1 : b ∨ ¬1 : c
2. Introduction to Distributed Reasoning 21/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a 1 : b
1 : c
¬1 : a ∨ 1 : b ∨ ¬1 : c1 : b ∨ ¬1 : c
2. Introduction to Distributed Reasoning 21/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a 1 : b
1 : c
¬1 : a ∨ 1 : b ∨ ¬1 : c1 : b ∨ ¬1 : c
2. Introduction to Distributed Reasoning 21/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a 1 : b
1 : c
¬1 : a ∨ 1 : b ∨ ¬1 : c1 : b ∨ ¬1 : c
2. Introduction to Distributed Reasoning 21/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a 1 : b
1 : c
¬1 : a ∨ 1 : b ∨ ¬1 : c1 : b ∨ ¬1 : c
4 : e ∨ 5 : f
¬3 : h17 : p
2. Introduction to Distributed Reasoning 21/44
Distributed consequence finding.DECA: fully decentralised message-passing CF algorithm• input: a propositional clause, in selected peer’s vocabulary• output: all proper prime implicates of input clause and global
theory, which are formulated using given target variables
******************************************************************************************************************************************************
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ##################
########################################################################
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1 : a 1 : b
1 : c
¬1 : a ∨ 1 : b ∨ ¬1 : c1 : b ∨ ¬1 : c
4 : e ∨ 5 : f
¬3 : h17 : p
4 : e ∨ 5 : f ∨ 17 : p
2. Introduction to Distributed Reasoning 21/44
Handling inconsistency.Reasonable to suppose each peer has consistent KB.
Not reasonable to whole system consistent!!
Well-founded consequence: supported by consistent subset ofglobal theory
1 : a1 : b ∨ ¬1 : c
¬1 : a ∨ 2 : b
¬2 : b ∨ ¬2 : c
1
2
3
2 : c ∨ ¬2 : d
3 : d3 : c
¬3 : c ∨ 2 : c¬3 : d ∨ ¬2 : e
m1m2m3
¬2 : e is well-founded consequence(need to use both m1 and m2, which induce contradiction)
2. Introduction to Distributed Reasoning 22/44
Handling inconsistency.Reasonable to suppose each peer has consistent KB.
Not reasonable to whole system consistent!!
Well-founded consequence: supported by consistent subset ofglobal theory
1 : a1 : b ∨ ¬1 : c
¬1 : a ∨ 2 : b
¬2 : b ∨ ¬2 : c
1
2
3
2 : c ∨ ¬2 : d
3 : d3 : c
¬3 : c ∨ 2 : c¬3 : d ∨ ¬2 : e
m1m2m3
¬3 : c NOT well-founded consequence(need to use both m1 and m2, which induce contradiction)
2. Introduction to Distributed Reasoning 22/44
RDF reasoning in P2P setting.
In the fourth course, we consider a somewhat different setup.
Now peers have RDF data (triples) and ontologies (schema).
Relationship between peer vocabularies also via RDF ontologies.
Reasoning task: conjunctive query answering
Technique we employ: reduction to propositional reasoning
Result of CF = rewriting of input conjunctive query
Domain typing: domain of property P is A ; ¬P ∨ Adom
Class inclusion: A subclass of B ; ¬Adom∨Bdom,¬Arange∨Brange
2. Introduction to Distributed Reasoning 23/44
We will study various types of reasoning in distributed systems.
1 Nov. 22 Introduction to the course2 Nov. 29 Propositional reasoning in P2P systems3 Dec. 6 Inconsistency-handling in P2P systems4 Dec. 13 RDFS querying in P2P setting5 Jan. 10 Distributed satisfiability algorithms6 Jan. 17 Distributed diagnosis7 Jan. 24 Web service composition8 Jan. 31 Web service verification
2. Introduction to Distributed Reasoning 24/44
What is abductive reasoning?.Abductive reasoning aims at generating explanations.
Formalization as a logical reasoning problem:
• Input: background theory B + effects / observations E +hypothesis vocabulary V (set of variables)
• Output: hypotheses / causes / explanations H satisfying:I B ∧ H is consistent (i.e. H is possible)I B ∧ H |= E (i.e. H explains E)I H is a cube (= conjunction of literals) over V
Important: Abductive reasoning can be rephrased in termsof consequence finding, using the following equivalence.
B ∧ H |= E if and only if B ∧ ¬E |= ¬H2. Introduction to Distributed Reasoning 25/44
Example: abductive diagnosis.Consider two inverters I and J in series:
I J0 1
Assume each inverter can behave according to 4 distinct andexhaustive behavioural modes:• correct (hypotheses IC and JC): IC → (outputI ↔ ¬inputI)
• faulty as followers (hyp. IF and JF): IF → (outputI ↔ inputI)
• faulty stuck-at-0 (hyp. I0 and J0): I0 → ¬outputI
• faulty stuck-at-1 (hyp. I1 and J1): I1 → outputI
Here outputI means I outputs 1 (so ¬outputI means I outputs 0).
2. Introduction to Distributed Reasoning 26/44
Example, cont..Our background theory B consists of the 8 formulas above, plus:
inputJ ↔ outputI ¬inputI
The observation E to explain is the faulty output: outputJ
Our hypothesis vocabulary is: {IC, IF, I0, I1, JC, JF, J0, J1}
We compute the prime implicates of B ∧ ¬E on vocabulary V.
¬J1,¬IF ∨ ¬JC,¬IC ∨ ¬JF,¬I0 ∨ ¬JC,¬I1 ∨ ¬JF
Taking negation yields 8 possible explanations (4 single faults; 4double faults):
J1(+IC/IF/I0/I1) IF ∧ JC IC ∧ JF I0 ∧ JC I1 ∧ JF
2. Introduction to Distributed Reasoning 27/44
Consistency-based reasoning.
What happens if the causes are not all known (incompleteness)?
Or, if the dependencies between causes and effects are not known?(e.g. in diagnosis: no fault model available, only correct model)
Then we should consider a weaker form of reasoning thanabduction, where we require only consistency with the effects(rather than their entailment):
• Input: background theory B; effects E; vocabulary V
• Output: hypotheses H (= valuation over V) such thatB ∧ H ∧ E is consistent
2. Introduction to Distributed Reasoning 28/44
Example: consistency-based diagnosis.Same example, but with only correct behavioural modes:
IC → (outputI ↔ ¬inputI) JC → (outputJ ↔ ¬inputJ)
Hypothesis vocabulary: V = {IC, JC}
Want to find hypotheses that consistently extend B ∧ E.
First compute prime implicates on V: B ∧ E |= ¬IC ∨ ¬JC
Next, prime implicants of the prime implicate(s): {¬IC,¬JC}
These code concisely the consistent models
The minimal consistent hypotheses are thus (single faults):
IC ∧ ¬JC ¬IC ∧ JC
2. Introduction to Distributed Reasoning 29/44
Distributed diagnosis.Want to move from centralized to distributed case (e.g. P2P).
General ideas:
• Distributed abductive diagnosis: do distributed CF, i.e.distributed computation of prime implicates (cf. session 2)
• Distributed consistency-based diagnosis:I avoid using intermediate step of prime implicates computationI find directly the consistent models restricted to VI much easier if local theories are in DNF instead of CNF:
it will be assumed that peer theories are small enough for theinitial transformation CNF –> DNF to be tractable
I do distributed computation of prime implicants
2. Introduction to Distributed Reasoning 30/44
Reasoning and distributed systems.
Aim of this course:Investigate relationship between reasoning and distributed systems
Three perspectives on the interaction of these two areas:
1. How to extend traditional reasoning algorithms to adistributed context?
2. How to exploit distributed computing to improve theefficiency of reasoning algorithms?
3. What new reasoning tasks are relevant to distributed systems,and how can we solve them?
2. Introduction to Distributed Reasoning 31/44
Extending traditional reasoning algorithms to P2P networks.
1 Nov. 22 Introduction to the course2 Nov. 29 Propositional reasoning in P2P systems3 Dec. 6 Inconsistency-handling in P2P systems4 Dec. 13 RDFS querying in P2P setting5 Jan. 10 Distributed satisfiability algorithms6 Jan. 17 Distributed diagnosis7 Jan. 24 Web service composition8 Jan. 31 Web service verification
2. Introduction to Distributed Reasoning 32/44
Propositional satisfiability.
Satisfiability = does a satisfying truth assignment exist?
Many practical problems can be reduced to satisfiability (SAT):
• planning (generate a sequence of actions to achieve goal)
• verification (finding bugs in programs)
• cryptography (decryption, finding keys)
• biology (identify common genes in population)
• ...
For this reason, lots of work on improving SAT solvers.
2. Introduction to Distributed Reasoning 33/44
Simple SAT algorithm.
Algorithm SAT
Input: a set Σ of propositional clauses, a partial valuation vOutput: true if v can be extended to a sat. valuation for Σ, else false
remove from Σ all clauses which are satisfied by vif Σ is now empty, then return trueremove from all clauses in Σ all literals made false by vif Σ contains an empty clause, then return falsechoose some variable x which does not appear in vlet v′ (resp. v′′) be v extended by x← true (resp. x← false)if SAT(Σ,v′)=true then return trueelse return SAT(Σ,v′′)
2. Introduction to Distributed Reasoning 34/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ =
∅
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
{a}
t
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
{a}
t
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
{a}
t
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a, b}
t
t
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a, b}
t
t
t
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a, b}
empty clause!t
t
t
false
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a,¬b}
t
t f
false
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a,¬b}
t
t f
false
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
{a,¬b}
t
t f
false
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t{a,¬b, c}
c
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t{a,¬b, c}
c
empty clauses!
false2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t
c
false
f{a,¬b,¬c}
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t
c
false
f{a,¬b,¬c}
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t
c
false
f
true
no clauses left!
{a,¬b,¬c}
2. Introduction to Distributed Reasoning 35/44
Example of SAT algorithm.
¬b ∨ a ∨ c
¬c ∨ b
¬a ∨ ¬c
¬b ∨ ¬a
v =
Σ = a
b
t
t f
false
t
c
false
f
true
SAT!!
{a,¬b,¬c}
2. Introduction to Distributed Reasoning 35/44
Exploiting distribution to improve efficiency.Two ideas:• split original problem into sub-problems, assigned to different
computers• give whole problem to each computer, but use different
techniques on each
ϕ
ψ1 ψ2 ψ3 ψ4
ϕ
2. Introduction to Distributed Reasoning 36/44
Reasoning and distributed systems.
Aim of this course:Investigate relationship between reasoning and distributed systems
Three perspectives on the interaction of these two areas:
1. How to extend traditional reasoning algorithms to adistributed context?
2. How to exploit distributed computing to improve theefficiency of reasoning algorithms?
3. What new reasoning tasks are relevant to distributed systems,and how can we solve them?
2. Introduction to Distributed Reasoning 37/44
1 Nov. 22 Introduction to the course2 Nov. 29 Propositional reasoning in P2P systems3 Dec. 6 Inconsistency-handling in P2P systems4 Dec. 13 RDFS querying in P2P setting5 Jan. 10 Distributed satisfiability algorithms6 Jan. 17 Distributed diagnosis7 Jan. 24 Web service composition8 Jan. 31 Web service verification
2. Introduction to Distributed Reasoning 38/44
Web services: basic scenario.
Web provides not justinformation, also services.
Often need to combine multipleservices to achieve a task(e.g. travel planning).
New reasoning task:provide support for(automatically) composing webservices to satisfy user needs
login(...)logout(...)get_credit(...)ask_bill(...)
<< service >>paypal
order(...)ship(...)charge_cc(...)charge_pp(...)bill(...)finalize(...)
<< service >>ebay
order(...)cancel(...)ship(...)bill(...)charge(...)gift(...)ack(...)
<< service >>pear_store
I need a tracking number
I want to buy something
I agree to give the product and
personal info
Find me service(s) so that I can
call select, purchase, ship, ...
2. Introduction to Distributed Reasoning 39/44
Components of service descriptions.Set of capabilities, which are functionalities requested by user orprovided by a service.
Set of (semantic) data types, which can be used as input or output.
Data semantic structure (DSS) = relations between data types
addressshipping addr billing addr
user addr
product
pear product
ePadePhone
user nameuser info
CC info
CC number
CC holder
amazon login
amazon pwd
paypal login
paypal pwd
product price
order amount
product specs
pear product info
PIM wallet
amazon info
paypal info
2. Introduction to Distributed Reasoning 40/44
Describing web services.
Service w = (Operations O, WFO)where for each operation o = (in,out,k)
• in: inputs(what o needs)
• out: outputs(what o provides)
• k: capability(what o does)
order ship bill
cancel
charge ack
gift_wrapper
order ship
charge_pp
finalizecharge_cc bill
paypal
ebay
pear_store
login get_credit
logout
logoutask_bill
order pear product pear product info, sidPS product selection
cancel sidPS
ship shipping addr, sidPS shipping setup
bill billing addr, sidPS billing setup
charge CC info, sidPS payment
gift wrapper giftcode, sidPS payment
ack sidPS tracking number order finalization
PS
SS
SS
$
$
F
2. Introduction to Distributed Reasoning 41/44
Describing user needs.
I need a tracking number
I want to buy something
I agree to give the product and
personal info
Din = {product, user info}
Dout = {tracking number}
product_selection
shipping_setup
billing_setup
payment
order_finalization
Input Din + Output Dout + Capability workflow
2. Introduction to Distributed Reasoning 42/44
Web service composition via planning.Technique used: reduction to propositional planning
Propositional planning problem:
• set S ⊆ 2V of possible states• an initial state s0 ∈ S• goal g ⊆ V – variables we want to make true• a set A of actions, with each action being defined by:
I its preconditions, i.e. atoms required for action to be possibleI positive effects, i.e. atoms made true by performing actionI negative effects, i.e. atoms made false by performing action
Plan = sequence of actions transforming initial state to a goal state
2. Introduction to Distributed Reasoning 43/44
Verifying and testing web service compositions.Different but related reasoning task:Check whether a given service composition satisfies user’s needs.
NeedsNeeds Conceptual Conceptual diagram.diagram.
formal modelformal modelformal modelformal modelModel Model
specificationspecification
specificationspecificationabstract BPEL, abstract BPEL,
BPMN, UMLBPMN, UML
implementationimplementationexecutable executable
BPEL, Java, BPEL, Java, .net, ....net, ...
test casetest case
!"#$"
static analysis
verify
1. translate
2. generate
conform?
3. test
test suite
%"&'(')*$'+, -.*)/0-+#1$"2$',3
CodeCodeModelModel
SourceSourcecodecode
verifyverify
$&*,2.*$"
%"&'(4
2. Introduction to Distributed Reasoning 44/44