1. Trang chủ
  2. » Công Nghệ Thông Tin

CONCUR 2004 – Concurrency Theory- P8

30 184 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Deciding Probabilistic Bisimilarity Over Infinite-State Systems
Tác giả T. Brỏzdil
Trường học Not Available
Chuyên ngành Concurrency Theory
Thể loại Thesis
Năm xuất bản 2004
Thành phố Not Available
Định dạng
Số trang 30
Dung lượng 813,64 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

In this section we show that bisimilarity is decidable over pBPA and pBPP pro-cesses, which are probabilistic extensions of the well-known process classes BPA and BPP [9].. Moreover, we

Trang 1

of states such that and 0 for

define the set of successors by

exists because the set is finite or countably

Obviously, introducing combined transitions does not influence the reachability

relation However, a single state can have uncountably many outgoing combined

transitions Therefore, the triple cannot be generally seen as a

tran-sition system in the sense of Definition 1

Semantic equivalence of probabilistic processes can be formally captured in

many ways Existing approaches extend the ideas originally developed for

non-probabilistic processes, and the resulting notions have similar properties as their

non-probabilistic counterparts One consequence of this is that probabilistic

ex-tensions of bisimulation-like equivalences play a very important role in this

set-ting First we introduce some useful notions and notation For the rest of this

equiv-alence relation We say that two distributions are equivalent

according to E, denoted iff for each and each equivalence class

words, the equivalence E (defined on states) determines a unique equivalence on

distributions that is also denoted by E.

Definition 2 Let E be an equivalence on S, and let We say that

expands in E iff

A relation expands in E iff each expands in E An

equivalence E on S is a probabilistic bisimulation iff E expands in E We say

that are bisimilar, written iff they are related by some probabilistic

bisimulation.

The notions of combined expansion, combined bisimulation, and combined

bisimilarity (denoted are defined in the same way as above, using

instead of

It can be shown that probabilistic bisimilarity is a proper refinement of

com-bined probabilistic bisimilarity (we refer to [23] for a more detailed comparison

of the two equivalences) Since most of our results are valid for both of these

equivalences, we usually refer just to “bisimilarity” and use the and

sym-bols to indicate that a given construction works both for and and for

for each there is such that

for each there is such that

Trang 2

and respectively The word “expansion” is also overloaded in the rest of this

paper

Bisimilarity can also be used to relate processes of different transition systems

by considering bisimulations on the disjoint union of the two systems

Given a binary relation R over a set X, the symbol denotes the least

equivalence on X subsuming R We start with a sequence of basic observations.

Lemma 3 Let be binary relations on S such that Then for

Lemma 4 Let R be a relation on S and E be an equivalence on S If R expands

in E, then expands in E.

An immediate corollary to the previous lemmas is the following:

Corollary 5 is a bisimulation.

Proof expands in by Lemma 3, hence expands in by Lemma 4

Therefore, is a bisimulation and

Lemma 6 Suppose that where E is a bisimulation on S If

for some then there is such that

2.1 Approximating Bisimilarity

Bisimilarity can be approximated by a family of equivalences defined

inductively as follows:

Clearly and the other inclusion holds if each process is

finitely branching, i.e., the set is finite It is worth mentioning that

this observation can be further generalized

Lemma 7 Let and let us assume that each state reachable from is

finitely branching (i.e., can still be infinitely-branching) Then iff

for each

Lemma 7 can be seen as a generalization of a similar result for

non-probabilistic processes and strong bisimilarity presented in [4] Also note that

Lemma 7 does not impose any restrictions on distributions which can have an

infinite support

Definition 8 We say that a process is well-defined if is finitely

branch-ing and for each transition we have that is a rational distribution with

a finite support.

For example, pBPA, pBPP, and pPDA processes which are introduced in

next sections are well-defined

Trang 3

Lemma 9 Let us assume that Act is finite, and let be well-defined

states Let E be an equivalence over (represented as a finite

set of its elements) The problem if expands in 1 is decidable in time

where is the length of the corresponding binary encoding of the

triple (note that is a rational number).

A direct corollary to Lemma 7 and Lemma 9 is the following:

Corollary 10 Let us assume that Act is finite and each is well-defined.

Then over S × S is semidecidable.

In this section we show that bisimilarity is decidable over pBPA and pBPP

pro-cesses, which are probabilistic extensions of the well-known process classes BPA

and BPP [9] Moreover, we also show that bisimilarity over normed subclasses

of pBPA and pBPP is decidable in polynomial time

Let be a transition system, and let “·” be a binary operator

on S For every the symbol denotes the least congruence over S

wrt “·” subsuming R.

Lemma 11 Let and let Pre(R) be the least set such that

and if then also (su, tu), (us, ut) Pre(R) for every Then

Now we formulate three abstract conditions which guarantee the

semidecid-ability of over S × S As we shall see, pBPA and pBPP classes satisfy these

conditions

1

2

3

For every finite relation we have that if R expands in then

There is a finite relation such that over S × S is called

a bisimulation base).

The definition of is effective in the following sense: the set of states S is

recursively enumerable, each state is well-defined, and the problem if

for given is semidecidable

1

Strictly speaking, we consider expansion in because E is not an

equivalence over S (which is required by Definition 2).

Trang 4

Lemma 12 If the three conditions above are satisfied, then over S × S is

semidecidable (and thus decidable by applying Corollary 10).

Now we formally introduce pBPA and pBPP processes Let N = {X, Y, }

be a countably infinite set of constants and a countably infinite

set of actions The elements of are denoted and the empty word by

is not a suffix of

Definition 13 A pBPA (pBPP) system is a finite set of rules of the form

where is a rational distribution with a finite support.

The sets of all constants and actions occurring in are denoted and

respectively We require that for each there is at least onerule of the form in

transitions of D are determined as follows:

The elements of are called pBPA processes (of

pBPP systems and processes are defined in the same way, but the elements

of are understood modulo commutativity (intuitively, this corresponds

to an unsynchronized parallel composition of constants)

Observe that “ordinary”, i.e., non-probabilistic BPA and BPP systems can

be understood as those pBPA and pBPP where all distributions used in basic

transitions are Dirac (see Section 2) Moreover, to every pBPA/pBPP system

we associate its underlying non-probabilistic BPA/BPP system defined

each If we consider as a relation on the states of

we can readily confirm that is a (non-probabilistic) strong bisimulation; this

follows immediately from Lemma 6 However, is generally finer than strong

bisimilarity over the states of

Definition 14 Let be a pBPA or pBPP system A given is

is the length of the shortest such If is not normed, we put

We say that is normed if every is normed.

Note that and if we adopt the usual conventions for then

Also note that bisimilar processes must have the samenorm Transition systems generated by pBPA and pBPP systems are clearly

effective in the sense of condition 3 above Now we check that conditions 1

and 2 are also satisfied This is where new problems (which are specific to the

probabilistic setting) arise

Trang 5

Lemma 15 (Condition 1) Let be a pBPA or a pBPP system Let R be

a binary relation over and let E be a congruence over where

If R expands in E, then expands in E.

It follows from Lemma 15 that whenever R expands in

Corollary 16 is a congruence over processes of a given pBPA or pBPP

system.

Proof expands in hence by Lemma 15

It remains to check that bisimilarity over pBPA and pBPP processes can be

represented by a finite base (condition 2 above)

Lemma 17 (Condition 2 for pBPP) Let be a pBPP system There is a

Proof The proof in [9] for (non-probabilistic) BPP relies just on the fact that

(non-probabilistic) bisimilarity is a congruence Due to Corollary 16, we can use

the same proof also for pBPP

In the case of pBPA, the situation is more complicated Let be

the set of all normed variables, and the set of all unnormed

ones

Note that due to Lemma 18 we need only ever consider states

the others being immediately transformed into such a bisimilar state

by erasing all symbols following the first infinite-norm variable

A careful inspection of the construction for non-probabilistic BPA (as

pre-sented in [9]) reveals the following:

Proposition 19 (See [9]) Let be a (non-probabilistic) BPA system Let

be an equivalence satisfying the following properties:

if for infinitely many pairwise non-equivalent then

Then there is a finite base such that over

So, it suffices to prove that (when considered as an equivalence over the

states of the underlying BPA system satisfies the conditions 1–3 of

Proposi-tion 19 The first condiProposi-tion follows immediately from Lemma 6, and the second

condition follows from Corollary 16 Condition 3 is proven below, together with

one auxiliary result

Trang 6

Lemma 20 Let be processes of a pBPA system If and for

some then

Lemma 21 Let be processes of a pBPA system If for infinitely

many pairwise non-bisimilar then

An immediate consequence of Proposition 19, Lemma 6, Corollary 16, and

Lemma 21, is the following:

Lemma 22 (Condition 2 for pBPA) Let be a pBPA system There is a

Now we can formulate the first theorem of our paper:

Theorem 23 Bisimilarity for pBPA and pBPP processes is decidable.

3.1 Polynomial-Time Algorithms for Normed pBPA and Normed

pBPP

In this subsection we show that the polynomial-time algorithms deciding

(non-probabilistic) bisimilarity over the normed subclasses of BPA and BPP processes

(see [9]) can also be adapted to the probabilistic case We concentrate just on

crucial observations which underpin the functionality of these algorithms, and

show that they can be reformulated and reproved in the probabilistic setting

We refer to [9] for the omitted parts

In the probabilistic setting, the polynomial-time algorithms deciding

non-probabilistic bisimilarity over normed BPA and normed BPP processes are

mod-ified as follows: Given a normed pBPA or normed pBPP system we run the

non-probabilistic algorithm on the underlying system where the only

modifi-cation is that the expansion is considered in the probabilistic transition system

(instead of To see that the modified algorithm is again polynomial-time,

we need to realize that the problem if a given pair of pBPA or pBPP processes

expands in a polynomially computable equivalence is decidable in polynomial

time However, it is a simple consequence of Lemma 9

Lemma 24 Let be a pBPA or pBPP system, and E a polynomially

com-putable equivalence over Let be processes of It is decidable in

polynomial time whether expands in E.

The authors have carefully verified that bisimilarity has all the properties

which imply the correctness of these (modified) algorithms Some of the most

important observations are listed below; roughly speaking, the original

non-probabilistic algorithms are based mainly on the unique decomposition property,

which must be reestablished in the probabilistic setting

A pBPA or pBPP process is a prime iff whenever then either

Lemma 25 Let be processes of a normed pBPA system Then

implies

Trang 7

Theorem 26 Every normed pBPA process decomposes uniquely (up to

bisim-ilarity) into prime components.

Proof We can use the same proof as in [9] It relies on Lemma 25, Corollary 16,

and Lemma 6

Theorem 27 Every normed pBPP process decomposes uniquely (up to

bisimi-larity) into prime components.

Proof As in [9] It relies on Lemma 6.

Now we have all the “tools” required for adapting the observations about

non-probabilistic normed BPA/BPP to the probabilistic setting which altogether

imply the following:

Theorem 28 Bisimilarity is decidable for normed pBPA and normed pBPP

processes in polynomial time.

Processes

Definition 29 A probabilistic pushdown automaton (pPDA) is a tuple

where Q is a finite set of control states, is a finite stack alphabet, Act is a finite set of actions, and is a transition

function such that the set is finite and each is a rational

distribution with a finite support for all and

be a distribution For each the symbol denotes

not a suffix of Each pPDA induces a unique transition system where

is the set of states, Act is the set of actions, and transitions are given by

the following rule:

The states of are called pPDA processes of or just pPDA processes if

is not significant

Our aim is to show that between pPDA processes and finite-state

pro-cesses is decidable in exponential time For this purpose we adapt the results

of [19], where a generic framework for deciding various behavioral equivalences

between PDA and finite-state processes is developed In this framework, the

generic part of the problem (applicable to every behavioral equivalence which

is a right PDA congruence in the sense of Definition 31) is clearly separated

from the equivalence-specific part that must be supplied for each behavioral

equivalence individually The method works also in the probabilistic setting, but

Trang 8

the application part would be unnecessarily complicated if we used the

origi-nal scheme proposed in [19] Therefore, we first develop the generic part of the

method into a more “algebraic” form, and then apply the new variant to

prob-abilistic bisimilarity The introduced modification is generic and works also for

other (non-probabilistic) behavioral equivalences

and a finite-state system of size (the size of a given

is defined similarly as in Lemma 9) In our complexityestimations we also use the parameter

We start by recalling some notions and results of [19] To simplify our

no-tation, we introduce all notions directly in the probabilistic setting We denote

where stands for “undefined”

Definition 30 For every process of we define the set

every The class of all functions that are compatible with is denoted

For every process of and every we define the process

whose transitions are determined by the following rules:

Here is a distribution which returns a non-zero value only for pairs of

which returns a non-zero value only for pairs of the form where

the same result as for every argument except for where In

other words, behaves like until the point when the stack is emptied and

a configuration of the form is entered; from that point on, behaves like

put and

Definition 31 We say that an equivalence E over is a right pPDA

congruence (for and iff the following conditions are satisfied:

For every process of and all we have that if

for each then also for every

Let R be a binary relation over The least right pPDA congruence

over subsuming R is denoted Further, Rpre(R) denotes the

least relation over subsuming R satisfying the following condition:

is a proper subset of the relationship between Rpre(R) and is revealed

in the following lemma:

Trang 9

Lemma 32 Let R be a binary relation over For every we

define a binary relation over inductively as follows:

and Then

For the rest of this section, let us fix a right pPDA congruence over

which is decidable for finite-state processes and satisfies the lowing transfer property: if and then there exists such that

fol-and The following definitions are also borrowed from [19]

Definition 33 Let and We write iff for

all we have that if then

Further, for every relation we define the set I(K)

of K-instances as follows:

(That is, consists of (some) pairs

of the form and We say that K is well-formed iff K satisfies

the following conditions:

resp.).

It is clear that there are only finitely many well-formed sets, and that there

exists the greatest well-formed set G whose size is Observe that

G is effectively constructible because is decidable for finite-state processes

Intuitively, well-formed sets are finite representations of certain infinite

re-lations between processes of and F, which are “generated” from

well-formed sets using the rules introduced in our next definition:

Definition 35 Let K be a well-formed set The closure of K, denoted Cl(K),

is the least set L satisfying the following conditions:

Further, we define Gen(K) = I(Cl(K)).

Observe that Cl and Gen are monotonic and that

for every well-formed set K.

An important property of Gen is that it generates only “congruent pairs” as

stated in the following lemma

Lemma 36 Let K be a well-formed set Then

The following well-formed set is especially important

Trang 10

Definition 37 The base is defined as follows:

The importance of is clarified in the next lemma

Lemma 38 (see [19]). coincides with over

Let be the complete lattice of all well-formed sets, and let Exp :

be a function satisfying the four conditions listed below:

The membership to Exp(K) is decidable.

According to condition 1, the base is a fixed-point of Exp We prove that

is the greatest fixed-point of Exp Suppose that K = Exp(K) for some

well-formed set K By definition of Gen(K) and condition 3 we have that

implies we can conclude that

Hence, can be computed by a simple algorithm which iterates Exp on G

until a fixed-point is found These conditions are formulated in the same way

as in [19] except for condition 3 which is slightly different As we shall see, with

the help of the new “algebraic” observations presented above, condition 3 can be

checked in a relatively simple way This is the main difference from the original

method presented in [19]

Similarly as in [19], we use finite multi-automata to represent certain infinite

subsets of

Definition 39 A multi-automaton is a tuple where

S is a finite set of states such that (i e, the control states of are

among the states of

is the input alphabet (the alphabet has a special symbol for each

is a transition relation;

Acc S is a set of accepting states.

Every multi-automaton determines a unique set

The following tool will be useful for deciding the membership to Exp(K).

Lemma 40 Let K be a well-formed set The relation

is computable in time polynomial in Moreover, for each equivalence class

there is a multiautomaton accepting the set where

The automaton is constructible in time polynomial in

Trang 11

4.1 Deciding Between pPDA and Finite-State Processes

We apply the abstract framework presented in the previous section That is, we

show that is a right pPDA congruence and define an appropriate function Exp

satisfying the four conditions given earlier We start with an auxiliary result

Lemma 41 Let R be a binary relation over If R expands in

then

The next lemma follows immediately from Lemma 41

Lemma 42 is a right pPDA congruence.

Definition 43 Given a well-formed set K, the set Exp(K) consists of all pairs

such that for each we have that if then expands in

Now we verify the four conditions that must be satisfied by Exp The first

con-dition follows easily from the fact that coincides with over

second condition is obvious

Lemma 44 Exp(K) = K

Proof Exp(K) = K implies that each pair of I(K) expands in But

then each pair of I(K) expands in by Lemma 3 and Lemma 36 Thus,

by Lemma 41

Lemma 45 Exp(K) is computable in time polynomial in

im-mediately from Lemma 40 that the equivalence relation

can be computed in time polynomial in The claim then follows from

Lemma 9

Now we can formulate our next theorem

Theorem 46 Probabilistic bisimilarity between pPDA and finite-state processes

is decidable in time which is polynomial in That is, the problem is

de-cidable in exponential time for general pPDA, and in polynomial time for every

subclass of pPDA where the number of control states is bounded by some constant

(in particular, this applies to pBPA).

Proof Let be a pPDA process and a finite-state process We can assume

(w.l.o.g.) that for some The algorithm computes the base by

first computing the greatest well-formed relation G and then iterating Exp until

a fixed-point is found Then, it suffices to find out if there is a pair

such that Note that this takes time polynomial in because

Trang 12

G is computable in time polynomial in This is because the size of G

is and over finite-state systems is decidable in polynomial

time [10]

Exp is computable in time polynomial in due to Lemma 45

fixed-point

The results presented in this paper show that various forms of probabilistic

bisim-ilarity are decidable over certain classes of infinite-state systems In particular,

this paper advocates the use of algebraic methods which were originally

devel-oped for non-probabilistic systems These methods turn out to be surprisingly

robust and can be applied also in the probabilistic setting

An obvious question is whether the decidability/tractability results for other

non-probabilistic infinite-state models can be extended to the probabilistic case

We conjecture that the answer is positive in many cases, and we hope that the

results presented in this paper provide some hints and guidelines on how to

achieve that Another interesting question is whether we could do better than in

the non-probabilistic case In particular, undecidability results and lower

com-plexity bounds do not carry over to fully probabilistic variants of infinite-state

models (fully probabilistic systems are probabilistic systems where each state

has at most most one out-going transition It is still possible that

methods specifically tailored to fully probabilistic models might produce better

results than their non-probabilistic counterparts This also applies to

proba-bilistic variants of other behavioural equivalences, such as trace or simulation

P.A Abdulla, C Baier, S.P Iyer, and B Jonsson Reasoning about probabilistic

channel systems In Proceedings of CONCUR 2000, volume 1877 of LNCS, pages

320–330 Springer, 2000.

P.A Abdulla and A Rabinovich Verification of probabilistic systems with faulty

communication In Proceedings of FoSSaCS 2003, volume 2620 of LNCS, pages

39–53 Springer, 2003.

A Aziz, V Singhal, F Balarin, R Brayton, and A Sangiovanni-Vincentelli It

usually works: The temporal logic of stochastic systems In Proceedings of CAV’95,

volume 939 of LNCS, pages 155–165 Springer, 1995.

J.C.M Baeten, J.A Bergstra, and J.W Klop On the consistency of Koomen’s

fair abstraction rule TCS, 51(1):129–176, 1987.

C Baier and B Engelen Establishing qualitative properties for probabilistic lossy

channel systems: an algorithmic approach In Proceedings of 5th International

AMAST Workshop on Real-Time and Probabilistic Systems (ARTS’99), volume

1601 of LNCS, pages 34–52 Springer, 1999.

Trang 13

C Baier, H Hermanns, and J Katoen Probabilistic weak simulation is decidable

in polynomial time Information Processing Letters, 89(3): 123–130, 2004.

A Bianco and L de Alfaro Model checking of probabalistic and nondeterministic

systems In Proceedings of FST&TCS’95, volume 1026 of LNCS, pages 499–513.

Springer, 1995.

T Brázdil, and O.Stražovský Deciding probabilistic bisimilarity over

infinite-state probabilistic systems Technical report FIMU-RS-2004-06, Faculty

of Informatics, Masaryk University, 2004.

O Burkart, D Caucal, F Moller, and B Steffen Verification on infinite

struc-tures Handbook of Process Algebra, pages 545–623, 1999.

S Cattani and R Segala Decision algorithms for probabilistic bisimulation In

Proceedings of CONCUR 2002, volume 2421 of LNCS, pages 371–385 Springer,

2002.

C Courcoubetis and M Yannakakis Verifying temporal properties of finite-state

probabilistic programs In Proceedings of 29th Annual Symposium on Foundations

of Computer Science, pages 338–345 IEEE, 1988.

C Courcoubetis and M Yannakakis The complexity of probabilistic verification.

JACM, 42(4):857–907, 1995.

L de Alfaro, M.Z Kwiatkowska, G Norman, D Parker, and R Segala Symbolic

model checking of probabilistic processes using MTBDDs and the Kronecker

rep-resentation In Proceedings of TACAS 2000, volume 1785 of LNCS, pages 395–410.

Springer, 2000.

J Esparza, and R Mayr Model-checking probabilistic pushdown

automata In Proceedings of LICS 2004 IEEE, 2004 To appear.

H Hansson and B Jonsson A logic for reasoning about time and reliability.

Formal Aspects of Computing, 6:512–535, 1994.

M Huth and M.Z Kwiatkowska Quantitative analysis and model checking In

Proceedings of LICS’97, pages 111–122 IEEE, 1997.

S.P Iyer and M Narasimha Probabilistic lossy channel systems In Proceedings

of TAPSOFT’97, volume 1214 of LNCS, pages 667–681 Springer, 1997.

B Jonsson, W Yi, and K.G Larsen Probabilistic extensions of process algebras.

Handbook of Process Algebra, pages 685–710, 1999.

and R Mayr A generic framework for checking semantic equivalences

between pushdown automata and finite-state automata In Proceedings of IFIP

TCS’2004 Kluwer, 2004 To appear.

M.Z Kwiatkowska Model checking for probability and time: from theory to

practice In Proceedings of LICS 2003, pages 351–360 IEEE, 2003.

K Larsen and A Skou Bisimulation through probabilistic testing I&C, 94(1):1–

28, 1991.

A Rabinovich Quantitative analysis of probabilistic lossy channel systems In

Proceedings of ICALP 2003, volume 2719 of LNCS, pages 1008–1021 Springer,

2003.

R Segala and N.A Lynch Probabilistic simulations for probabilistic processes.

NJC, 2(2):250–273, 1995.

Trang 14

Glenn Bruns1, Radha Jagadeesan2*, Alan Jeffrey2**, and James Riely2***

1 Bell Labs, Lucent Technologies

2 DePaul University

Abstract Aspect-oriented programming is emerging as a powerful tool for

sys-tem design and development In this paper, we study aspects as primitive tational entities on par with objects, functions and horn-clauses To this end, weintroduce a name-based calculus, that incorporates aspects as primitive Incontrast to earlier work on aspects in the context of object-oriented and functionalprogramming, the only computational entities in are aspects We establish

compu-a compositioncompu-al trcompu-anslcompu-ations into from a functional language with aspectsand higher-order functions Further, we delineate the features required to support

an aspect-oriented style by presenting a translation of into an extended

1 Introduction

Aspects [7,21,28,23,22,3] have emerged as a powerful tool in the design and

develop-ment of systems (e.g., see [4]) To explain the interest in aspects, we begin with a short

example inspired by tutorials of AspectJ [1] Suppose class L realizes a useful library,

and that we want to obtain timing information about a method foo () of L With aspects

this can be done by writing advice specifying that, whenever foo is called, the current

time should be logged, foo should be executed, and then the current time should again

be logged It is indicative of the power of the aspect framework that:

the profiling code is localized in the advice,

the library source code is left untouched, and

the responsibility for profiling all foo() calls resides with the compiler and/or

runtime environment

The second and third items ensure that, in developing the library, one need not worry

about advice that may be written in the future In [13] this notion is called obliviousness.

However, in writing the logging advice, one must identify the pieces of code that need

to be logged In [13] this notion is called quantification These ideas are quite general

and are independent of programming language paradigm

The execution of such an aspect-program can intuitively be seen in a reactive

frame-work as follows View method invocations (in this case the foo() invocations) as

Trang 15

events View advice code (in this case the logging advice) as running in parallel with the

other source code and responding to occurrences of events (corresponding to method

calls) This view of execution is general enough to accommodate dynamic arrival of

new advice by treating it as dynamically created parallel components In the special

case that all advice is static, the implicit parallel composition of advice can be compiled

away — in aspect-based languages, this compile-time process called weaving

Infor-mally, the weaving algorithm replaces each call to foo () with a call to the advice code,

thus altering the client code and leaving the library untouched

Aspect-oriented extensions have been developed for object-oriented [21,28],

im-perative [20], and functional languages [30,31] Furthermore, a diverse collection of

examples show the utility of aspects These range from the treatment of inheritance

anomalies in concurrent object-oriented programming (eg see [25] for a survey of such

problems, and [24] for an aspect-based approach) to the design of flexible mechanisms

for access control in security applications [5], Recent performance evaluations of

as-pect languages [12] suggest that a combination of programming and compiler efforts

suffices to manage any performance penalties

Much recent work on aspects is aimed at improving aspect-oriented language design

and providing solutions to the challenge of reasoning about aspect-oriented programs

For example, there is work on adding aspects to existing language paradigms [30,31],

on finding a parametric way to describe a wide range of aspect languages [10], on

find-ing abstraction principles [11], on type systems [18], and on checkfind-ing the correctness

of compiling techniques using operational models [19] or denotational models [32] A

strategy in much of this work is to develop an calculus that provides a manageable

set-ting in which to study the issues Similarly to the way that aspect languages have been

designed by adding aspects to an existing programming paradigm, these calculi

gener-ally extend a base calculus with a notion of aspect For example, [19] is based on an

untyped class-based calculus, [10] is based on the object calculus [2], and [31] is based

on the simply-typed lambda calculus

If one wishes to study aspects in the context of existing programming languages,

then calculi of this style are quite appropriate However, another role for an aspect

cal-culus is to identify the essential nature of aspects and understand their relationship to

other basic computational primitives We follow the approach of the theory of

concur-rency — concurconcur-rency is not built on top of sequentiality because that would certainly

make concurrency more complex rather than sequentiality Rather, concurrency theory

studies interaction and concurrency as primitive concepts and sequentiality emerges as

a special case of concurrency

Along these lines, we aim here to establish aspects as primitive computational

en-tities on par with objects, functions, and horn clauses; separate from their integration

into existing programming paradigms To this end we have created a minimal aspect

calculus called

We present as a sequential deterministic calculus, with all concurrency being

implicit The primitive entities of are names, in the style of the pi-calculus [26]

and the join calculus [15] It differs in the choice of the communication paradigm in

two ways: firstly, messages are broadcast (somewhat in the style of CSP [16]) to all

Ngày đăng: 08/11/2013, 02:15