Natural numbers - SN P systems¶
Description¶
This is one of the basic examples of spiking neural P systems (SN P systems, for short) presented in the seminal paper of this paradigm. More specifically, it is a generator of natural numbers, as presented in [1] and also appeared in [2]. It would be similar to this:

Model¶
The corresponding P-Lingua file is the following:
@model<spiking_psystems>
def main()
{
call spiking_init_conf();
call spiking_rules();
}
def spiking_init_conf()
{
@mu = in, out;
@mu += 1,2,3;
@ms(1) = a*2;
@ms(2) = a;
@ms(3) = a*3;
@marcs = (1,2);
@marcs += (1,3);
@marcs += (2,1);
@marcs += (2,3);
@marcs += (3,out);
@min = in;
@mout = out;
}
def spiking_rules()
{
[a --> a]'1 "a*2";
[a --> #]'1;
[a --> a]'2;
[a --> a]'2 :: 1;
[a*3 --> a]'3;
[a --> a]'3 :: 1;
[a*2 --> #]'3;
}
Files¶
As it can be seen above, this example presents an ad-hoc model, not accepting any input parameter nor special output to check the results, so it can run with the general MeCoSim app. Only the .pli file is specific from this problem.
- General application yet available and pre-loaded in MeCoSim.
- Model file, P-Lingua file with the code above.
- As in the case of the app, no scenario file with specific input is needed, so the general dummy scenario file can also be used.
A description of the syntax used above and in the corresponding .pli file can be found at [3].
References¶
[1] | M Ionescu, G. Păun, T. Yokomori. Spiking Neural P systems. Fundamenta informaticae, 2006, 71(2): 279-308. |
[2] | H.A. Adorna, F.G.C. Cabarle, L.F. Macías-Ramos, L. Pan, M.J. Pérez-Jiménez, B. Song, T. Song, L. Valencia-Cabrera. Taking the pulse of SN P systems: A quick survey. In M. Gheorghe, I. Petre, M.J. Pérez-Jiménez, G. Rozenberg, A. Salomaa (Eds.) Multidisciplinary creativity, Spandugino, Bucharest, 2015, pages 1-16. |
[3] | L.F. Macías, I. Pérez-Hurtado, M. García-Quismondo, L. Valencia, M.J. Pérez-Jiménez, A. Riscos. A P-Lingua based simulator for Spiking Neural P systems. Membrane Computing, 12th International Conference, CMC 2011, Fontainebleau, France, August 23-26, 2011, Revised Selected Papers. Lecture Notes in Computer Science, 7184 (2012), 257-281 (doi: 10.1007/978-3-642-28024-5_18). |