Transcript
  • 8/7/2019 UbiCC Camera Ready ID 270_270

    1/9

    Ubiquitous Computing and Communication Journal

    LRN/R-MAUDE BASED APPROACH

    FOR MODELING AND SIMULATION

    OF MOBILE CODE SYSTEMS

    Lad Kahloul1 and Allaoua Chaoui21Computer Science Department, Biskra University, Algeria

    [email protected] Science Department, Constantine University, Algeria

    [email protected]

    ABSTRACT

    Code mobility technologies attract more and more developers and consumers. Numerousdomains are concerned, many platforms are developed and interest applications are realized.However, developing good software products requires modeling, analyzing and proving steps.The choice of models and modeling languages is so critical on these steps. Formal tools are

    powerful in analyzing and proving steps. However, poorness of classical modeling language tomodel mobility requires proposition of new models. The objective of this paper is to provide aformal approach based on LRN and R-Maude. LRN (Labeled Reconfigurable Nets) is aspecific formalism that we propose to model different kinds of code mobility. R-Maude(Reconfigurable Maude) is a system that we devlop to encode and simulate LRN-models.

    Keywords: code mobility, modeling mobility, LRN, R-Maude.

    1 INTRODUCTION

    Code mobility is one of the attracting fields forcomputer science researchers. Code mobilitytechnology seems an interest solution fordistributed applications facing bandwidth problems,users' mobility, and fault tolerance requirement.

    Numerous platforms were been developed [17].Such platforms allow the broadcasting of thistechnology in many domains (informationretrieving [9], e-commerce [11], networkmanagement [22], ). Software engineeringresearches have provided some interest design

    paradigms influencing the development of the field.The most recognized paradigms [7] are: code ondemand, remote evaluation, and mobile agent. Toavoid ad-hoc development for code mobilitysoftware, many works attempt to proposemethodologies and approaches ([16], [21], [14],). Indeed, these approaches are mostly informal.They lack in analyzing and proving system

    proprieties. Enhancing development process withformal tools was an attractive field in code mobilityresearches.

    Traditional formal tools witch were massivelyused to model and analyze classical systems seemto be poor to deal with inherent proprieties in codemobility systems. Works on formal tools attempt toextended classical tools to deal with code mobility

    proprieties. The most important proposition can be

    found in process algebra based model and statetransition model. For the first one, -calculus [13]is the famous one, and for the second, high-levelPetri net (with many kinds) can be considered thegood representative. -calculus is an extension forCCS (communicating concurrent systems) [12].

    CCS allows modeling a system composed of a setof communicating process. This communicationuses names (gates) to insure synchronization

    between processes. In -calculus information canbeen exchanged through gates. The key idea is thatthis information can be also a gate. With this idea,

    process can exchange gates. Once these gatesreceived, they can be used by the receiver tocommunicate. In an extension of-calculus, HO-calculus [15], processes can exchange other

    processes through gates (the exchanged processescalled agents).

    To model mobility with Petri nets, high level

    PNets were proposed. The most famous are Mobile Nets (variant of coloured Petri nets) [1] andDynamic Petri nets. In mobile Petri nets, names of

    places can appear as tokens inside other places.Dynamic Petri nets extend mobile Petri nets. In thislast one, firing a transition can cause the creation ofa new subnet. With high-level Petri nets, mobilityin a system is modeled through the dynamicstructure of the net. A process appearing in a newenvironment is modeled through a new subnetcreated in the former net by firing a transition.Many extensions have been proposed to adaptmobile Petri net to specific mobile systems:

    Elementary Object Nets [18], reconfigurable nets[3], Nested Petri Nets [10], HyperPetriNets [2], With respect to [20], all these formalisms lack in

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    2/9

    Ubiquitous Computing and Communication Journal

    security aspect specification. To handle this aspectin code mobility, recently Mobile SynchronousPetri Net (based on labeled coloured Petri net) are

    proposed [19].The objective of this work is to treat to aspects

    of code mobility: modeling and simulation. We try

    to propose a formal approach in witch we definetwo formalisms : Labeled Reconfigurable Nets(LRN) and Reconfigurable Maude (R-Maude).Firstly, LRN will be used to model the system thenR-Maude will encode and simulate this model. Ourformalism labeled reconfigurable nets with adifferent semantic from the one presented in [3] isdedicated to model code mobility systems. Weattempt to propose to model mobility in an intuitiveand an explicit way. Mobility of code (a process oran agent) will be directly modeled throughreconfiguration of the net. We allow adding anddeleting of places, arcs, and transitions at run time.

    R-Maude is an extension for Maude that we propose and prototype in order to encode andsimulate LRN models.

    The rest of this paper is organized as follows.Section 2 starts by presenting the definition of theformalism LRN. In section 3 we show how LRNcan be used to model the three mobile code

    paradigms: remote evaluation, code ondemand, and mobile agent. Section 4 presentsthe idea and foundation of R-Maude, and section 5discusses the prototype and shows an example. Insection 6, we present some related works. Weconclude this work and give some perspectives, in

    section 7.

    2 LABELED RECONFIGURABLE NETS

    Labeled reconfigurable nets are an extension ofPetri nets. Informally, a labeled reconfigurable netis a set of environments (blocs of units).Connections between these environments and theircontents can be modified during runtime. A unitis aspecific Petri net. A unit can contain three kinds oftransitions (a unique starttransition: , a set ofordinary transitions: , and a set of reconfiguretransitions: ).

    Preconditions and post-conditions to fire a startor an ordinary transition are the same that in Petrinets. Reconfigure transitions are labeled with labelsthat influence their firing. When a reconfiguretransition is fired, a net N will be (re)moved froman environment E towards another environment E.The net N, the environment E and E are defined inthe label associated to the transition. After firing areconfigure transition, the structure of the labeledreconfigurable net will be updated (i.e some places,arcs, and transitions will be deleted or added). Hereafter we give our formal definitions of the concepts:unit, environment and labeled reconfigurable net.

    After the definition, we present the dynamic aspectof this model.

    Formal Definition:

    Let N1, N2, Nkbe a set of nets.for each i: 1, , n : Ni = (Pi, Ti, Ai), such that :

    1. Pi = {pi1, p

    i2, , p

    in} a finite set of places,

    2. Ti = STiRTi STi={st

    i1, st

    i2, , st

    im} a finite set of

    standard (ordinary) transitions, RTi = {rt

    i1, rt

    i2, , rt

    ir} a finite set

    (eventually empty) of reconfiguretransitions,

    3. Ai Pi x Ti Ti x Pi.

    Definition 1 (Unit): a unit UN is a net N i that has aspecific transition stij denotedstart

    i. SoTi={start

    i}STiRTi.

    Dfinition 2 (Environment): anenvironment E isa quadruplet E=(GP, RP, U, A)

    GP = {gp1, gp2, , gps} a finite set ofspecific places : guest places ; RP = {rp1, rp2, , rps} a finite set of specific

    places : resource places; U = { N1, N2, Nk} a set of nets. A GP x StrTRPxT. Such that :StrT={start1, start2, , startk} and T=ST1RT1 ST2RT2 STkRTk

    Definition 3 (Labeled reconfigurable net):

    A labeled reconfigurable net LRN is a set of

    environments. LRN={E1, E2, , Ep} such that There exist at least one net Ni in LRN such

    that RTi ;

    For each rtij RTi, rtij has a label, such that N is a unit, Eeand Eg are environments, a set of places, a set of arcs.

    Dynamic of labeled reconfigurable nets:Let LRN = {E1, E2, , Ep} be a labeledreconfigurable net,

    Let Ei = (GPi, RPi, Ui, Ai) be an environment in

    LRN, GPi = {gp1

    i, gp2i, , gps

    i}; RPi = {rp1

    i, rp2i, , rpp

    i} ; Ui = { N

    1

    i, N2

    i, Nk

    i}; Ai GPi xstartsi RPi x Ti Ti x RPi,

    where:Sartsi= {start1, start2, ..., startk} and

    Ti={STi1, STi2, ..., ST

    ik}{RT

    i1, RT

    i2, ..., RT

    ik}

    Let RTji be the non empty set of reconfigure

    transitions associated with the net Nji.

    RTji={rtj1, rt

    j2, , rt

    jr}.

    Let rtjm be a reconfigure transition inRTj

    i, such that : Ee=(GP

    e, RPe, Ue, Ae); N=(P, T, A) and NUe;

    Eg=(GPg, RPg, Ug, Ag);

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    3/9

    Ubiquitous Computing and Communication Journal

    RPe; =rc. (rdenotes removedplaces and c denotes cloned places). is a set of arcs. RPe x TRPg x T.

    Letstrtbe the start transition of N.

    Conditions to fire rtjm:

    In addition to the known conditions, we impose thatthere exists afree place pg in GP

    g; witch means: foreach t startsg, (pg,t)A

    g.

    After firing rtjm:In addition to the known post-condition of atransition firing, we add the following post-condition:

    LRN will be structurally changed such that:If Ee and Eg denote the same environment then

    LRN will be not changed;Else:

    1) Ug Ug{N}; Ue Ue/{N};

    2) Ag

    Ag

    (pg,strt);3) LetDA ={(a, b) Ae/ (a and b) and

    ((aN and bN) or (aN and bN))}, Ae=Ae-DA.DA deleted arcs- to be deleted aftermoving N.

    4) RPg RPg; RPeRPe/r

    5) if ALRN is the set of arcs in LRN,ALRNALRN .

    3 MODELING MOBILITY PARADIGMS

    WITH LABELED RECONFIGURABLE

    NETS

    A mobile code system is composed ofexecution units (EUs), resources, andcomputational environments (CEs). EUs will bemodeled as units and computational environmentsas environments. Modeling resources requires usinga set of places.

    Reconfigure transitions model mobility actions.The key in modeling mobility is to identify thelabel associated with the reconfigure transition. Wemust identify the unit to be moved, the targetcomputational environment and the types of

    binding to resources and their locations. This labeldepends on the kind of mobility.

    In general, a reconfigure transition rtis alwayslabeled , such that:

    EU: the execution unit to be moved. CE, CE: respectively, resource and targetcomputational environments. : will be used to model transferableresources. So is empty if the system has notransferable resource. : models bindings after moving.

    The execution unit that contains rt and the EUthat represents the first argument in the label will bedefined according to the three design paradigms:

    remote evaluation (REV), code on demand (COD),and mobile agent (MA).

    3.1. Remote Evaluation

    In remote evaluation paradigm, an executionunit EU1 sends another execution unit EU2 from acomputational environment CE1 to another oneCE2. The reconfigure transition rt is contained in

    the unit modeling EU1, and EU2 will be the firstargument in rts label.

    Example 4.1:Let us consider two computationalenvironments E1 and E2. Firstly, E1 contains twoexecution units EU1 and EU2; E2 contains anexecution unit EU3. The three execution unitsexecute infinite loops. EU1 executes actions {a11,a12}, EU2 executes actions {a21, a22, a23}, and EU3executes actions {a31, a32}. a21 requires atransferable resource TR1 and a non-transferableresource bound by type PNR1 witch is shared witha11. a22 and a12 share a transferable resource bound

    by value VTR1, and a23 requires a non-transferableresource NR1. In E2, EU1 requires a non-transferable resource bound by type PNR2 toexecute a31. PNR2 has the same type of PNR1.

    The system will be modeled as a labeledreconfigurable net LRN. LRN contains twoenvironments E1, E2 that model the twocomputational environments (CE1 and CE2). UnitsEU1 and EU2 will model execution units EU1 andEU2, respectively. In this case, the unit EU1 willcontain a reconfigure transitionrt; suchthat:

    1. E1 =(RP1, GP1, U1, A1); RP1= {TR1, PNR1,

    VTR1, NR1}. U1 = {EU1,EU2};2. E2 = (RP2, GP2, U2, A2); RP2={ PNR2}. GP2

    ={PEU1}.

    3. r={TR1}, c={VTR1};

    4. ={(PEU1,str2), (PNR2,a21), (NR1, a23)}.

    Fig. 1 shows the configuration before firing rt,and Fig. 2 shows the configuration after the firing.

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    4/9

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    5/9

    Ubiquitous Computing and Communication Journal

    Example 4.2: let E1 and E2 two computationalenvironments. E1 contains two agents, a mobileagent MA and a static agent SA1; E2 contains aunique static agent SA2. The three agents executeinfinite loops. MA executes actions {a11, a12, a13 },SA1 executes actions {a21, a22, a23}, and SA2

    executes actions {a33, a32}. To be executed, a11require a transferable resource TR1 and a non-transferable resource bound by type PNR1 witch isshared with a21. a12 and a22 share a transferableresource bound by value, and a13 and a23 share anon-transferable resource NR1. In E2, SA2 requires anon-transferable resource bound by type PNR2 toexecute a32. PNR2 has the same type of PNR1.

    The system will be modeled as a labeledreconfigurable net LRN. LRN contains twoenvironments E1 and E2 that model the twocomputational environments. In this case the unitAthat models the mobile agent A will contain a

    reconfigure transition rt < A, E1, E2, , >; suchthat:1. E1 =(RP1, GP1, U1, A1); RP1 contains at least

    four places that model the four resources.Let TR1, NR1, PNR1 and VTR1 be these

    places. GP1 contains at least a free place PA1modeling that A can be received, andU1={A}.

    2. E2=(RP2,GP2, U2, A2); RP2={PNR2},GP2={PA2}.

    3. r={TR1}, c={VTR1};4. ={(PA2, str1), (PNR2, a11), (NR1, a13)}.

    Fig. 5 shows the configuration before firing rt.

    Figure 5: MA-model before firing rt

    Fig. 6 shows the configuration after the firing.

    Figure 6: MA-model after firing rt.

    4 RECONFIGURABLE MAUDE

    Maude [23] is a high-level language and high- performance system supporting executablespecifications and declarative programming inrewriting logic [24]. Maude also supportsequational specification, since rewriting logic

    contains equational logic. The underlyingequational logic chosen for Maude is membershipequational logic, that has sorts, subsorts, operatoroverloading, and partiality definable bymembership and equality conditions. Modules ofMaude are theories in rewriting logic. The mostgeneral Maude module are called system modules.A rewrite theory is a triple T=(, E, R), where isa signature, E a set of equations and R a set ofrewriting rules. The equations E in the equationaltheory (, E) are presented as a union E=AE,with A a set of equational axioms introduced asattributes of operators in the signature . E is a set

    of Church-Rosser equations assumed to beterminating modulo the axioms A. Considering theMaude syntax, a system module has the form modT endmod. Maude contains a sublanguage offunctional modules and object modules. Afunctional module have the form fmod=(, E)endfmand an object module have the same formas system module. Maude can be used as a tool forthe specification and verification of distributedsystems. The dynamic of the distributed system isspecified by rewrite rules. Rewrite rules modeltransitions from one state to another state, duringthe execution of the distributed system.

    Maude has been extended to deal with someaspects not considered in former version. Real time

    PA2E2

    PNR2

    PA1

    str2

    P32

    P31

    a32

    a31

    a21

    rt

    E1

    str1

    P11

    P13

    a13

    P12

    a12

    a11

    PA1

    TR1

    VTR1

    NR1

    PNR1

    P21

    PA2

    str3

    P22

    a23

    a22

    rt

    E2

    str1

    P11

    P13

    P4

    a13

    P12

    a12

    a11

    PA2

    TR1

    VTR1

    PNR2

    PA1

    str3

    P32

    P31

    a32

    a31

    NR1

    E1

    VTR1

    P23

    P22

    a23

    a22

    PNR1

    PA1PA2

    str2

    P21

    a21

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    6/9

    Ubiquitous Computing and Communication Journal

    Maude [25]is a system to specify and analyze realtime and hybrid systems. Mobile Maude [5] is anextension of Maude for mobile systemsspecification. Mobile Maude is an object orientedhigh level language with asynchronous message

    passing. The key feature of mobile Maude is that it

    deals with various security aspects. Cryptographicauthentication protects machine from maliciousmobile code, redundant checks insure reliabilityand integrity of computations, and public-keyinfrastructure service protects communications.

    In this section we propose an encoding ofLabeled Reconfigurable Nets in a Maude-basedlanguage. We call the inspired languageReconfigurable Maude (R-Maude). We want to

    profit from the powerful of Maude (as a meta-language). We extend Maude to support thetranslation of LRN and their simulation. R-Maudeenrich Maude with new kind of rewriting rules.

    Theses rules are called Reconfigurable rules (R-Rules). The semantic of these rules is similar to thatof Reconfigurable transition in LRN. When a R-rule is executed, the R-Maude specification will beupdated in different ways, this will depend on labelassociated with this rule.

    A specification in R-Maude is a set ofReconfigurable rewrite theories (R-theories). An R-Theory RT is a triple (, E, R) as like a rewritetheory. The different resides in the set R. R willcontain two kinds of rules: standard Rules S-Rules(well known rules of Maude) and Reconfigurablerules R-Rules. A R-Rule r is composed of a label

    = and a rule tt. In the label, RT1 and RT2 are two R-Theorie, S is a segmentof a theory, and d a specific parameter. Thesegment S can be a set of sorts, rules, variables,operators that can be an R-theory or not. When ris fired, the specification can be updated in severalways. Updating specification means that their R-theories will be changed. This change depends on. In general, when r is fired, the segment S willmove from RT1 to RT2 or the inverse. The d

    parameter can be used to express direction of thismove.

    5 PROTOTYPING R-MAUDE

    We have prototyped R-Maude. The prototypeis a system composed from a text editor and aninterpreter. The editor is used to enter thespecification and commands. The interpreterexecutes commands, and through this updatesspecifications. The system was experimented on aLAN (Local Area Network), composed of a fewmachines. The system is installed on all hosts. Sothe specifications are edited ever where. On everyhosts, commands can be executed. The execution ofcommands will create the system dynamic. Thisdynamic can be shown as migration ofspecifications part (or ever else at whole) through

    the LAN. The specification (or their parts) aretransferred in messages between machines, usingUDP protocol.

    The interpreter realized for R-Maude can beused to interpret Maude specifications. The majordifferent is that in this newest interpreter, we have

    added the interpretation of R-Rules. The label of anR-Rule precedes the rule, and it has the form [MT|L| IP@| S]. Semantics of these parameters is : MT:mobility type (MA, COD, REV, ), L: a multi-setof operations and rules to be moved, cloned orremoved from or to the local host, IP@: IP addressof distant host, S: sources to move or to removefrom or to the local host. When specifications (or

    part of them) are moved, some resources (R)necessary to firing some rules become far (on another host). IP address of the far host appears withthe concerned resource in the form: R[IP@].

    To encode LRN we adopt the same rules

    proposed to translate Petri Nets into Maude in [23].The newest is that R-transition will be translated inR-Rules. Here after, we present the encoding ofFig.5s example in R-Maude prototype. Weconsider that the two environments E1, E2 arespecified as two specifications on two hosts (Host1and Host2). Host1 has the IP address : 192.168.0.1,and Host2 has the IP address : 192.168.0.2.

    On Host1, we have the specification:

    mod E1sort Place Marking .subsort Place

    Marking .ops PA

    1,P

    11,P

    12,P

    13,P

    14,PA

    2,P

    21,

    P22,P

    23,TR

    1,VTR

    1,PNR

    1,NR

    1:->Place

    rl [str1] : PA

    1=>P

    11.

    rl [rt][MA|192.186.0.2|{{P11-

    P14},{str

    1-

    a13}}|{TR

    1,VTR

    1}] :

    P11=>P

    12.

    rl [a11] : P

    12, TR

    1, PNR

    1=>P

    13.

    rl [a12] : P

    13, VTR

    1=>P

    14.

    rl [a13] : P

    14, NR

    1=>PA

    1.

    rl [str2]: PA

    2=>P

    21.

    rl [a21] : P

    21, PNR

    1=>P

    22.

    rl [a22] : P

    22, VTR

    1=>P

    23.

    rl [a23] : P

    23, NR

    1=>PA

    2.

    endmod

    and on Host2, we have the specification :

    mod E2sort Place Marking .subsort Place

    Marking .ops PA

    1,PA

    2,P

    31,P

    32,PNR

    2: -> Place.

    rl [str3] : PA

    2=>P

    31.

    rl [a31] : P

    31=>P

    32.

    rl [a32] : P

    32, PNR

    2=>PA

    2.

    endmod

    As an example of a command, we have rwPA1 on Host1. The execution of this command

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    7/9

    Ubiquitous Computing and Communication Journal

    will produce respectively on Host1, and Host2 thetwo specifications:

    mod E1sort Place Marking .subsort Place

    Marking .ops PA1,PA2,P21,P

    22,P

    23,

    VTR1,PNR

    1,NR

    1:->Place

    rl [str2]: PA

    2=>P

    21.

    rl [a21] : P

    21, PNR

    1=>P

    22.

    rl [a22] : P

    22, VTR

    1=>P

    23.

    rl [a23] : P

    23, NR

    1=>PA

    2.

    endmod

    and

    mod E2sort Place Marking .subsort Place Marking .

    ops PA1,PA2,P31,P32,PNR2 : -> Place.ops VTR

    1, TR

    1:-> Place.

    ops P11,P

    12,P

    13,P

    14:->Place.

    rl [str3] : PA

    2=>P

    31.

    rl [a31] : P

    31=>P

    32.

    rl [a32] : P

    32, PNR

    2=>PA

    2.

    rl [str1] : PA

    1=>P

    11.

    rl [rt][MA|192.186.0.2|{{P11-

    P14},{str

    1-

    a13}}|{TR

    1,VTR

    1}] :

    P11=>P

    12.

    rl [a11] : P

    12, TR

    1, PNR

    2=>P

    13.

    rl [a12] : P

    13, VTR

    1=>P

    14.

    rl [a13]:P

    14,NR

    1[192.168.0.1]=>PA

    1.

    endmod

    Finally, the state of the marking will be : P12 onthe Host2. At this point, the two specificationscontinue their execution on the two hosts wherethey reside.

    6 RELATED WORKS

    In [4], the authors proposed PrN(Predicate/Transition nets) to model mobility. Theyuse concepts: agent space witch is composed of amobility environment and a set of connector nets

    that bind mobile agents to mobility environment.Agents are modeled through tokens. So these agentsare transferred by transition firing from a mobilityenvironment to another. The structure of the net isnot changed and mobility is modeled implicitlythrough the dynamic of the net. In [19], authors

    proposed MSPN (Mobile synchronous Petri net) asformalism to model mobile systems and securityaspects. They introduced notions of nets (an entity)and disjoint locations to explicit mobility. A systemis composed of set of localities that can containnets. To explicit mobility, specific transitions(called autonomous) are introduced. Two kinds ofautonomous transition were proposed: new and go.Firing ago transition move the net form its locality

    towards another locality. The destination locality isgiven through a token in an input place of the gotransition. Mobile Petri nets (MPN) [1] extendedcolored Petri nets to model mobility. MPN is basedon -calculus and join calculus. Mobility ismodeled implicitly, by considering names of places

    as tokens. A transition can consumes some names(places) and produce other names. The idea isinherited from -calculus where names (gates) areexchanged between communicating process. MPNare extended to Dynamic Petri Net (DPN) [1]. InDPN, mobility is modeled explicitly, by addingsubnets when transitions are fired. In their

    presentation [1], no explicit graphic representationhas been exposed.

    In nest nets [8], tokens can be Petri nets themselves. This model allows some transition whenthey are fired to create new nets in the output

    places. Nest nets can be viewed as hierarchic nets

    where we have different levels of details. Placescan contain nets that their places can also containother nets et cetera. So all nets created when atransition is fired are contained in a place. So thecreated nets are not in the same level with the firstnet. This formalism is proposed to adaptiveworkflow systems.

    In [3], authors studied equivalence between the join calculus [6] (a simple version of-calculus)and different kinds of high level nets. They usedreconfigurable net concept with a differentsemantic from the formalism presented in thiswork. In reconfigurable nets, the structure of the net

    is not explicitly changed. No places or transitionsare added in runtime. The key difference withcolored Petri nets is that firing transition can changenames of output places. Names of places can figureas weight of output arcs. This formalism is

    proposed to model nets with fixed components butwhere connectivity can be changed over time.

    In this work, we have attempted to provide aformal and graphical model for code mobility. Wehave extended Petri net with reconfigure labeledtransitions that when they are fired reconfigure thenet. Mobility is modeled explicitly by the

    possibility of adding or deleting at runtime arcs,

    transitions and places. Modification in reconfiguretransitions label allows modeling different kinds ofcode mobility. Bindings to resources can bemodeled by adding arcs between environments. It isclear that in this model created nets are in the samelevel of nets that create them. Creator and creatednets can communicate. This model is moreadequate for modeling mobile code systems. We

    propose also an extension for Maude, that we callR-Maude. R-Maude extends Maude withReconfigurable rules (R-rules). When an R-Rule isfired, R-Maude specifications are reconfigured on aLAN (Local Area Net).We use R-Maude to encode

    and simulate LRN models.

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    8/9

    Ubiquitous Computing and Communication Journal

    7 CONCLUSION

    Proposed initially to model concurrency anddistributed systems, Petri nets attract searchers inmobility modeling domain. The ordinary formalism

    is so simple with a smart formal background, but itfails in modeling mobility aspects. Many extensionswere been proposed to treat mobility aspects. Thekey idea was to introduce mechanisms that allowreconfiguration of the model during runtime. Themost works extends coloured Petri nets and borrow-calculus or join calculus ideas to model mobility.The exchanging of names between processes in -calculus is interpreted as exchanging of placesnames when some transitions are fired. This canmodel dynamic communication channels. In muchformalism, mobility of process is modeled by a net

    playing as token that moves when a transition is

    fired. All these mechanisms allow modelingmobility in an implicit way. We consider that themost adequate formalisms must model mobilityexplicitly. If a process is modeled as a subnet,mobility of this process must be modeled as areconfiguration in the net that represents theenvironment of this process.

    In this paper, we have presented a newformalism labeled reconfigurable nets. Thisformalism allows explicit modeling ofcomputational environments and processes mobility

    between them. We have presented how thisformalism allows, in a simple and an intuitive

    approach, modeling mobile code paradigms. Wehave focused on bindings to resources and how theywill be updated after mobility. We have presentedan extension for Maude : reconfigurable Maude (R-Maude). R-Maude is a distributed system. Thissystem can be used to specification and simulationof mobile code system. A prototype for this systemhas been realized. We use this prototype to encodeand simulate LRN models. In our future works we

    plan to focus on modeling and analyzing aspects. Inmodeling aspects, we are interested to handle

    problems such that modeling multi-hops mobility, processs states during travel, birth places and

    locations. On the analysis aspect, we are workingon a denotational semantics for LRN. For R-Maude, the current R-Maude can be used only tosimulate Models. Future works will handlespecification analyzing. As a future extension, wethink to adapt Maude model-checker toreconfigurable Maude. In [26], we have proposedextensions for LRN Temporal LRN, and in [27],we proposed Coloured LRN. In this sense, we focuson using R-Maude to simulate models of theseextensions.

    8 REFERENCES

    [1] Andrea Asperti and Nadia Busi: Mobile Petri Nets.Technical Report UBLCS-96-10, Department ofComputer Science University of Bologna, May 1996.

    [2] M.A. Bednarczyk, L. Bernardinello, W. Pawlowski,and L. Pomello: Modelling Mobility with PetriHypernets. 17th Int. Conf. on Recent Trends inAlgebraic Development Techniques, WADT04.LNCS vol. 3423, Springer-Verlag, 2004.

    [3] M. Buscemi and V. Sassone: High-Level Petri Netsas Type Theories in the Join Calculus. In Proc. ofFoundations of Software Science and ComputationStructure (FoSSaCS '01), LNCS 2030, Springer-Verlag.

    [4] Dianxiang Xu and Yi Deng: Modeling Mobile AgentSystems with High Level Petri Nets. 0-7803-6583-6/00/ 2000 IEEE.

    [5] Francisco Durn, Steven Eker, Patrick Lincoln andJos Meseguer: principles of mobile maude. In

    D.Kotz and F.Mattern, editors, Agent systems,mobile agents and applications, second internationalsymposium on agent systems and applications andfourth international symposium on mobile agents,ASA/MA 2000 LNCS 1882, Springer Verlag. Sept2000.

    [6] Cdric Fournet Georges Gonthier: The Join Calculus:a Language for Distributed Mobile Programming. InApplied Semantics. International Summer School,APPSEM 2000, Caminha, Portugal, September 2000,LNCS 2395, pages 268--332, Springer-Verlag.August 2002.

    [7] Alfonso Fuggetta, Gian Pietro Picco and GiovanniVigna: Understanding Code Mobility. IEEE

    transactions on software engineering, vol. 24, no. 5,may 1998.[8] Kees M. van Hee, Irina A. Lomazova, Olivia Oanea,

    Alexander Serebrenik, Natalia Sidorova, MarcVoorhoeve: Nested Nets for Adaptive Systems.IEEE. ICATPN 2006: 241-260.

    [9] P. Knudsen: Comparing Two Distributed ComputingParadigms, A Performance Case Study; MS thesis,Univ. of Tromso 1995.

    [10] I.A. Lomazova: Nested Petri Nets. Multi-leveland Recursive Systems. Fundamenta Informaticaevol.47, pp.283-293. IOS Press, 2002.

    [11] M. Merz and W. Lamersdorf: Agents, Services,and Electronic Markets: How Do They Integrate?.Proc. Intl Conf. Distributed Platforms, IFIP/IEEE,1996.

    [12] R. Milner: A Calculus of CommunicatingSystems. Number 92 in Lecture Notes in ComputerScience. Springer Verlag, 1980.

    [13] R. Milner, J. Parrow, and D. Walker: Acalculus of mobile processes. Information andComputation, 100:177, 1992.

    [14] Reinhartz-Berger, I., Dori, D. and Katz, S.:Modelling code mobility and migration: anOPM/Web approach. Int. J. Web Engineering andTechnology, Vol. 2 (2005), No. 1, pp.628.

    [15] D. Sangiorgi and D. Walker: The -Calculus: ATheory of Mobile Processes. Cambridge UniversityPress, 2001.

    [16] Athie L. Self and Scott A. DeLoach.: Designingand Specifying Mobility within the MultiagentSystems Engineering methodology. Special Track on

  • 8/7/2019 UbiCC Camera Ready ID 270_270

    9/9

    Ubiquitous Computing and Communication Journal

    Agents, Interactions, Mobility, and Systems (AIMS)at the 18th ACM Symposium on Applied Computing(SAC 2003). Melbourne, Florida, USA, 2003.

    [17] Tommy Thorn: Programming languages formobile code. Rapport de recherche INRIA, N 3134,Mars, 1997.

    [18] R. Valk: Petri Nets as Token Objects: An

    Introduction to Elementary Object Nets. Applicationsand Theory of Petri Nets 1998, LNCS vol.1420, pp.1-25, Springer-Verlag, 1998.

    [19] F. Rosa Velardo, O. Marroqn Alonso and D.Frutos Escrig: Mobile Synchronizing Petri Nets: achoreographic approach for coordination inUbiquitous Systems. In 1st Int. Workshop on Methodsand Tools for Coordinating Concurrent, Distributedand Mobile Systems, MTCoord05. ENTCS, No 150.

    [20] Fernando Rosa-Velardo: Coding MobileSynchronizing Petri Nets into Rewriting Logic. thispaper is electronically published in Electronic Notesin Theoretical Computer science URL:www.elsevier.nl/locate/entcs.

    [21] Sutandiyo, W., Chhetri, M, B., Loke, S,W., andKrishnaswamy, S: mGaia: Extending the GaiaMethodology to Model Mobile Agent Systems.Accepted for publication as a poster in the SixthInternational Conference on Enterprise InformationSystems (ICEIS 2004), Porto, Portugal, April 14-17.

    [22] D.J. Wetherall, J. Guttag, and D.L.Tennenhouse: ANTS: A Toolkit for Building andDynamically Deploying Network Protocols.Technical Report, MIT, 1997, in Proc.OPENARCH98.

    [23] M. Clavel, F.Durn, S.Eker, P.Lincoln, N.Marti-Oliet, J.Meseguer, and J. Quesada: Maude:specification and programming in rewriting logic.SRI International, Januray 1999,

    http://maude,.csl.sri.com.[24] J. Meseguer: Conditional rewriting logic as a

    unified model of concurrency. Theoretical ComputerScience, 96 (1):73-155, 1992.

    [25] P.C.lveczky, J. Meseguer: Real-Time Maude: A tool for simulating and analyzing real-time andhybrid systems. In K. Futatsugi, editor, ThirdInternational Workshop on Rewriting Logic and itsApplications, volume 36 of Electronic Notes inTheoretical Computer Science. Elsevier, 2000.http://www.elsevier.nl/locate.entcs/volume36.html.

    [26] Lad Kahloul, Allaoua Chaoui: TemporalLabeled Reconfigurable Nets for Code MobilityModeling. The International Workshop on

    Trustworthy Ubiquitous Computing (TwUC 2007)associated to the iiWAS2007 conference.

    [27] Lad Kahloul, Allaoua Chaoui: Colouredreconfigurable nets for code mobility modeling. Inthe Proceedings of World Academy of Science,Engineering and Technology, Volume 25, November2007 with ISSN: 1307-6886. WASET-XXVInternational Conference Venice, Italy.