Spiking neural P systems: matrix representation and formal verification

Structural and behavioural properties of models are very important in development of complex systems and applications. In this paper, we investigate such properties for some classes of SN P systems. First, a class of SN P systems associated to a set of routing problems are investigated through their matrix representation. This allows to make certain connections amongst some of these problems. Secondly, the behavioural properties of these SN P systems are formally verified through a natural and direct mapping of these models into kP systems which are equipped with adequate formal verification methods and tools. Some examples are used to prove the effectiveness of the verification approach.


Introduction
Membrane computing is a research field initiated by Gh. Păun [48,49]. This computation paradigm is inspired by the structure and functioning of the living cells. The key models are called membrane systems or P systems. The field has developed very fast and many classes of membrane systems (P systems) have been investigated. These may be classified as cell-like, tissue-like and neural-like P systems. A presentation of the most important such models is available in [50] and [51].
A class of neural-like P systems, called Spiking Neural P systems (SN P systems, for short), has been introduced in [30], inspired by the neurophysiological behaviour of neurons (in brain) sending electrical impulses along axons to other neurons. Significant results have been reported in the literature with respect to SN P systems, in particular, generating or recognising elements of a set (see the survey paper [47]).
Matrices have been used to represent SN P systems without delays [55] and later SN P systems with delays [15]. These matrix representations have been useful in implementing SN P systems in silico [8,18,19,31]. A thorough presentation on these matrix representations and further research directions have been discussed in [2], including the idea of periodicity in SN P systems (without delays) started by [29]. Some Petri net-like properties of SN P systems are also provided in [2].
Another type of P systems, called kernel P systems (kP systems, for short), has been introduced [23] in order to capture in a unified approach features of various membrane computing models, making it more amenable for describing various problems, including complex applications. kP systems have an expressive formal language, allowing models to be simulated with a software framework, called kPWorkbench [12], which also includes a verification component 1 3 [25]. A thorough presentation of this tool has been made in [42]. The modelling, simulation, verification and testing aspects of kP systems have been presented in [21,22] and applications in synthetic biology in [24,40,41].
In this paper we investigate structural and behavioural properties of some classes of SN P systems. First, the overall structure and configurations of SN P systems associated to a set of routing problems are investigated through their matrix representation. This allows to make certain connections amongst some of these problems. Secondly, the behavioural properties of these SN P systems are simulated and formally verified through a natural and direct mapping of these models into kP systems, which are equipped with adequate formal verification methods and tools. Some examples are used to prove the effectiveness of the verification approach.
This paper is structured as follows: Sect. 2 presents the preliminaries regarding SN P systems and kP systems. Section 3 discusses the matrix representation introduced in [15] for SN P systems for some Petri net-like properties. Some connections between SN P systems and kP systems are presented in Sect. 4. Simulation and formal verification of the kP systems obtained from the SN P systems, by examining two examples, are discussed in Sect. 5. Finally, conclusions are presented in Sect. 6.

Preliminaries
This section briefly presents the notations used, then gives the basic definitions regarding spiking neural P systems (SN P systems, for short) and kernel P systems (kP systems, for short).
For a finite alphabet A = {a 1 , ..., a p } , A * represents the set of all strings (sequences) over A. The empty string is denoted by and A + = A * ⧵ { } denotes the set of non-empty strings.
A multiset over A is a mapping f ∶ A → ℕ , represented as a string a f (a 1 ) 1 ⋯ a f (a p ) p , where the order is not important, and where elements which are not in the support (i.e., elements a j , with 1 ≤ j ≤ p, having f (a j ) = 0 ) are omitted. In the sequel, multisets will be represented by such strings.

Spiking neural P systems
The definition and other concepts related to SN P systems are from [2,55]. In this paper, we consider only SN P systems without delay rules.
Definition 1 An SN P system of degree m, m ≥ 1 , is a tuple where Π = (O, 1 , … , m , syn, in, out), n i ≥ 0 is the number of spikes in i ; -R i is a finite set of rules of the following forms: (Type (1); spiking rules) E∕a c → a p ; where E is a regular expression over {a} , and c ≥ 1, p ≥ 1, such that c ≥ p; (Type (2); forgetting rules) a s → , for s ≥ 1, such that for each rule E∕a c → a p of type (1) from R i , a s ∉ L(E); .m} indicate the input and output neurons respectively.

Remark 1
The in neuron will not be distinguished in what follows and, when specified, out will be also not considered. The SN P system Π computes by applying one rule from each neuron.
A configuration of SN P system Π is an m-size vector of integers where a j , 1 ≤ j ≤ m, represents the number of spikes in neuron j .
A configuration at time k, k ≥ 0, of an SN P system Π, as above, is a vector where a (k) j ∈ ℤ + ∪ {0}, 1 ≤ j ≤ m , is the number of spikes present at time k in neuron j .
We say a rule r x ∈ R j , 1 ≤ j ≤ m, of neuron j is applicable at time k, k ≥ 0, if and only if the multiset a n satisfies E x (or a n ∈ L(E x )), where n = a (k) j . At some time k, we can have in neuron j , a n ∈ L(E x ) ∩ L(E y ), for some rules r x and r y , x ≠ y. In this case one of the two rules will be chosen to be applied. This is how the non-determinism 1 of the system is realised, whereas several neurons with their chosen applicable rules can fire (or spike) simultaneouly at time k, demonstrating parallelism.
1 In [53] there is a normal form for SN P systems where L(E x ) ∩ L(E y ) is either L(E x ) or empty, hence in order to find all nondeterministic rules is sufficient to verify if their regular expressions are the same.
A rule of type 2 from R j removes spike(s) from the neuron at some time k when applied. Such a rule could only be applied if and only if the number of spikes in j is exactly the amount of spikes it needs to be applied. Formally, if there exists a rule a s → ∈ R j , then there cannot exist any rule E∕a c → a p of type 1 in R j such that a s ∈ L(E).
In defining rules in SN P systems, we follow the standard convention of simply not specifying E whenever the lefthand side of the rule is equal to E.
The sequence of configurations defines a computation of the system. SN P systems obtain inputs from outside the system (environment) through the designated input neuron(s). We say that a computation halts or reaches a halting configuration if it reaches a configuration where no more applicable rules are available. We could represent the output of the system as the number of steps lapse between the first two spikes of the designated output neuron. Another output representation of SN P system is a sequence of (coded) spikes. This sequence is called a spike train, which is a (combinatorial) sequence of spikes and no spikes (silence) made by the systems.

Kernel P systems
In the following, we will give a formal definition of kP systems; for more details, see [23].
First, we introduce a compartment type utilised later in defining the compartments of a kP system.
consists of a set of rules, R i , and an execution strategy, i , defined over Lab(R i ) , the labels of the rules of R i .
The definition of a kP system uses the concept of compartment type.
Definition 3 A kP system of degree n, n ≥ 1 , is a tuple where • A is a finite set of elements called objects; • defines the membrane structure, which is a graph, (V, L), where V is a set of vertices representing compartments (or components), and L is a set of edges, i.e., links between compartments; • C i = (t i , w i,0 ) , 1 ≤ i ≤ n , is a compartment of the system consisting of a compartment type, t i , from a set T, and an initial multiset, w i,0 , over A; the type consists of a set of evolution rules, R i , and an execution strategy, i ; • i 0 is the output compartment where the result is obtained.
The kP systems presented in this paper will only use rewriting and communication rules. A more general discussion regarding all types of rules of a kP system, including structure changing rules, i.e., membrane division, membrane dissolution, link creation and link destruction rules, can be found in [23].
A rewriting and communication rule of a compartment C i , 1 ≤ i ≤ n , has the form: x → y{g} , where g represents a guard (this will be formally explained in Definition 5), x ∈ A + and y ∈ (A × T) * , where y is a multiset, y = (a 1 , t 1 ) … (a h , t h ) , where h ≥ 0 , and for each 1 ≤ j ≤ h , a j ∈ A and t j indicates a compartment type from T. If several compartments, C j 1 , … C j p , p > 1, linked to C i , have the same compartment type, t j , then one of them will be nondeterministically chosen to receive a j .
For the next definitions, we make the following notations. For a multiset w over A and an element a ∈ A , we denote by |w| a the number of objects a occurring in w. Rel = {<, ≤, =, ≠, ≥, >} denotes the set of relational operators, ∈ Rel , a relational operator. We introduce now an abstract relational expression.

Definition 4
If g is the abstract relational expression denoted by a n and w a multiset, then the guard g applied to w denotes the relational expression |w| a n.
The abstract relational expression g is true for the multiset w, if |w| a n is true.
We consider now the following Boolean operators ¬ (negation), ∧ (conjunction) and ∨ (disjunction). An abstract Boolean expression is defined by one of the following conditions: • any abstract relational expression is an abstract Boolean expression; • if g and h are abstract Boolean expressions then ¬g , g ∧ h and g ∨ h are abstract Boolean expressions.

Definition 5
If g is an abstract Boolean expression containing g i , 1 ≤ i ≤ q, abstract relational expressions and w a multiset, then g applied to w means the Boolean expression obtained from g by applying g i to w for any i, 1 ≤ i ≤ q.
As in the case of an abstract relational expression, the guard g is true with respect to the multiset w, if the abstract Boolean expression g applied to w is true.
In each compartment type, apart from rules, there is an execution strategy, as mentioned by Definition 2. In this paper we only refer to one execution strategy, namely choice or alternative. For an exhaustive discussion we refer to [23].

Definition 6
For a compartment type t = (R, ) from T and r 1 , … , r s ∈ Lab(R) , the choice (alternative) execution strategy, , is defined by the following notation {r 1 , … , r s }, with the meaning: one of the rules applicable will be non-deterministically chosen and executed; if none is applicable then nothing is executed.
A transition (or computation step), introduced by the next definition, is the process of passing from one configuration to another.

Definition 8 Given two configurations
) of a kP system, kΠ , with n compartments, and a multiset of rules M i , 1 ≤ i ≤ n , applicable to c i (as i is a choice, M i consists either of a rule from the compartment C i or is empty), a transition or a computation step is the process of obtaining c ′ from c by using the multisets of rules is obtained from c i by removing all the objects that are on the left-hand side of the rule of M i from c i and then adding objects a that appear as (a, t i ) on the right-hand side of each rule of M j , 1 ≤ j ≤ n , and do not go to other compartments with the same type t i as C i .
A computation in a P system is a sequence of transitions (computation steps). A configuration is called final configuration, if no rule can be applied to it. As usual in P systems, we only consider terminal computations, i.e., those arriving in a final configuration. The result of a terminal computation is the number of objects appearing in the output compartment of a final configuration.

Matrix representation of spiking neural P systems and applications
We express with matrices SN P systems, as suggested in [2,55]. Structural and behavioural properties of SN P systems considered in [13] are then investigated using matrices.

Basics on matrix representation of spiking neural P systems
We restrict our SN P systems not to have any neuron with self-loop, that is synapse directly connecting to itself when defining its matrix representation.
Definition 9 (Spiking transition matrix) [55] Let Π be an SN P system with the total number of rules n and m neurons. Let the rules in the systems follow some precise ordering.
The matrix M Π is (almost) a natural representation of the SN P system Π.

Example 1 An SN P system for
Some more details regarding the properties of this matrix, M Π , are presented in [55]. The initial configuration of Π, introduced in Example 1, is C (0) = (2, 1, 1). The next configuration C (k+1) to C (k) can be computed using the following identity [55], 1} n is some valid spiking vector with respect to C (k) and M Π is the spiking transition matrix of Π.
A valid spiking vector s (k) indicates the rules that could be used at time k with respect to C (k) and the regular expression governing the usability of rules in each neuron.
entries represent only the amount of multisets in each neuron in the system. Checking if the multiset in every neuron belongs to L(E i ), for each i is a must to define a valid spiking vector. If there exist at least two possible rules in a neuron that can be used, then we non-deterministically choose one of them for that time instance.
A valid configuration is one that is either an initial configuration or any configuration obtained from a valid configuration using a valid spiking vector or (sum of) sequence of valid spiking vectors [2]. It is not hard to see that Any configuration C (k) that satisfies Eq. (2) is called a reachable configuration. In particular, we define the set of all reachable configurations from C (0) in Π . We call C (k) a reachable configuration of Π from C (0) , for each k ≥ 0.

Properties of SN P systems
In this section, we look into some structural and behavioural properties of SN P systems [13] which resemble some properties of transition systems such as Petri nets. SN P systems transmit and route spikes in processing information. First, we consider basic routing blocks, namely AnD-join, AnD-split, or-join and 2-way or-split. Then we focus on types of routing spikes via synapses in the systems that can be identified as follows: sequential, conditional, parallel, and iteration routing type. We will show some relationships amongst some basic routing blocks and some routing types. To demonstrate these routing blocks and routing types, we have SN P systems to emulate the behaviour of spike transmission with respect to the structures of the synapses connecting neurons. In the following illustrations, neurons emit only at most 2 spikes. Boundedness and liveness of SN P systems are consider at the end of this section.

Basic routing blocks
One can check correctness of the matrices below, representing basic routing blocks by performing the matrix computation by SN P systems using equation (1) and observing the appropriate entries in the configuration vector that indicate the desired output. (2) 1. AND-join: spikes are transmitted from two source neurons to a neuron, which sends the processed accumulated spikes to next neuron connected from it. L et t h e S N P s yst e m Π AND-join∶ g i ve n b y ({a}, 1 , 2 , 3 , 4 , syn), w h e r e 2. AND-split: transmits spikes simultaneously from a source neuron to all neurons connected from it. Let an SN P system with three neurons given by 3. OR-join: spikes are transmitted from two source neurons directly to a neuron connected from these source neurons.
Let an SN P system with three neurons given by This can be represented by the following matrix:  0, 0, 0, 0, 0, 0, 0). Another solution, with fewer neurons than in the above mentioned SN P system, Π OR-split , is obtained by removing the neurons 2 and 3 with all the synapses coming to and going out of them, and adding a synapse from 1 to 4 and an initial spike to 4 . These will be reflected in the spiking matrix representation by removing the rows and columns 2 and 3, and introducing C (0) = (1, 1, 0, 0, 0, 0). The SN P system Π OR-split , as well as the others above, perform one flow of execution, starting with one spike and then moving through synapses up until no rule is executed. One can consider a slight generalisation, whereby the neuron 1 will have initially k spikes, k ≥ 1, and its spiking rule will become a + ∕a → a. In this case the flow of spikes from 1 towards 7 , 8 will move in k waves leading eventually to k 1 spikes in 7 and k 2 in 8 , such that k 1 + k 2 = k . This and other properties of Π OR-split will be discussed in Sect. 5.

Routing type for SN P systems
Now, we demonstrate the routing type [13] mentioned earlier in this section. We likewise express as matrices these routing types as demonstrated by appropriate SN P systems. Similarly, correctness of these matrix representations can be checked by performing matrix operation using Eq. (1).

Sequential routing:
Let Π seq given by This matrix appears as a sub-matrix (top left corner) of several matrices of basic routing blocks.

Conditional routing:
The SN P system, denoted Π cond is very similar to 2-way OR-split SN P system block, but instead of collecting the spikes in two distinct neurons, 7 and 8 , only one, denoted 7 , will receive spikes from 5 and 6 . In this case 7 will also have a rule a → a. The spiking transition matrix is C (0) = (1, 0, 0, 0, 0, 0, 0).
We consider the same changes as in the case of Π OR-split applied to Π cond and accordingly to M Π cond and the initial configuration. Then this conditional routing model will still perform as expected.
This matrix appears as a sub-matrix (top left corner) of the matrix describing 2-way OR-split SN P system block.

Remark:
Notice that the non-zero sub-matrix of the matrix representing the basic routing blocks AND-join, AND-split and OR-join are sub-matrices of the matrices for conditional and parallel routings.

Boundedness and liveness of SN P systems
We now turn our focus on the properties of SN P systems as described by its configurations. These properties described how SN P system behaves as it performs its function.

Definition 10
We call a rule r live for an initial configuration C (0) if for every C (k) , C (k) ∈ R(Π, C (0) ), there exists a valid spiking sequence from C (k) that contains and applies r. An SN P system Π is live for C (0) if all its rules are live for C (0) . This means for SN P system Π to be live, rules in Π must not be useless permanently during the computation. A generating or recognizing Π halts after computation. This means no more rules can be applied and therefore "dead" or a "deadlock". We adapt the idea of the so-called "quasi-live transition" from Petri nets for SN P systems.

Definition 11
A rule r is quasi-live for an initial configuration C (0) , if there is a valid spiking sequence from C (0) that contains and applies r.
We call an SN P system quasi-live if all its rules are quasi-live.
The idea of quasi-liveness allows SN P systems to be "not dead" even some of the neurons are "useless" or "dead" while the other neurons are still functional. Note that to keep SN P systems live, it must have a "feedback-loop" or an "iteration routing" structure where all rules involved are live.
For the following illustrations, we have for all rules E∕a c → a p of each neuron in the SN P system, E = a c . The absolute values of the entries of M Π for each Π, indicate the values of the exponents c and p of a. C (0) is the corresponding initial configuration of each Π.

Example 2
Let Π 1 be an SN P system, such that, 0). It is not hard to see that Π 1 is live.

Example 3
Let Π 2 be an SN P system, such that with C (0) = (1, 0, 0). It is not hard to see that Π 2 is quasi-live (without deadlock).

Example 4 Let Π 3 be an SN P system, such that
with C (0) = (2, 0, 0, 0). It is not hard to see that Π 3 is quasi-live with deadlock.
We define below a bounded SN P system with respect to the amount of spikes every neuron has after some computation. First, we define boundedness of a neuron.

Definition 12
A neuron is bounded for an initial configuration C (0) if there is a positive integer s such that, C( ) ≤ s, for every configuration C ∈ R(Π, C (0) ), where C( ) is the amount of spikes in in configuration C. We say, is an s-bounded neuron. An SN P system Π is bounded for an initial configuration C (0) , if all neurons are bounded for C (0) . Π is s-bounded if all the neurons are s-bounded.
If s = 1, then we call the SN P system Π, safe.

Example 5
Let Π 4 be an SN P system, such that, 0, 0). It is not hard to see that Π 4 is unbounded.
Note that 3 of Π 4 accumulates spikes unboundedly during the computation.

Example 6
The SN P system of Example 1 has neurons 1 , 2 and 3 2-bounded and 4 unbounded. This is also verified in Sect. 5.

SN P systems and kP systems
kP systems have been conceived as a membrane computing model allowing to specify and verify problems from various areas, from specific computer science topics, such as communication and synchronisation [22], to applications in synthetic biology [40,41]. The modelling and verification capabilities of these models have been presented in [22]. Relationships with other classes of P systems, such as P systems with active membranes and neural-like P systems [23], and membrane systems with symport/antiport rules [22].
In this section we illustrate how potential connections between SN P systems and kP systems are built. We do not intend to make a thorough investigation of these relationships, as our goal is relatively limited now, i.e., to illustrate how some specific SN P system examples are expressed as kP systems with equivalent behaviour, facilitating the use of the verification tools developed for these models. We are also aware that there are other types of SN P systems that need to be investigated in relation to kP systems as well, and these topics will be considered in a broader context.

Remark 2
For an SN P system, Π, as in Definition 1, we build a kP system, kΠ Π . Its components and structure are as in Definition 3.

The set of objects is
2. The set of edges (links), denoted L, of the graph giving the membrane structure , includes pairs {C i , C j } , if and only if, at least one of (i, j) or (j, i) is in syn, i.e., there is a synapse between i and j or vice-versa. Although the edges (links) of L are bi-directional, the objects might circulate only in one direction, as specified by the rules and in accordance with the synapse that is considered in Π.
3. For each neuron i , 1 ≤ i ≤ m, of Π , a compartment NC i of type C i is considered for kΠ Π . One might also have a compartment NEnv of type Env.

For each set of rules
where g E is the guard obtained from the regular expression E. Please note that as (i, j 1 ), … (i, j h ) ∈ syn, then one must have {i, j 1 }, … {i, j h } ∈ L. When h = 0, i.e., no synapse going out of i , then the corresponding rule in R ′ i is a c → (a p , Env) {g E }. R ′ Env , the set of rules associated with type Env, is ∅.
ii. for each rule of type (2), a c → ∈ R i , a rule a c → {= a c } is added to R ′ i . (b) execution strategy, i ∶ is always choice, as one single rule from those applicable must be selected; Env is also choice.
5. The output compartment, i 0 , is only considered in kΠ Π when an output neuron is distinguished in Π.
Below we are focusing on translating Example 1 and 2-way OR-split SNP system, into kP system specifications. The SN P system introduced in Example 1 is now specified using kP systems.
The types of these compartments are C i = (R i , i ), 1 ≤ i ≤ 4, and the initial multisets w 1,0 = a 2 , w 2,0 = w 3,0 = a and w 4,0 = . The sets of rules that appear in the types above are

Remark 3
One can observe that the compartment NC 4 of type C 4 collects the objects from NC 3 sent out by rule r 3,1 and acting as an environment.
It is easy to observe that kΠ Π and Π ( Π from Example 1) have the same behaviour.
This kP system will be used in Sect. 5 for simulating and verifying certain properties of this example.
Next we present the kP system obtained from the SN P system associated with the 2-way OR-split block. We only present the set of rules, initial multiset and execution strategies.
Example 8 Let us denote by kΠ Π OR-split , the kP system built, based on Remark 2, for the SN P system, Π OR-split . For each of the eight neurons of the SN P system Π OR-split a compartment, NC i , 1 ≤ i ≤ 8, of type C i = (R i , i ) will be constructed in the kP system, kΠ Π OR-split .
The set of rules are The initial multisets are w 1,0 = a k , k ≥ 1, and w i,0 = , 2 ≤ i ≤ 8, and the execution strategies are all choice.

Remark 4
The mapping of Example 1 and 2-way OR-split SNP system into kP system specifications, by using Remark 2, shows how natural is the process of getting the components NC i , 1 ≤ i ≤ n, of the kP system from the neurons i of the SN P system, where n = 4 , in the case of Example 1, and n = 8 , for the 2-way OR-split system.
A simpler solution to the problem of splitting the amount of objects present in the initial compartment, by using a kP system, kΠ � Π OR-split , with only three compartments, NC 1 , NC 2 and NC 3 , can be constructed. The k objects from NC 1 will be distributed non-deterministically to the other two. NC 1 is of type C = (R, ) and NC 2 , NC 3 of type C � = (�, ). R contains the rule, r ∶ a → (a, C � ) {≥ a}, and might be choice (of a rule, r) or sequence. This solution exploits the fact that the rule r sends non-deterministically an object a to one of the two compartments, NC 2 , NC 3 , of the same type C ′ .

Simulation and verification using kPWorkbench
To provide a tool support for kernel P systems, an integrated software suite, the kPWorkbench [42] platform, has been developed (available and downloadable from its website [43]). The tool includes two simulators, a native one, which allows the execution of the entire system or a step-wise approach, and the FlAme simulator [17], a general purpose large scale agent based simulation environment. The later is meant to allow a kP system to be expressed as a set of communicating X-machines [27] and then executed on highperformance hardware platform [11].
Any kP system model can be expressed using kPWorkbench 's kP-Lingua language-see [23], for details, including the language syntax. A kP-lingua model can be executed, using some of the above mentioned simulators, or formally verified, through the verification component of kPWorkbench .
To assist users in verification process, which is a very cumbersome process for non-experts, the platform also features a user friendly property language, kP-Queries, based on natural language statements, which makes the property specification a much easier task. The query language comprises a list of property patterns written as natural language statements. This is very useful for non-experts as they do not need to know the syntax of such query languages, relying on existing pre-defined patterns. The properties expressed in kP-Queries are verified using the SPin [28] and nuSmV [16] model checkers after being translated into corresponding Linear Temporal Logic (LTL) and Computation Tree Logic (CTL) syntax.
We now use kPWorkbench to model and analyse the behaviour of the SN P system described in Example 1 in Sect. 3. The corresponding kP system model kΠ Π has been expressed in kPWorkbench 's kP-Lingua language as presented in Fig. 1a. In kP-Lingua notation, the usual multiset notation is replaced by exposing the multplicity of a symbol in front of it, i.e., a 3 will become 3a.
The model in Fig. 1a has four compartment types, C1, C2, C3 and C4 with corresponding instances NC1, NC2, NC3 and NC4, respectively. The compartment NC1 starts with initial multiset 2a, NC2 and NC3 with a; NC4 is initially empty. Only one of the two rules of C1 is selected non-deterministically. The first rule is executed only if its guard =2a is true. This rule also sends an a to the instance of the type C2 and C3. The rules in the compartments C2 and C3 are executed similarly. NC4 has no rules.
To observe the dynamic evolution of the system, we have run simulation experiments using kPWorkbench 's native simulator. Table 1 shows some simulation results. We have presented a finite halting computation (left) and the first steps from a longer computation (right). Table 1 shows on the left a computation ending after 7 steps, with a 6 in the output compartment, NC4 . This means that the corresponding SN P system will stop with 6 spikes in 4 . The simulation that appears on the right, shows that steps 4 and 6 have the same configuration with respect to compartments NC1 , NC2 and NC3 . Hence, this computation might stop later on, after n steps ( n ≥ 10 for the configuration after 6 steps) or might continue forever. Tables 2 and 4 summarise some of the properties verified for the kΠ Π model and kΠ Π OR-split model, respectively. One can observe that any property that refers to the number of spikes, n, of a neuron of the SN P system is translated to the same property, but referring to a n , in the corresponding compartment of the kP system. This observation together with Remark 4 show how natural is the verification of an SN P system, derived directly from the verification of the associated kP system.

Remark 6
The first line of each property in these tables expresses the property through a natural language statement. Hence, its meaning becomes obvious to the reader.
Some interesting properties that have been verified for the kΠ Π model can be seen in Table 2. The verification results of most of these properties are true, for example property 1: eventually the number of objects a in NC4 will be greater than 0, or properties 2, 3 that state that the number of a objects in compartments NC1-NC3 will not exceed 1 or 2. This proves what has been presented in Sect. 3.2, Example 6, where the boundedness of certain neurons of the SN P system, Π, presented in Example 1. Two properties, 4 and 6, are not true. Property 4 checks if the computation will halt with an a in compartment NC1 and empty compartments NC2 and NC3. Many of the execution traces, those that halt, have this property; however, the NuSMV model checker could provide a counterexample with an infinite loop, showing it is not always true-the loop was considering the application of the same rules like those applied at steps 3-4, then repeated in steps 5-6, provided in Table 1     property 4 is false, property 7 states the context in which the computation will halt, with a particular final configuration: if in a step there are 0 objects a in the first compartment, then the computation will eventually halt, with one a in the first compartment and empty compartments NC2 and NC3.
Our second example refers to the SN P system associated with the 2-way OR-split block, Π OR-split and translated into the kP system kΠ Π OR-split . This is presented in Fig. 1b. The model has eight compartment types, C1, … , C8, with corresponding instances NC1, … , NC8, respectively. The compartment NC1 starts with the initial multiset 6a. All other compartments are initially empty. C4, C5 and C6 have two rules, which are selected non-deterministically only one at a time and the selected rule is executed if the guard holds. For example, in C5, the first rule is executed only if its guard =a is true. This rule also sends an a to the instance of the type C7. The rules in the compartments C4 and C6 are executed similarly. C1, C2, and C3 have only one rule, which is executed if the guard is true. C7 and C8 have no rules. Table 3 presents two computations for kΠ Π OR-split with the same number of steps, but arriving to different configurations given the non-determinism. For the same kP system model we have verified some properties of interest and the results are presented in Table 4. Properties 1-6 check the number of objects in different compartments, at any time. These are summarised in Property 7, which shows that the number of objects in NC2, NC3 is maximum 1 and in  NC4-NC6 is maximum 2. Property 8 checks that the number of objects a in first compartment is decreasing. Properties 9 and 10 show that the number of objects in NC7 and NC8, respectively, is bounded by the initial number of objects (6 in NC1). Property 11 proves that eventually the sum of objects in NC7 and NC8 is the same as the initial number of objects in NC1, which verifies the statement made for the SN P system Π OR-split as a a model of the 2-way OR-split block presented in Sect. 3.2; it is also shown that the other compartments, NC1-NC6, are empty. In this section, we have shown that formal verification of kP systems can be translated in a natural manner into the verification of SN P systems. Both, the modelling language, kP-lingua, and the verification mechanism provide direct mapping of the neurons into compartments and spikes into powers of the object a, respectively.

Conclusions
This paper has presented an approach based on matrix representation of SN P systems and a way of mapping such a system to a kP system. The matrix representation allows to express in a succinct and uniform way various structural and behavioural properties of such systems. The basic model of SN P systems has been studied in connection with kP systems and two examples of SN P system models have been translated into equivalent kP system ones. These two examples have been formally verified, by using an integrated software suite, kPWorkbench .
Regarding the first line of research, investigating structural and behavioural properties of the SN P systems using the matrix representation, we recall the fact that these properties are based on the the investigation considered in [13]. In [52], similar constructs are presented in the context of generalized communicating P systems. For instance, separation and joining blocks [52] are similar to AND-split and OR-join, respectively.
A number of new research avenues remain to be investigated, in the context of this work: the relationship between various classes of SN P systems and kP systems; the investigation of the matrix representation for other problems related to SN P systems -one of interest being the reverse computation; a more systematic investigation of various properties that are expressed by using kPWorkbench .
Finally, some comments regarding the second research direction mentioned above are presented. Reverse computation has been studied for various types of P systems [3-5, 7, 46]. A first question is related to how a reverse computation is defined for SN P systems. Reversing the rules of an SN P system might involve the use of concepts introduced for networks of cells [20] or generalized communicating P systems [52], whereby spikes are collected from various neurons and a number of spikes returned to one single neuron. The regular expressions associated with such rules must be then verified a posteriori, similar to a post-condition that must be true after executing a statement. The second aspect is related to expressing reverse computation with spiking translation matrices and the relationship with the matrix representing the initial SN P system. Dr. Juraj Hromkovic. HNA went home to obtain his PhD in Mathematics from the UP Diliman in 2002. HNA works primarily on P systems since 2009. Other research interests of HNA include algorithmics for NP-hard problems, particularly combinatorial hard problems in computational biology, discrete mathematics, natural and unconventional computing models.