A Theory of Contracts for Web Services Giuseppe Castagna, Nils - - PowerPoint PPT Presentation

a theory of contracts for web services
SMART_READER_LITE
LIVE PREVIEW

A Theory of Contracts for Web Services Giuseppe Castagna, Nils - - PowerPoint PPT Presentation

1. Introduction 2. Contracts 3. Compliance 4. Subcontracting 5. Filters 6. Languages 7. Conclusion FLACOS 07 A Theory of Contracts for Web Services Giuseppe Castagna, Nils Gesbert, Luca Padovani Universit e Paris


slide-1
SLIDE 1
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

A Theory of Contracts for Web Services

Giuseppe Castagna, Nils Gesbert, Luca Padovani

Universit´ e Paris 7, Universit´ e Paris Sud, Universit` a di Urbino

FLACOS ’07

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 1/20

slide-2
SLIDE 2
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Web services in a nutshell

distributed processes communicating through standard Web protocols (tcp, http, soap) exchanging data in platform-neutral format (xml) dynamically linked with machine-understandable descriptions

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 2/20

slide-3
SLIDE 3
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Web services in a nutshell

distributed processes communicating through standard Web protocols (tcp, http, soap) exchanging data in platform-neutral format (xml) dynamically linked with machine-understandable descriptions

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 2/20

slide-4
SLIDE 4
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Technologies for Web services

Interface descriptions WSDL 1.1 (W3C note, 2001) WSDL 2.0 (W3C recommendation, 2007) Behavioural descriptions WSCL 1.0 (W3C note, 2002) WSCI 1.0 (W3C note, 2002) WS BPEL 2.0 (OASIS standard, 2007) “Enabling users to describe business process activities as Web services and define how they can be connected to accomplish specific tasks” Registries UDDI 3.0.2 (OASIS standard, 2004) “Defining a standard method for enterprises to dynamically discover and invoke Web services”

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 3/20

slide-5
SLIDE 5
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Technologies for Web services

Interface descriptions WSDL 1.1 (W3C note, 2001) WSDL 2.0 (W3C recommendation, 2007) Behavioural descriptions WSCL 1.0 (W3C note, 2002) WSCI 1.0 (W3C note, 2002) WS BPEL 2.0 (OASIS standard, 2007) “Enabling users to describe business process activities as Web services and define how they can be connected to accomplish specific tasks” Registries UDDI 3.0.2 (OASIS standard, 2004) “Defining a standard method for enterprises to dynamically discover and invoke Web services”

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 3/20

slide-6
SLIDE 6
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Technologies for Web services

Interface descriptions WSDL 1.1 (W3C note, 2001) WSDL 2.0 (W3C recommendation, 2007) Behavioural descriptions WSCL 1.0 (W3C note, 2002) WSCI 1.0 (W3C note, 2002) WS BPEL 2.0 (OASIS standard, 2007) “Enabling users to describe business process activities as Web services and define how they can be connected to accomplish specific tasks” Registries UDDI 3.0.2 (OASIS standard, 2004) “Defining a standard method for enterprises to dynamically discover and invoke Web services”

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 3/20

slide-7
SLIDE 7
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Discovering Web services

Search key name industrial classification location . . . behavioural type! Problem We need a semantic notion of behavioural equivalence which preserves client satisfaction is abstract (based on the described, observable behaviour) Plan Synthesise contracts from Web service descriptions, give contracts a formal semantics, use contracts for searching (and possibly more. . . )

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 4/20

slide-8
SLIDE 8
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Summary

In this talk. . .

1 understand what contracts look like 2 define client satisfaction (compliance) 3 define contract equivalence (subcontract) 4 relate compliance and subcontract (filters) 5 apply to languages used to implement client/services 6 apply to service discovery Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 5/20

slide-9
SLIDE 9
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-10
SLIDE 10
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-11
SLIDE 11
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout in: Query

  • ut: Catalog

[ValidLogin] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] [OutOfStock] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-12
SLIDE 12
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout in: Query

  • ut: Catalog

[ValidLogin] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] [OutOfStock] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-13
SLIDE 13
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-14
SLIDE 14
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [OutOfStock] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] [InvalidLogin] [ValidLogin] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-15
SLIDE 15
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [OutOfStock] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] [InvalidLogin] [ValidLogin] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-16
SLIDE 16
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-17
SLIDE 17
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-18
SLIDE 18
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-19
SLIDE 19
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment] 1 Describes sequences of INPUT/OUTPUT actions

Query✿Catalog

2 Describes possible internal choices

Login✿✭ValidLogin✿ ✿✿✿ ✟ InvalidLogin✿ ✿✿✿✮

3 Describes available external choices

Query✿Catalog✿✭Logout✿ ✿✿✿ ✰ Purchase✿ ✿✿✿✮ Note that the contract is recursive

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 6/20

slide-20
SLIDE 20
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment]

rec x✿Login✿✭InvalidLogin✿x ✟ ValidLogin✿rec y✿ Query✿Catalog✿✭y ✰ Logout ✰ rec z✿Purchase✿ Accepted ✟ InvalidPayment✿✭z ✰ Logout✮ ✟ OutOfStock✿✭y ✰ Logout✮✮✮

Note that the contract is recursive

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 7/20

slide-21
SLIDE 21
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

What is a contract?

in: Login

  • ut: ValidLogin
  • ut: InvalidLogin

in: Query

  • ut: Catalog

in: Purchase

  • ut: Accepted
  • ut: InvalidPayment
  • ut: OutOfStock

in: Logout [ValidLogin] [OutOfStock] [InvalidLogin] [InvalidPayment] [Accepted] [OutOfStock] [InvalidPayment]

rec x✿Login✿✭InvalidLogin✿x ✟ ValidLogin✿rec y✿ Query✿Catalog✿✭y ✰ Logout ✰ rec z✿Purchase✿ Accepted ✟ InvalidPayment✿✭z ✰ Logout✮ ✟ OutOfStock✿✭y ✰ Logout✮✮✮

We do not consider recursion in this work

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 7/20

slide-22
SLIDE 22
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

A formal contract language

contracts ✛ ✿✿❂ ✭void✮ ☛✿✛ ✭action prefix✮ ✛ ✰ ✛ ✭external choice✮ ✛ ✟ ✛ ✭internal choice✮ actions ☛ ✿✿❂

Names represent types, operations, . . .

a ✭receive✮ a ✭send✮

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 8/20

slide-23
SLIDE 23
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

A formal contract language

contracts ✛ ✿✿❂ ✭void✮ ☛✿✛ ✭action prefix✮ ✛ ✰ ✛ ✭external choice✮ ✛ ✟ ✛ ✭internal choice✮ actions ☛ ✿✿❂

Names represent types, operations, . . .

a ✭receive✮ a ✭send✮ Two questions:

1 When does a client fit a server of given contract?

(compliance) When it successfully achieves every possible interaction with it

2 When is a contract more general than another?

(subcontracting) When all the clients of the other comply with it

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 8/20

slide-24
SLIDE 24
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

A formal contract language

contracts ✛ ✿✿❂ ✭void✮ ☛✿✛ ✭action prefix✮ ✛ ✰ ✛ ✭external choice✮ ✛ ✟ ✛ ✭internal choice✮ actions ☛ ✿✿❂

Names represent types, operations, . . .

a ✭receive✮ a ✭send✮ Two questions:

1 When does a client fit a server of given contract?

(compliance) When it successfully achieves every possible interaction with it

2 When is a contract more general than another?

(subcontracting) When all the clients of the other comply with it

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 8/20

slide-25
SLIDE 25
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

A formal contract language

contracts ✛ ✿✿❂ ✭void✮ ☛✿✛ ✭action prefix✮ ✛ ✰ ✛ ✭external choice✮ ✛ ✟ ✛ ✭internal choice✮ actions ☛ ✿✿❂

Names represent types, operations, . . .

a ✭receive✮ a ✭send✮ Two questions:

1 When does a client fit a server of given contract?

(compliance) When it successfully achieves every possible interaction with it

2 When is a contract more general than another?

(subcontracting) When all the clients of the other comply with it

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 8/20

slide-26
SLIDE 26
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

The contract of a process describes

1 WHICH actions the process offers

(✛

✼ ✦: “✛ can emit ☛”) ☛✿✛

✼ ✦ ✛ ✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✰ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✰ ✛2

✼ ✦ ✛✵

1

✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✟ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✟ ✛2

✼ ✦ ✛✵

1

2 HOW actions are offered

(✛ ✰ R: “✛ can offer to choose in R”) 0 ✰ ❀ ☛✿✛ ✰ ❢☛❣ ✭✛ ✰ ✛✵✮ ✰ r ❬ r✵ if ✛ ✰ r and ✛✵ ✰ r✵ ✭✛ ✟ ✛✵✮ ✰ r if either ✛ ✰ r or ✛✵ ✰ r

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 9/20

slide-27
SLIDE 27
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

The contract of a process describes

1 WHICH actions the process offers

(✛

✼ ✦: “✛ can emit ☛”) ☛✿✛

✼ ✦ ✛ ✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✰ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✰ ✛2

✼ ✦ ✛✵

1

✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✟ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✟ ✛2

✼ ✦ ✛✵

1

2 HOW actions are offered

(✛ ✰ R: “✛ can offer to choose in R”) 0 ✰ ❀ ☛✿✛ ✰ ❢☛❣ ✭✛ ✰ ✛✵✮ ✰ r ❬ r✵ if ✛ ✰ r and ✛✵ ✰ r✵ ✭✛ ✟ ✛✵✮ ✰ r if either ✛ ✰ r or ✛✵ ✰ r

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 9/20

slide-28
SLIDE 28
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

The contract of a process describes

1 WHICH actions the process offers

(✛

✼ ✦: “✛ can emit ☛”) ☛✿✛

✼ ✦ ✛ ✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✰ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✰ ✛2

✼ ✦ ✛✵

1

✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✟ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✟ ✛2

✼ ✦ ✛✵

1

2 HOW actions are offered

(✛ ✰ R: “✛ can offer to choose in R”) 0 ✰ ❀ ☛✿✛ ✰ ❢☛❣ ✭✛ ✰ ✛✵✮ ✰ r ❬ r✵ if ✛ ✰ r and ✛✵ ✰ r✵ ✭✛ ✟ ✛✵✮ ✰ r if either ✛ ✰ r or ✛✵ ✰ r

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 9/20

slide-29
SLIDE 29
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

The contract of a process describes

1 WHICH actions the process offers

(✛

✼ ✦: “✛ can emit ☛”) ☛✿✛

✼ ✦ ✛ ✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✰ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✰ ✛2

✼ ✦ ✛✵

1

✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✟ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✟ ✛2

✼ ✦ ✛✵

1

2 HOW actions are offered

(✛ ✰ R: “✛ can offer to choose in R”) 0 ✰ ❀ ☛✿✛ ✰ ❢☛❣ ✭✛ ✰ ✛✵✮ ✰ r ❬ r✵ if ✛ ✰ r and ✛✵ ✰ r✵ ✭✛ ✟ ✛✵✮ ✰ r if either ✛ ✰ r or ✛✵ ✰ r

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 9/20

slide-30
SLIDE 30
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

The contract of a process describes

1 WHICH actions the process offers

(✛

✼ ✦: “✛ can emit ☛”) ☛✿✛

✼ ✦ ✛ ✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✰ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✰ ✛2

✼ ✦ ✛✵

1

✛1

✼ ✦ ✛✵

1

✛2

✼ ✦ ✛✵

2

✛1 ✟ ✛2

✼ ✦ ✛✵

1 ✟ ✛✵ 2

✛1

✼ ✦ ✛✵

1

✛2 ✻ ☛ ✼ ✦ ✛1 ✟ ✛2

✼ ✦ ✛✵

1

2 HOW actions are offered

(✛ ✰ R: “✛ can offer to choose in R”) 0 ✰ ❀ ☛✿✛ ✰ ❢☛❣ ✭✛ ✰ ✛✵✮ ✰ r ❬ r✵ if ✛ ✰ r and ✛✵ ✰ r✵ ✭✛ ✟ ✛✵✮ ✰ r if either ✛ ✰ r or ✛✵ ✰ r

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 9/20

slide-31
SLIDE 31
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Semantics

For instance a ✟ b

a

✼ ✦ 0 a ✰ b

a

✼ ✦ 0 a ✟ b

b

✼ ✦ 0 a ✰ b

b

✼ ✦ 0 but a ✟ b ✰ ❢a❣ a ✟ b ✰ ❢b❣ a ✰ b ✰ ❢a❀ b❣

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 10/20

slide-32
SLIDE 32
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating clients and services: compliance

A client ✚ complies with a service ✛ (✚ ❛ ❛ ❛ ✛) if it successfully achieves every possible interaction with the service a✿✌ ✰ b✿✌ ❛ ❛ ❛ a ✟ b a✿✌ ✰ b✿✌ ❛ ❛ ❛ a a✿✌ ✟ b✿✌ ❛ ❛ ❛ a✿c ✰ b✿d

  • a✿✌ ✟ b✿✌

✻❛ ❛ ❛ a ✟ b (✌ indicates client’s satisfaction).

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 11/20

slide-33
SLIDE 33
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating clients and services: compliance

A client ✚ complies with a service ✛ (✚ ❛ ❛ ❛ ✛) if it successfully achieves every possible interaction with the service a✿✌ ✰ b✿✌ ❛ ❛ ❛ a ✟ b a✿✌ ✰ b✿✌ ❛ ❛ ❛ a a✿✌ ✟ b✿✌ ❛ ❛ ❛ a✿c ✰ b✿d

  • a✿✌ ✟ b✿✌

✻❛ ❛ ❛ a ✟ b (✌ indicates client’s satisfaction).

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 11/20

slide-34
SLIDE 34
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating clients and services: compliance

A client ✚ complies with a service ✛ (✚ ❛ ❛ ❛ ✛) if it successfully achieves every possible interaction with the service a✿✌ ✰ b✿✌ ❛ ❛ ❛ a ✟ b a✿✌ ✰ b✿✌ ❛ ❛ ❛ a a✿✌ ✟ b✿✌ ❛ ❛ ❛ a✿c ✰ b✿d

  • a✿✌ ✟ b✿✌

✻❛ ❛ ❛ a ✟ b (✌ indicates client’s satisfaction). Formally ✚ ❛ ❛ ❛ ✛ iff

1 ✚ ✰ r, ✛ ✰ s, and r ❭ s ❂ ∅ imply ✌ ✷ r 2 ✚

✼ ✦ ✚✵ and ✛

✼ ✦ ✛✵ imply ✚✵ ❛ ❛ ❛ ✛✵

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 11/20

slide-35
SLIDE 35
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-36
SLIDE 36
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-37
SLIDE 37
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-38
SLIDE 38
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-39
SLIDE 39
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-40
SLIDE 40
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-41
SLIDE 41
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension]

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-42
SLIDE 42
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Relating different services: subcontract

Intuition A client that works with a server ✛ will also work with a server ✜ that “does more”: ✛ ✖ ✜

1 Is more deterministic:

a ✟ b✿c ✖ a

InvalidLogin ✟ ValidLogin ✖ ValidLogin

2 Offers more choices:

a ✖ a ✰ b✿d

Logout✰Purchase ✖ Logout✰Purchase✰SaveForLater [width extension]

3 Offers longer interaction patterns:

a ✖ a✿b✿d

Purchase✿Accepted ✖ Purchase✿Accepted✿Invoice

[depth extension] Is “✖” an (inverse) subtyping relation? Apparent mismatch in

1 and 2 Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 12/20

slide-43
SLIDE 43
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Compliance and Subcontract mismatch

Note: a ✟ b✿c

1

✖ a

2

✖ a ✰ b✿d but for a client a✿✌ ✰ b✿c✿✌: a✿✌ ✰ b✿c✿✌ ❛ ❛ ❛ a ✟ b✿c a✿✌ ✰ b✿c✿✌ ✻❛ ❛ ❛ a ✰ b✿d Can we replace a server a ✟ b✿c for a a ✰ b✿d one (i.e. a ✟ b✿c :> a ✰ b✿d)? YES if “:>” uses explicit coercions (rather than implicit ones) Filter-out foreign actions (e.g. b and d for

2 ) Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 13/20

slide-44
SLIDE 44
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Compliance and Subcontract mismatch

Note: a ✟ b✿c

1

✖ a

2

✖ a ✰ b✿d but for a client a✿✌ ✰ b✿c✿✌: a✿✌ ✰ b✿c✿✌ ❛ ❛ ❛ a ✟ b✿c a✿✌ ✰ b✿c✿✌ ✻❛ ❛ ❛ a ✰ b✿d Can we replace a server a ✟ b✿c for a a ✰ b✿d one (i.e. a ✟ b✿c :> a ✰ b✿d)? YES if “:>” uses explicit coercions (rather than implicit ones) Filter-out foreign actions (e.g. b and d for

2 ) Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 13/20

slide-45
SLIDE 45
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Compliance and Subcontract mismatch

Note: a ✟ b✿c

1

✖ a

2

✖ a ✰ b✿d but for a client a✿✌ ✰ b✿c✿✌: a✿✌ ✰ b✿c✿✌ ❛ ❛ ❛ a ✟ b✿c a✿✌ ✰ b✿c✿✌ ✻❛ ❛ ❛ a ✰ b✿d Can we replace a server a ✟ b✿c for a a ✰ b✿d one (i.e. a ✟ b✿c :> a ✰ b✿d)? YES if “:>” uses explicit coercions (rather than implicit ones) Filter-out foreign actions (e.g. b and d for

2 ) Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 13/20

slide-46
SLIDE 46
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Compliance and Subcontract mismatch

Note: a ✟ b✿c

1

✖ a

2

✖ a ✰ b✿d but for a client a✿✌ ✰ b✿c✿✌: a✿✌ ✰ b✿c✿✌ ❛ ❛ ❛ a ✟ b✿c a✿✌ ✰ b✿c✿✌ ✻❛ ❛ ❛ a ✰ b✿d Can we replace a server a ✟ b✿c for a a ✰ b✿d one (i.e. a ✟ b✿c :> a ✰ b✿d)? YES if “:>” uses explicit coercions (rather than implicit ones) Filter-out foreign actions (e.g. b and d for

2 ) Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 13/20

slide-47
SLIDE 47
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Compliance and Subcontract mismatch

Note: a ✟ b✿c

1

✖ a

2

✖ a ✰ b✿d but for a client a✿✌ ✰ b✿c✿✌: a✿✌ ✰ b✿c✿✌ ❛ ❛ ❛ a ✟ b✿c a✿✌ ✰ b✿c✿✌ ✻❛ ❛ ❛ a ✰ b✿d Can we replace a server a ✟ b✿c for a a ✰ b✿d one (i.e. a ✟ b✿c :> a ✰ b✿d)? YES if “:>” uses explicit coercions (rather than implicit ones) Filter-out foreign actions (e.g. b and d for

2 ) Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 13/20

slide-48
SLIDE 48
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Gluing compliance and subcontracting: Filters

filters f ✿✿❂

☛✷a

☛✿f☛ Transition relation of filters

☛✷a

☛✿f☛

✼ ✦ f☞ if ☞ ✷ a Contract coercion through a filter f ✭0✮ ❂ f ✭☛✿✛✮ ❂ if f ✻ ☛ ✼ ✦ f ✭☛✿✛✮ ❂ ☛✿f ✵✭✛✮ if f

✼ ✦ f ✵ f ✭✛1 ✰ ✛2✮ ❂ f ✭✛1✮ ✰ f ✭✛2✮ f ✭✛1 ✟ ✛2✮ ❂ f ✭✛1✮ ✟ f ✭✛2✮ Property ✛ ✖ ✜ ❫ ✚ ❛ ❛ ❛ ✛ ✭ ✮ ✚ ❛ ❛ ❛ f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 14/20

slide-49
SLIDE 49
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Gluing compliance and subcontracting: Filters

filters f ✿✿❂

☛✷a

☛✿f☛ Transition relation of filters

☛✷a

☛✿f☛

✼ ✦ f☞ if ☞ ✷ a Contract coercion through a filter f ✭0✮ ❂ f ✭☛✿✛✮ ❂ if f ✻ ☛ ✼ ✦ f ✭☛✿✛✮ ❂ ☛✿f ✵✭✛✮ if f

✼ ✦ f ✵ f ✭✛1 ✰ ✛2✮ ❂ f ✭✛1✮ ✰ f ✭✛2✮ f ✭✛1 ✟ ✛2✮ ❂ f ✭✛1✮ ✟ f ✭✛2✮ Property ✛ ✖ ✜ ❫ ✚ ❛ ❛ ❛ ✛ ✭ ✮ ✚ ❛ ❛ ❛ f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 14/20

slide-50
SLIDE 50
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Gluing compliance and subcontracting: Filters

filters f ✿✿❂

☛✷a

☛✿f☛ Transition relation of filters

☛✷a

☛✿f☛

✼ ✦ f☞ if ☞ ✷ a Contract coercion through a filter f ✭0✮ ❂ f ✭☛✿✛✮ ❂ if f ✻ ☛ ✼ ✦ f ✭☛✿✛✮ ❂ ☛✿f ✵✭✛✮ if f

✼ ✦ f ✵ f ✭✛1 ✰ ✛2✮ ❂ f ✭✛1✮ ✰ f ✭✛2✮ f ✭✛1 ✟ ✛2✮ ❂ f ✭✛1✮ ✟ f ✭✛2✮ Property ✛ ✖ ✜ ❫ ✚ ❛ ❛ ❛ ✛ ✭ ✮ ✚ ❛ ❛ ❛ f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 14/20

slide-51
SLIDE 51
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Gluing compliance and subcontracting: Filters

filters f ✿✿❂

☛✷a

☛✿f☛ Transition relation of filters

☛✷a

☛✿f☛

✼ ✦ f☞ if ☞ ✷ a Contract coercion through a filter f ✭0✮ ❂ f ✭☛✿✛✮ ❂ if f ✻ ☛ ✼ ✦ f ✭☛✿✛✮ ❂ ☛✿f ✵✭✛✮ if f

✼ ✦ f ✵ f ✭✛1 ✰ ✛2✮ ❂ f ✭✛1✮ ✰ f ✭✛2✮ f ✭✛1 ✟ ✛2✮ ❂ f ✭✛1✮ ✟ f ✭✛2✮ Property ✛ ✖ ✜ ❫ ✚ ❛ ❛ ❛ ✛ ✭ ✮ ✚ ❛ ❛ ❛ f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 14/20

slide-52
SLIDE 52
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-53
SLIDE 53
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-54
SLIDE 54
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-55
SLIDE 55
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-56
SLIDE 56
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-57
SLIDE 57
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-58
SLIDE 58
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Results

Filters are “proofs” of subcontracting f ✿ ✛ ✖ ✜ deduction system for subcontracting: f ✿ ✛ ✖ ✜, algebraic theory for filters existence and effectiveness of a most general filter

(via cut-elimination, yields subcontracting coherence)

subcontracting decidability Compliance characterises must testing ✛ ✈must ✜ ✭ ✮ ✚ ❛ ❛ ❛ ✛ implies ✚ ❛ ❛ ❛ ✜ Corollary ✛ ✖ ✜ ✭ ✮ ✚ ✈must f ✭✜✮ for some filter f

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 15/20

slide-59
SLIDE 59
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to languages

Our contracts work for any language as long as they come equipped with:

1 An LTS

P

  • ✦ P✵

✖ is either a visible action or an invisible τ action

2 A type system

❵ P ✿ ✛

✛ is a contract

3 The latter abstracts the former: 1

If ❵ P ✿ ✛ and ✛

✼ ✦, then P

2

If ❵ P ✿ ✛ and P

  • ✦ P✵ then ❵ P✵ ✿ ✛✵ and

✎ if ✖ ❂ τ, then ✛ ✈must ✛✵ ✎ if ✖ ❂ ☛, then ✛

✼ ✦✈must ✛✵ ✈must measures non-determinism

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 16/20

slide-60
SLIDE 60
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to languages

Our contracts work for any language as long as they come equipped with:

1 An LTS

P

  • ✦ P✵

✖ is either a visible action or an invisible τ action

2 A type system

❵ P ✿ ✛

✛ is a contract

3 The latter abstracts the former: 1

If ❵ P ✿ ✛ and ✛

✼ ✦, then P

2

If ❵ P ✿ ✛ and P

  • ✦ P✵ then ❵ P✵ ✿ ✛✵ and

✎ if ✖ ❂ τ, then ✛ ✈must ✛✵ ✎ if ✖ ❂ ☛, then ✛

✼ ✦✈must ✛✵ ✈must measures non-determinism

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 16/20

slide-61
SLIDE 61
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to languages

Our contracts work for any language as long as they come equipped with:

1 An LTS

P

  • ✦ P✵

✖ is either a visible action or an invisible τ action

2 A type system

❵ P ✿ ✛

✛ is a contract

3 The latter abstracts the former: 1

If ❵ P ✿ ✛ and ✛

✼ ✦, then P

2

If ❵ P ✿ ✛ and P

  • ✦ P✵ then ❵ P✵ ✿ ✛✵ and

✎ if ✖ ❂ τ, then ✛ ✈must ✛✵ ✎ if ✖ ❂ ☛, then ✛

✼ ✦✈must ✛✵ ✈must measures non-determinism

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 16/20

slide-62
SLIDE 62
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to languages

Our contracts work for any language as long as they come equipped with:

1 An LTS

P

  • ✦ P✵

✖ is either a visible action or an invisible τ action

2 A type system

❵ P ✿ ✛

✛ is a contract

3 The latter abstracts the former: 1

If ❵ P ✿ ✛ and ✛

✼ ✦, then P

2

If ❵ P ✿ ✛ and P

  • ✦ P✵ then ❵ P✵ ✿ ✛✵ and

✎ if ✖ ❂ τ, then ✛ ✈must ✛✵ ✎ if ✖ ❂ ☛, then ✛

✼ ✦✈must ✛✵ ✈must measures non-determinism

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 16/20

slide-63
SLIDE 63
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process compliance

By the LTS we define sessions and compliance for processes If P

  • ✦ P✵ and Q

  • ✦ Q✵ then P ❦ Q

✦ P✵ ❦ Q✵

(plus τ-moves)

Client P complies with server Q (noted P ❛ ❛ ❛ Q) if ✎ if P

  • ✦, then ✖ ❂ ✌ or

✎ P ❦ Q ✦ P✵ ❦ Q✵ and P✵ ❛ ❛ ❛ Q✵ Theorem (Process compliance) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and ✚ ❛ ❛ ❛ ✛, then P ❛ ❛ ❛ Q

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 17/20

slide-64
SLIDE 64
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process compliance

By the LTS we define sessions and compliance for processes If P

  • ✦ P✵ and Q

  • ✦ Q✵ then P ❦ Q

✦ P✵ ❦ Q✵

(plus τ-moves)

Client P complies with server Q (noted P ❛ ❛ ❛ Q) if ✎ if P

  • ✦, then ✖ ❂ ✌ or

✎ P ❦ Q ✦ P✵ ❦ Q✵ and P✵ ❛ ❛ ❛ Q✵ Theorem (Process compliance) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and ✚ ❛ ❛ ❛ ✛, then P ❛ ❛ ❛ Q

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 17/20

slide-65
SLIDE 65
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process compliance

By the LTS we define sessions and compliance for processes If P

  • ✦ P✵ and Q

  • ✦ Q✵ then P ❦ Q

✦ P✵ ❦ Q✵

(plus τ-moves)

Client P complies with server Q (noted P ❛ ❛ ❛ Q) if ✎ if P

  • ✦, then ✖ ❂ ✌ or

✎ P ❦ Q ✦ P✵ ❦ Q✵ and P✵ ❛ ❛ ❛ Q✵ Theorem (Process compliance) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and ✚ ❛ ❛ ❛ ✛, then P ❛ ❛ ❛ Q

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 17/20

slide-66
SLIDE 66
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process Filtering

Add filters to the language: f ❬P❪ Transition rules for filters

(Filter1)

P

  • ✦ P✵

f

✼ ✦ f ✵ f ❬P❪

  • ✦ f ✵❬P✵❪

(Filter2)

P

τ

  • ✦ P✵

f ❬P❪

τ

  • ✦ f ❬P✵❪

Typing rules for filters

(T-Filter)

❵ P ✿ ✛ ❵ f ❬P❪ ✿ f ✭✛✮ “Subject reduction” still holds Theorem (Process filtering) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and f ✿ ✚ ✖ ✛, then P ❛ ❛ ❛ f ❬Q❪

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 18/20

slide-67
SLIDE 67
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process Filtering

Add filters to the language: f ❬P❪ Transition rules for filters

(Filter1)

P

  • ✦ P✵

f

✼ ✦ f ✵ f ❬P❪

  • ✦ f ✵❬P✵❪

(Filter2)

P

τ

  • ✦ P✵

f ❬P❪

τ

  • ✦ f ❬P✵❪

Typing rules for filters

(T-Filter)

❵ P ✿ ✛ ❵ f ❬P❪ ✿ f ✭✛✮ “Subject reduction” still holds Theorem (Process filtering) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and f ✿ ✚ ✖ ✛, then P ❛ ❛ ❛ f ❬Q❪

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 18/20

slide-68
SLIDE 68
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process Filtering

Add filters to the language: f ❬P❪ Transition rules for filters

(Filter1)

P

  • ✦ P✵

f

✼ ✦ f ✵ f ❬P❪

  • ✦ f ✵❬P✵❪

(Filter2)

P

τ

  • ✦ P✵

f ❬P❪

τ

  • ✦ f ❬P✵❪

Typing rules for filters

(T-Filter)

❵ P ✿ ✛ ❵ f ❬P❪ ✿ f ✭✛✮ “Subject reduction” still holds Theorem (Process filtering) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and f ✿ ✚ ✖ ✛, then P ❛ ❛ ❛ f ❬Q❪

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 18/20

slide-69
SLIDE 69
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Process Filtering

Add filters to the language: f ❬P❪ Transition rules for filters

(Filter1)

P

  • ✦ P✵

f

✼ ✦ f ✵ f ❬P❪

  • ✦ f ✵❬P✵❪

(Filter2)

P

τ

  • ✦ P✵

f ❬P❪

τ

  • ✦ f ❬P✵❪

Typing rules for filters

(T-Filter)

❵ P ✿ ✛ ❵ f ❬P❪ ✿ f ✭✛✮ “Subject reduction” still holds Theorem (Process filtering) If ❵ P ✿ ✚ and ❵ Q ✿ ✛ and f ✿ ✚ ✖ ✛, then P ❛ ❛ ❛ f ❬Q❪

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 18/20

slide-70
SLIDE 70
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-71
SLIDE 71
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-72
SLIDE 72
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-73
SLIDE 73
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-74
SLIDE 74
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-75
SLIDE 75
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-76
SLIDE 76
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-77
SLIDE 77
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Application to service discovery

Search for services compliant with a client ✚: discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ ✚ ❛ ❛ ❛ f ✭✛✮❣ Call one of the services in the result by using the associated filter. More efficient using subcontracts and caching

1 Compute ✚❄ the “canonical server” of ✚ 2 Return all compatible servers:

discover✭✚✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛❣ (cached) Finer-grained searches Define some minimal behaviour that must not be filtered out: discover✭✚❀ g✮ ❂ ❢✭✛❀ f ✮ ❥ f ✿ ✚❄ ✖ ✛ ❫ g ✔ f ❣ E.g.: provide at least Login✿ValidLogin✿Query✿Catalog✿Purchase✿Accepted so as to avoid, say, Login✿InvalidLogin.

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 19/20

slide-78
SLIDE 78
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-79
SLIDE 79
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-80
SLIDE 80
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-81
SLIDE 81
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-82
SLIDE 82
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-83
SLIDE 83
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-84
SLIDE 84
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-85
SLIDE 85
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-86
SLIDE 86
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-87
SLIDE 87
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-88
SLIDE 88
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20

slide-89
SLIDE 89
  • 1. Introduction – 2. Contracts – 3. Compliance – 4. Subcontracting – 5. Filters – 6. Languages – 7. Conclusion

FLACOS ’07

Conclusion

The approach reconciles two desiderata:

upgrade services by more operations (width subtyping), longer interaction patterns (depth subtyping) and/or more deterministic ones; upgrade transparency for old clients

Technical device: filters Filters as explicit coercions between contracts and as proofs for subcontracting. Algorithmic counterpart obtained via cut-elimination. Theory independent from the language(s) used to implement clients and services. Applications: specification and discovery of services. Future work

Recursion Messages and higher order channels Integration with session types Choreography

Full details in a forthcoming POPL 2008 paper

Castagna, Gesbert, and Padovani A Theory of Contracts for Web Services 20/20