Franck Delaplace

Cinzia Di Giusto
email: cinzia.di-giusto@unice.fr

Hanna Klaudel

Activity Networks with Delays An application to toxicity analysis

Keywords: Petri Nets, Toxicity, Reaction networks

ANDy, Activity Networks with Delays, is a discrete time framework aimed at the qualitative modelling of time-dependent activities. The modular and concise syntax makes ANDy suitable for an easy and natural modelling of time-dependent biological systems (i.e., regulatory pathways).

Activities involve entities playing the role of activators, inhibitors or products of biochemical network operation. Activities may have given duration, i.e., the time required to obtain results. An entity may represent an object (e.g., an agent, a biochemical species or a family of thereof) with a local attribute, a state denoting its level (e.g., concentration, strength). Entities levels may change as a result of an activity or may decay gradually as time passes by.

The semantics of ANDy is formally given via high-level Petri nets ensuring this way some modularity. As main results we show that ANDy systems have finite state representations even for potentially infinite processes and it well adapts to the modelling of toxic behaviours. As an illustration, we present a classification of toxicity properties and give some hints on how they can be verified with existing tools on ANDy systems. A small case study on blood glucose regulation is provided to exemplify the ANDy framework and the toxicity properties.

Introduction

Activities and their causal relationships are a central concern in biological systems such as biological networks and regulatory pathways. They deal with questions such as, how long does it take to complete an activity, when it can be performed, or whether it can be delayed or even ignored. Our proposal stems from reaction systems [START_REF] Brijder | A Tour of reaction Systems[END_REF], a formalism based on reactions, each defined as a triple (R, I, P ) with R set of reactants, I set of inhibitors and P set of products, and R, I and P taken from a common set of species. Reaction systems are based on three basic assumptions:

(i) a reaction can take place only if all the reactants involved are available but none of the inhibitors are;

(ii) if a species is available then a sufficient amount of it is necessary to trigger a reaction;

(iii) species are not persistent: they become unavailable if they are not sustained by a reaction.

We complement this model by adding several important features. We allow a richer description of species states using attributes having potentially multiple values and introduce timing aspects. More precisely, the resulting formalism, Activity Networks with Delays (ANDy), targets systems composed of various entities (i.e., species in reaction systems) that evolve by means of time-dependent activities. Each entity is characterised by one attribute, called level, representing rates, activation/inhibition status or expression degrees (e.g., low, medium, high). Activities are rules describing the evolution of systems, involving (as for reaction systems) three sets of entities: activators, which must be present, inhibitors, which must be absent, and results whose expression levels have to be modified (increased or decreased). The introduction of time concerns both activities and entities. Activities have a duration and entities are subject to a decay process or aging that models the action of a non-specified environment: i.e., levels decrease with time progression. Another difference is in the semantics of activities: while in reaction systems a maximal concurrency model is considered, here we adopt two types of activities: mandatory and potential ones. The former set of activities, once enabled, must take place altogether in the same time unit (in maximal concurrency) while the latter, non deterministically one at the time, may be performed or not. Following [START_REF] Wang | Formal verification of timed systems: A survey and perspective[END_REF], as in our modelling all entities have discrete states and share the same global clock, it is reasonable to work with discrete time constraints. Our main objective is to provide theoretical foundations and underlying tools for the description and the understanding of the mechanisms and of the structural properties underpinning biological interactions networks. In biology, ordinary differential equations (ODE) remain the predominant modelling methodology [START_REF] Alon | An introduction to systems biology: design principles of biological circuits[END_REF]. Such models present however some drawbacks: they need a precise quantification of parameters, random interactions are difficult to model outside an averaged approach, system openness and non-linearities make hopeless the existence of analytic solutions, and numerical methods -often the only sensible option -are mainly descriptive and cannot form the basis for an explanatory theory. On the other hand, many languages and tools have been developed to build and explore discrete qualitative models in various application domains. Such models are rough abstractions of real world processes but they make possible to unravel the entangled causal relationships between system's entities. More specifically in systems biology, formalisms like Petri nets [START_REF] Baldan | Petri nets for modelling metabolic pathways: a survey[END_REF], Boolean networks [START_REF] Thomas | Boolean formalisation of genetic control circuits[END_REF], process algebras [START_REF] Cardelli | Abstract Machines of Systems Biology[END_REF] or rewriting systems [START_REF] Giavitto | Rewriting systems and the modelling of biological systems[END_REF] (to cite a few) have been used with undeniable success to understand the causal links between structure and behaviour in molecular networks. Nonetheless, the management of time is somewhat problematic in all of the previous approaches. In general, timing aspects are either disregarded or handled at a primitive level, which leads to expressiveness problems for the modeller. For example, modelling a synchronous evolution directly in Petri nets requires a coding that is not necessarily natural for a biologist. This is why here we propose a qualitative discrete formalism for biological systems that provides, in particular, a direct and intuitive account of timing aspects natural in biology such as activity duration and decay. Such features are in particular essential in describing toxicity problems. Indeed toxicology [START_REF] Waters | Toxicogenomics and systems toxicology: aims and prospects[END_REF] studies the adverse effects of the exposures to chemicals at various levels of living entities: organism, tissue, cell and intracellular molecular systems. During the last decade, the accumulation of genomic and post-genomic data together with the introduction of new technologies for gene analysis has opened the way to toxicogenomics. Toxicogenomics combines toxicology with "Omics" technologies 1 to study the mode-of-action of toxicants or environmental stressors on biological systems. The mode-of-action is understood as the sequence of events from the absorption of chemicals to a toxic outcome. Toxicogenomics potentially improves clinical diagnosis capabilities and facilitates the identification of potential toxicity in drug discovery [START_REF] Foster | A retrospective analysis of toxicogenomics in the safety assessment of drug candidates[END_REF] or in the design of bio-synthetic entities [START_REF] Serrano | Synthetic biology: promises and challenges[END_REF]. Our formalism permits to model biological systems together with their stressors and discover (or highlight) the mode-of-action of toxicants, that is why we complement our designing process with a general discussion on toxicity properties and how they can be tested against ANDy systems. In this respect, we aim at providing a methodology rather than a precise technique of testing.

Organisation of the paper. This paper is the extended version of BioPPN workshop paper [START_REF] Giusto | Systemic approach for toxicity analysis[END_REF]. The main difference with respect to [START_REF] Giusto | Systemic approach for toxicity analysis[END_REF] is the introduction of time aspects in ANDy systems, a more mature taxonomy of toxicity properties and a prototype implementation of ANDy networks using Snakes toolkit [START_REF] Pommereau | Quickly prototyping Petri nets tools with SNAKES[END_REF], Snoopy [START_REF] Heiner | Snoopy -A Unifying Petri Net Tool[END_REF] and its related analysis tool Charlie [START_REF] Heiner | Charlie an extensible Petri net analysis tool[END_REF].

Section 2 introduces the principles behind ANDy networks and gives a formal definition of ANDy semantics in terms of high-level Petri nets. It also states the main result of the paper addressing the finiteness of state space. Next, Section 3 discusses an axiomatisation of toxicity properties. An illustration of the model and its properties is given in Section 4 describing the assimilation of aspartame in blood regulation in human body. Finally Sections 5 and 6 discuss related works and conclude.

A web page with additional material is available at [15]. It includes the implementations in Snakes and Snoopy and a technical report adding a comparison with timed automata.

Activity Networks with Delays

In this section we give the syntax and semantics of Activity Networks with Delays (ANDy). An ANDy is composed by a set of entities E driven by a set of timed activities. The time is assumed to be discrete and modelled by a tick event.

Entities. Each entity, e ∈ E, is associated to a finite number of levels L e (from 0 to L e -1) that in general represent ordered expression degrees (e.g., low, medium, high) and refer to a change in the entity capability of action. A decay duration is associated to each level of an entity e through the function δ e : [0 . . L e -1] → N + ∪ {ω} allowing different duration's for different levels or ω if unbounded. More precisely, if δ e (i) = ω, then level i is permanent and it can be modified only by an activity. If δ e (i) = ω, the presence of the entity at level i is transient: once entity e at level i has passed δ e (i) time units its level will pass to i -1, i.e., it decays or ages gradually as time passes by.

We fix δ e (0) = ω as no negative level is allowed. In principle, this substitutes a set of unspecified activities accounting for the action of an underspecified environment that consumes entities. A state s of an ANDy network assigns to each entity e ∈ E a level η ∈ [0..L e -1]. The initial state s 0 sets each entity e to a given level η e .

Activities. The evolution of entities is driven by timed activities of the form:

ρ ::= A ρ ; I ρ ∆ρ --→ R ρ
where ∆ ρ ∈ N is the activity duration, A ρ (activators) and I ρ (inhibitors) are sets of pairs (e, η e ) with e ∈ E and η e ∈ [0 . . L e -1]; R ρ , the results, is a non empty set of pairs (e, ±n) where e ∈ E and ±n ∈ Z is a positive or negative variation of the entity level η e . Entities can appear at most once in each set A ρ , I ρ and R ρ , cf., Remark 2.2 below. We write e ∈ A ρ to denote (e, •) ∈ A ρ , similarly for I ρ and R ρ . We omit index ρ if it is clear from the context.

Duration ∆ ρ characterises the number of ticks required for yielding change of levels of results, ∆ ρ = 0 denotes an instantaneous activity. The results of an activity are the increments or decrements ±n of each entity level in R ρ (up to the range of entity levels). An activity ρ can take place only if it is enabled, this depends on the activator and inhibitor levels appearing in A ρ and I ρ . Nonetheless, observing only the current level of each entity is not enough to decide if an activity is enabled: such approach would miss the handling of decays and durations.

Definition 2.1. (Enabled activity)

An activity ρ is enabled (i.e., may happen) if and only if:

for each entity e a of the activators set A ρ (i.e., (e a , η a ) ∈ A ρ ), e a is available at least at level η a for the whole duration ∆ ρ ;

for each entity e i of the inhibitors set I ρ (i.e., (e i , η i ) ∈ I ρ ), e i is available at a level strictly inferior to η i for the whole duration ∆ ρ ;

Remark 2.2. Notice that:

-If an entity is an activator (resp. an inhibitor) at level for some activity ρ, it is also an activator (resp. an inhibitor) for ρ at all levels l ≥ (resp. l ≤ ).

-An entity may be both in A and R, e.g., as in an auto-catalytic production where reaction products themselves are activators for the reaction. Similarly, an entity may be both in I and R: thus representing self-repressing activities.

-An entity can appear in the same activity simultaneously as an activator and as an inhibitor but we require them to occur with different levels. For instance, the rule

{(e, η)} ∪ A; {(e, η )} ∪ I ∆ -→ R where η < η
requires that the activity takes place only if the level l e of e belongs to the interval η ≤ l e < η .

In particular, if e has to be present in an activity exactly at level η, e should appear as an activator at level η and as inhibitor at level η = η + 1.

-The set of activators and inhibitors A ∪ I is allowed to be empty. In this case, the activity is constantly enabled. This accounts for modelling an environment that continuously sustains the production of an entity. In this case a duration ∆ = 0 may be used to account for a start-up time.

Guided by the case study and the biological applications, we assume that once an activity ρ is triggered:

it must wait at least ∆ ρ before being enabled again (a kind of refractory period).

its activators and inhibitors are left unchanged.

These are non restrictive hypotheses and by slightly modifying Definition 2.7 one can obtain different semantics that could depend on the specific modelled scenario: e.g., once enabled an activity ρ can be triggered an unbounded number of times or once per time unit; also one can easily choose a different policy to modify the level of activators and/or inhibitors.

It is important to note that when an activity is enabled, it is not necessarily performed. The idea is to make a distinction between two types of activities:

1. potential activities, denoted by α in a set P: if enabled, they may occur in an interleaved way thus the result depends on the order they are performed. It may happen that no potential activities occur even if they are enabled;

2. mandatory activities, denoted by β in a set M: if enabled they must occur within the same time unit. All enabled mandatory activities occur simultaneously.

As all mandatory activities β i are triggered simultaneously, all updates related to an entity e are collected and summed up before being applied to the current level of e. Definition 2.3. (ANDy network and its semantics) An ANDy network is a triple (E, M, P) where E is the set of entities, M is the set of mandatory activities and P is the set of potential ones. It evolves by triggering enabled activities in two separate phases implementing one evolution step: Ph. 1 In this phase (between two ticks) potential activities that are enabled may be triggered. Their action occurs non-deterministically in an interleaved way. Any potential activity is triggered at most once in this phase.

Ph. 2 This phase is the tick transition: the effect is that all concerned entities must decay and all enabled mandatory activities are performed simultaneously. Notice that as activators and inhibitors are not "consumed", there are no conflicts and so there is a unique way (per time unit) to execute all enabled mandatory activities.

Example 2.4. (Repressilator)

The repressilator [START_REF] Elowitz | A Synthetic Oscillatory Network of Transcriptional Regulators[END_REF] is a synthetic genetic regulatory network in Escherichia Coli consisting of three genes (lacI, tetR, cI) connected in a feedback loop such that each gene inhibits the next gene and is inhibited by the previous one. The repressilator exhibits a stable oscillation with fixed time period that is witnessed by the synthesis of a green fluorescent protein (GF P ). According to [START_REF] Elowitz | A Synthetic Oscillatory Network of Transcriptional Regulators[END_REF]: "the resulting oscillation with typical periods of hours are slower than the cell division cycle so the state of the oscillator has to be transmitted from generation to generation". It may be modelled in ANDy with five entities E = {lacI, tetR, cI, GF P, gen}. The first three represent the three genes, each with two levels denoting an on/off state where level 1 = on has decay time 2. GF P has two levels (on/off ) with unbounded decay. Finally, the evolution of successive generations is represented by entity gen with, let's say, seven levels (from 0 to 6, with unbounded decay) to differentiate among generations.

The behaviour is modelled with potential and mandatory activities: potential activities (on the left below) are used to represent the feedback loop between lacI, tetR and cI. Mandatory activities (on the right) handle the synthesis of GF P and show the evolution of generations.

α 1 : ∅; (lacI,

Petri Net formalisation.

The semantics of ANDy networks is formalised in terms of high-level Petri nets. We recall here the notations together with some elements of their semantics [START_REF] Jensen | Coloured Petri Nets -Basic Concepts, Analysis Methods and Practical Use[END_REF].

Definition 2.5. A high-level Petri net is a tuple (P, T, F, L, M 0 ) where:

-P is the set of places, T is the set of transitions, with P ∩ T = ∅;

-F ⊆ (P × T ) ∪ (T × P ) is the set of arcs;

-L is the labelling of P ∪ T ∪ F defined as follows:

-∀p ∈ P , L(p) is a set of values (the type of p);

-∀t ∈ T , L(t) is a computable Boolean expression (a guard);

and ∀f ∈ F , L(f ) is a tuple of variables or values.

-M 0 is the initial marking putting a multiset of values (tokens) in L(p) in each p ∈ P .

The behaviour of high-level Petri nets is defined as usual: markings (states) are functions from places in P to multisets of possibly structured tokens in L(p). A transition t ∈ T is enabled at marking M , if there exists a valuation σ of all variables in the labelling of t such that the guard L(t) evaluates to true (L σ (t) = true) and there are enough tokens in all input places p of t to satisfy the corresponding input arcs, i.e., L σ ((p, t)) ∈ M (p) for each input place p of t. The firing of t produces the marking M :

∀p ∈ P, M (p) = M (p) -L σ ((p, t)) + L σ ((t, p)) with L σ (f ) = 0 if f / ∈ F , - and
+ are multiset operators for removal and adding of one element, respectively. We denote it by M [t:σ M . Observe that for ANDy we are considering a subclass of high-level Petri nets where for each pair place/transition there is either no connection or a loop (an input and an output arc). So, starting from an initial marking associating one token per place, the number of tokens (but not necessary their value) is maintained at each step of the net evolution.

As usual, in figures, places are represented as rounds, transitions as squares, and arcs as directed arrows. By convention, primed version of variables (e.g., x ) are used to annotate output arcs of transitions, their evaluation is possibly computed using unprimed variables (e.g., x) appearing on input arcs. With an abuse of notation, singleton markings are denoted without brackets, the same is used in arc annotations. Also we refer to valuated variables without effectively mentioning the valuation σ: e.g., we say that the current value of variable w is w instead of σ(w). An example of firing is shown in Figure 1. We say that a marking M is reachable from the initial marking M 0 if there exists a firing sequence

(t 1 , σ 1 ), . . , (t n , σ n ) such that M 0 [t 1 :σ 1 M 1 . . M n-1 [t n :σ n M .
The semantics of an initially marked Petri net is a marking graph (transition system) comprising all the reachable markings.

ANDy's formalisation. ANDy syntax and semantics of Definition 2.3 are compact and intelligible, thus easily usable in practice as shown in Example 2.4. However, time and the interplay between entity levels, decay and activity durations require a complex machinery to realize the expected behaviour into high-level Petri nets. Nevertheless, the advantage is that this realization is completely transparent to the final user.

In order to properly describe decay and the semantics of activities we need to record three kinds of information:

1. (decay) since how long an entity is at the current level since the last update, 2. (activators) since how long an entity is available at a level less or equal to the current one (recall that levels are inclusive),

3. (inhibitors) since how long a level greater than the current one has been left.

Notice that duration relative to Items 1 and 2 for the current level can be different: i.e., if an entity is continuously sustained by some activities it remains available in the system at the current level for a period that may be longer than the corresponding decay time. Thus Item 1 reports the duration since the last update (i.e., when the activity concerning the entity has been performed) and Item 2 is the duration since the first appearance of the entity at that level.

For this reason, we model each entity e ∈ E by a single Petri net place p e carrying tuples l e , u e , λ e as tokens where l e is the current level of e; u e is a counter storing the duration spent in the current level since the last update (Item 1): 0 ≤ u e ≤ δ e (l e ); and λ e is a tuple of counters with L e fields (one for each level). Each counter λ e [i] contains a duration interpreted as follows:

λ e [i] =       
since how long e has reached level i (Item 2) for 0 ≤ i ≤ l e since how long e has left level i (Item 3) (or 0 if e has not yet reached i).

for l e < i ≤ L e -1

Each place is initialised to η e , 0, 0 Le where η e is the given initial level of e and 0 Le denotes vector λ e of counters uniformly initialised with zero.

It is worth observing that once a duration in λ has reached the maximum duration for all activities (D = max{∆ ρ | ρ ∈ M ∪ P}) it is useless to increment it, as for all duration greater than D, the guards of all activities involving the entity are satisfied.

Notation 2.6. λ{ x /[l . . l + n]} is the systematic update to x of values in counters λ[l] . . λ[l + n]. We denote by inc D (λ) the increment by one of all values in λ: i.e., ∀k ∈ [0 . . L e -1], λ[k] = min(λ[k] + 1, D) with D ∈ N.
Every potential activity α ∈ P is modelled with a transition t α and a special place p α that ensures that the same activity is not executed more than once every ∆ α time units, complying to Phase Ph. 1 in Definition 2.3. Figure 2(b) details the scheme of the resulting Petri net and defines the arc annotations. Input and output arcs between the same place and transition with the same label (read arcs) are denoted with a double-pointed arrow with a single label. We comment on the conditions (implementing requirements in Definition 2.1) and results of firing of t α corresponding to a potential activity α = A; I ∆ -→ R. We have: since each activity must wait at least ∆ before being enabled again, place p α retains whether the activity can be performed w α ≥ ∆ and after firing the token is set to 0, (w α = 0).

each activator a ∈ A has to be present at least at level η a for at least ∆ time units, this is expressed by guard l a ≥ η a ∧ λ[η a ] ≥ ∆;

each inhibitor i ∈ I has not to exceed level η i for at least ∆ time units, this is guaranteed by

guard l i < η i ∧ λ[η i ] ≥ ∆;
the updates on a place p r of a result entity r at level l r containing token l r , u r , λ r , (i.e., (r, ±n) ∈ R with n ∈ N) are performed2 as follows:

Increase +n: l r + n, 0, λ r { 0 /[l r + 1 . . l r + n]} . l r becomes l r + n, u r is reset to 0 restarting the counter for level l r + n and λ r is updated to record the change to the new level by resetting the counters λ r [i] for all levels i from l r + 1 to l r + n.

Maintenance 0: l r , 0, λ r : the current level is recharged resetting u r to 0.

Decrease -n: l r -n, 0, λ r { 0 /[l r -n + 1 . . l r ]} . This case is symmetric to the increase one, except for the treatment of λ r that is updated by resetting counters λ r [i] for all levels i from l r -n + 1 to l r .

Finally, in order to cope with time aspects present in ANDy, we introduce a tick transition t c (Figure 2(a)) that represents the time progression. Its effect is the one described by Phase Ph. 2 in Definition 2.3: it increments counters of entities, takes care of the decay and simultaneously performs all enabled mandatory activities. More precisely: Time: All counters in entities tuples are incremented by one: we pass from l, u, λ to l, u + 1, inc D (λ) . Counter u remains unchanged for levels of unbounded duration.

Decay: An entity may stay at level l for δ(l) time units (i.e., u ≤ δ(l)). Decay happens as soon as the interval δ(l) is elapsed and is obtained by decreasing the level by one, till reaching level zero. We pass from l, u, λ to l -1, 0, inc D (λ){ 0 /l} .

Mandatory activities: All enabled mandatory activities β are performed simultaneously. The results on involved entities are collected and summed up. The derived update works as decribed above for potential activities.

Notice that transition t c is always enabled and Algorithm Calc (cf., Algorithm 1) takes care of implementing the proper updates. The Algorithm is divided into 4 successive loops: the first one increments the counters in p ρ (w ρ = w ρ + 1) for all activities ρ ∈ M ∪ P, the second one realizes decay for all entities, the third one checks whether a mandatory activity β is enabled in which case the involved entities are updated and the corresponding w β is set to 0. The last loop combines the effect of decay and mandatory activities and updates counters in λ accordingly.

Next definition puts together all the elements described so far:

Definition 2.7. Given an ANDy network (E, M, P) with initial state (e, η e ) for each e ∈ E, the highlevel Petri net representation is defined as tuple (P, T, F, L, M 0 ) where l, l , u, u , λ, λ , w, w range over variables and: for all e ∈ E do l e := l e u e := u e λ e := inc D (λ e ) if δ(l e ) = ω then u e := u e + 1 if u e > δ(l e ) then l e := max(0, l e -1)

-P = {p e | e ∈ E} ∪ {p ρ | ρ ∈ M ∪ P}; -T = {t c } ∪ {t α | α ∈ P}; -F = {(p, t c ), (t c , p) | p ∈ P } ∪ {(p e , t α ), (t α , p e ), (p α , t α ), (t α , p α ) | α ∈ P, e ∈ A α ∪ I α ∪ R α } -Labels
u e := 0 for all β ∈ M do if ∀(a, η a ) ∈ A β (l a ≥ η a and λ[η a ] ≥ ∆ β ) and ∀(i, η i ) ∈ I β (l i < η i and λ[η i ] ≥ ∆ β ) and (w β ≥ ∆ β ) then w β := 0 for all (r, v) ∈ R β do l r := l r + v u r := 0
for all e ∈ E do l e := max(0, min(l e , L e -1)) if l e < l e then λ e := λ e { 0 /[l e + 1 . . l e ]} if l e > l e then λ e = λ e { 0 /[l e + 1 . . l e ]} return ρ∈M∪P (w ρ = w ρ ) ∧ e∈E ( l e , u e , λ e = l e , u e , λ e )

L(t α ) = w α ≥ ∆ α ∧ w α = 0 ∧ (a,ηa)∈Aα (l a ≥ η a ∧ λ[η a ] ≥ ∆ α ) ∧ (i,η i )∈Iα (l i < η i ∧ λ[η i ] ≥ ∆ α ) ∧ (r,+n)∈Rα C r+ ∧ (r,0)∈Eα C r0 ∧ (r,-n)∈Rα C r-,
for each potential activity α ∈ P with

C r+ : l r , u r , λ r = min(l r + n, L r -1), 0, λ r { 0 /[l r + 1 . . min(l r + n, L r -1]} C r0 : l r , u r , λ r = l r , 0, λ r C r-: l r , u r , λ r = max(0, l r -n), 0, λ r { 0 /[max(0, l r -n) + 1 . . l r ]} .
-The initial marking is M 0 (p e ) = η s , 0, 0 Le for each e ∈ E and M 0 (p ρ ) = 0 for ρ ∈ M ∪ P.

Example 2.8. Figure 3 gives the simplified Petri net representation of the ANDy system introduced in Example 2.4, obtained via the Snakes library.

Expressiveness. The first result that we show for ANDy networks concerns the finiteness of the state space. Actually, even if the number of species and levels is finite, as a state of the network includes an information concerning time (that could be unbounded, if one takes a naive representation of dates), this could lead to an infinite state space. Nonetheless in our case, when the local counters have reached the maximal duration for activities D, no new behaviours can be triggered by the system. This immediately provides a way of abstracting without loosing precision and thus getting a symbolic representation. Proposition 2.9. The state space of an ANDy network N is finite.

Proof:

Immediate as the type of each place is finite and each place can have at most one token.

An alternative formalization of ANDy networks can be given using a timed automata model [START_REF] Alur | A Theory of Timed Automata[END_REF]. In Appendix A we provide an encoding that is compositional with respect to entities and potential activities. This encoding is exponential because of the nature of mandatory activities that have to be treated simultaneously and dynamically. We think that this encoding, although equivalent, is less elegant as it requires a lower level representation of the system. Indeed it corresponds to a sort of unfolding of the Petri net given in Definition 2.7.

Application to toxicology

ANDy and in particular the introduction of time constraints in conjunction with expression levels well adapts to study and explain toxic behaviours in biological systems. Here we explore the notion of toxicity and provide a methodology to analyse it in ANDy.

The main approach used in toxicogenomics employs empirical analysis like in the identification of molecular biomarkers, i.e., indicators of disease or toxicity in the form of specific gene expression patterns [START_REF] De Cristofaro | Toxicogenomics in Biomarker Discovery[END_REF]. Clearly, biomarkers remain observational indicators linking genes related measures to toxic states. In this proposal, we complement these empirical methods with a computational method that aims at discovering the molecular mechanisms of toxicity. This way, instead of studying the phenomenology of the toxic impacts, we focus on the processes triggering adverse effects on organisms. Usually, the toxicity process is defined as a sequence of physiological events that causes the abnormal behaviour of a living organism with respect to its healthy state.

Healthy physiological states generally correspond to homoeostasis, namely a process that maintains a dynamic stability of internal conditions against changes in the external environment. Hence, we will consider toxicity outcomes as deregulation of homoeostasis processes, namely deviation of some intrinsic referential equilibrium of the system. Biological processes are usually given in terms of pathways which are causal chains of the responses to stimuli, this way the deregulation of homoeostasis appears as the unexpected activation or inhibition of existing pathways. Moreover, in the context of toxicogenomics it is crucial to take into account at least two other parameters: the exposure time and the thresholds dosage delimiting the ranges of safe and hazardous effects. Considering the qualitative nature of ANDy models, we believe that the potential contribution lies in the analysis of the etiology of toxic processes. From this perspective, toxicity properties can be classified into two categories:

1. properties characterising pathological states or more generally associated to symptoms and 2. properties characterising sequences of states (traces), e.g., non viable behaviours.

The former class of properties basically leads to check the reachability of some states, while the latter may be used to unravel sequences of events leading to toxic outcomes.

ANDy allows us to describe such scenarios and the Petri net representation of a reaction network with the associated marking graph may be used to detect and predict toxic behaviours related to the dynamics of biological networks, both from the point of view of the dose (e.g., some species exceed a pathological level) and from the point of view of the exposure (e.g., some species persist in time beyond some maximal exposure time). Remark that defining toxicity by characterising properties on sequences of events is more general than just characterising pathological states. It addresses the needs to characterise multifactorial scenario (e.g., periodical behaviours relating possibly several species) and to discover complex etiology among reactants.

From healthy states to healthy behaviours. In ANDy a state is a marking in the marking graph, it collects for each species its current level and the corresponding λ vector. The first step is to observe that some states can be naturally characterised as dangerous, they highlight particular symptoms (e.g. the dosage of a poison has become relevant). Let D be the set of such states. Symmetrically to dangerous states, there are some states that characterise a "safe" condition (e.g. the organism is functioning normally and does not present hazardous symptoms), denoted H. Notice that there are states that are not assigned to any of the two classes, we group them into set R. Characterising harmful states corresponds only to address toxicity problems as in Item 1 above, more complex properties (Item 2) need to refer to (sets of) traces in the marking graph. We therefore classify possible behaviours starting from an initial state into four toxicity scenarios:

1. those that lead to states in D, 2. those that irremediably quit H and never reach it again: the tail of the trace visits only states in D or R (e.g., when a gene mutation knock out some pathway);

3. those that quit H for too long in terms of ticks (even if they may reach it again), the regulation system allows, in principle, to reestablish the homeostatic equilibrium but the process takes too long, compromising the viability of the organism (e.g., DNA damage caused by hydrogen peroxide in Escherichia Coli can be recovered to some extent by DNA repair enzymes but the perturbation may lead to cell apoptosis if to important or too long [START_REF] Imlay | DNA damage and oxygen radical toxicity[END_REF]); 4. those that quit H an unbounded number of times (systemic metabolic dysfunction, slow poisoning)

All these properties can be given in terms of temporal logic formulae. As mentioned above, the first item corresponds to reachability analysis thus instead of logic formulae ad hoc algorithms can be used as well. The second item can be dealt with formulae like the following in CTL: EF EG (s / ∈ H), which means that eventually (EF) all visited states (EG) will not belong to set H. The formulation of remaining items depends on the specific property of the system under consideration, for instance taking into account a precise number of ticks or a concrete sequence of states.

From healthy behaviours to healthy states. Notice that sometimes it is not sufficient or possible to describe the healthy condition of an organism (i.e., the ability of maintaining its capabilities) only in terms of the sets H and D. Indeed, for some organisms their viability conditions are characterised by complex behaviours such as specific traces or oscillations. We, thus, define toxic (and symmetrically viable) behaviours T toxic (resp. T viable ) by giving the property characterising them (or simply by enumerating the traces). The properties can be described by specific temporal logic formulae (that can be rather complex employing also recursive operators). For instance, we can consider viable all traces that infinitely repeat an ordered sequence of three states as in our example of the repressilator (e.g., only lacL ON, then only tetR ON, and finally only cI ON) and where the period of oscillation is six ticks. This way toxicity can be checked by testing whether a trace belongs or not to T toxic . For instance, suppose that we want to describe the periodic activation of three genes a, b and c, we could use this µ calculus formula to describe T viable :

ν.X(a ∧ ---tt ∧ [-](b ∧ [-](c ∧ [-]X)))
which means we are in a state with a activated, followed by three transitions, for each first transition we should have b activated and then c and so on recursively. In our case, as the state space is finite, any ANDy network may be simulated by a Büchi automaton and the questions above may correspond either to check word acceptance or language inclusion, which are both decidable questions in our case.

Moreover once we have given the specification of viable and toxic behaviour, we may infer several interesting sets of states:

states starting from which all possible futures are behaviours in T viable/toxic states that have at least one possible future in T viable/toxic , states that are included only in T viable/toxic . Example 3.1. We generalise here the example of the repressilator given above: we take three entities {A, B, C} each with decay duration 2 that are inhibited in turn by potential activities:

α 1 : ∅; (A, 1) 2 - → (B, +1) α 2 : ∅; (B, 1) 2 - → (C, +1) α 3 : ∅; (C, 1) 2 - → (A, +1)
we consider a new perturbed variant of the system with an additional entity D with only one level (i.e., the entity is permanent) such that α 1 and α 3 remains unchanged and α 2 is modified in Figure 4 shows the periodic activation of entity A (bottom line) each six time units while the second line shows the periodic behaviour of A (top line, here denoted with A to avoid confusion) in the system perturbed with entity D.

We now define T viable as all traces where entity A is activated every six ticks, clearly with this definition of viability all traces in the perturbed system will be toxic.

Notice that formulae describing properties can be rather long requiring, for instance, a complex combination of all possible cases and interleaving. To this aim, in the future we plan to design a language with dedicated primitives that abbreviate common use cases (i.e., macro instructions).

Case study: Blood glucose regulation

Here we model glucose regulation in human body (Figure 5). This example shows that ANDy model is not limited to genetic regulations but it may express other kinds of interactions. In the following, we are always referring to the process under normal circumstances in a healthy body.

Glucose regulation is a homeostatic process: i.e., the rates of glucose in blood (glycemia) must remain stable at what we call the equilibrium state. Glycemia is regulated by two hormones: insulin and glucagon. When glycemia rises (for instance as a result of the digestion of a meal), insulin promotes the storing of glucose in muscles through the glycogenesis process, thus decreasing the blood glucose levels. Conversely, when glycemia is critically low, glucagon stimulates the process of glycogenolysis that increases the blood glucose level by transforming glycogen back into glucose.

We will focus on the assimilation of sweeteners: i.e., sugars or artificial sweeteners such as aspartame. Whenever we eat something sweet either natural or artificial, the sweet sensation sends a signal to the brain (through neurotransmitters) that in turns stimulates the production of insulin by pancreas. In the case of sugar, the digestion transforms food into nutrients (i.e., glucose) that are absorbed by blood. This way, sugar through digestion increases glucose in blood giving the sensation of satiety. In case the income of glucose produces hyperglycemia, the levels of glucose are promptly equilibrated by the intervention of insulin. Unlike sugar, artificial sweeteners are not assimilated by the body, hence they do not increase the glucose levels in blood. Nevertheless the insulin produced under the stimuli originated by the sweet sensation, although weak, can still cause the rate of glucose to drop engendering hypoglycemia. In response to that, the brain induces the stimulus of hunger. As a matter of fact this appears as an unwanted/toxic behaviour. Indeed the assimilation of food (even if it contains aspartame) should calm hunger and induce satiety not the opposite.

This schema suggests that we should consider four levels for glycemia: low, hunger, equilibrium and high. Likewise for insulin we assume three levels: inactive, low and high. All other actors involved in glucose regulation, have only two levels (inactive or active). In this example, duration do not play a fundamental role, for the sake of simplicity we have set all complementary activities such as production of insulin and glucagon, to take the same amount of time, the signal to the brain is the fastest, and the decay of glycemia values are much longer than the digestion process.

Thus the set of involved entities is

E = {Sugar, Aspartame, Glycemia, Glucagon, Insulin}
and their expression levels and corresponding decays are:

levels duration L sugar = {0, 1} δ sugar (1) = 2 L aspartame = {0, 1} δ aspartame (1) = 2 L glycemia = {0, 1, 2, 3} δ glycemia (1) = 8 δ glycemia (2) = 8 δ glycemia (3) = 8 L glucagon = {0, 1} δ glucagon (1) = 3 L insulin = {0, 1, 2} δ insulin (1) = 3 δ insulin (2) = 3
The levels of glycemia are: 0 corresponding to low, 1 to hunger, 2 to equilibrium and 3 to high.

Likewise for insulin we have 0 that corresponds to inactive, 1 to low and 2 to high. All levels for the other species are 0 for inactive and 1 for active. The set of potential activities

P = {α k = A k ; I k - → R k | k ∈ [1.
.9]} for the glucose metabolism example is: α 1 : (Sugar, 1); ∅ -→ (Insulin, +1), (Glycemia, +1) α 2 : (Aspartame, 1); ∅ -→ (Insulin, +1) α 3 : ∅; (Glycemia, 1) -→ (Glucagon, +1) α 4 : (Glycemia, 3); ∅ -→ (Insulin, +1) α 5 : (Insulin, 2); ∅ -→ (Glycemia, -1) α 6 : (Insulin, 1), (Glycemia, 3); ∅ -→ (Glycemia, -1) α 7 : (Insulin, 1); (Glycemia, 2) -→ (Glycemia, -1) α 8 : (Glucagon, 1); ∅ -→ (Glycemia, +1) α 1 and α 2 represent the assimilation of Sugar and Aspartame, respectively: while Aspartame only increases the level of Insulin, Sugar also increases Glycemia. α 3 takes care of hypoglycemia, i.e., a Glycemia level equal to 0 (obtained by using (Glycemia, 1) as inhibitor) engenders the production of Glucagon. On the contrary, hyperglycemia causes the production of Insulin (α 4 ). The presence of Insulin lowers Glycemia (activities α 5 , α 6 , α 7 ). In particular Insulin level equal to 1 plays a role in the decrease of Glycemia only in case of hyperglycemia α 6 or hypoglycemia α 7 , otherwise the signal is not strong enough and we need Insulin at level 2 to see the effect on Glycemia (α 5 ). Last activity describes the role of Glucagon which if active increases the level of Glycemia.

For this example we consider an empty set of mandatory activities. Observe now the behaviour of Glycemia in the following scenario: one time unit elapses, Glycemia decays 0, 0 one time unit elapses, no effect since δ glycemia (0) = ω 0, 0 .

Figure 6 shows a simplified ANDy network (E, P, ∅). The shown fragment focuses only on the activity schema linking inputs (i.e., activators and inhibitors) to results. Each input arc is labeled with either letter A or letter I denoting whether the input place is an activator or an inhibitor, respectively. Likewise, each output arc is labeled with a + or a -to denote increase or decrease of product levels by 1. For each activity transition α, we have omitted place q α and all arcs in the opposite direction. The numbers inside each transition refer to the corresponding activity. Figure 7, instead, shows a portion of the complete initially marked ANDy network focusing only on activity α 7 .

The obtained network allows to simulate and intuitively confirm expected behaviours. In addition and as explained in previous section, we can perform exhaustive checks and for instance automatically verify the following CTL properties: For this formula we highlight the different mode-of-action depending on the absorption of sugar or aspartame.

In the case of the assimilation of sugar, it induces an increase of the production of insulin and an augmentation of the blood glucose levels. Nonetheless the levels of insulin produced are not enough to cause the glycemia to drop and the formula is satisfied.

(Sugar, 1), (Aspartame, 0), (Glycemia, 1), (Insulin, 0), (Glucagon, 0) α 1 -→ (Sugar, 1), (Aspartame, 0), (Glycemia, 2), (Insulin, 1), (Glucagon, 0)

In the case of the assimilation of aspartame but not sugar, it causes only an increase of insulin. Unfortunately, this increment is sufficient to induce a decrease of blood glucose levels thus contradicting the formula above. This illustrates the toxic behaviour caused by aspartame.

(Sugar, 0), (Aspartame, 1), (Glycemia, 1), (Insulin, 0), (Glucagon, 0) α 2 -→ (Sugar, 0), (Aspartame, 1), (Glycemia, 1), (Insulin, 1), (Glucagon, 0) α 7 -→ (Sugar, 0), (Aspartame, 0), (Glycemia, 0), (Insulin, 1), (Glucagon, 0)

The ANDy network, its implementation in Snoopy and formulas for Charlie analyser as well as some results can be found in [15].

(3, 0) q glycemia (0, 0)

q insulin 1 q α 7 t c L(t c ) l g , u g l g , u g l i , u i l i , u i t α 7 L(t α 7 ) l g , u g l i , u i l g , u g w 0 Figure 7.
A portion of the ANDy network of glucose metabolism with an initial marking.

Related works

From a technical point of view, the closest related work is on reaction systems [START_REF] Brijder | A Tour of reaction Systems[END_REF] or their Petri net representation [START_REF] Kleijn | Modelling Reaction Systems with Petri Nets[END_REF]. Although we use a similar definition for activity, the semantics we have proposed is inherently different: in [START_REF] Brijder | A Tour of reaction Systems[END_REF] all enabled reactions occur in one step while we consider two forms of activity evolution: simultaneous for mandatory activities and interleaved for potential ones. Furthermore, we have introduced discrete abstract levels that, to the best of our knowledge, are not taken into account in reaction systems. Also, we have presented a more elaborated notion of time that governs both entities and activities. In [START_REF] Brijder | Reaction Systems with Duration[END_REF] the authors consider an extension of reaction systems with duration but it concerns only decay and not duration of activities. Furthermore the decay is referred to the number of steps and not to the discrete time progression as in our case.

From the Petri net modelling point of view, our representation of time is considerably different from the approaches traditionally used in time and timed Petri nets ( [START_REF] Cerone | Time-Based Expressivity of Time Petri Nets for System Specification[END_REF] presents a survey with insightful comparison of the different approaches). The main difference lies on the fact that the progression of time is implicit and external to the system. By contrast, in our proposal we have assumed the presence of an explicit way of incrementing duration (modelled by synchronised counters). This is also different from the notion of timestamps introduced in [START_REF] Hanisch | Timestamp Petri Nets in Technical Applications[END_REF] that again refers to an implicit notion of time. Indeed, our approach is conceptually closer to Petri nets with causal time [START_REF] Thanh | Petri nets with causal time for system verification[END_REF] for the presence of an explicit transition for time progression. Nevertheless, in our approach time cannot be suspended under the influence of the environment (as is the case in [START_REF] Thanh | Petri nets with causal time for system verification[END_REF]).

Time is featured also in [START_REF] Comet | Simplified Models for the Mammalian Circadian Clock[END_REF] based on the Thomas framework and using delays as parameters to be discovered. A similar approach but based on timed automata is presented in [START_REF] Batt | On Timed Models of Gene Networks[END_REF] and [START_REF] Siebert | Incorporating Time Delays into the Logical Analysis of Gene Regulatory Networks[END_REF]. In all these proposals, delays are reminiscent of our durations for mandatory activities but our semantics is more general as it includes the treatment of decay and potential activities.

In a broader sense, our work could also be related to P-systems [START_REF] Paun | P Systems with proteins on Membranes: a Survey[END_REF][START_REF] Kleijn | Membrane Systems with Qualitative Evolution Rules[END_REF] or the κ-calculus [START_REF] Danos | Formal molecular biology[END_REF] that describe the evolution of cells through rules. Both these approaches are mainly oriented to simulation while we are interested in verification aspects. Moreover, always related to the modelling in Petri nets but with a different aim, levels have been used in qualitative approaches to address problems related to the identification of steady states in genetic networks such as in [START_REF] Chaouiya | Petri net representation of multi-valued logical regulatory graphs[END_REF]. Nevertheless these contributions abstract away from time related aspects that are instead central in our proposal. It is also interesting to notice that our formalism adds a new node in between timed and qualitative regions in the classification in [START_REF] Heiner | How Might Petri Nets Enhance Your Systems Biology Toolkit[END_REF].

Final remarks

We have introduced ANDy to model time-dependent activity-driven systems, which consist of a set of entities present in the environment at a given level. Entities can age as time passes by and their level is governed by a set of mandatory and potential activities with duration. The ANDy network is compact and provides an intelligible representation of the described activities. Moreover, it is easily scalable as the size of the network grows linearly with the number of added entities and activities and the rule-based architecture of guarantees a modular construction of the systems. We have shown that, despite the ability of modelling timed (thus infinite) systems, ANDy networks have finite state space.

Moreover we have discussed how toxicity problems can be addressed using our formalism. To the best of our knowledge this is the first attempt to give a general methodology, a systemic approach of toxicity analysis rather than a particular technique to verify them. We have exemplified our approach to toxicity on the blood glucose regulation example.

As the semantics of ANDy is given in terms of high-level Petri nets, ANDy networks can be easily used as overlay of existing implemented tools. We have prototyped a tool to simulate and build the state space of an ANDy network using the SNAKES toolkit and Snoopy/Charlie. The first results [15] are very positive, ANDy is particularly suited to describe biological systems, in particular regulatory networks and pathways whose formalisation is based on rules (activities).

We plan to develop the ANDy approach along several directions. We want to extend the decay function to arbitrary maps in L. The problem is to generalise the notion of increase and decrease in a relevant way for the application. More structure can also be given to the notion of entity. Characterising an entity by several attributes (instead of only one level) raises the question of the causal relationships between these attributes and their update strategy. Another aspect that will be addressed in the future is to consider dynamic models where entities are created and deleted, as in [START_REF] Giavitto | Integrated regulatory networks (IRNs): Spatially organized biochemical modules[END_REF]. Finally, it would certainly be interesting to find a systematic way for approximating stochastic rates into activities duration and decays.

A. Encoding into Timed Automata

In Section 2 we have hinted at the construction of a timed automaton coming directly from the marking graph of an ANDy network. Here we present another encoding that is syntax-driven which is not straightforward because of the management of mandatory rules. Unfortunately, even if the obtained automata is smaller, we cannot avoid it to be exponential at least in the number of activities. We conclude this section showing that the semantics of ANDy in terms of timed automata is equivalent to the semantics in terms of high-level Petri nets. Timed automata. A timed automaton is an annotated directed (and connected) graph, with an initial node and provided with a finite set of non-negative real variables called clocks. Nodes (called locations) are annotated with invariants (predicates allowing to enter or stay in a location). Arcs are annotated with guards, communication labels, and possibly with some clock resets. Guards are conjunctions of elementary predicates of the form x op c, where op ∈ {>, ≥, =, >, ≤} where x is a clock and c a (possibly parameterised) positive integer constant. As usual, the empty conjunction is interpreted as true. The set of all guards and invariant predicates will be denoted by G.

Definition A.1. A timed automaton TA is a tuple (L, l 0 , X, Σ, Arcs, Inv ), where -L is a set of locations with l 0 ∈ L the initial one, X is the set of clocks, -Σ = Σ s ∪ Σ u ∪ Σ b is a set of communication labels, where Σ s are synchronous, Σ u are synchronous and urgent, and Σ b are broadcast ones, -Arcs ⊆ L×(G∪Σ∪R)×L is a set of arcs between locations with a guard in G, a communication label in Σ ∪ { }, and a set of clock resets in R = 2 X ; for all a ∈ Σ u , we require the guard to be true;

-Inv : L → G assigns invariants to locations.

It is possible to define a synchronised product of a set of timed automata that work and synchronise in parallel. The automata are required to have disjoint sets of locations, but may share clocks and communication labels which are used for synchronisation. We define three communication policies:

synchronous communications through labels a ∈ Σ s that require all the automata having label a to synchronise on a;

synchronous urgent communications through labels u ∈ Σ u that are synchronous as above but urgent meaning that there will be no delay if transition with label u can be taken;

broadcast communications through labels b!, b? ∈ Σ b meaning that a set of automata can synchronise if one is emitting; notice that, a process can always emit (e.g., b!) and the receivers (b?) must synchronise if they can.

The synchronous product TA 1 . . . TA n of timed automata, where for each j ∈ [1, . . . , n], TA j = (L j , l 0 j , X j , Σ j , Arcs j , Inv j ) and all L j are pairwise disjoint sets of locations is the timed automaton TA = (L, l 0 , X, Σ, Arcs, Inv ) such that:

-L = L 1 × . . . × L n and l 0 = (l 0 1 , . . . , l 0 n ), X = n j=1 X j , Σ = n j=1 Σ j ,
-∀l = (l 1 , . . . , l n ) ∈ L : Inv (l) = j Inv j (l j ), -Arcs is the set of arcs (l 1 , . . . , l n )

g,a,r -→ (l 1 , . . . , l n ) such that (where for each a ∈ Σ s ∪ Σ u , S a = {j | 1 ≤ j ≤ n, a ∈ Σ s j ∪ Σ u j }): for all 1 ≤ j ≤ n, if j ∈ S a , then l j = l j , otherwise there exist g j and r j such that l j g j ,a,r j -→ l j ∈ E j ; g = j∈Sa g j and r = j∈Sa r j .

The semantics of a synchronous product TA 1 . . . TA n is that of the underlying timed automaton TA (synchronising on synchronous and broadcast communication labels) as recalled below, with the following notations. A location is a vector l = (l 1 , . . . , l n ). We write l[l j /l j , j ∈ S] to denote the location l in which the jth element l j is replaced by l j , for all j in some set S. A valuation is a function ν from the set of clocks to the non-negative reals. Let V be the set of all clock valuations, and ν 0 (x) = 0 for all x ∈ X. We shall denote by ν F the fact that the valuation ν satisfies (makes true) the formula F . If r is a clock reset, we shall denote by ν[r] the valuation obtained after applying clock reset r ⊆ X to ν; and if d ∈ R >0 is a delay, ν + d is the valuation such that, for any clock x ∈ X,

(ν + d)(x) = ν(x) + d.
The semantics of a synchronous product TA 1 . . . TA n is defined as a timed transition system (S, s 0 , →), where S = (L 1 ×, . . . × L n ) × V is the set of states, s 0 = (l 0 , ν 0 ) is the initial state, and →⊆ S × S is the transition relation defined by:

-(sync): ( l, ν) → ( l , ν ) if there exist arc l g,a,r -→ l ∈ Arcs such that ν g, ν = ν[r], for S a = {j | 1 ≤ j ≤ n, a ∈ Σ s j }, l = l[l j /l j , j ∈ S a ],
and there is no enabled transition with urgent communication label from ( l, ν); -(urgent): as (sync) but a ∈ Σ u and there is no delay if transition with urgent communication label can be taken;

-(broadcast): ( l, ν) → ( l , ν ) if there exist an output arc l j g j ,b!,r j -→ l j ∈ Arcs j and a (possibly empty) set of input arcs of the form l

k g k ,b?,r k -→ l k ∈ Arcs k such that for all k ∈ K = {k 1 , . . . , k m } ⊆ {l 1 , . . . , l n }\{l j }, the size of K is maximal, ν k∈K∪{j} g k , l = l[l k /l k , k ∈ K ∪ {j}] and ν = ν[r k , k ∈ K ∪ {j}]; -(timed): (l, ν) → (l, ν + d) if ν + d Inv (l).
Here we exemplify timed automata usage: consider for instance the network of timed automata TA 1 and TA 2 with synchronous (non urgent) communications only:

l1 x < 2 l2 x < 2 TA 1 l3 ∅ l4 ∅ x > 0; b; ∅ TA 2 x = 1; a; {x} x = 1; c; ∅ true; a; {x}
whose behaviour is given by their synchronised product TA 1 TA 2 :

(l1,l4) x < 2 (l1,l3) x < 2 (l2,l3) x < 2 (l2,l4) x < 2 x > 0; b; ∅ x = 1; c; ∅ x = 1; a; {x} x = 1; c; ∅ x > 0; b; ∅
and where a possible run is:

[(l 1 , l 3 ); x = 0] [(l 1 , l 3 ); x = 1] [(l 2 , l 3 ); x = 0] [(l 2 , l 3 ); x = .5] [(l 2 , l 3 ); x = .5] [(l 2 , l 4 ); x = 1]
Encoding into timed automata. We are now ready to introduce the encoding of the high-level Petri net formalisation of ANDy, to this aim we need to add some notation:

Notation A.2. Let B = {β 1 , . . . , β n } be the set of all mandatory activities identifiers from M, ordered alphabetically, i.e., β i < β j if i < j. We denote by

B = {seq(h) | h ∈ P(B ) ∧ h = ∅} ∪ {ε},
the set of sequences seq(h) obtained by concatenating the identifiers in non-empty subsets h of B , where for each h

= {β i 1 , . . . , β im | ∀j, k : i j < i k } ∈ P(B ), seq(h) = β i 1 • • • β im .
We assume that if B = {h 1 . . h k }, then the h i 's are ordered by decreasing length and alphabetically in such a way that h

1 = β 1 • • • β |B | and h k = ε. Moreover, β i = h[i]
is the identifier at the i-position, and h = h 1 -h 2 is the sequence of identifier in h 1 without those in h 2 .

The encoding of an ANDy network is the synchronised product of one timed automaton for each entity in E together with a set of auxiliary automata that are used to handle potential and mandatory activities. The idea is that the global state of an ANDy network is divided into its local counterparts represented by state of entities (i.e., their levels). Thus for each entity e we build a timed automaton TA(e, η e ) which has as many locations as the levels in e. Auxiliary automata are used to implement the encoding of places p ρ (TA(ρ) for ρ ∈ M ∪ P) and to realise time progression together with mandatory activities (TA √ ). More formally: Definition A.3. Given an ANDy network (E, M, P), with initial expression level η e for each e ∈ E, the corresponding timed automata encoding is where TA(e, η e ), TA(α),TA(β) and TA √ are defined next. In the following we assume B to be the set of identifiers of mandatory activities in M.

Entities. TA(e, η e ) = (L e , l 0 e , X e , Σ e , Arcs e , Inv e ) where:

-L e = {l e i | i ∈ [0 . . L e ]} ∪ {k h i , k d,h i | i ∈ [0 . . L e ], h ∈ B } with l 0 e = l e ηe -X e = {λ e i , u e i | i ∈ [0 . . L e ]} ∪ {x e } -Σ s e = {α | α identifier of an activity in P}, Σ b e = B , Σ u e = { √ h | h ∈ B }
-Arcs e = Arcs P ∪ Arcs M where

Arcs P = {l j g(Aα)∧g(Iα)∧xe=0,α,r --------------→ l e | e Aα ≤ j < e Iα , α ∈ P, e ∈ A α ∪ I α ∪ R α }
with j, e, e Aα , and e Iα are levels of e defined as follows: Time. TA √ = (L √ , l 0 √ , X √ , Σ √ , Arcs √ , Inv √ ) where Theorem A.4. The above encoding of ANDy network (E, M, P) is correct and complete.

e Aα = η a if (e, η a ) ∈ A α 0 otherwise e Iα = η i if (e, η i ) ∈ I α L e otherwise g(A α ) = λ e ηa ≥ ∆ α if (e, η a ) ∈ A α true otherwise g(I α ) = λ e η i ≥ ∆ α if (e, η i ) ∈ I α true otherwise m = max(0, min(j + v, L e -1)) if (e, v) ∈ R α j otherwise r =            ∅ if (e, v) ∈ R α {u e m , } ∪ {λ e x | x ∈ [j + 1, m]} if (e, v) ∈ R α ∧ m -j > 0 {u e m , } if (e, v) ∈ R α ∧ m -j = 0 {u e m , } ∪ {λ e x | x ∈ [m + 1, j]} if (e, v) ∈ R α ∧ m -j < 0 Arcs M = {l j g(d)∧g,h?,∅ -------→ k d,h j , | j ∈ [0 . . L e -1], h ∈ B } ∪ {l j ¬g(d)∧g,h?,∅ --------→ k h j , | j ∈ [0 . . L e -1], h ∈ B } ∪ {k d,h j true,h ,r∪{xe} ---------→ l e , | j ∈ [0 . . L e -1], h, h ∈ B , h < h } ∪ {k h j true, √ h ,r ∪{xe} -----------→ l e , | j ∈ [0 . . L e -1], h, h ∈ B , h < h } where g = n k=1 g(β k ) ∧ m k=1 ¬g(β m ) for h = β 1 • • • β n and h 1 -h = β 1 • • • β m g(β) = g (A β ) ∧ g (I β ) and β = A β ; I β ∆ β --→ R β g(d) = u j > δ e (j) g (A β ) = j ≥ η a ∧ λ e ηa ≥ ∆ β if (e, η a ) ∈ A β true otherwise g (I β ) = j < η i ∧ λ e η i ≥ ∆ β if (e, η i ) ∈ I β true otherwise m = max(0, min( i∈[1 . . n] f (h[i] ) + j -1, L e -1)) m = max(0, min( i∈[1 . . n] f (h[i] ) + j, L e -1)) where f (h[i]) = v if (e, v) ∈ R β i 0 otherwise r =     
-L √ = {l h | h ∈ B } ∪ {l ⊥ }, l 0 √ = l h 1 , X √ = {x}, Σ b √ = B , Σ u √ = { √ h | h ∈ B } -Arcs √ = {l h i x=1,h i !,∅ ------→ l h i +1 , l h i +1 true, √ h i ,
Proof:

[Sketch] Follows by induction on the length of the run and from a case analysis on the transition performed. Some intuitions on the proof follows. For each entity e, the corresponding marking of place p e , M (p e ) = l e , u e , λ e , in the Petri net representation is encoded by the state (location l e le and valuations of clocks variables u e le , λ e i for i ∈ [0 . . L e -1]) of each timed automaton TA(e, η e ). Marking of places p ρ (for ρ ∈ M ∪ P) is given by the valuation of clock w ρ in the corresponding timed automaton TA(ρ).

Each transition of the Petri net is encoded by (a series of) timed automata arcs. For each transition t α (corresponding to potential activity α) involving e there is a (synchronous) arcs in the timed automaton TA(e, η e ) whose guard describes its role in the activity (activator, inhibitor or result). Clock w α in TA(α) implements the constraint that the activity α is performed at most once in the interval ∆ α : w α ≥ ∆ α . This way, the synchronous product of all automata reconstructs the full guard of the activity α and exactly one transition in the synchronised product of automata corresponds to the firing of transition t α . The state reached after this transition coincides with the corresponding marking in the Petri net.

Transition t c is trickier as time progression causes decay but more importantly the simultaneous action of mandatory activities. Notice that mandatory activities concern the global state of an ANDy network (the maximal set of enabled mandatory activities has to be performed each time t c fires) but each sub-automaton of the synchronised automaton as only a partial/local information. That is why, we need to introduce the auxiliary automaton TA √ that coordinates and gathers partial information from all other automata. Thus, the implementation of t c has two phases. The first one gathers partial information, performs the selection of the largest set of enabled mandatory activities and forces the time to progress in a discrete fashion; the second phase completes the time progression and synchronises all timed automata communicating the chosen maximal set of mandatory activities. Both phases are initiated by automaton TA √ which has two types of arcs: broadcast ones for the first phase and urgent synchronous ones for the second (see Figure 8). More precisely, TA √ progressively interrogates the entities timed automata TA(e, η e ) and the mandatory activities automata TA(β i ) to "compute" for each automaton the maximal set of enabled mandatory activities. This is obtained through broadcast arcs labelled with sequences of mandatory activities identifiers h ∈ B , from the longest (h = seq(B ) = β 1 • • • β n ) to the shortest (h = , i.e., no mandatory activity is enabled). As broadcast is a non blocking transition and because of the ordering on sequences in B , each entity automaton chooses its maximal set of mandatory activities it is involved in. If it is necessary, it also performs decay. When all automata TA(e, η e ) and TA(β i ) have agreed on some sequence h = β i 1 . . β im (in the worst case h is empty) the first phase is completed and {β i 1 , . . , β im } is the largest set of enabled mandatory activities. The second phase is then implemented with an urgent synchronous arc synchronising all automata: TA √ , TA(e, η e ), for each e ∈ E, and TA(β i ), for i ∈ [i 1 . . i m ]. Notice that guards on broadcast transitions constraint the clocks to progress by one time unit at once. As a consequence, at the end of the two phase algorithm, timed automata of entities and of places p ρ together with the corresponding clocks valuations exactly encode the marking reached after firing t c .

l β1β2 l β1 l β2 l l ⊥ β 1 β 2 ! β 1 ! β 2 ! ! √ β 1 β 2 √ β 1 √ β 2 √

Figure 1 .

 1 Figure 1. Example of firing of transition t with σ = {x = 5, y = 2, x = 7}.

  Transition for α ∈ P.

Figure 2 .

 2 Figure 2. Scheme of Petri net modelling of ANDy.

Algorithm 1

 1 for places in P : L(p ρ ) = [0 . . D] for each ρ ∈ M ∪ P L(p e ) = [0 . . L e -1] × [0 . . d] × [0 . . D] Le for each e ∈ E with d = max{δ e (i) | i ∈ [0 . . L e -1]} and D = max{∆ ρ | ρ ∈ M ∪ P} -Labels for arcs in F : L((p ρ , t c )) = w ρ L((t c , p ρ )) = w ρ for each ρ ∈ M ∪ P L((p e , t c )) = l e , u e , λ e L((t c , p e )) = l e , u e , λ e for each e ∈ E For each potential activity α ∈ P and e ∈ A α ∪ I α ∪ R α : L((p e , t α )) = l e , u e , λ e L((t α , p e )) = l e , u e , λ e if e / ∈ R α l e , u e , λ e otherwise L((p α , t α )) = w α L((t α , p α )) = w α -Labels for transitions in T : L(t c ) = Calc where Calc is the guard computed by Algorithm 1; when evaluated for a given valuation of net variables of input arcs of t c , it produces the corresponding updates of net variables of output arcs. Calcs algorithm function CALC for all ρ ∈ M ∪ P do w ρ := max(w ρ + 1, D)

Figure 3 .

 3 Figure 3. The general shape of the ANDy network for the Repressilator from Example 2.4 (arcs annotations are omitted).

α 2 :Figure 4 .

 24 Figure 4. Entities levels evolving with time corresponding to the given scenario.

Figure 5 .

 5 Figure 5. Glucose metabolism

1 activity α 5

 15 elapse, counter at level 3 updates 3, 8 one time unit elapses, Glycemia decays 2, 0 one time unit elapses, counter at level 2 updates 2, decreases Glycemia level 1, 0 8 time units elapse, counter at level 1 updates 1, 8

Symptoms:Figure 6 .

 6 Figure 6. Simplified ANDy network of glucose metabolism.

  {u e m } ∪ {λ e x | x ∈ [j + 1, m]} if m -j > 0 {u e m } if m -j = 0 {u e m } ∪ {λ e x | x ∈ [m + 1, j]} if m -j < 0 {λ e x | x ∈ [j + 1, m ]} if m -j > 0 {u e m } if e ∈ h ∧ m -j = 0 {u e m } ∪ {λ e x | x ∈ [m + 1, j]} if m -j < 0 ∅ if e / ∈ hwhere e ∈ h denotes formula:∃β k = A β k ; I β k ∆ β k --→ R β k s.t. h = β 1 • • • β n , 1 ≤ k ≤ n ∧ (e, v) ∈ R β k -Inv e (l e i ) = u e i ≤ δ e (i) for all i ∈ [0 . . L e ] Potential activity. TA(α) = (L α , l 0 α , X α , Σ α , Arcs α , Inv α ) for α ∈ P where -L α = {l α }, l 0 α = α, X α = {w α }, Σ s α = {α} -Arcs α = {l α wα≥∆α,α,{wα} ----------→ l α } -Inv α (l α ) = true. Mandatory activity. TA(β) = (L β , l 0 β , X β , Σ β , Arcs β , Inv β ) for β ∈ M where -L β = {l β , l β }, l 0 β = l β , X β = {w β }, Σ b β = B , Σ u β = { √ h | h ∈ B } -Arcs β = {l β w β ≥∆ β ,h?,∅ --------→ l β | h ∈ B , β ∈ h} ∪ {l β true, √h,{w β } ---------→ l β | h ∈ B , β ∈ h} -Inv β (l β ) = true and Inv β (l β ) = true.

  {x} --------→ l h 1 | h, i ∈ [1 . . n -1]} ∪ {l hn x=1,hn!,∅ ------→ l ⊥ , l ⊥ true, √ ε,{x} -------→ l h 1 } -Inv √ (l) = true for all l ∈ L √ .

Figure 8 .

 8 Figure 8. The shape of timed automaton TA√ for B = {β 1 β 2 , β 1 , β 2 , }, where √ β 1 β 2 , √ β 1 , √ β 2 ,√ are all synchronous urgent communication labels.

  In particular, the evolution of successive generations is circular modulo 7, this allows us to have a finite number of levels for gen). Activities β 3 and β 4 describe such a behaviour. Notice in particular the use of inhibitor (gen, 6) in β 3 that allows to apply the activity for all levels of gen from 0 to 5 and to apply β 4 for level 6.We now exhibit a possible execution scenario for the repressilator, the table below shows for each line the current level of each entity:

			1)	2 -→ (tetR, +1)	β 1 : (lacI, 1); ∅	0 -→ (GF P, +1)
		α 2 : ∅; (tetR, 1)	2 -→ (cI, +1)	β 2 : (lacI, 0); (lacI, 1)	0 -→ (GF P, -1)
		α 3 : ∅; (cI, 1)	2 -→ (lacI, +1)	β 3 : (gen, 0); (gen, 6)	1 -→ (gen, +1)
							β 4 : (gen, 6); ∅	1 -→ (gen, -6)
	lacI	tetR	cI	GF P	gen	description
	0	0	1		0	0	initial state
	0	0	1		0	0	after Ph. 2 (tick)
	0	0	1		0	0	after Ph. 1 (no activity)
	0	0	1		0	1	after Ph. 2 (tick and activity β 3 )
	0	1	1		0	1	after Ph. 1 (activity α 1 )
	0	1	1		0	1	after Ph. 2 (tick)
	0	1	1		0	1	after Ph. 1 (no activity)
	0	1	0		0	2	after Ph. 2 (tick, decay of cI and activity β 3 )
	1	1	0		0	2	after Ph. 1 (activity α 3 )
	1	1	0		0	2	after Ph. 2 (tick)
	1	1	0		0	2	after Ph. 1 (no activity)
	1	0	0		1	3	after Ph. 2 (tick, decay of tetR and activities β 1 , β 3 )

"Omics" technologies are methodologies such as genomics, transcriptomics, proteomics and metabolomics.

For the sake of simplicity, in the explanation we consider updates that do not exceed allowed boundaries, these cases are handled as expected in Definition 2.7.

Acknowledgements. We thank the anonymous reviewers of PNSE and BioPPN 2014 for their comments on the very first version of this paper. We are grateful to M. Heiner, F. Pommereau, Y.-S. Le Cornec and A. Finkelstein for useful suggestions and discussions.