FRANCISCO J. GALAN AND AHMED RIVERAS UNIVERSITY OF SEVILLE SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT PROLE 2013 (MADRID)

Slides:



Advertisements
Similar presentations
Technologies for finding errors in object-oriented software K. Rustan M. Leino Microsoft Research, Redmond, WA Lecture 1 Summer school on Formal Models.
Advertisements

Automated Theorem Proving Lecture 1. Program verification is undecidable! Given program P and specification S, does P satisfy S?
Auto-Generation of Test Cases for Infinite States Reactive Systems Based on Symbolic Execution and Formula Rewriting Donghuo Chen School of Computer Science.
Design by Contract.
An Abstract Interpretation Framework for Refactoring P. Cousot, NYU, ENS, CNRS, INRIA R. Cousot, ENS, CNRS, INRIA F. Logozzo, M. Barnett, Microsoft Research.
Semantics Static semantics Dynamic semantics attribute grammars
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Logic.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
ISBN Chapter 3 Describing Syntax and Semantics.
1 Discrete Structures Lecture 29 Predicates and Programming Read Ch
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Announcements We are done with homeworks Second coding exam this week, in recitation –Times will be posted later today –If in doubt, show up for your regular.
Formal Methods of Systems Specification Logical Specification of Hard- and Software Prof. Dr. Holger Schlingloff Institut für Informatik der.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
Copyright W. Howden1 Lecture 13: Programming by Contract.
Axiomatic Semantics Dr. M Al-Mulhem ICS
The WSMO / L / X Approach Michael Stollberg DERI – Digital Enterprise Research Institute Alternative Frameworks for Semantics in Web Services: Possibilities.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Semantic Matching Pavel Shvaiko Stanford University, October 31, 2003 Paper with Fausto Giunchiglia Research group (alphabetically ordered): Fausto Giunchiglia,
A Logic for Decidable Reasoning about Services Yilan Gu Dept. of Computer Science University of Toronto Mikhail Soutchanski Dept. of Computer Science Ryerson.
Logic Specification and Z Schema 3K04 McMaster. Basic Logic Operators Logical negation ( ¬ ) Logical conjunction ( Λ or & ) Logical disjunction ( V or.
1 Abstraction  Identify important aspects and ignore the details  Permeates software development programming languages are abstractions built on hardware.
1 Automatic Refinement and Vacuity Detection for Symbolic Trajectory Evaluation Orna Grumberg Technion Haifa, Israel Joint work with Rachel Tzoref.
SWE 619 © Paul Ammann Procedural Abstraction and Design by Contract Paul Ammann Information & Software Engineering SWE 619 Software Construction cs.gmu.edu/~pammann/
Chapter 25 Formal Methods Formal methods Specify program using math Develop program using math Prove program matches specification using.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
The Bernays-Schönfinkel Fragment of First-Order Autoepistemic Logic Peter Baumgartner MPI Informatik, Saarbrücken.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Universität Innsbruck Leopold Franzens  Copyright 2007 DERI Innsbruck Technical Task Fair December 2007 SWS Composition The SUPER Approach.
Key Concepts Representation Inference Semantics Discourse Pragmatics Computation.
Theory and Applications
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
1 / 48 Formal a Language Theory and Describing Semantics Principles of Programming Languages 4.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Reasoning about the Behavior of Semantic Web Services with Concurrent Transaction Logic Presented By Dumitru Roman, Michael Kifer University of Innsbruk,
2/1/20161 Computer Security Foundational Results.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
1/20 Arrays Changki PSWLAB Arrays Daniel Kroening and Ofer Strichman Decision Procedure.
C HAPTER 3 Describing Syntax and Semantics. D YNAMIC S EMANTICS Describing syntax is relatively simple There is no single widely acceptable notation or.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Interpreting the Object Constraint Presented by: Ed Kausmeyer.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Model Checking Early Requirements Specifications in Tropos Presented by Chin-Yi Tsai.
Counterexample-Guided Abstraction Refinement By Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith Presented by Yunho Kim Provable Software.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Principles of Programming & Software Engineering
Formal methods: Lecture
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Logics for Data and Knowledge Representation
Programming Languages 2nd edition Tucker and Noonan
George Baryannis and Dimitris Plexousakis
Logics for Data and Knowledge Representation
Symbolic Characterization of Heap Abstractions
Programming Languages 2nd edition Tucker and Noonan
COP4020 Programming Languages
Presentation transcript:

FRANCISCO J. GALAN AND AHMED RIVERAS UNIVERSITY OF SEVILLE SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT PROLE 2013 (MADRID)

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONTENT 1. Purpose 2. Conceptualization 3. Formalization 4. Service matchmaking 5. Conclusions

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT PURPOSE To formalize a class of semantic web services (SWS) based on the concept of executional entailment. The formalization (1) integrates functional and procedural aspects, (2) facilitates the dynamic integration of SWSs with databases and (3) solves the problem of service matchmaking in an effective way.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION State = set of properties which are true in the system under consideration. Data invariant = set of constraints which must satisfy any possible state in the life of a system. Canonical state = prototypical state.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION Service request = outputs or effects a web client want to achieve by executing a hypothetical service. Semantic web service (SWS) = specification of a service by a set of possible sequences of states. Canonical execution = prototypical execution of a semantic web service.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION It is important to remark: By state, we mean an abstraction of a (real) state in the execution of a service. By execution of a SWS, we mean an abstraction of a (real) execution of a service. The execution of a SWS ≠ choreography (i.e. interaction with the client in order to consume the service). The execution of a SWS ≠ orchestration (i.e. interaction with other sevices in order to implement the functionality of the service).

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES Service request (generic) : //Buy a product in stock with delivery before invoicing Service request : buy(p,c) { Pre : product p is in stock } { Int 1 : product p is delivered to customer c } { Post : product p is delivered to customer c and an invoice is issued } Service requests (concrete): // Someone want to buy a PC with delivery before invoicing = buy(PC,c) // JN want to buy a PC with delivery before invoicing = buy(PC,JN)

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES Semantic web service: //Sell a product in stock to a customer with delivery before invoicing Service : sell(p,c) { Pre : product p is in stock } { Transaction : add customer c, deliver product p to customer c, issue an invoice and consider p as a sold product { Post : product p is sold to customer c, p is delivered to c and an invoice is issued to formalize the selling of p to c}

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES Data invariant: // For every sold product must exist a customer, a delivery and an invoice. // Every product which has been delivered to a customer can not be in // stock. // Customers and products are disjoint sets of individuals. // …

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES State : PC is a product in stock (PC is a concrete individual). Canonical State : p is a product in stock (p is a protoypical individual).

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES Execution : state 1 : PC is a product in stock,TV is a product, RB is a customer. state 2 : PC is a product in stock, TV is a product, JN is a customer, RB is a customer. state 3 : PC is delivered to JN, TV is a product, RB is a customer. state 4 : product PC is delivered to JN, an invoice is issued to JN in order to formalize the selling of PC, TV is a product, RB is a customer.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCEPTUALIZATION. EXAMPLES Canonical execution : state 1 : p is a product in stock. state 2 : p is a product in stock, c is a customer. state 3 : p is a product in stock, c is a customer, p is delivered to c. state 4 : p is a product in stock, c is a customer, p is delivered to c, an invoice is issued in order to formalize the selling of p to c.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM state : a set of ground atoms. e.g. state = { product(PC), stock(PC) } canonical state : a set of atoms with labelled nulls, e.g. state = { product(p), stock(p) } being p a labelled null (protoypical individual). A formula  Y  (X,Y) where  is a conjunction of atoms can be translated to a canonical state by replacing each variable in  Y  (X,Y) by a labelled null. eg. canonical(  s(supplies(s,p)  product(p)))  { supplies(s,p), product(p)}.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Similarity between canonical state and state: Given a canonical state s 1 and a (concrete) state s 2, we say that s 2 is similar to s 1, s 1   s 2, iff there is a substitution  such that s 1   s 2. e.g.: canonical state: s 1 = { product(p), stock(p) } state: s 2 = { product(PC), stock(PC), product(TV), customer(RB) } s 1   s 2 with  = { p/PC }

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Data invariant : a (finite) set of formulas of the form  X(  (X)   Y  (X,Y)) or  X(  (X)  false) inv 1 : // For every sold product must exist a customer, a delivery and an invoice.  p(product(p)  sold(p)   c(customer(c)  delivery(p,c)  invoice(p,c)) // Every product which is delivered can not be in stock.  p,c(product(p)  delivery(p,c)  stock(p)  false) // Customers and products are disjoint sets of individuals.  p,c(product(p)  delivery(p,c)  stock(p)  false)

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Execution : (finite) sequence of states satisfying an invariant. It is denoted as inv e.g. inv1, being s 1 = { product(PC), stock(PC), product(TV), customer(RB) } s 2 = { product(PC), stock(PC), customer(JN), product(TV), customer(RB) } s 3 = { product(PC), delivery(PC,JN), customer(JN), product(TV), customer(RB) } s 4 = { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC), product(TV), customer(RB) } Notational conventions : inv denotes an execution which starts from state 1. inv denotes an execution which ends in state n.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Canonical execution : execution composed of canonical states only. e.g.: inv1, where state 1 = { product(p), stock(p) } state 2 = { product(p), stock(p), customer(c) } state 3 = {product(p), customer(c), delivery(p,c) } state 4 = {product(p), customer(c), delivery(p,c), invoice(p,c), sold(p) }

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Given a canonical execution e 1 and an execution e 2, we say that e 2 is similar to e 1, e 1   e 2, iff | e 1 |=| e 2 | and there is a substitution  such that, for each s i in e 1 and t i in e 2, s i   t i. E.g. : e 1   e 2 with  ={p/PC,c/JN} and being e 2 : s 1 = {product(PC), stock(PC), product(TV), customer(RB) } s 2 = { product(PC), stock(PC), customer(JN), product(TV), customer(RB) } s 3 = { product(PC), delivery(PC,JN), customer(JN), product(TV), customer(RB) } s 4 = { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC), product(TV), customer(RB) } e 1 : state 1 = { product(p), stock(p) } state 2 = { product(p), stock(p), customer(c) } state 3 = {product(p), customer(c), delivery(p,c) } state 4 = {product(p), customer(c), delivery(p,c), invoice(p,c), sold(p) }

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Transaction: a set of formulas of the form: r(X)  Y(  (X,Y)) where r is a relation symbol and  a formula recursively written from the following elements: (a) primitive consult ( consult ), (b) primitive update ( add, del ), (c) (restricted) paralell conjunction (  ), (d) serial conjunction (  ), (e) (restricted) transaction invocation, (f) (restricted) existential quantification (  ) and (h) negation (  ). e.g. productInStock(p)  consult(product(p)) sell2(p,c)   productInStock(p)   s(consult(provider(s))  (add(provision(p,s))  add(stock(p)))  sell1(p,c))

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM The semantics of a transaction is formalized by executional entailments of form inv |= . inv |= consult(r(C)) iff r(C)  state. inv |= consult(  r(X)) iff there is C such that r(C)  state. r(C)  state 1  inv |= del(r(C)) iff state 2 = state 1 – {r(C)}. r(C)  state  inv |= del(r(C)) r(C)  state 1  inv |= add(r(C)) iff state 2 = state 1  {r(C)}. r(C)  state  inv |= add(r(C))

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM inv |=  1  …   n iff inv |=  1 and inv |=  2  …   n inv |=  1  …   n iff for every serial conjunction of  1,…,  n, , we have that inv |=  and inv |=  inv |= r(C) iff r(X)  Y(  (X,Y)) and inv |=  Y(  (C,Y))

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM inv |=  X(  (X)) iff inv |=  (C) where C satisfies the safeness condition (C is computed by a consult). inv |=  iff inv |  

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Service request: sequence of formulas { Pre } { Int 1 }, …, { Int n } { Post } w here each formula is of the form  Y  (X,Y), being  is a conjunction of atoms. e.g. //Buy a product in stock with delivery before invoincing Service request : buy(p,c) { Pre : product(p)  stock(p)} { Int 1 : product(p)  customer(c)  delivery(p,c)} { Post : product(p)  customer(c)  delivery(p,c)  invoice(p,c)}

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Service request : g { Pre } { Int 1 } … { Int J } { Post } SEM(g) = the canonical execution of g + all executions similar to the canonical one. (the canonical execution of g) state 1 = canonical( Pre), state 2 = canonical( Int 1 ), … state J+1 = canonical( Int J ), state J+2 =canonical( Post )

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Semantic web service: pre/post specification extended with a transaction of the form r   1, …, r   n where precondition and postcondition are formulas of the form  Y(  (X,Y)) and each  i, with i=1..n, is a transactional formula. e.g.: //Sell a product in stock with delivery before invoincing Service : sell1(p,c) { Pre : product(p) and stock(p)} { Transaction : sell1(p,c)  add(customer(c))  (add(delivery(p,c))  del(stock(p)))  (add(invoice(p,c))  del(sold(p))) { Post : product(p)  sold(p)  customer(c)  delivery(p,c)  invoice(p,c)}

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT FORMALISM Service : r { Pre } { Transaction : r   1, …, r   k } { Post } SEM(r) = k canonical executions of r + all executions similar to some canonical execution of r such that inv |=  j, with j=1..k, such that state 1 |= Pre and state n |= Post

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT SERVICE MATCHMAKING It is the mechanism which maps appropriate SWSs to service requests. We propose a matchmaking method based on two phases: (phase 1) prototypical matchmaking and (phase 2) concrete matchmaking. The purpose of the prototypical matchmaking is to select those SWSs which may satisfy the service request. This selection is based on canonical executions. The purpose of the concrete matchmaking is to select those SWSs which can satisfy the service request. This selection is based on (concrete) executions. If every canonical state in a service request is included in an state of the canonical execution of the SWS then we can conclude that the SWS may satisfy the service request.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT PROTOTYPICAL SERVICE MATCHMAKING In order to know which SWSs may satisfy a service request, we propose the construction of a matrix in order to compare the canonical execution of the service request with the canonical execution of the SWS. As we can see, every canonical state in the service request is contaned in some state of the canonical execution of the SWS. Therefore, we can conclude that the SWS may satisfy the service request. sell buy state 1 state 2 state 3 state 4 state 5 state 1  state 2  state 3 

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCRETE SERVICE MATCHMAKING The second phase of the matchmaking focuses on the selection of those SWSs which can satisfy the service request. A SWS can satisfy a service request if it can develop some execution similar to the canonical execution of the service request. Problem : the construction of (concrete) executions are expensive because we have to access to the web for extracting the current state of the system.

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCRETE SERVICE MATCHMAKING We assume that the execution of a SWS does not affect the whole state of the system. Therefore, we propose to access to the web for extracting the affected substate only. To check an invariant is usually an expensive task. A way to palliate this cost is by following a solution inspired by the RETE algorithm. Due to the form of the rules in an invariant, we must only check those rules whose antecedents are satisfied in each state of the execution of the SWS.  X(  (X)   Y  (X,Y)) or  X(  (X)  false)

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCRETE SERVICE MATCHMAKING Suppose that a client want to achieve the service request buy(PC,JN) and the prototypical matchmaking has selected buy(p,c) as a SWS which may satisfy it. We access to the web in order to extract the current state of the system but restricted to the substate affected by the execution of buy(PC,JN). (scenario 1) state 1 = { product(PC), customer(JN), delivery(PC,JN) } The precondition of buy(PC,JN) is { product(PC), stock(PC) } As we can verify, state 1 |  Pre (conclusion: service matchmaking fails )

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCRETE SERVICE MATCHMAKING (scenario 2) state 1 = { product(PC), customer(JN), stock(PC) } The execution of , the transaction in buy, can begin from state 1 because state 1 |= Pre Let be the execution of buy(PC,JN), being state 2 = { product(PC), stock(PC), customer(JN) } state 3 = { product(PC), delivery(PC,JN), customer(JN) } state 4 = { product(PC), delivery(PC,JN), customer(JN), invoice(PC,JN), sold(PC) } As we can verify, |=  and state 4 |= Post (conclusion: service matchmaking is successful )

SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT CONCLUSIONS We have proposed a formalism for specifying and executing semantic web services based on the concept of executional entailment. The formalism has been designed having in mind three main requirements: (1) integration of functional and procedural aspects, (2) dynamic integration of SWSs with databases and (3) effective solution to the problem of service matchmaking.

FRANCISCO J. GALAN AND AHMED RIVERAS UNIVERSITY OF SEVILLE SEMANTIC WEB SERVICES IN A TRANSACTIONAL CONTEXT PROLE 2013 (MADRID)