18
The Frame Problem in Web Service Specifications George Baryannis and Dimitris Plexousakis [email protected], [email protected] Computer Science Department University of Crete, Greece PESOS 2009 Workshop Principles of Engineering Service Oriented Systems Work partially supported by S-Cube, the European Network of Excellence in Software, Services & Systems

The Frame Problem in Web Service Specifications

Embed Size (px)

DESCRIPTION

This work explores the frame problem and its effects in devising Web service specifications. The frame problem encompasses the issues raised when trying to concisely state in a specification that nothing changes except when explicitly mentioned otherwise. A motivating example of a composite service specification is presented and a solution approach is proposed, based on knowledge gained from related research on the frame problem in procedure specifications. The solution is adapted and integrated in existing Semantic Web service frameworks such as OWL-S, WSMO and SWSO. Finally, an algorithm that applies the presented solution in order to transform existing OWL-S service descriptions to ones that don’t suffer from the frame problem is proposed.

Citation preview

Page 1: The Frame Problem in Web Service Specifications

The Frame Problem in Web Service

SpecificationsGeorge Baryannis and Dimitris Plexousakis

[email protected], [email protected]

Computer Science DepartmentUniversity of Crete, Greece

PESOS 2009 WorkshopPrinciples of Engineering Service Oriented Systems

Work partially supported by S-Cube, the European Network of Excellence in Software, Services & Systems

Page 2: The Frame Problem in Web Service Specifications

2

The Frame Problem

• Definition• The Frame Problem in the Service-Oriented Architecture

A Motivating Example

• Atomic Services• Service Composition

Addressing the Frame Problem

• Change Axioms• An algorithm for producing Change Axioms

Conclusions & Future Work

Outline

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 3: The Frame Problem in Web Service Specifications

3

Stating only “what is changed” in a formal specification is inadequate› May lead to inconsistencies› May hinder the ability to prove certain

properties of the specification One should also include clauses which state

explicitly that “nothing else changes”› These clauses are called frame axioms

Stating succinctly these frame axioms has been known in literature as the frame problem

The Frame Problem

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 4: The Frame Problem in Web Service Specifications

4

SOA scenario: an application component in need of a specific service describes this need and tasks a directory service to find matching candidates› Formal descriptions of service functionality

and behavior should be available Without having access to the source code Not limited to interface descriptions

› Describe services in terms of preconditions and postconditions The frame problem may arise when using such

notations

The Frame Problem in the Service-Oriented Architecture

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 5: The Frame Problem in Web Service Specifications

5

Online shop that provides wish list and recommendation functionality› After an order is completed, the purchased

item is removed from the wish list› The item most closely associated to the

purchased one is added to the recommendations list

These functions are offered by two distinct services› Let’s describe them in terms of their

preconditions and postconditions

A Motivating Example (1)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 6: The Frame Problem in Web Service Specifications

6

Wish List ServicePRE1: completed(order, item)

included(buyersWishList, item)POST1: ¬included(buyersWishList, item)

x, y [x ≠ buyersWishList y ≠ item included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)]

Recommendations List ServicePRE2: completed(order, item)

¬ included(buyersRecoms, associatedItem)POST2: included(buyersRecoms, associatedItem)

x, y [x ≠ buyersRecoms y ≠ associatedItem included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)]

A Motivating Example (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 7: The Frame Problem in Web Service Specifications

7

Both services need to be run after the successful completion of an order› They can be executed in parallel

› Let’s describe the composite service in terms of its preconditions and postconditions

A Motivating Example: Service Composition (1)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Wish List Service

Recoms List

Service

PRE1 PRE2 POST1 POST2

Page 8: The Frame Problem in Web Service Specifications

8

Composite ServicePRE1: completed(order, item)

included(buyersWishList, item)PRE2: completed(order, item)

¬ included(buyersRecoms, associatedItem)

A Motivating Example: Service Composition (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 9: The Frame Problem in Web Service Specifications

9

Composite ServicePRE: completed(order, item) included(buyersWishList, item)

¬ included(buyersRecoms, associatedItem)

A Motivating Example: Service Composition (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 10: The Frame Problem in Web Service Specifications

10

Composite ServicePRE: completed(order, item) included(buyersWishList, item)

¬ included(buyersRecoms, associatedItem)

POST1: ¬included(buyersWishList, item)

x, y [x ≠ buyersWishList y ≠ item included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)] POST2: included(buyersRecoms, associatedItem)

x, y [x ≠ buyersRecoms y ≠ associatedItem included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)]

A Motivating Example: Service Composition (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 11: The Frame Problem in Web Service Specifications

11

Composite ServicePRE: completed(order, item) included(buyersWishList, item)

¬ included(buyersRecoms, associatedItem)

POST: ¬included(buyersWishList, item) included(buyersRecoms, associatedItem) x, y [x ≠ buyersWishList y ≠ item included(x, y) ≡ included(x, y)] x, y [x ≠ buyersRecoms y ≠ associatedItem included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)]

A Motivating Example: Service Composition (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 12: The Frame Problem in Web Service Specifications

12

Several solutions have been proposed in the AI literature› Linear deductive planning› Situation calculus and successor state axioms› Explanation closure axioms or change axioms

The change axioms approach is based on first-order predicate logic› Can be adapted in order to work on Semantic

Web Service frameworks such as OWL-S, WSMO and SWSO

Addressing The Frame Problem

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 13: The Frame Problem in Web Service Specifications

13

Frame Axioms: Procedure-oriented perspective› State what predicates each procedure (service)

does not change Change Axioms: State-oriented perspective

› State which procedures (services) change each predicate

› Extend first-order predicate logic with: Special predicate Occur, of arity 1 and special

variable α Occur(α) is true iff the service denoted by variable

a has executed successfully

Expressing Change Axioms (1)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 14: The Frame Problem in Web Service Specifications

14

Let’s revisit the example

Composite ServicePRE: completed(order, item) included(buyersWishList, item)

¬ included(buyersRecoms, associatedItem)

POST: ¬included(buyersWishList, item) included(buyersRecoms, associatedItem) x, y [x ≠ buyersWishList y ≠ item included(x, y) ≡ included(x, y)] x, y [x ≠ buyersRecoms y ≠ associatedItem included(x, y) ≡ included(x, y)] x, y [completed(x, y) ≡ completed(x, y)]

Expressing Change Axioms (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 15: The Frame Problem in Web Service Specifications

15

Let’s revisit the example

Composite ServicePRE: completed(order, item) included(buyersWishList, item)

¬ included(buyersRecoms, associatedItem)

CHANGE: α x, item [included (x, item) ¬ included( x, item) Occur(α)] α = updWishList α = updRecList α order, item [completed(order, item)

¬completed(order, item) Occur(α)] false

Expressing Change Axioms (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 16: The Frame Problem in Web Service Specifications

16

An Algorithm for producing Change Axioms (1)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Create a list of

participating services

Already checked

?

Predicate used in a

precondition too?

Associated change axiom

already exists?

Negation in either the pre

or the postcondition

(but not in both)?

Create a list of

postconditions

Get next service

Get next postcondition

Yes

No

Negation in either the pre

or the postcondition

(but not in both)?

List End

?

List End

?

No

No

Yes

Yes

No

Yes

No

Yes

No Modify existing change axiom

(add disjunction)

Insert change axiom with

Occur in consequent

Yes

Insert change axiom with

false in consequent

No

Create a list of

preconditions

Already checked

?

Associated change axiom

already exists?

Get next postcondition

List End

?

Insert change axiom with

false in consequent

No

No

No

Yes

YesYes

END

Yes

Page 17: The Frame Problem in Web Service Specifications

17

The algorithm has been implemented in Java, for the case of OWL-S process model descriptions with SWRL-FOL rules› OWL-S process model files are read using the CMU

OWL-S API (http://www.semwebcentral.org/projects/owl-s-api/)

› Change axioms are added according to the algorithm

› The system also checks for postconditions that are redundant after the addition of change axioms, and removes them

› The modified model is exported as an OWL-S process model file

An Algorithm for producing Change Axioms (2)

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis

Page 18: The Frame Problem in Web Service Specifications

18

The frame problem can apparently cause issues when devising complete Web service specifications

The problem can be addressed using the approach of change axioms Change axioms can be used to provide complete descriptions for

atomic and composite services containing all major composition schemas

An algorithm for the automatic production of change axioms was presented

Future work includes › detecting service compositions which contain conflicts, either in

preconditions or postconditions (including change axioms)› adapting the implementation in order to support WSMO and SWSO

specifications› using the implementation as part of an automatic composition framework,

allowing it to take into account the frame problem when attempting to compose Web services

› Taking indirect effects into account (ramification problem)

Conclusions & Future Work

The Frame Problem in Web Service SpecificationsGeorge Baryannis and Dimitris Plexousakis