a summary of our activities about wsi philippe giabbanelli cmpt 894 – spring 2008
TRANSCRIPT
Process Rewrite Systems (week 7)
Visibly Pushdown Languages (week 8)
We will not present any new concept today.
Instead, we will do a summary of what we learnt regarding Web Service Interfaces.
Yellin and Strom (week 10)
WSI in the hierarchy and software contracts (week 9)
1
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
• We presented a hierarchy of formal models for infinite-state concurrent systems called Process Rewrite Systems (by Richard’s Mayr’s).• The idea is that many systems can be seen as a set of states and rules defining the dynamics (i.e. how to go between those states).
• The dynamic of the system is described by a set of rules t1 →a t2.
• A term t can be of four classes:
∙ single process like X
∙ sequential composition like X . Y . Z
∙ parallel composition like X || Y || Z
∙ sequence of arbitrary parallel and sequential compositions like (X . (Y || Z) || W
1
S
P
G
Process Rewrite Systems
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Process Rewrite Systems• Let α, β be classes among {1, S, P, G}. An (α, β) – PRS is a finite set of rules such that for all rewrite rule l →a r, l ≠ ε is in α and r in β.
• Each formal model is categorized by the classes of α β that it allows. A hierarchy can be built upon such categorization.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Process Rewrite Systems
Smallest generalization of PA and Petri Nets
Smallest generalization of PA and PD.
Process algebra without communication
Basic parallel processes.
Context-free processes (or Basic Process Algebra). Transition systems
associated with Greibach Normal Form context-free
grammars.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Process Rewrite Systems• The hierarchy is strict if we use a bisimulation equivalence: there are no two models in the hierarchy that can bisimulate each other.
• The proof that finite-state systems, BPP, BPA, pushdown systems, PA and Petri nets are different with respect to bisimulation can be found in Bisimulation collapse and the process taxonomy (1996, Springer-Verlag) and PAD/PAN/PRS is shown in this paper.
• Web Service Interfaces (WSI) is not in the hierarchy…
• …yet the hierarchy already represents all possible combinations of classes for α and β!
• So, there is clearly a class in between, left to be explored.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Visibly Pushdown Languages• In general, checking a context-free property on a pushdown automata is undecidable. However, there are cases under some restrictions where we
can do it.
So, what class of properties can be checked on pushdown models?
The whole regular class.
A bit of context-free…
A class « in between » has been defined: visibly pushdown languages (VPL).
Regular languages are closed under union and intersection.Context-Free Languages are closed under union but not intersection.VPL are closed under union and intersection.
In other words, VPL is a subset of deterministic context-free languages with nice closure properties.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Visibly Pushdown Languages• The main principles is a partition of the actions in three sets:
∙ Call. The automaton push something on the stack.
∙ Return. The automaton can pop from the stack if it’s not empty.
∙ Local. The stack is not involved.
• The example is easy to understand if we think of a program:
∙ A function is called, the return address is pushed on the stack.
∙ We return from a function so we pop to stack to know where.
∙ If the program is somewhere in a function, there is no reason to use the stack.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
WSI in the Hierarchy• Basic Process Algebra (BPA) is based on context-free languages.
P ::= a | X | p1 + p2 | p1 . p2
• It is undecidable to check if two context-free grammar generates the same language, so it’s undecidable to check trace equivalence for BPA.
• It is also undecidable to check if a language is a subset of another one.
…but that’s decidable for Visibly Pushdown Languages !
An algebra defined on VPL
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
WSI in the Hierarchy• A one-counter automaton is a finite-state automaton with a counter that can be incremented, decremented or compared to 0. It can be seen as a Pushdown Automata with only one symbol for the stack (+ the bottom).
• A visibly one-counter automaton (v1CA) is defined like for visibly pushdown-automaton: an action a is either a call, a return or just local.
∙ If it is a call, then |α| = 2∙ If it is a return, then |α| = 0∙ If it is local, then |α| = 1
stack size + 1stack size - 1same stack
• Given an automaton and two of its initial states, can we decide if those states are equal given an equivalence? If so, what is the complexity?
It is decidable and EXPTIME for Visibly Pushdown Automata.It is decidable and PSPACE-complete for visibly 1CA.It is decidable and P-complete for visibly BPA.
WSI
vBPA v1CA
• CVP is a related work on a formalism over VPL but so far it’s just a grammar and does not have any algorithms.
• We have to proove that WSI is well located in this hierarchy.
? ??
?
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Related work
Signature Name of the method? Return type? Methods of which it relies?
Consistency: some methods behaviours can be exclusive.
Protocol: how do the methods communicate?
First, a little reminder of the way we did it in Web Service Interfaces.
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Related workIn software contracts, we have 4 layers, and some
additional concepts:
• Negociation. A person chooses a contract with some condition and if it cannot be satisfied then the component will modify the contract.
• Violation. What do you do if the contract is violated? Ignore, reject, wait, or re-negociate?
Week 7 Week 8 Week 9 Week 2 Week 9 Week 10
3
Related workSignature Interface Interface
Consistency Interface Interface signature
Protocol Interface Protocol
Web Service Interfaces Yellin & Strom
• A collaboration history is a trace of the collaboration between two protocols P1 and P2, i.e. a run in the two automata taken together.
• The meaning is that one automaton is sending a message to the other one. It sent the message: it goes in a new state. The other automaton receives the message and also goes in a new state.
• An additional concept in the work by Yellin and Strom is adaptors.
∙ Given that two components have the same functionnalities but a different interface, is it possible to automatically create an adaptor?
∙ How different can two components be before we can’t adapt them with an adaptor in a given class of complexity?