Behavior Composition in the Presence of Failure Sebastian Sardina RMIT University, Melbourne, Australia Fabio Patrizi & Giuseppe De Giacomo Sapienza Univ. Roma, Italy KR’08, Sept. 2008, Sydney Australia

Introduction

There are at least two kinds of games. One could be called finite, the other infinite. A finite game is played for the purpose of winning ... ... an infinite game for the purpose of continuing the play. Finite and Infinite Games J. P. Carse

Behavior composition vs Planning Planning

• • • •

Operators: atomic

Behavior composition



“Operators”: available transition systems

• •

“Goal”: target transition system



Playing strategy: composition controller

Goal: desired state of affair Finite game: compose operator sequentially so as to reach the goal Playing strategy: plan

Infinite game: compose available transition systems concurrently so as to play the target transition systems

Behavior composition Given:

-

a set of available behaviors B1,…,Bn a target behavior T

we want to realize T by delegating actions to B1,…,Bn i.e.: control the concurrent execution of B1,…,Bn so as to mimic T over time Behavior composition: synthesis of the controller 4

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 5

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 6

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 7

t4

b,2

Synthesizing a composition Techniques for computing compositions:

• Reduction to PDL SAT • Simulation-based • LTL synthesis as model checking of game

[IJCAI07, AAAI07, VLDB05, ICSOC03]

structure [ICAPS08]

All techniques are for finite state behaviors

8

Synthesizing a composition Techniques for computing compositions:

• Reduction to PDL SAT • Simulation-based • LTL synthesis as model checking of game

[IJCAI07, AAAI07, VLDB05, ICSOC03]

structure [ICAPS08]

All techniques are for finite state behaviors

8

Simulation-based technique Directly based on “ ... control the concurrent execution of B1,…,Bn so as to mimic T ” Note this is possible ... .... if the concurrent execution of B1,…,Bn can mimic T Thm: this is possible iff ... the asynchronous (Cartesian) product C of B1,…,Bn can (ND-)simulate T 9

Simulation relation •

Given two transition systems T = < A,ST, t0, δT> and C = < A, SC, sC0, δC> a (ND-)simulation is a relation R between the states t 2 T an (s1,..,sn) of C such that:



(t, s1,..,sn) 2 R implies that



for all t !a t’ exists a Bi 2 C s.t.

• •

9 si !a s’i in Bi 8 si !a s’i in Bi ) (t’, s1,..,s’i,..,sn) 2 R



If exists a simulation relation R such that (t0, sC0) 2 R, then we say that T is simulated by C.



Simulated-by is (i) a simulation; (ii) the largest simulation.

Simulated-by is a coinductive definition

Simulation relation •

Given two transition systems T = < A,ST, t0, δT> and C = < A, SC, sC0, δC> a (ND-)simulation is a relation R between the states t 2 T an (s1,..,sn) of C such that:



(t, s1,..,sn) 2 R implies that



for all t !a t’ exists a Bi 2 C s.t.

• •

9 si !a s’i in Bi 8 si !a s’i in Bi ) (t’, s1,..,s’i,..,sn) 2 R



If exists a simulation relation R such that (t0, sC0) 2 R, then we say that T is simulated by C.



Simulated-by is (i) a simulation; (ii) the largest simulation.

Simulated-by is a coinductive definition

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 11

t4

b,2

Simulation relation (cont.) Algorithm Compute (ND-)simulation Input: target behavior T = and (Cart. prod. of) available behaviors C= Output: the simulated-by relation (the largest simulation) Body R=; R’ = ST £ SC while (R ≠ R’) { R := R’ R’ := R’ - {(t, s1,..,sn) | 9 t !a t’ in T Æ 8 Bi . ¬9 s !a s’ in Bi Ç 9 si !a s’i in Bi Æ (t’, s1,..s’i,..sn) 62 R’ } } return R’ End

Simulation relation (cont.) Algorithm Compute (ND-)simulation Input: target behavior T = and (Cart. prod. of) available behaviors C= Output: the simulated-by relation (the largest simulation) Body R=; R’ = ST £ SC while (R ≠ R’) { R := R’ R’ := R’ - {(t, s1,..,sn) | 9 t !a t’ in T Æ 8 Bi . ¬9 s !a s’ in Bi Ç 9 si !a s’i in Bi Æ (t’, s1,..s’i,..sn) 62 R’ } } return R’ End

Using simulation for composition Given the largest simulation R of T by C, we can build every composition through the controller generator (CG). CG = < A, [1,…,n], Sr, sr0, δ, ω> with

• • • • •

A : the actions shared by the behaviors [1,…,n]: the identifiers of the available behaviors Sr = ST£ S1 £...£ Sn : the states of the controller generator sr0 = (t0, s01, ..., s0n) : the initial state of the controller generator ω: Sr £ A ! 2[1,…,n] : the output function, defined as follows:

ω(t, s1,..,sn, a) = { i | Bi can do a and remain in R} •

δ µ Sr £ A £ [1,…,n] ! Sr : the state transition function, defined as follows

(t, s1,..,si,..,sn)!a,i (t’, s1,..,s’i,..,sn) iff i 2 ω(t, s1,..,si,..,sn, a)

13

Example B1:

b,3 a,2

a s1

C:

s2

b

a,1 s1q1

s2q1

b,1

a

B2:

b,3 a,2

a b,2

c b

q1

c,2

q2

a,2

a,2 a,1

b s1q2

B3:

s2q2

b,1 v

b,3

b,3

c

T:

t1

a

c,2

t2

b b

c

t3 14

t4

b,2

Example B1:

t1 W(t1,s1q1,a) = {1,2} W(t1,s2q1,a) = {2}

a s1

s2

b

a

B2:

a c b

q1

q2

C:

W(t1,s1q1,c) = {2} W(t1,s2q1,c) = {2} t2 W(t2,s1q1,b) = {3} W(t2,s1q2,b) = {2} W(t2,s2q1,b) = {1,3} W(t2,s2q2,b) = {2}

b,2

s1q1

t1

a

t2

b b

b,1 a,2

a,2

s1q2

c,2

s2q2

b,1 b,3

b,3

c

T:

s2q1

a,1

t4 W(t4,s1q1,b) = {3} W(t4,s1q2,b) = {2} W(t4,s2q1,b) = {1,3} W(t4,s2q2,b) = {2}

v

b,3 a,2

a,1

c,2

t3 W(t3,s1q1,b) = {2} W(t3,s2q1,b) = {2}

b

B3:

b,3 a,2

c

t3 14

t4

b,2

Results for simulation Thm: Choosing at each point any value in ω gives us a correct controller for the composition. Thm: Every controller that is a composition can be obtained by choosing, at each point, a suitable value in ω. Thm: Computing the controller generator is EXPTIME (composition is EXPTIME-complete [IJCAI07]) where the exponential depends only on the number (not the size) of the available behaviors. 15

Behavior failures Components may become unexpectedly unavailable for various reasons. We consider four kinds of behavior failures:



A behavior temporarily freezes; it will eventually resume in the same state it was in;



A behavior (or the environment) unexpectedly and arbitrarily (i.e., without respecting its transition relation) changes its current state;

• •

A behavior dies - it becomes permanently unavailable. A dead behavior unexpectedly comes alive again (this is an opportunity more than a failure).

Just-in-time composition Once we have the controller generator ... ... we can avoid choosing any particular composition apriori ... ... and use directly ω to choose the available behavior to which delegate the next action.

We can be lazy and make such choice just-in-time, possibly adapting reactively to runtime feedback.

17

Reactive failure recovery with CG CG already solves:

• Temporary freezing of an available behavior B

i

-

In principle: wait for Bi

-

In principle: recompute CG / simulated-by from new initial state ...

-

... but CG / simulated-by independent from initial state!

But with CG: stop selecting Bi until it comes back!

• Unexpected behavior (environment) state change

Hence: simply use old CG / simulated-by from the new state!! 18

Parsimonious failure recovery Algorithm Computing (ND-)simulation - parametrized version Input: transition system T = and transition system C= relation Rraw including the simulated-by relation relation Rsure included the simulated-by relation Output: the simulated-by relation (the largest simulation) Body Q=; Q’ = Rraw - Rsure

//Note R’ = (Q’



Rsure)

while (Q ≠ Q’) { Q := Q’ Q’ := Q’

-

{(t, s1,..,sn) | 9 t !a t’ in T Æ

8 Bi . ¬9 s !a s’ in Bi Ç 9 si !a s’i in Bi Æ (t’, s1,..s’i,..sn) 62 Q’ } return Q’ End



Rsure

19



Rsure }

Parsimonious failure recovery (cont.) Let [1,.., n] = W

∪ F be the available behaviors.

Let R = RW∪F be the simulated-by relation of target by behaviors W Then the following hold:



RW ⊆ πW(RW∪F)



∪ F.

πW(RW∪F) is not a simulation in general Behaviors F die: compute RW with Rraw = πW(RW∪F) !

RW × F ⊆ RW∪F

-

RW × F is a simulation of target by behaviors W ∪ F Dead behaviors F come back: compute RW∪F with Rsure = RW × F ! 20

Tools for computing composition based on simulation



Computing simulation is a well-studied problem (related to bisimulation, a key notion in process algebra). Tools, like the Edinburgh Concurrency Workbench and its clones, can be adapted to compute composition via simulation.



Also LTL-based syntesis tools, like TLV, can be used for (indirectly) computing composition via simulation [Patrizi PhD08] We are currently focussing on the second approach. 21

Conclusion

• •

Behavior composition: an infinite game.



It realies on a controller generator: kind of stateful universal plan generator for composition.



Full observability of available behavior’ states is crucial for CG to work properly. But ... Partial observability addressable by manipulating knowledge states! [work in progress]



All techniques are for finite states. What about dealing with infinite states? Very difficult, but also crucial when mixing processes and data!

Simulation based composition techniques allow for failure tolerance!

22

Web service composition via TLV

Given the largest simulation R of T by C, we can build every composition through the controller generator (CG). CG = < A, [1,…,n], Sr, sr. 0, δ, ω> with.

1013KB Sizes 4 Downloads 277 Views

Recommend Documents

pdf-1399\web-service-composition-and-new-frameworks-in ...
... the apps below to open or edit this item. pdf-1399\web-service-composition-and-new-frameworks-in-designing-semantics-innovations-by-patrick-hung.pdf.

A survey on Web Service Composition Algorithm - IJRIT
IJRIT International Journal of Research in Information Technology, Volume 1, Issue 5, May ... Service Oriented Computing (SOC) is an emerging cross-disciplinary .... Here authors have proposed a cloud web service ... ICIW '08: Proceedings of the 2008

A survey on Web Service Composition Algorithm - IJRIT
The necessity for fast service composition systems is directly connected with the emergence ... require frequent changes in their business strategy. A SOA is an ...

Web Query Recommendation via Sequential ... - Semantic Scholar
wise approaches on large-scale search logs extracted from a commercial search engine. Results show that the sequence-wise approaches significantly outperform the conventional pair-wise ones in terms of prediction accuracy. In particular, our MVMM app

Web Query Recommendation via Sequential ... - Semantic Scholar
Abstract—Web query recommendation has long been con- sidered a key feature of search engines. Building a good Web query recommendation system, however, is very difficult due to the fundamental challenge of predicting users' search intent, especiall

ReComp: QoS-aware Recursive service Composition at ...
build over existing web sites as well and many web-sites today can be viewed as mashups. For example, the site zoomtra [20] provides the cheapest airfare ...

Conversation-Based Service Composition for Pervasive ...
among which a streaming service used to stream digital re- sources on users ... video stream to the user's PDA. When the ..... to satisfy the rest of expected data.

Context-Aware Service Composition in a Home Control ...
protocols, security policies, and such are dynamic and differ from one ... speech system if no display is available. If he comes at ... system is then given to using distinct service providers ..... Conference (CCNC'07), Las Vegas, January 2007.

A Survey on Service Composition Middleware in ...
context awareness, QoS management, security, spontaneous management, and ...... [35] UPnP Forum, "Understanding UPnP: A White Paper",. Technical Report ...

User-Excentric Service Composition in Pervasive ...
we introduce a Servicebook, a new social network of services, where services create and join group of service profile providing to users better access to all the ...

User-Excentric Service Composition in Pervasive ...
Abstract—In pervasive environments, services are fastly developing and .... building online communities of people who share interests and/or activities, or .... The two values of of Exact and F ail are the best and worst case. ..... only redirect t

COCOA : Conversation-Based Service Composition for ...
ABSTRACT. Due to the large success of wireless networks and handheld devices ... in terms of available services and by enforcing valid service consumption. 1.

Evolution of the Chilean Web Structure Composition
Barbara Poblete. Center for Web Research. Dept. of Computer Science .... We acknowledge the support of Millennium Nucleus. Grant P01-029-F from Mideplan, ...

VC Glossary Terms - TLV Partners.pdf
(Annual Recurring Revenue). The recurring subscription-based. revenue which software as a. service/platform as a service,. (SaaS/PaaS) based companies.

Building Consensus via a Semantic Web Collaborative ...
Use of Social Media to connect citizens and all other stakeholders to ... 20. Consensus Rate Definitions. • Position a. • Arguments b (pro) and c (con).

developing pre-service teacher noticing via the ...
Share the design process used to create LessonSketch modules that ... Site for users of LessonSketch (https://sites.google.com/site/lessonsketchproject/) ...

Building Consensus via a Semantic Web Collaborative ...
republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. ... Process Modelling, Visualization, Gaming, Mixed Reality and Simulation [1]. .... for adoption by the hosting organization. Finally, the vo

Automatic Image Tagging via Category Label and Web ...
trip, these images may belong to 'tiger', 'building', 'moun- tain', etc. It is hard ..... shuttle shuttlecock club bocce ball game lawn summer bocci croquet party grass.

Personalized QoS Prediction for Web Services via ...
lected QoS data consistent with the format of collaborative filtering. ..... should specify a file directory in the computer and the client program could get all the file ...

interlinking current affairs with archives via the Semantic Web - GitHub
content with the Semantic Web, user validations of the resulting data and topic extraction from live ..... We therefore developed an infrastructure to process entire ... application using these links to publish this archive on the web11. This web sit

web service architecture pdf
Loading… Page 1. Whoops! There was a problem loading more pages. web service architecture pdf. web service architecture pdf. Open. Extract. Open with.

Highly-Available Web Service Community
vices to run the customized Fast Bully Algorithm. Finally, a ... to the user or application when master Web service is ... 2 Customization of Fast Bully Algorithm.

Download Data from Web Service - MATLAB & Simulink.pdf ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Download Data ...