Contract-Based Discovery and Composition of Web Services Gianluigi - - PowerPoint PPT Presentation

contract based discovery and composition of web services
SMART_READER_LITE
LIVE PREVIEW

Contract-Based Discovery and Composition of Web Services Gianluigi - - PowerPoint PPT Presentation

Contract-Based Discovery and Composition of Web Services Gianluigi Zavattaro zavattar@cs.unibo.it Department of Computer Science http://cs.unibo.it/~zavattar University of Bologna joint work with Mario Bravetti Contracts [FHRR04][CCLP06]


slide-1
SLIDE 1

joint work with Mario Bravetti

Department of Computer Science University of Bologna

Contract-Based Discovery and Composition of Web Services

Gianluigi Zavattaro

zavattar@cs.unibo.it http://cs.unibo.it/~zavattar

slide-2
SLIDE 2

Contracts [FHRR04][CCLP06]

 Contract: service “behavioural interface”

that describes

 not only the signature

  • f the provided
  • perations

(as in WSDL)

 but also the expected

  • rder of invoke and

receive (as in abstract WS-BPEL) Contract: abstract service description Service

public registry

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-3
SLIDE 3

Choreography: description of the behaviour

  • f the participants in a

multi-party service composition

e.g. WS-CDL

Contract: abstract service description Contract: abstract service description

Participant 1 Participant n

projection projection

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

Choreographies and contracts

e.g. [CHY07]

slide-4
SLIDE 4

Choreography Contract required for Participant 1

public registry

Contract required for Participant n

public registry

Service Service

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

Discovery of required contracts: directly in registries… ?

projection projection

slide-5
SLIDE 5

Choreography Contract

public registry

Contract

public registry

Service Service

Contract Part. 1 Contract Part. n

refines refines

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

Contract refinement

Reciprocal invocations

slide-6
SLIDE 6

An example…

 Buyer-Seller-Bank choreography

Buyer Seller

PayDescr Request Offer

Bank

Payment Confirm Receipt

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-7
SLIDE 7

An example… (more formally)

RequestBuyerSeller ; ( OfferSellerBuyer | PayDescrSellerBank ) ; PaymentBuyerBank ; ( ConfirmBankSeller | ReceiptBankBuyer )

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-8
SLIDE 8

Projection of the Choreography

  • n the Single Participants

Buyer: Invoke(Request)@Seller;Receive(Offer); Invoke(Payment)@Bank;Receive(Receipt) Seller: Receive(Request); (Invoke(Offer)@Buyer | Invoke(PayDescr)@Bank); Receive(Confirm) Bank: Receive(PayDescr);Receive(Payment); (Invoke(Receipt)@Buyer | Invoke(Confirm)@Seller)

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-9
SLIDE 9

Contract Refinement

 Can we use a concrete MonteDeiPaschi

service: Receive(PayDescr);Receive(Payment);

(Invoke(Receipt)@Buyer | Invoke(Confirm)@Seller) + Receive(eBookStore); ….

to implement the Bank role?

Receive(PayDescr);Receive(Payment);

(Invoke(Receipt)@Buyer | Invoke(Confirm)@Seller)

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-10
SLIDE 10

Choreography Contract

public registry

Contract

public registry

Service Service

Reciprocal invocations

Contract Part. 1 Contract Part. n

refines refines

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

Contract Refinement

slide-11
SLIDE 11

is conformant for participant 1 to is conformant for participant n to

Choreography Contract

public registry

Contract

public registry

Service Service

Reciprocal invocations

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

Choreography Conformance

slide-12
SLIDE 12

Choreography Conformance

 Can we use a concrete MonteDeiPaschi

service: Receive(PayDescr);Receive(Payment);

(Invoke(Receipt)@Buyer | Invoke(Confirm)@Seller) + Receive(eBookStore); ….

to implement the Bank role in the choreography?

RequestBuyerSeller ;(OfferSellerBuyer | PayDescrSellerBank);

PaymentBuyerBank ;(ConfirmBankSeller | ReceiptBankBuyer)

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-13
SLIDE 13

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-14
SLIDE 14

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-15
SLIDE 15

Compliance-Preserving Contract Refinement

Contract

public registry

Contract

public registry

Contract Part. 1 Contract Part. n

refines refines

compliance preserved by refinement compliant (i.e. correct composition)

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-16
SLIDE 16

 Services publish their interface expressed in

terms of a contract “C” in UDDI-like registries

 Operational semantics:

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

A formal (language independent) model for contracts

slide-17
SLIDE 17

Contract composition

 A composition of contracts can be

represented by the syntax:

 Operational semantics:

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-18
SLIDE 18

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

Correct compositions: informally

 The composition [C1]|[C2] is correct for

the following compliant contracts:

slide-19
SLIDE 19

 A contract composition is correct if all

contracts always reach successful termination (under fairness assumption)

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

Correct compositions: formally

slide-20
SLIDE 20

Refinement: Subcontract Preorder

C

sub-contracts

  • f C

subcontract preorder

 Preorder ≤ between contracts C:

 C’ ≤ C means C’ is a subcontract of C

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-21
SLIDE 21

Definition of Preorder Induced from Independence Property

C1 C2

Cn

Given a correct composition with initial contracts: The composition is still correct after (independent) replacement of initial contracts with subcontracts

subcontract preorder

sub-contracts

  • f C2

sub-contracts

  • f C1

sub-contracts

  • f Cn

C’1 C’2 C’n … …

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-22
SLIDE 22

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

Singular Refinement is Implied

 In particular (since ≤ is a preorder, it is

reflexive, i.e. Ci ≤ Ci): C’i ≤ Ci implies C’i must comply with the other initial contracts C1,…,Ci-1,Ci+1, …,Cn

slide-23
SLIDE 23

Buyer-Seller-Bank example strikes back…

 Remember that for the Bank:

Receive(PayDescr).P + Receive(eBookStore).Q

should be a refinement for

Receive(PayDescr).P (this because we assumed that eBookStore was not invoked from Buyer and Seller)

 This kind of refinement requires

knowledge about input-output alphabets

  • f the considered contracts!

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-24
SLIDE 24

Exploiting Knowledge About Interface of Initial Contracts

 Formally, we parametrize subcontract preorders

with information about what we assume

 outputs O: operations that can be invoked by the

  • ther initial contracts

 inputs I: operations that can be received by the other

initial contracts

We write C’ ≤I,O C

 Such a knowledge is usable in independent

retrieval because it can be extracted from the initial contracts before starting the independent retrieval phase

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-25
SLIDE 25

Negative result

 We cannot define a “refinement” as the

maximal subcontract pre-order!

 Consider the system [ a ] | [ a ] :

we could have a preorder ≤’ for which a + b.0 ≤’N-{b},N-{b} a and a preorder ≤’’ for which a + b ≤’’N-{b},N-{b} a but no preorder ≤ could have both a + b.0 ≤N-{b},N-{b} a a + b ≤N-{b},N-{b} a

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-26
SLIDE 26

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-27
SLIDE 27

Output persistence

 Assume that services are programmed

with languages in which external choices are guarded by inputs (such as in the pick operator of WS-BPEL)

 Their contracts satisfies the following

  • utput persistence property:

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

a a b

slide-28
SLIDE 28

Example of output persistent contract

 Receive(a)+Receive(b) | Invoke(c)

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

b c a

c c

b a

slide-29
SLIDE 29

Output persistence (formally)

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

 Main result: If we restrict to output

persistent contracts, the union of all subcontract relations turns out to be a subcontract relation

 Consequence: we can define our

“refinement” as the maximal subcontract relation!

slide-30
SLIDE 30

 The preorder C’ ≤I,O C iff for every context

P with inputs in I and outputs in O [C] P is correct implies [C’] P is correct

 is a subcontract preoder  includes all subcontract preorders

Main theorem for output persistent contracts

max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-31
SLIDE 31

Subcontracts Cannot Add Reachable Invoke of New Operations

 Due to output persistence subcontracts cannot

add reachable outputs on new types

 otherwise subcontract compliance w.r.t initial con-

tracts is not preserved

 For example: a + c.b ≤N-{c},N-{c} a but not

a + a.b ≤N-{c},N-{c} a

 Executable additional actions on new types can

be just inputs so interaction on new types between subcontracts cannot be generated

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-32
SLIDE 32

Input Knowledge Independence

 If I’,I’’ include types of outputs in C:

C’ ≤I’,O C iff C’ ≤I’’,O C

 because subcontracts cannot add reachable

  • utputs on new types

 We just use ≤O to stand for ≤N,O

max max max max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-33
SLIDE 33

Output knowledge

 Contrary to inputs, enlarging output

types of contexts decreases allowed subcontracts

 In fact a + b ≤N,N-{b} a

but not a + b ≤N,N a Consider for instance the correct system [ a ] | [a.b] | [ b ] and the incorrect one [ a+b ] | [a.b] | [ b ]

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-34
SLIDE 34

Output Knowledge Allows Extension with Additional Input Types

 Problem reduced to ≤ (meaning ≤N,N):

C’ ≤O C iff C’ \\ N-O ≤ C \\ N-O i.e. to subcontract relation when inputs that cannot be invoked are restricted

 Examples:

 exploiting knowledge we have a+b ≤{a} a  in addition to τ.a ≤ τ.a + τ.b (more deterministic)

max max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-35
SLIDE 35

 Subcontract relation contains a universal

quantification over possible contexts

 Sound characterization resorting to a

must-testing theory (should-testing [RV05])

 C’ ≤O C is implied by

NF NF (C’ \\ N-O) ≤test NF NF (C \\ N-O)

 i.e. ≤O coarser than testing preorder

(and of simulation)

Decidible Sound Characterization Based on a Must-like Testing

max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-36
SLIDE 36

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-37
SLIDE 37

Adoption of a more realistic address-based communication

 Alternative to standard Process Algebra

channel-based communication mechanism

 “ a ” can be received by any C doing “a”

 Invokes al indicate a destination address

(location l)

 Every contract C is executed at a

distiguished location l, written “[C]l”

 i.e. from choreography, location = participant

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-38
SLIDE 38

In Addition Output Knowledge Independence !

 If, for every l, O’,O’’ include inputs in C:

C’ ≤I,O’ C iff C’ ≤I,O’’ C

 because compliant contexts of C cannot perform

reachable outputs to C that it cannot receive

 Now al + b ≤N,N-{b} al

and also al + b ≤N,N al in fact the refined process now cannot intercept the b message in [ al+b ]i | [a.b]l | [ bl ]j

max max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-39
SLIDE 39

Independence on Output Knowledge allows Extension with Input Types !

 Therefore, from C’ ≤ C iff C’ ≤N,I(C) C,

we can reduce the problem: C’ ≤ C iff C’\\N-I(C) ≤ C i.e. to subcontract relation when inputs that cannot be invoked are restricted

 Hence knowledge is no longer needed!  Analogous sound characterization based

  • n a must-like testing scenario

max max max max

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-40
SLIDE 40

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-41
SLIDE 41

is conformant for participant 1 to is conformant for participant n to

Choreography

Choreography Conformance

Contract

public registry

Contract

public registry

Service Service

Reciprocal invocations

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-42
SLIDE 42

Choreography Language in Essence

 Choreography H:

H ::= ars | H;H | H+H | H|H | H* r invokes the

  • peration a of s

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-43
SLIDE 43

Notion of Implementation

 Given a choreography H, a system P

implements H if:

 P is a composition of compliant contracts  Each (completed weak) trace of P has a

corresponding (completed) trace of H

 all computations of P are correct conversations

according to the choreography H

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-44
SLIDE 44

Examples of choreography Implementations:

 Given the choreography:

RequestAliceBob; (AcceptBobAlice + RejectBobAlice)

The following are implementations:

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-45
SLIDE 45

Examples of choreography Implementations:

 Given the choreography:

RequestAliceBob; (AcceptBobAlice + RejectBobAlice)

The following are implementations: [RequestBob.(Accept+Reject)]Alice |

[Request.(τ.AcceptAlice+τ.RejectAlice)]Bob

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-46
SLIDE 46

Examples of choreography Implementations:

 Given the choreography:

RequestAliceBob; (AcceptBobAlice + RejectBobAlice)

The following are implementations: [RequestBob.(Accept+Reject)]Alice |

[Request.(τ.AcceptAlice+τ.RejectAlice)]Bob [RequestBob.(Accept+Reject+Retry)]Alice | [Request.(τ.AcceptAlice+τ.RejectAlice)]Bob

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-47
SLIDE 47

Examples of choreography Implementations:

 Given the choreography:

RequestAliceBob; (AcceptBobAlice + RejectBobAlice)

The following are implementations: [RequestBob.(Accept+Reject)]Alice |

[Request.(τ.AcceptAlice+τ.RejectAlice)]Bob [RequestBob.(Accept+Reject+Retry)]Alice | [Request.(τ.AcceptAlice+τ.RejectAlice)]Bob [RequestBob.(Accept+Reject+Retry)]Alice | [Request.AcceptAlice]Bob

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-48
SLIDE 48

Definition of Relation Induced from Independence Property

H with roles p1,p2,…,pn [C1]p1 | [C2]p2 | … | [Cn]pn implements H … … contracts for p1 contracts for p2 contracts for pn conformance relation

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-49
SLIDE 49

No Maximal Choreography Conformance Relation

 Consider the choreography

ars | brs that can be implemented as: [ as.bs + bs.as]r | [ τ.a.b + τ.b.a ]s [τ.as.bs + τ.bs.as ]r | [a.b + b.a]s but not as:

[τ.as.bs + τ.bs.as ]r | [ τ.a.b + τ.b.a ]s

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-50
SLIDE 50

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-51
SLIDE 51

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

Consonance:

a “canonical” conformance relation

H with roles p1,p2,…,pn [C’1]p1 | [C’2]p2 | … | [C’n]pn implements H … project “canonical” contracts C1 C2 Cn …

sub-contracts

  • f C1

sub-contracts

  • f C2

sub-contracts

  • f Cn

Decidable charact.

  • f refinement
slide-52
SLIDE 52

The “Canonical” Projection

 H is well-formed if the system P, achieved via

canonical projections, implements H

 Canonical projection [[ ]]t :

τ.as if t=r [[ ars ]]t = a if t=s 1

  • therwise

[[H;H’]]t=[[H]]t ; [[H’]]t [[H|H’]]t=[[H]]t | [[H’]]t [[H+H’]]t=[[H]]t + [[H’]]t [[H*]]t=[[H]]t*

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-53
SLIDE 53

 The sound characterization of the conso-

nance relation between a choreography H and a contract C playing a role r given by

NF NF (C \\ N-I([[H]]r)) ≤test NF NF ([[H]]r)

is a conformance relation

 proof exploits pre-congruence of testing

(trace inclusion is implied by testing)

Decidible Sound Characterization Based on a Must-like Testing

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-54
SLIDE 54

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-55
SLIDE 55

 “Standard” Contract Compliance:

 S1: invoke(a).invoke(b)  S2: receive(a).invoke(c)  S3: receive(c).receive(b)

S1 S2 S3

Any doubt?

Alternatives to Standard Compliance: Strong Compliance

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-56
SLIDE 56

 Let us give a more careful look:

 S1: invoke(a).invoke(b)  S2: receive(a).invoke(c)  S3: receive(c).receive(b)

S1 S2 S3

 Strong

compliance requires that the receptors should be always ready

 These services

are not strongly compliant !!

Alternatives to Standard Compliance: Strong Compliance

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-57
SLIDE 57

 “Strongly” Compliant Contracts:

 S1: invoke(a).receive(b).invoke(b)  S2: receive(a).invoke(c)  S3: receive(c).invoke(b).receive(b)

S1 S2 S3

Alternatives to Standard Compliance: Strong Compliance

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-58
SLIDE 58

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-59
SLIDE 59

Alternatives to Standard Compliance: Queue-based Comp.

 Study of asynchronous compliance:

each service has a queue for every

  • peration (input)

 Communication involves two events:

 “ al ” inserts in queue “a” at location “l”  “a” retrieves from local “a” queue

 Example:

[ as.bs ]r is now compliant with [ b.a ]s

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-60
SLIDE 60

Plan of the talk

 Preliminaries

 Choreography, contract, refinement, conformance

 Compliance-preserving refinement

 General case (negative result)  Output persistence, located outputs

 Choreography conformance (negative result)

 Consonance

 Alternative notions of compliance

 Strong compliance, queue-based compliance

 Conclusion

Contract-Based Discovery and Composition of Web Services SFM09:WS - Bertinoro - 5.6.2009

slide-61
SLIDE 61

Summary of Results

 Direct conformance w.r.t. the whole choreography:

maximal relation does not exist (all kinds of compl.)

 Conformance via refinement with knowledge about

  • ther initial contracts limited to I/O actions

(enough to guarantee that refinements that extend the interface are included)

 “normal” compliance:

 Unconstrained contracts: maximal relation does not exist  Contracts where outputs are internally chosen (output persistence):

maximal relation exists and “I” knowledge is irrelevant

 Output persistent contracts where outputs are directed to a location:

maximal relation exists and “I/O” knowledge is irrelevant

 strong compliance:

 Unconstrained contracts (where output are directed to a location):

maximal relation exists and “I/O” knowledge is irrelevant

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-62
SLIDE 62

Summary of Results

 queue-based compliance:

 Unconstrained contracts (where output are directed to a location):

maximal relation exists and “I/O” knowledge is irrelevant

 Sound characterizations of the relations obtained

(apart from the queue based) by resorting to an encoding into (a fair version of) must testing [RV05]

 As a consequence:

 Algorithm that guarantees compliance  Classification of the relations w.r.t. existing pre-orders:

coarser than must testing (e.g., they allow external non- determinism on inputs to be added in refinements)

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-63
SLIDE 63

Future work

 Complete characterization of the

relations

 τ.a+τ.b ≤ c+c.d is not captured by the

should-testing based characterization

 Extension with data (types), mobility,

sessions/correlation sets, ….

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services

slide-64
SLIDE 64

References

 [FHRR04] C. Fournet, C.A.R. Hoare, S.K. Rajamani, and J. Rehof. Stuck-

Free Conformance. In CAV’04.

 [CCLP06] S. Carpineti, G. Castagna, C. Laneve, and L. Padovani. A Formal

Account of Contracts for Web Services. In WS-FM’06.

 [CHY07] M. Carbone, K. Honda, and N. Yoshida. Structured

Communication-Centred Programming for Web Services. In ESOP’07.

 [RV05] A. Rensink and W. Vogler. Fair testing. CTIT Technical Report TR-

CTIT-05-64, Dep. Computer Science, Univ. of Twente, 2005.

 [BZ07a] M. Bravetti and G. Zavattaro. Contract based Multi-party Service

  • Composition. In FSEN’07 and “Fundamenta Informaticae”.

 [BZ07b] M. Bravetti and G. Zavattaro. Towards a Unifying Theory for

Choreography Conformance and Contract Compliance. In SC’07.

 [BZ07c] M. Bravetti and G. Zavattaro. A Theory for Strong Service

  • Compliance. In Coordination’07 and “Mathematical Structures in Computer

Science”.

 [BZ08] M. Bravetti and G. Zavattaro. Contract Compliance and Choreogra-

phy Conformance in the Presence of Message Queues. In WS-FM’08.

SFM09:WS - Bertinoro - 5.6.2009 Contract-Based Discovery and Composition of Web Services