Transcript Document
A summary of our activities about WSI
Philippe Giabbanelli
CMPT 894 – Spring 2008
We will not present any new concept today.
Instead, we will do a summary of what we learnt regarding Web Service
Interfaces.
Process Rewrite Systems (week 7)
Visibly Pushdown Languages (week 8)
WSI in the hierarchy and software contracts (week 9)
Yellin and Strom (week 10)
1
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
Process Rewrite Systems
• 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:
1 ∙ single process like X
S ∙ sequential composition like X . Y . Z
P ∙ parallel composition like X || Y || Z
G ∙ sequence of arbitrary parallel and sequential compositions
like (X . (Y || Z) || W
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
Process Rewrite Systems
Smallest generalization
of PA and PD.
Smallest generalization
of PA and Petri Nets
Process algebra without
communication
Context-free
processes (or Basic
Process Algebra).
Transition systems
associated with
Greibach Normal
Form context-free
grammars.
Basic parallel processes.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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). In other words, VPL is a subset of deterministic context-free
languages with nice closure properties.
Regular languages are closed under union and intersection.
are closed
intersection.
Context-FreeVPL
Languages
areunder
closedunion
underand
union
but not intersection.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
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 WSI
(v1CA) is defined like for visibly
pushdown-automaton: an action a is either a call, a return or just local.
vBPA
∙ If it v1CA
is a call, then |α| = 2
stack size + 1
stack size - 1
∙ If it is a return, then |α| = 0
same stack
∙ If it is local, then |α| = 1
?
• CVP
Givenisan
a related
automaton
workand
ontwo
a formalism
of its initial
overstates,
VPL can
but so
wefar
decide
it’s just
if those
a
states are and
grammar
equal
does
given
notan
have
equivalence?
any algorithms.
If so, what is the complexity?
• WeIthave
is decidable
to prooveand
thatP-complete
PSPACE-complete
WSI is well
forlocated
visibly
forinPushdown
BPA.
visibly
this hierarchy.
1CA.
EXPTIME
for
Visibly
Automata.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
Related work
First, a little reminder of the way we did it in Web Service Interfaces.
Signature
Name of the method?
Return type?
Methods of which it relies?
Protocol: how do the
methods communicate?
Consistency: some methods behaviours can be exclusive.
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
Related work
In 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?
3
Week 7
Week 8
Week 9
Week 2
Week 9
Week 10
Related work
Signature Interface
Interface
Consistency Interface
Interface signature
Protocol Interface
Protocol
Web Service Interfaces
Yellin & Strom
•• An
additional concept
workofbythe
Yellin
and Strombetween
is adaptors.
A collaboration
historyinisthe
a trace
collaboration
two
protocols
andtwo
P2, components
i.e. a run in the
two
taken together.
∙ GivenP1that
have
theautomata
same functionnalities
but a
different interface, is it possible to automatically create an adaptor?
• The meaning is that one automaton is sending a message to the other
How
can two
components
before
can’t
adapt them
one.∙ It
sentdifferent
the message:
it goes
in a new be
state.
Thewe
other
automaton
with the
an adaptor
a given
class in
of acomplexity?
receives
messageinand
also goes
new state.
3
Article used for this presentation