• Aucun résultat trouvé

Parametrized automata simulation and application to service composition

N/A
N/A
Protected

Academic year: 2021

Partager "Parametrized automata simulation and application to service composition"

Copied!
22
0
0

Texte intégral

(1)

Any correspondence concerning this service should be sent

to the repository administrator:

tech-oatao@listes-diff.inp-toulouse.fr

This is a publisher’s version published in:

http://oatao.univ-toulouse.fr/22622

To cite this version:

Belkhir, Walid and Chevalier, Yannick and

Rusinowitch, Michaël Parametrized automata simulation and application to

service composition. (2015) Journal of Symbolic Computation, 69. 40-60.

ISSN 0747-7171

Official URL

DOI :

https://doi.org/10.1016/j.jsc.2014.09.029

Open Archive Toulouse Archive Ouverte

OATAO is an open access repository that collects the work of Toulouse

researchers and makes it freely available over the web where possible

(2)

Parametrized

automata

simulation

and

application

to

service

composition

Walid Belkhir

a

,

Yannick Chevalier

b

,

Michael Rusinowitch

a aINRIANancy–GrandEst&LORIA,54600Villers-lès-Nancy,France

bUniversitéPaulSabatier&IRITToulouse,France

a

b

s

t

r

a

c

t

Keywords: Parametrizedautomata Service Simulation preorder Compositionsynthesis Infinite alphabet

The service composition problemasks whether, givenaclient and a community of available services, there exists an agent (called the mediator) thatsuitablydelegatesthe actionsrequested bythe client to the available community of services. We address this problem in a general setting where the agents communication actions are parametrized by data from an infinite domain and possibly subjectto constraints.Forthispurpose, wedefine param-etrized automata (PAs), where transitionsare guarded by conjunc-tion ofequalities and disequalities.We solve the service composi-tion problem by showing that the simulation preorder of PAs is decidable and devising a procedure to synthesize a mediator out of a simulation preorder. We also show that the Nonemptiness problemofPAs isPSPACE-complete.

1. Introduction

Service Oriented Architectures (SOA) consider services as self-contained components that can be published, invokedover anetwork and combined withother services throughstandardized protocols in order to dynamically build complex applications (Alonso et al., 2004; Reisig, 2008). Service com-position is required when none of the existing services can fulfil some client needs but a suitable coordination of them would satisfy the client requests. How to find the right combination and how toorchestratethiscombination are amongthe keyissues for servicearchitecture development.

✩ ThisresearchispartlysupportedbyFP7NESSoSproject (Grantno.256980),andextendssubstantiallyresultspresentedat SYNASC2013.

E-mailaddresses: walid.belkhir@inria.fr (W. Belkhir),ychevali@irit.fr (Y. Chevalier),rusi@loria.fr (M. Rusinowitch). http://dx.doi.org/10.1016/j.jsc.2014.09.029

(3)

Servicecompositionhas beenstudied in manyworkse.g.Hull and Su (2005), Martín et al. (2012),

Berardi et al. (2008). The related problem of system synthesisfrom libraries of reusablecomponents has been thoroughly investigatedtoo Lustigand Vardi (2009).

In this paper we address the composition synthesis problem for web services in which the agents are parametrized, i.e. the client and the available services exchange data ranging over an infinite domain and they are possibly subject to some dataconstraints. More precisely, the compo-sition synthesis problem we consider can be stated as follows: (e.g. Nourine and Toumani, 2012; Cheikh, 2009): given a client and a community of available services, compute a mediator which will enable communication between the client and the available services in such a way that each client request isforwardedto anappropriateservice.

This problemwasreduced to show that thereexists asimulation relation betweenthe target ser-vice (specifyinganexpectedservicebehaviourforsatisfying theclientrequests)and theasynchronous product ofthe availableservices.Ifsuchasimulationrelationexiststhenit canbe easilyusedto gen-erate a mediator, that is a function that selects at each step an available service for executing an action requested by theclient.

One of the most successfulapproachesto compositionamounts toabstract services as finite-state automata (FA) and applyavailable tools from automata theory tosynthesize a new service satisfying the given client requests from anexisting communityof services. However it is notobvious whether the automata-based approachtoservicecompositioncan stillbe appliedwithinfinite alphabetssince simulation often gets undecidable in extended models like Colombo (Akroun et al., 2013). Starting from theapproach initiatedin Belkhiret al. (2013)our objectiveisto defineexpressiveclassesof au-tomata on infinite alphabetswhich are well-adapted to the specification and composition of services and enjoynice closure properties and decidable simulationpreorder. Compared toour previouswork (Belkhiretal.,2013) weintroduceastrictly moreexpressiveservicespecificationformalismthanks to the use of guardedtransitions.

1.1. Contributions

Inthispaper werely on automata-based techniquestotackle the problemof composition synthe-sis of parametrized services. We introduce anextension of automata called parametrizedautomata or

PAs, that allows a natural specification and decidable synthesis of parametrized services. In PAs, the transitions are labelled by letters or variablesranging overan infinitealphabets and guarded by con-junction of equalities and disequalities. Besides, some variables canbe refreshed in some states,that is, these variables canbe released so that new letters canbe bound to them. Refreshing mechanism is useful when computationsstart new sessions.

We introduceasimulation preorder forPAs and show its decidability.The proofrelies on a game-theoretic characterizationof simulation.We show howthisresult canbeapplied tothesynthesisofa mediator for web services.Althoughnot detailedhere, the simulationdecisionprocedure canhelpto solve language containment problems which are important ones in formal verification. The potential applicability of our model in verification also follows from the fact that PAs are closed under inter-section, union, concatenation and Kleene operator. An advantage of PAs with respect to alternative automatamodelsis thesuccinctservice representationtheypermit, thankstothe useof variable and guards (e.g. with negative conditions). This benefit will be formally supported in the paper. Finally we have shown that for PAs the Nonemptiness problem is PSPACE-complete, and the membership problemis NP-complete.

1.2. Relatedwork

Logic-based techniques for the synthesis problem (e.g. Feuillade and Pinchinat, 2007; Pathak et al., 2007)havebeen consideredinthe literature.Narayananand McIlraith (2002)relyon thesituation calculusandGologlogic programminglanguageforautomaticconstructionofWebservices.Waldinger (2001)employsSnark theorem-provertogetsoftwareagentsdistributedoverthenettocooperateand answer aqueryorperformatask.Manyworkshavealsoaddressed servicecompositionbyelaborating planning techniquesfromartificialintelligence(e.g. Pistoreet al.,2005; Hoffmann,2008; Hoffmannet

(4)

al., 2007). Service compositionproblem, in the case of finitesets of actions, is reduced in Balbiani et al. (2010) toadecidable controlproblemfor nondeterministic communicatingautomata.

In the Roman model web services behaviours are specified with activity-based finite state au-tomata. The corresponding services composition problem was reduced to PDL satisfiability (e.g.

Berardi et al., 2003; Cheikh, 2009). Thanks to the relation between PDL and Description Logic (DL), several DL reasoning tools can be applied in the latter case. The composition problem can also be reduced to computing a simulation preorder as in Berardi et al. (2008). This approach cannot be ex-tendedtothedata-centric

Colombo

modelof Berardietal. (2005)for servicessinceaswementioned above simulation is undecidable in this case. Known decidable cases of the composition synthesis problemin Colomboframework need restrictionssuch as determinismor finitedomain for values.

The

Colombo

k,b model is a restrictionof the

Columbo

model in which suitablehypotheses en-sure that only a finite number of domain values (and thus a finite number of different records) are considered. In Berardi et al. (2005) the composition problem for this model was proven decidable when the clients are represented as deterministic guarded automata. Besides, their proof relies on (a priori) bounding two parameters of the synthesized mediator. More precisely, they assume that the mediator is

(

p

,

q

)

-bounded, where p is the number of states, and q is the number of variables representing records in its global store. Theyconjecture thattheir decidability resultcan be obtained without mentioningthese bounds.We havebeenable toprove thatthere wasno need foraboundq

on variablesin the synthetised servicenor on its number p ofstates.

In De Giacomo et al. (2013), the authors address a related problem of synthesizing a controller generator from which one can compute new controller when the environment or the available ser-viceschange.The controllerimplementsafully controllabletarget behaviourby suitablycoordinating available partially controllable behaviours that are to execute within a shared, fully observable, but non-deterministic environment. The behaviours and the environment are represented as finite state transitionsystems. Theyconstructatableofstates relatedin asimulation, andare abletoupdate this table on the fly when the available services change. For efficiency reasons they also consider safety games for generatinganew controller fromthistable.

Thoughour resultsonlyaddressthesynthesisofonecontrollerinanunmutablesetting,our under-lying model is more general than finite transition systems as it allows the exchange of datafrom an infinite domain. Though our simulation game also uses a bounded number of constants, it is worth mentionning that an unbounded execution of the synthesized controller can handle an unbounded number of differentconstants.

In Hassen et al. (2008) the authors also obtain an interesting positive result for the case where services are described by finite state machines but the number of instances of existing services that canbe used in agivencomposition isnotbounded apriori.

Several automata models have been designed recently for infinite alphabets. However they have not been applied to service composition.

Usages

nominal calculus (Degano et al., 2012) is a com-putational model based on infinite alphabets and dynamic creation of resources. PAs are incompa-rable with

Usages

. We give a procedure to decide the simulation preorder for PAs. Simulation has never been investigated for related classes of automata over infinite alphabets (Neven et al., 2004; Kaminski and Zeitlin, 2010; Degano et al., 2012), with the exception of the strictly less expressive class of fresh-variable automata in Belkhir et al. (2013). Compared to Belkhir et al. (2013) the proof technique has been improved and allows us to extract easily a mediator from a simulation game. Moreover we have shown that the complexity of Nonemptiness for PAs is higher than for the class defined in Belkhiret al. (2013).

Webservices behaviourshavebeen describedby contractsin severalworks(Castagnaet al.,2007). A theory of contracts that formalises the compatibility of a client to a service has been devised in

Castagna et al. (2009). Contracts ensures that every possible interaction between compatible clients andservices canbecompletedsuccessfully.ThefinitecontractsstudiedinCastagnaetal. (2009)seem tobe less expressive thanPAs for specifyingbehaviours.

Aservicebehaviourcanbe expressed byaPetri nettoo (seeHamadiand Benatallah, 2003),where actions are modelled by transitions and the state is modelled by places. However it seems hard to extendour synthesisresult toPetri nets servicespecification because of the negativeresult of Jancar

(5)

(1995). Howeversimulationbetweenfinitestatemachinesandwell-structuredtransitionsystems(and so Petrinets) is decidableas shown in Finkel andSchnoebelen (2001).

1.3. Paperorganization

Section 2 recalls standard notions. Section 3 introduces the new class of parametrized automata. Section 4 studies closure properties and the complexity of Nonemptiness for PAs. Section 5 uses the parametrized automata to solve the composition synthesis problem, more precisely, Section 5.1

introduces thesimulation preorderof PAs, Section5.2showsits decidability,Section5.3appliesthese resultstoservicecompositionby devising aprocedurefor mediator synthesis,and Section5.4applies thisprocedure to anexample. Future workdirectionsare given inSection 6.

2. Preliminaries

Let

X

be a finite set of variables,

Σ

an infinite alphabet of letters. A substitution

σ

is an idem-potentmapping

{

x1

7→

α

1

,

. . . ,

xn

7→

α

n

}

S

a∈Σ

{

a

7→

a

}

withvariablesx1

,

. . . ,

xn in

X

and

α

1

,

. . . ,

αn

in

X ∪ Σ

. We call

{

x1

, . . . ,

xn

}

its properdomain, and denote it by dom

(

σ

)

. We denote by Dom

(

σ

)

the set dom

(

σ

)

∪ Σ

. We denote by codom

(

σ

)

the set

{

a

∈ Σ | ∃

x

dom

(

σ

)

s.t.

σ

(

x

) =

a

}

. If all the

αi

,

i

=

1

. . .

n are letters then we say that

σ

is ground. The empty substitution (i.e., with an empty proper domain) is denoted by

. The set of substitutions from

X ∪ Σ

to a set A is denoted by

ζ

X ,A, or by

ζ

X, or simply by

ζ

if there is no ambiguity. If

σ

1 and

σ

2 are substitutions that co-incide on the domain dom

(

σ

1

)

dom

(

σ

2

)

, then

σ

1

σ

2 denotes their union in the usual sense. If

dom

(

σ

1

)

dom

(

σ

2

)

= ∅

then we denote by

σ

1

σ

2 their disjoint union. We define the function

V : Σ ∪ X −→ P(X )

by

V(

α

)

= {

α

}

if

α

∈ X

, and

V(

α

)

= ∅

, otherwise. For a function F

:

A

B,

and A

A, the restrictionof F on A′ is denotedby F|A′.

Definition1.A two-players game is atuple

h

PosE

,

PosA

,

M

,

p

i

, where PosE

,

PosA are disjointsets of

positions:

Eloise

’s positions and

Abelard

’s positions. M

⊆ (

PosE

PosA

)

× (

PosE

PosA

)

is a set

of moves, and pis the starting position. A strategy for the player

Eloise

is afunction

ρ

:

Pos

E

PosE

PosA, such that

(℘,

ρ

(℘))

M for all

℘ ∈

PosE. A (possibly infinite) play

π

= h℘

1

,

2

,

. . .i

follows a strategy

ρ

for player

Eloise

iff

i+1

=

ρ

(℘

i

)

for all i

∈ N

such that

i

PosE. Let

W

be a (possibly infinite) set of plays. A strategy

ρ

is winning for

Eloise

from a set S

PosE

PosA

according to

W

iff everyplaystartingfrom apositionin S andfollowing

ρ

belongs to

W

.

3. Parametrizedautomata

In this section we define formally the class of PAs. Firstly, we illustrate the practical use of PAs througha servicecompositionproblem.

3.1. Amotivatingexample

In Fig. 1 we have an e-commerce Web site allowing clients to open files, search for items in a largedomainthatcanbe abstractedasinfiniteand save themtoanappropriatefile dependingon the type of theitems(whether theyare in promotionor not).Thethree agents: CLIENT,FILEand SEARCH communicate with messages ranging over a possibly infinite set of terms. The problem is to check whetherFILEand SEARCHcanbe composedinorder tosatisfytheCLIENT requests.FollowingBerardi et al. (2008)the problemreducestofindasimulationbetweenCLIENT and theasynchronous product of FILE and SEARCH. We emphasize that the variables x and y are refreshed (i.e. freed to get a new value) when passing through the state p0. In the same way variables z and w are refreshed at p2. Thevariablesm andn are refreshedatq0;thevariables i and j arerefreshed atr0.Forsavingspace, a transition labelled by aterm, say

write(m, n)

, abbreviates successive transitionslabelled by the root symbol andits arguments, here

write

,

m

and

n

, respectively.We notice thatthisexamplecannot be handled within the subclass of fresh-variable automata (Belkhir et al., 2013) since they do not have

(6)

Fig. 1. PROM example.

guards. InSubsections 5.3and 5.4 wewill show how our resultspermit to synthesizea mediator for suitablyscheduling the availableservices and providethe target servicetothe client.

Before introducing formally the class of PAs, let us first explain the main ideas behind them. The transitions of a PA are labelled with letters or variables ranging over an infinite set of letters. These transitions can also be labelled with guards consisting of equalities and disequalities. Its guard must be true for the transition to be fired. We emphasize that while reading a guarded transition some variables of the guard might be free and we need to guess their value. Finally, some variables are refreshed in some states, that is, variables can be freed in these states so that new letters can be assigned tothem. Firstly,we introducethe syntax andsemantics of guards.

Definition2. Theset

G

of guards over

Σ ∪ X

isinductivelydefined as follows:

G

:= true |

α

= β |

α

6= β |

G

G

,

where

α

,

β ∈ Σ ∪ X

. We write

σ

|H

g ifasubstitution

σ

satisfies aguard g.

We notice thatadding the disjunction operator to the guards would not increase the expressivity of our model.Aguard isatomiciff it iseither

true

, anequality, or aninequality.Let gi, i

=

1

,

. . . ,

n,

be atomic guards. Then we define the free variables of a guard by extending the function

V

to a mapping

Σ ∪ X ∪ G

→ P(X )

as follows:

V(

V

i=1,ngi

)

=

S

i=1,n

V(

gi

)

and

V(

α

∼ β)

= V(

α

)

∪ V(β)

,

where

belongs to

{=, 6=}

and

α

,

β ∈ Σ ∪ X

. The finite set of letters of a guard g can be defined similarly and it willbe denotedby

Σ

g. The application of a substitution

γ

to a guard g, denoted by

γ

(

g

)

, isdefined in theusual way.We shallwrite

σ

g if thereexistsasubstitution

γ

s.t.

σ

γ

|H

g.

The formaldefinitionof PAsfollows.

Definition3. APA is atuple

A

= hΣ,

X ,

Q

,

Q0

,

δ,

F

,

κ

i

where

• Σ

is aninfinite setof letters,

• X

is afiniteset ofvariables,

(7)

Fig. 2. Two PAs A1 and A2 where thevariable y1 isrefreshed inthestate p,and thevariables x2,y2 are refreshed inthe

state q.

Q0

Q is asetof initial states,

• δ :

Q

× (Σ

A

∪ X ∪ {

ε

})

× G

2Q is atransition function where

Σ

A is afinitesubset of

Σ

,

F

Q is asetof accepting states,and

κ

: X →

2Q iscalled the refreshing function.

The run of a PA is defined over configurations. A configuration is a pair

(

γ

,

q

)

where

γ

is a sub-stitution such that for all variables x in dom

(

γ

)

,

γ

(

x

)

is the current value of x, and q is a state of the PA. Intuitively, when a PA

A

is in state q, and

(

γ

,

q

)

is the current configuration, and there is a transition qα

,gq′ in

A

then:

i) if

α

is a free variable (i.e.

α

∈ X \

dom

(

γ

)

) then

α

stores the input letter and some values for all the other free variables of

γ

(

g

)

are guessed such that

γ

(

g

)

holds, and

A

enters the state

q

∈ δ(

q

,

α

,

g

)

,

ii) if

α

is a boundvariable or a letter(i.e.

α

Dom

(

γ

)

) and

γ

(

α

)

is equal tothe input letter l then

some valuesfor all the freevariables of

γ

(

g

)

are guessed suchthat

γ

(

g

)

holds,and

A

entersthe stateq

∈ δ(

q

,

α

,

g

)

.

Inboth caseswhen

A

entersstateqall thevariableswhichare refreshedin qarefreed.Thusthe purpose of guards istocompare letters and toguess newletters that mightbe readafterward.

Fora PA

A

, we shall denote by

Σ

A the finiteset of letters thatappear in the transition function of

A

. We shall denote by

κ

−1

:

Q

2X the function that associates to each state of the PA the set of variables beingrefreshed in thisstate. That is,

κ

−1

(

q

)

= {

x

∈ X |

q

κ

(

x

)}

.

Theformal definitionsof run and recognizedlanguagefollow.

Definition4. Let

A

= hΣ,

X ,

Q

,

Q0

,

δ,

F

,

κ

i

be a PA. We define atransition relation overthe config-urations as follows:

(

γ

1

,

q1

)

⇒ (

a

γ

2

,

q2

)

, where a

∈ Σ ∪ {

ε

}

, iff there existsa substitution

σ

such that

dom

(

σ

)

dom

(

γ

1

)

= ∅

and either:

i) a

∈ Σ

and in this case thereexists alabel

α

∈ Σ ∪ X

such thatq2

∈ δ(

q1

,

α

,

g

)

,

(

γ

1

σ

)(

α

)

=

a,

(

γ

1

σ

)

|H

g and

γ

2

= (

γ

1

σ

)

|D, with D

=

Dom

(

γ

1

σ

)

\

κ

−1

(

q2

)

. Or,

ii) a

=

ε

and in thiscase

(

γ

1

σ

)

|H

g and

γ

2

= (

γ

1

σ

)

|D, with D

=

Dom

(

γ

1

σ

)

\

κ

−1

(

q2

)

. We denote by

⋆ the reflexive and transitive closure of

. For two configurations c

,

c′ and a letter

a

∈ Σ

, we write c

a c′ iff there exists two configurations c1 and c2 such that c

ε ⋆c1

a c2

ε ⋆c′.

A finite word, or a trace, w

=

a1a2

. . .

an

∈ Σ

∗ is recognized by

A

iff there exists a run

(

γ

0

,

q0

)

a1

(

γ

1

,

q1

)

a2

→ . . .

→ (

an

γ

n

,

qn

)

, such thatq0

Q0 andqn

F . Theset of wordsrecognizedby

A

is denoted

by L

(A)

.

Example 1. Let

A

1 and

A

2 be the PAs depicted above in Fig. 2 where the variable y1 is re-freshed in the state p, and the variables x2

,

y2 are refreshed in the state q. That is,

A

1

=

(8)

½

δ1(

p

,

y1, (y1

6=

x1)) = {p

}

and

δ1(

p

,

x1, true) = {p

},

and

κ

1

(

y1

) = {

p

}

And

A

2

= hΣ,

{

x2

,

y2

},

{

q

,

q

},

{

q

},

δ

2

,

{

q

},

κ

2

i

with

½

δ

2

(

q

,

x2

, true) = {

q

}

and

δ(

q

,

y2

, (

y2

6=

x2

)) = {

q

},

and

κ

2(x2) =

κ

2(y2) = {q

}.

We notice that while making the first loop over the state p of

A

1, the variable x1 of the guard

(

y1

6=

x1

)

isfree and its valueis guessed.Then thevariable y1 is refreshedin p,and at eachloop the input lettershould be different than thevalue of the variable x1 already guessed.More precisely, the behaviourof

A

1 on aninput wordisas follows. Beingin the initialstate p,either:

Makesthetransition p

p′ by readingthe inputsymbolandboundingthe variable x1 toit, then entersthe state p. Or,

Makesthe transition p

p by:

(1) Reading theinput symboland bounding the variable y1 toit.

(2) Guessing a symbol in

Σ

that is different than the input symbol (i.e. the value of x1) and boundsthe variable y1 tothe guessedsymbol, then entersthe state p.

(3) From the state p, refresh the variable x1, that is, it is no longer bound to the input symbol. Then,start again.

We illustratethe runof

A

1 on the word w

=

abbc, startingfromthe initialconfiguration

(∅,

p

)

as follows:

(∅,

p

)

a

¡

{

x1

7→

c

},

p

¢

b

¡

{

x1

7→

c

},

p

¢

b

¡

{

x1

7→

c

},

p

¢

c

¡

{

x1

7→

c

},

p

¢

Hence, thelanguage L

(A

1

)

consistsofall thewords in

Σ

⋆ in whichthelast letterisdifferentthan all the other letters. By following similar reasoning, we get L

(A

2

)

= {

w1w1

· · ·

wnwn

|

wi

,

wi

∈ Σ,

n

1

,

and wi

6=

w

i

,

i

∈ [

n

]}

.

4. Propertiesofparametrizedautomata

Closure properties are important for the modular development of services. PAs enjoy the same closurepropertiesas finiteautomataexceptforcomplementation(seeTheorem 5).Moreoverchecking whethera servicesatisfies a policy canoften be reduced toshow that the intersection of the service PA with a PA specifying the forbidden executions is empty. We give an example in Subsection 4.1. Since the class of PAs is closed under intersection, (Theorem 5), and Nonemptiness is decidable as shownin Subsection4.1,we canperformthisverification.Onthe otherhandifthe policyisexpressed as a language of authorized traces and if this language is recognized by a PA, say

Q

, then checking whetheraservice

M

respects the policy amountstocheckthe containment L

(M)

L

(Q)

. However, the containment for PAs is undecidable, as stated in Theorem 6 below. In practical cases it is often sufficient (in order toget this inclusion)to show the existence of asimulation preorder between

M

and

Q

: thisproblemis decidable,as we prove itin the following (Theorem 26).

Therefore we study the closure properties of PAs and the decidability and complexity of classical decision problems: Nonemptiness (given

A

, is L

(A)

6= ∅

?), Membership (given a word w and

A

, is

w

L

(A)

?), Universality (given

A

, is L

(A)

= Σ

∗?), and Containment (given

A

1 and

A

2, is L

(A

1

)

L

(A

2

)

?).

We have that:

Theorem5.PAsareclosedunderunion,concatenation,Kleeneoperatorandintersection.Theyarenotclosed undercomplementation.

Proof. Let

A

1

= hΣ

1

,

X

1

,

Q1

,

q10

,

δ

1

,

F1

,

κ

1

i

and

A

2

= hΣ

2

,

X

2

,

Q2

,

q20

,

δ

2

,

F2

,

κ

2

i

be two PAs. Up to variable renaming it issufficient to considerthe closure under the above operations for two PAsthat do notsharevariables.

(9)

The closure under Kleene operation and concatenation holds since PAs have

ε

-transitions. More precisely, theKleene closure

A

1 amounts toaddingan (unguarded)

ε

-transition between the accept-ing states and initial states of

A

1. Andthe concatenation

A

1

· A

2 amounts toaddingan (unguarded)

ε

-transition between theaccepting states of

A

1 and the initialstates of

A

2.

The closure under intersection follows from the fact that the intersection of two PAs

A

1 and

A

2

denoted by

A

1

∩ A

2 canbe defined as follows:

A

1

A

2

=

­

Σ1

∪ Σ2,

X

1

X

2,Q1

×

Q2,q10

×

q20

, δ,

F1

×

F2,

κ

®

,

where

δ

and

κ

are defined by:

(

q1

,

q2

) ∈ δ((

q1

,

q2

), (

α

1

, (

α

1

=

α

2

) ∧

g1

g2

))

iff q1

∈ δ1

(

q1

,

α

1

,

g1

)

and q2

∈ δ2(

q2,

α

2,g2).

(

q1

,

q2

) ∈

κ

(

x

)

iff q1

κ

1

(

x

)

or q2

κ

2

(

x

).

The proof that L

(A

1

)

L

(A

2

)

=

L

(A

1

∩ A

2

)

is straightforward.

Forthe maindecisionprocedure we havethat:

Theorem6.ForPAs,MembershipisNP-complete,UniversalityandContainmentareundecidable.

Proof. Let

A

be a PAand w

=

w1

· · ·

wn awordin

Σ

⋆.

Fortheupper boundofthe membership,anon deterministicpolynomialalgorithm guessesapath in

A

of length

|

w

|

such that the final state is accepting; and a series of substitutions

σ

1

,

. . . ,

σ

|w|, where

σi

: X → {

wj

,

1

j

≤ |

w

|}

, then checkswhether the corresponding run on w is possible. The lowerbound,i.e.theNP-hardness,followsfromthefactthatthemembershipproblemforPAswithout guards, i.e. fresh-variable automata, isNP-complete (Belkhir etal., 2013,Theorem3).

TheundecidabilityofContainmentandUniversalityisaconsequenceoftheundecidabilityof these problems for subclassesof PAs(Nevenet al., 2004).

Itis worth mentionningthat regularlanguagescanbe complementedwithin the class of PAs:

Proposition7.ThecomplementofaregularlanguageisPA-recognizable.Thatis,givenaFA F thereexistsa PA

A

suchthatL

(A)

= Σ

\

L

(

F

)

.

Proof. The construction of

A

is similar tothe one forFAs (over afinite alphabet).We assume that F

is deterministic. Firstly, we make the completion of F , i.e. we construct anequivalent PA so that for each stateq of F and for each letterl

∈ Σ

there is aunique transition outgoing from q that readsl.

Secondly, we swapthe accepting and non-acceptingstates.

Formally, assume F

= hΣ,

Q

,

p0

,

δ,

F

i

, with Q

= {

q1

, . . . ,

qn

}

, and define

A

= hΣ,

X ,

Q

,

p0

,

δ

,

F

,

κ

i

by

X

= {

x1

, . . . ,

xn

}

Q

=

Q

∪ {

qi1

,

qi2

,

i

=

1, . . . ,n

}

F

= (

Q

\

F

) ∪ {

q i1

,

qi2

,

i

=

1, . . . ,n

}

δ

= δ ∪ {

qi xi,Vj(xi6=aj)

−→

qi1

|

for all aj s.t. qi aj

qi

∈ δ} ∪ {

qi2 xi

qi2

}

κ

(

xi

) = {

qi2

}

Notice that F rejects aword w iff

A

accepts w.

(10)

Fig. 3. A usage policy for opening and reading files.

4.1. NonemptinessisinPSPACE

We motivate the study of PA Nonemptiness problem through an example of a service policy for reading and writing files, which is a variant of the example in Degano et al. (2012) and Reger et al. (2013). The PA of Fig. 3 defines a usage policy for opening and reading files by specifying (i.e. accepting)the forbiddenexecutions. Itstates that(i) afile named f mustbe openbefore beingused, where f is a variable,and (ii) the number of files which are open at the same time is at most one. Moreprecisely onceafile f is openthe PA entersstater1 allowingthe file f to be readand written. Besides, any attempt to read or write in a file whose name is different than f leads the PA to the offending state r2. On the other hand, starting from r0 any attempt to read or write in a file that is not open leads the PA to the offending state r2. We recall that a transition labelled by a term, say

open(f)

, abbreviates two successive transitions labelled by the root symbol and its arguments, here

open

and f , respectively. In this PA, the variables x and f are refreshed at r0, the variable z

is refreshed at r1, and the variables f′ is not refreshed in any state. As mentioned above, checking whether a service specified by PA M (with all states accepting, to be simple) respects the policy amountstocheck the emptinessof M

P .

We recall that Nonemptiness is NL-complete for the subclass of fresh-variable automata (Belkhir et al., 2013) and it is NP-complete for the subclass of registerautomata (Sakamoto and Ikeda, 2000). Firstly we show that Nonemptiness is in PSPACE. Given a PA

A

, we shall show that

A

recognizes a non-empty language over

Σ

iff

A

recognizes a non-empty language over a finite set of letters. For thispurpose,and in order torelatethe two runsof

A

(the oneover aninfinitealphabet and the one overa finitealphabet)we introduceacoherence relation betweensubstitutions.

Definition8. Let C bea finite subset of

Σ

. The coherence relation

C

⊆ ζ × ζ

betweensubstitutions is defined by

σ

¯

C

σ

iff the threefollowing conditionshold:

(1) dom

( ¯

σ

)

=

dom

(

σ

)

,

(2) If

σ

¯

(

x

)

C or

σ

(

x

)

C then

σ

¯

(

x

)

=

σ

(

x

)

, for any variable x

dom

(

σ

)

, and (3) forany variables x

,

y

dom

(

σ

)

,

σ

¯

(

x

)

= ¯

σ

(

y

)

iff

σ

(

x

)

=

σ

(

y

)

.

The claimsin the following lemma are nothard toprove.

Lemma9.LetC

⊆ Σ

beafinitesetofletters,

σ

¯

and

σ

twosubstitutions,x,anda aletterinC .Thefollowing hold.

(11)

(1) If

σ

¯

C

σ

then

|

codom

( ¯

σ

)|

= |

codom

(

σ

)|

.

(2) If

σ

¯

C

σ

andD

Dom

(

σ

)

then

σ

¯

|D

C

σ

|D.

(3) If

( ¯

σ

1

⊎ ¯

σ

2

)

(

σ

1

σ

2

)

withdom

( ¯

σ

i

)

=

dom

(

σ

i

)

,then

σ

¯

i

σ

i,fori

=

1

,

2.

(4) If

σ

¯

C

σ

and

γ

isasubstitutionwithdom

(

γ

)

dom

(

σ

)

= ∅

andcodom

(

γ

)

C ,then

σ

¯

γ

C

σ

γ

.

(5) If

σ

¯

C

σ

with

σ

¯

(

y

)

= ¯

a and

σ

(

y

)

=

a forsome variable y, and x

/

dom

(

σ

)

then

σ

¯

⊎ {

x

7→ ¯

a

}

C

σ

⊎ {

x

7→

a

}

.

(6) If

σ

¯

C

σ

anda

¯

/

C

codom

( ¯

σ

)

anda

/

C

codom

(

σ

)

and x

/

dom

(

σ

)

then

σ

¯

⊎ {

x

7→ ¯

a

}

C

σ

{

x

7→

a

}

.

(7) Letg beaguardsuchthat

Σ

g

C .If

σ

C

σ

¯

,then

σ

|H

g iff

σ

¯

|H

g.

(8) Assumethat

σ

C

σ

¯

,andletg beaguardsuchthat

Σ

g

C .Then,

σ

g iff

σ

¯

g.

In order to prove that only a finite number of constants is needed to cover all possible moves in the simulation game, we have to prove that if two substitutions are equivalent wrt the winning condition—i.e., if

σ

1

C

σ

2 where C will be the setof letters occurring in thetransitions of the simu-lation game—then for each substitution

γ

1, there existsa substitution

γ

2 such thatfor any transition with a guard g such that

σ

1

γ

1

|H

g onealso has

σ

2

γ

2

|H

g. This substitution

γ

2 canactually be computed explicitely from

σ

1

,

σ

2

,

γ

1.

Inwhatfollowswelet S1

⊆ Σ,

S2

⊆ Σ

betwo (possiblyinfinite)setsofletters with

|

S1

\

S2

|

> |X |

and

|

S2

\

S1

|

> |X |

and S1

S2

=

C

6= ∅

.

Definition10. We definethe functions

Θ

CS1,S2

, Θ

CS1,S2

: ξ

X,S1

× ξ

X,S1

× ξ

X,S2

→ ξ

X,S2

as follows.Let

σ

1

,

γ

1

∈ ξ

X ,S1,

σ

2

∈ ξ

X ,S2. Then,

Θ

S1,S2

C

(

σ

1

,

γ

1

,

σ

2

)

isdefined onlywhen

|

dom

(

γ

1

)|

=

1

and dom

(

γ

1

)

dom

(

σ

1

)

= ∅

and

σ

1

C

σ

2 by:

Θ

S1,S2 C

(

σ

1

,

γ

1

,

σ

2

) =

γ

1 if

γ

1

(

x

) ∈

C

{

x

7→

σ

2(y

)}

if

γ

1(x

) ∈

codom

(

σ

1) \C and

σ

1

(

y

) =

γ

1

(

x

),

y

X

{

x

7→

get

(

S2

\

codom

(

σ

2

))}

if

γ

1

(

x

) ∈

S1

\ (

C

codom

(

σ

1

))

where dom

(

γ

1

)

= {

x

}

. And

Θ

CS1,S2

(

σ

1

,

γ

1

,

σ

2

)

is defined onlywhen dom

(

γ

1

)

dom

(

σ

1

)

= ∅

by:

Θ

S1,S2 C

(

σ

1,

γ

1,

σ

2) =

Θ

S1,S2 C

(

σ

1

,

γ

1

,

σ

2

)

if

|

γ

1| =1

γ

2

⊎ Θ

S1,S2 C

(

σ

1

γ

1′

,

γ

1′′

,

σ

2

γ

2′

)

if

|

γ

1| ≥2,

γ

1

=

γ

1′

γ

1′′ and

|

γ

′ 1

| =

1, where

γ

′ 2

= Θ

S1,S2 C

(

σ

1,

γ

1′

,

σ

2) Thefunction

Θ

will be used in the proof of Lemma 12 and in the proof of the decidabilityof the simulation preorder in Section5.2. Letus nowprove that thisconstructioniscorrect.

Lemma11.Let

σ

,

γ

1

∈ ξ

X ,S1 and

σ

∈ ξ

X ,S2 besubstitutionswithdom

(

σ

)

dom

(

γ

1

)

= ∅

and

σ

C

σ

.We

havethat

(

σ

γ

1

) ✶

C

¡

σ

⊎ Θ

CS1,S2

¡

σ

,

γ

1

,

σ

¢¢

(1)

Proof. By induction on

|

dom

(

γ

1

)|

.

Base Case. If

|

dom

(

γ

1

)|

=

1 then assumedom

(

γ

1

)

= {

x

}

and let

γ

2

= Θ

CS1,S2

(

σ

,

γ

1

,

σ

)

. We distinguish threecases depending on

γ

1

(

x

)

.

If

γ

1

(

x

)

C then it follows from the definition of

Θ

CS1,S2 that

γ

2

=

γ

1. From Item (4) of

(12)

If

γ

1

(

x

)

codom

(

σ

)

\

C then in this case we recall that

γ

2

= {

x

7→

σ

(

y

)}

where

σ

(

y

)

=

γ

1

(

x

)

forsome variable y

∈ X

. Thefactthat

(

σ

⊎ {

x

7→

γ

1

(

x

)})

C

σ

⊎ {

x

7→

σ

(

y

)}

follows

from Item (5) ofLemma 9.

Otherwise, i.e.if

γ

1

(

x

)

S1

\ (

C

codom

(

σ

))

then thefact that

(

σ

⊎ {

x

7→

γ

1

(

x

)})

C

(

σ

{

x

7→

get

(

S2

\

codom

(

σ

))})

follows fromItem (6) of Lemma 9.

Induction Case. Assume

γ

1

=

γ

1

γ

1′′ with

|

γ

1′

|

=

1. Let

γ

2

= Θ

CS1,S2

(

σ

,

γ

1

,

σ

),

and

γ

2′′

= Θ

S1,S2 C

(

σ

γ

1′

,

γ

1′′

,

σ

γ

2′

)

and

γ

2

= Θ

CS1,S2

(

σ

,

γ

1

,

σ

) =

γ

2

γ

2′′ Fromthe induction hypothesis it followsthat

½

σ

γ

1

C

σ

γ

′ 2

(

σ

γ

1

) ⊎

γ

1′′

C

(

σ

γ

2

) ⊎

γ

2′′ Therefore

σ

γ

1

C

σ

γ

2

Lemma12.Let

A

beaPAover

Σ

withk variablesandm letters

Σ

A

= {

c1

, . . . ,

cm

}

.Let

Σ

= {

a1

,

. . . ,

ak

,

c1

,

. . . ,

cm

}

.Then,

A

recognizesanon-emptylanguageover

Σ

if,andonlyif,itrecognizesanon-emptylanguage

over

Σ

.

Proof. Let C

= {

c1

, . . . ,

cn

}

. We show that there is a run

(

σ

0

,

q0

)

→ . . . → (

σn

,

qn

)

over

Σ

⋆ in

A

iff

thereisarun

(

σ

0

,

q0

)

→ . . . → (

σ

n

,

qn

)

over

Σ

⋆ in

A

such that

σi

C

σ

i′ forall i

=

0

,

. . . ,

n. Theproof

is by induction onn in both directions. Thebasecase n

=

0 holds triviallysince

σ

0

=

σ

0

= ∅

. Assume thatthe claim holds upton andletus prove itfor n

+

1.

) Assumethereisatransition qn

αn,gn

qn+1 in

A

where

αn

∈ Σ ∪ X

and gn isaguard.Fromthe

in-duction hypothesiswe havethat

σ

n

C

σ

n′. Itfollows fromItem (7)of Lemma 9that

σ

n

(

gn

)

holds

iff

σ

n

(

gn

)

holds. Thus, the transition in

A

over

Σ

is possible. We describe next this transition.

From Definition 4 of the run of PAs, there exists a substitution

γn

: V(

σn

(

αn

))

∪ V(

σn

(

gn

))

→ Σ

such that

(

γ

n

σ

n

)(

gn

)

holds.Hence,wemustfindasubstitution

γ

n

: V(

σ

n

(

α

n

))

∪ V(

σ

n

(

gn

))

→ Σ

such that

(

γ

n

σ

n

)(

gn

)

holds.We define

γ

n′ by

γ

n

= Θ

Σ,ΣC

(

σn

,

γn

,

σ

n

)

. From Lemma 11 we have

that

(

σ

n

γ

n

)

C

(

σ

n

γ

n

)

. Hencefrom Item (7) of Lemma 9it follows that

(

γ

n

σ

n

)(

gn

)

holds.

It remains to show that

σn

+1

C

σ

n+1. But

σn

+1

= (

σn

γn

)

|D and

σ

n+1

= (

σ

n

γ

n

)

|D, for some

set D

⊆ X

. FromItem (2) of Lemma 9 it follows that

σn

+1

C

σ

n′+1.

) Sameproof butwe callthe function

Θ

Σ ,Σ

C

(

σ

n

,

γ

n

,

σn

)

instead of

Θ

Σ,Σ

C

(

σ

n

,

γn

,

σ

n

)

.

Definition13.(Restrictedconfiguration)Arestrictedconfiguration ofaPA

A

withk variables x1

,

. . . ,

xk

and m constantsc1

,

. . . ,

cm isa tuple

(

q

,

α

1

,

. . . ,

αk

)

where

α

1

,

. . . ,

αk

∈ {

a1

,

. . . ,

ak

,

c1

,

. . . ,

cm

}

.

Note that the number of different restricted configurations is exponentially bounded in the size of

A

. From Lemma 12it followsthat:

Lemma14.Assume

A

isaPAthatrecognizes anon-emptylanguage.Thenthereisan acceptingrunq1

. . . →

ql suchthati

6=

j impliesqi

6=

qj,andeachqi isarestrictedconfiguration.

As acorollary, we obtain thatif a PA recognizes a non-empty language L it has an accepting run consistingof restrictedconfigurationsthateach appearatmostonce.Henceits lengthislessthan the number of configurations, which can be encoded in binary in space linear in the size of

A

. We thus obtain:

(13)

Theorem15.TheNonemptiness problemforPAsisinPSPACE.

4.2. NonemptinessisPSPACE-hard

To show that Nonemptiness of PAs is PSPACE-hard, we reduce the reachability problem for bounded one-counter automata (known to be PSPACE-hard) to the Nonemptiness problem of PAs. Inthe restof thissubsection, we first introducebounded one-counterautomata, and thenproceed to PAs.

Definition 16 (Boundedone-counter automata). (See Fearnley and Jurdzinski, 2013.) A bounded one-counterautomaton (

Boca

) is atuple

(

Q

,

b

,

1,

q0

)

where Q is afinite set of states,b

∈ N

is a global counterbound, q0 is the initialstate, and

1

Q

× [−

b

,

b

]

×

Q isthe transition relation.

A

Boca

configuration is atuple

(

q

,

p

)

withq

Q and 0

p

b.Given

τ

= (

q

,

p

,

q

)

∈ 1

and two configurations c1

= (

q1

,

p1

)

and c2

= (

q2

,

p2

)

wedenote c1

τ c2 if q1

=

q, q2

=

q, p

2

=

p1

+

p. Note thatmandating thatc2 isa configuration implies two implicitinequalitytesting 0

p1

+

p

b.

The reachability problem for

Boca

consists in determining whether there exists asequence of tran-sitions starting from the configuration

(

q0

,

0

)

and ending in a configuration

(

q

,

p

)

. This problem has been showntobe PSPACE-completein FearnleyandJurdzinski (2013). WereduceittoPA’s Nonempti-ness as follows:

Assuming 2k−1

b

2k, we build aPA withk

+

1 variables x

1

,

. . . ,

xk

,

r, where each xi contains

the ith bitin thebinary representationofthe counter p,andr standsfor aregisterthatwillhold the current carryof abit-per-bit binaryaddition;

Addition of a positive constant to the counter is encoded by a sequence of k

+

1 half-adders. Each half-adder reads xi, and depending on the value of r and the ith bit of the number to

add, refreshes xi and r, and sets (using a guard) the correct new value for these two variables. A constant number of states is necessary at each half-addition step, and thus the encoding is linear in k

= ⌈

log2b

, and thusin the size ofthe input

Boca

. Notethatthe result isgreaterthan 2⌈log2bif,and onlyif, theregister r contains1 in theend;

Bitwise 2-complement of a register is similarly performed bit-per-bit, using a number of states linear in k;

Substraction of a positiveinteger is encoded by two bitwise 2-complement computations on the counterarounda positiveinteger addition. Ifthe final counteris negativethe intermediate addi-tion step willyielda numbergreaterthan 2k;

Finally, we test after each addition of a positiveinteger that the counteris smaller or equal to b

by adding2k

b toit, and then substracting thissamenumber;

The final configuration

(

qf

,

pf

)

is encoded by a transition from states of the PA encoding qf to its unique final state havingas guard the equality test of the variables x1

,

. . . ,

xk withthe bits in

the binaryencoding of pf.

The details are in the companion report tothis paper.The PSPACE-hardnessof the reachability prob-lem for

Boca

and Theorem 15 imply:

Theorem17.TheNonemptiness problemforPAsisPSPACE-complete.

Notethatwe needonlytwo letters in

Σ

A (i.e.

Σ

A

= {

0

,

1

}

) in theencoding we haveemployed to prove the hardness result.

5. Servicesynthesiswithparametrizedautomata

We defineand studythe simulation preorder for PAs, anextension of the simulation preorder for FAs. Then we show how to synthesis a mediator (i.e. a PA) allowing the communication between a

(14)

client and the community of available services. To simplify the presentation, we shall only consider in thissectionPAswithout

ε

-transitionsand in whichthere isaunique initialstateand all the states areaccepting.Theproof ofthe decidabilityofsimulationfor PAswith

ε

-transitionsis discussedat the endof Subsection 5.2.

5.1. SimulationpreorderforPAs,andsymbolicgames

Simulation for PAs is arelation defined overpairs of configurations instead of pairs of states as it is thecase for FAs.

Definition18 (Simulation preorder). Let

A

1

= hΣ,

X

1

,

Q1

,

q10

,

δ

1

,

F1

,

κ

1

i

and

A

2

= hΣ,

X

2

,

Q2

,

q20

,

δ

2

,

F2

,

κ

2

i

be two PAswhere

X

1

∩ X

2

= ∅

. Asimulationof

A

1 by

A

2 is arelation

⊆ (ζ

X1

×

Q1

) × (ζ

X2

×

Q2

)

such that: 1.

(∅,

q10

)

(∅,

q20

)

, and 2. if

(

σ

1

,

q1

)

(

σ

2

,

q2

)

and if

(

σ

1

,

q1

)

a

→ (

σ

1

,

q′1

)

for a

∈ Σ

then there exists a state q′2

Q2 and a substitution

σ

2′ such that

(

σ

2

,

q2

)

→ (

a

σ

2

,

q2

)

and

(

σ

1

,

q1

)

(

σ

2

,

q2

)

.

In order to show the decidability of simulation for PAs we shall provide agame-theoretic formu-lation of simulation in termsof symbolicsimulationgames. Roughly speaking, the arena of a symbolic gameis aPA in whicheachstateis controlledbyone ofthe twoplayers,

Eloise

or

Abelard

. From a state under his control, the player chooses an outgoing transition and instantiates the (possible) free variable that labels this transition and all the free variables in the constraint of this transition. Firstly, we introducesymbolic games in Definition 19 and their concretisationin Definition 20. Then, we show in Definition 21how toformulatethe simulation preorder for PAsas asymbolic game.

Definition19 (Symbolicgames). A symbolic game is apair

(A,

λ)

where

A

= hΣ,

X ,

Q

,

q0

,

δ,

F

,

κ

i

is a PA and

λ

:

Q

→ {E, A}

is the labelling function. The states labelled by

E

(resp.

A

) correspond to

Eloise

(resp.

Abelard

) states.

Theconcretisationofasymbolicgameamountstoinstantiateits variablesfroma(possiblyinfinite) set of letters. The resulting game is a two-players game in the sense of Definition 1. The formal definitionfollows.

Definition 20 (Concretisation of symbolic games). Let

(A,

λ)

be a symbolic game where

A

=

hΣ,

X ,

Q

,

q0

,

δ,

F

,

κ

i

. Let S

⊆ Σ

be a set of letters. The concretisation of the symbolic game

(A,

λ)

withletters in S,denotedby

G(A,

λ,

S

)

,is thetwo playersgame

h

PosE

,

PosA

,

M

,

p

i

where theinitial positionis p

= (∅,

q0

)

and thesetof positionsPos

=

PosA

PosE isthesetof positionscontaining p⋆ and reachablefrom themoves M:

M

=

©

(

σ

,

q

) →

¡

σ

,

q

¢

where

(

σ

,

q

)

a

¡

σ

,

q

¢

for all a

∈ Σ

ª

Finally,

½

PosE

= {(

σ

,

q

) ∈

Pos where

σ

∈ ζ

X,Sand

λ(

q

) = E}

PosA

= {(

σ

,

q

) ∈

Pos where

σ

∈ ζ

X,Sand

λ(

q

) = A}

Definition21(Symbolicgamesforsimulation).Let

A

1

= hΣ,

X

1

,

Q1

,

q10

,

δ

1

,

F1

,

κ

1

i

and

A

2

= hΣ,

X

2

,

Q2

,

q20

,

δ

2

,

F2

,

κ

2

i

be two PAsand let S

⊆ Σ

be asetof letters.Thesymbolicsimulationgame of

A

1 by

A

2 is thesymbolic game

(M,

λ)

where

M

= hΣ,

X ,

Q

,

q0

,

δ,

F

,

κ

i

is defined by:

(15)

Q

Q1

×

Q2

Q1

×

Q2

× (Σ

A1

X

1) q0

=

q10

×

q20

δ = 1

0

∪ 11

,

where

1

0

= {(

q1

,

q2

)

α1,g1

−→ (

q1

,

q2

,

α

1

),

for all q1 α1,g1

−→

q1

∈ δ1}

1

1

= {(

q1

,

q2

,

α

1

)

α2,g2∧(α1=α2)

−→

(

q1

,

q2

),

for all q2 α2,g2

−→

q2

∈ δ2}

κ

=

κ

1

×

κ

2

and the labelling function

λ

is defined by

λ((

q1

,

q2

))

= A

and

λ(

q1

,

q2

,

α

)

= E

, for every

(

q1

,

q2

),

(

q1

,

q2

,

α

)

Q .

Thesimulation gameof

A

1 by

A

2 overletters in S, denotedby

G

S

(A

1

,

A

2

)

, is the concrete game

G(M,

λ,

S

)

.

Finally,anyinfiniteplayin

G(M,

λ,

S

)

iswinning for

Eloise

,and anyfiniteplayis losingforthe player who cannot move.

The simulation problem for PAs is the following: given two PAs

A

1 and

A

2, is

A

1

✂ A

2? This amountstoaskingwhetherplayer

Eloise

hasawinning strategyinthe concretegame

G

Σ

(A

1

,

A

2

)

.

Thefollowing lemma states animmediateproperty of the symbolic games.

Lemma22.Let

(M,

λ)

beasymbolicgameandS

⊂ Σ

.IfS isfinitethentheconcretegame

G

S

(M,

λ)

isfinite too.

5.2. Decidabilityofthesimulationproblem

We show that the simulation problem is decidable by showing that solving symbolic games is decidable. The idea is that the problem of solving a symbolic game can be reduced to solving the same game in which the two players instantiate the variables from a finite setof letters, see Propo-sition 25. In order to relate these two games we need to adapt the notion of coherence between substitutions given in Definition 8 to the coherence between game positions. The definition of the coherence betweengame positions,stilldenoted by

C, follows.

Definition23.Let

M

be aPAand q be astateof

M

. Let S1

,

S2 besubsets of

Σ

where C

=

S1

S2

6=

. Let

(

q

,

σ

)

P (resp.

(

q

,

γ

)

P) be a position of player

P

∈ {E, A}

in the two-players game

G

S1

(M,

λ)

(resp.

G

S2

(M,

λ)

). Define

(

q

,

σ

)

P

C

(

q

,

γ

)

P iff

σ

C

γ

.

Let

(M,

λ)

be a symbolic game where

M

= hΣ,

X ,

Q

,

q0

,

δ,

F

,

κ

i

is aPA. Let k

= |X |

. We define

C0 to be thefinite setof letters:

C0

= Σ

A

⊎ {

c1, . . . ,ck

}

(2)

Let us take the abbreviations

G

Σ

= G

Σ

(M,

λ)

and

G

C0

= G

C0

(M,

λ)

. Now we are ready to show

that the games

G

Σ and

G

C0 are equivalent. For the direction “

” we show that out of a winning strategy of

Eloise

in

G

Σ

(M,

λ)

weconstruct awinning strategyfor her in

G

C0

(M,

λ)

.

For this purpose, we show that each move of

Abelard

in

G

C0

(M,

λ)

can be mapped to an

Abelard

move in

G

Σ

(M,

λ)

, and that

Eloise

response in

G

Σ

(M,

λ)

can be actually mapped to an

Eloise

move in

G

C0

(M,

λ)

. Formally,weneed to defineafunction f

f

:

Pos

¡

G

Σ

(

M

, λ)

¢

Pos

¡

G

C0

(

M

, λ)

¢

in order to make possible thismapping as shown in the Diagram below. It follows that this is suffi-cient to argue that if there is aninfinite play in

G

Σ

(M,

λ)

then we can constructan infinite play in

Figure

Fig. 1. PROM example.
Fig. 2. Two PAs A 1 and A 2 where the variable y 1 is refreshed in the state p, and the variables x 2 , y 2 are refreshed in the state q.
Fig. 3. A usage policy for opening and reading files.
Fig. 4. A synthesized mediator for the PROM example.

Références

Documents relatifs

The world supply of vegetable oils includes an abundance of an unsaturated and omega 6 (or n‐6) C18 fatty acid, linoleic, which has been declared for decades

In this case, the laser pump excites the titanium film and, through a thermoelastic process, leads to the generation of picosecond acoustic pulses that propagate within the copper

More generally, one says that a variety of dimension n, defined by a system of polynomial equations, is rational if its points (the solutions of the system) can be

At that time the com­ pany, under the direction of Peter Z inovieff, was exploring the possibilities of using mini­ computers to control electronic music instruments.. My job was

Singular integrals associated to the Laplacian on the affine group ax+b.. G. [H 1]):

become the service sources best composition path i Composition Engine selects t the candidate service com maximum value of the f(n) search algorithm.. all possible co determined

81 (65—83), la criáis de la crítica tradicional hispanoamericana se produjo con oambios radicales en la realidad social de Amérioa Latina que posibilitaron el nacimiento de la

The second section deals with the presentation of the mathematical model that we consider, which is a specific case of hyperbolic model for chemotaxis where the velocity of the