1.1 Membrane Computing Overview

Membrane computing (MC for short) is a branch of natural computing investigating computational models called membrane systems or P systems , inspired by the structure and functionality of the living cell . This computing paradigm was introduced by Gh. Păun, initially in a technical report [26] and then in a journal paper [27]. The MC research has initially developed mostly as a theoretical investigation looking at various models and bringing inspiration from a multitude of living cell concepts, topics, and phenomena. All these models have in common a set of compartments separated by membranes and organized according to a certain structure (tree, graph) that can be fixed or dynamic. Each of these compartments contains biochemical entities, called objects , which evolve according to local rules by transforming multisets of objects and/or moving them from a compartment to a neighboring one. This common framework uses various bioinspired features such as activators and inhibitors , membrane electrical charges , catalysts , membrane thickness , and cross-membrane movement of objects (symport , antiport ) in order to generate various types of models, all fine-tuned by a rigorous way of selecting them in a consistent and coherent manner. The main characteristic of these models is their distributed and parallel behavior, that is, the computation takes place in each compartment and multiple transformations and/or cross-membrane movement of objects may take place in parallel. Well-defined topics for many classes of (natural computing) computational models, such as computational power , complexity , and connections with other computational models, have been investigated, revealing a wealth of new and exciting results. A first research monograph [28] included some of these initial theoretical aspects of this field.

These theoretical investigations have paved the way for applications in biology, computer science, computer graphics, and linguistics. Some tools have been also produced, supporting these research developments. All these have been published in another Springer monograph [11]. The key theoretical developments and applications of membrane computing, at the level of 2010, have been presented in a handbook [29]. More recently, some more specific MC applications have been reported [16]. With the exploration of MC models with real-life background, more and more real-life complex and challenging applications have been investigated [14, 43].

From this very brief MC overview, it is clear that the theoretical investigations and MC applications have had a very consistent and steady development. With a multitude of models requesting, in certain circumstances, tools to verify various hypotheses and numerous applications involving the simulation, verification, and analysis of complex systems, a new type of research activity has been launched, the design and development of adequate software and hardware tools. Thus, this book will systematically report the results and applications on software and hardware implementations of a variety of MC models.

The rest of this chapter is organized as follows: Sect. 1.2 introduces software implementation of P systems. Section 1.3 introduces hardware implementation of P systems. Section 1.4 discusses challenging problems of P systems implementation. Concluding remarks, other implementations of P systems, and a brief presentation of the chapters of this book will be discussed in Sect. 1.5.

1.2 Software Implementation of P Systems

When conducting research in MC, the design of computational models (P systems) can be guided by a broad spectrum of questions, ranging from solving hard problems (i.e., problems having a high computational complexity) to modelling complex systems. The desired answer can be extracted from the analysis of the corresponding computations of the designed P system over initial scenarios of interest. Obviously, in order for the designs to be reliable, it is important to verify their correctness, that is, making sure that the described system actually reflects its expected behavior. In this context, the need for software implementations able to manipulate P systems and recreate their behavior naturally arose. Such automatic tools provide not only an invaluable help for the verification process (especially when dealing with large and complicated designs and/or long computations) but also the possibility to run virtual experiments and to process the data associated to the simulated computations (especially in the case of computational modelling of complex systems). A very brief overview of existing P systems simulators is provided in what follows. For a more detailed history and bibliography, we refer the reader to [11, 29, 33, 40].

First software implementations were written in LISP [38] and Prolog [19], followed closely by Scheme [2] and Haskell [1] simulators. Note that the term implementation is used in a software engineering sense (i.e., developing code that somehow captures the specification of an abstract theoretical model), but it does not correspond to a faithful and precise materialization of the semantics of the model. In particular, the inherent parallelism concerning rule applications in one step of a membrane system cannot be implemented as is in the sequential Central Processing Unit (CPU) of a standard computer although it can be “imitated” or “emulated” by means of loops of intermediate auxiliary steps. Nevertheless, there were also several early attempts to get closer to such an ideal implementation by using parallel techniques of different programming languages, such as MPI for communicating threads in C++ [9, 10] or RMI for the communication among processes in different computers in Java [39].

From that point on, new simulators kept coming out on a regular basis as the field grew and different research groups started to investigate new types of membrane systems. However, at that time, software tools were mostly considered as auxiliary by-products, typically featuring an ad hoc design oriented to a specific type of P system, and they were not meant to be extended.

In this situation, P-Lingua project was created [12, 13], pursuing a standard formalization that could be used by software implementations independently of the underlying programming language used to develop the simulator. The initial goal was to cover as many types of P systems as possible and to define a syntax specification, which was similar to the notation used in the MC literature. Chapter 3 offers more details about P-Lingua project, as well as about MeCoSim, a general purpose tool for virtual experimentation in membrane computing built on top of P-Lingua.

It is also worth pointing out that there exist some specialized integrated simulation tools that offer modelization services to users, which are not required to have a strong membrane computing training (mostly dealing with biochemical processes). Some of the most relevant works in this direction are Cyto-Sim [34], MetaPlab / MpTheory [6], BioSimWare [3], Infobiotics Workbench [4] (see Chap. 4), and The Java Environment for Nature-inspired Approaches (JENA) [17] (see Chap. 5).

1.3 Hardware Implementation of P Systems

Software simulations of P systems face difficulties in expressing in an efficient way the parallel and distributed nature of the model as current-day computers are based on a different, mostly sequential, paradigm. So from the very beginning, a research aiming to accelerate the execution of P system simulators using different types of hardware platforms was proposed. Two main research directions have been developed in this respect, depending on the underlying hardware utilized: Graphics Processing Unit (GPU) Compute Unified Device Architecture (CUDA) -based and Field Programmable Gate Array (FPGA) -based implementations. We refer to Chaps. 6 and 7 for the presentation of the corresponding hardware.

The development cycle for a GPU CUDA-based implementation is very similar to a traditional software development cycle and allows a relatively quick prototyping and implementation of corresponding algorithms. The major difficulty is to handle the data parallelism provided by these devices. In the FPGA case, a unique circuit design is created for each concrete system and its initial data. This allows to optimize the circuit for the corresponding computation and to achieve important speedups of several orders of magnitude. In order to accommodate more designs, a software generator is used that provides a hardware description corresponding to the system description and its initial configuration.

First, FPGA-based implementation of a P systems model was proposed in 2003 by Petreska and Teuscher [30], for transitional P systems and using a variant of sequential rule application strategy. Then, in 2008–2010, Nguyen et al. presented a series of implementations of transitional P systems with maximal parallelism evolution strategy [22,23,24,25]. These implementations featured up to 500 times speedup with respect to a reference software implementation. In 2012, Quiros and Verlan proposed a first truly nondeterministic implementation of a variant of network of cells (a generic P systems model; see [15]) [31, 32, 42]. This is also the first implementation achieving a speedup of order 104. In 2019–2020, Shang et al. proposed an implementation of numerical P systems [35,36,37] with several applications in robotics and achieving a speedup of order 105. More details about these implementations can be found in Chap. 7.

The first GPU simulators came relatively late, in 2010 [7]. However, due to a lower development effort with respect to FPGA-based designs, their number is bigger. Besides P systems with active membranes [7, 8], population dynamics P (PDP) systems [21], spiking neural P systems [5], enzymatic numerical P systems, and evolution-communication P systems with energy [20] were targeted for simulation. The obtained speedups range from 1.6 to 100 with respect to a reference software implementation.

In conclusion, we would like to remark that the development of hardware implementations is very promising as it allows to achieve important speedups. Unfortunately, the development time for these implementations, especially for FPGA-based ones, is much larger than for an ordinary software one. So there is a kind of a trade-off between the efficiency of an implementation and the development speed. Hence, for a hardware implementation to be cost-effective, it should target a problem with significant further development, such as like mobile robot controller, in order to compensate for the high development effort.

We also refer to a recent paper [44] that gives a detailed overview of different hardware implementations of P systems.

1.4 Challenges of P Systems Implementation

We mention here some of the most significant challenges of P systems implementation that are discussed in the next chapters: inherent parallelism of the MC models, a broad spectrum of models, combining in different ways various features associated with the generic framework, the usability of the tools, and nondeterminism implementation on computers with von Neumann architecture. These challenges require new algorithms, adequate software and/or hardware platforms, generic or specific solutions, and an effort, in some cases, to produce tools that might appeal to researchers outside the MC community—we have in mind those complex systems requesting models that have to be simulated and analyzed with specific tools. More details can refer to [41, 44]. Some of these challenges are explained as follows:

  • Parallelism: How to realize a P system with inherent parallelism is one of the main challenging problem in P systems software and/or hardware tools. The challenge results from both model design and simulator implementation or hardware constraints. Simulating P systems is a memory-demanding task, given that the execution of rules requires several accesses to memory for just one conditional operation [41]. The design of P system variants of high computational intensity and with memory-bandwidth bounded is a challenging task. The rule competition for objects in the selection phases and finding ways to extend the idea of adaptive simulators represent significant bottlenecks.

  • Nondeterminism: Simulating a P system with nondeterminism on the inherently deterministic computers or hardware with von Neumann architecture is another main challenge. Pseudorandom numbers, instead pf actual random numbers, are used in the present simulators.

  • Universality and flexibility: There are numerous P system models with their own syntactical elements, such as initial structures, initial multisets of objects and initial set of rules, and specific semantics of the execution strategy. Thus, it is a challenging task in the development of a software simulator or selection of a hardware platform that is flexible enough to support all the P system variants.

1.5 Concluding Remarks

As each of the following chapters has an abstract summarizing its content, we will not present here a summary of each chapter but will discuss instead the main problems pointing to where they appear in this book.

Three software platforms, P-Lingua (Chap. 2), Infobiotics Workbench (Chap. 4), and JENA Environment (Chap. 5), are described, pointing to their key features and usage. P-Lingua framework, probably the most widely used software tool, allows for the specification and simulation of a large spectrum of types of P systems. Algorithms describing the semantics of these classes of P systems and a higher level tool, called MeCoSim, providing a visual representation of the simulation environment, are presented. Infobiotics Workbench is an integrated software suite developed for computational systems biology and relying upon stochastic P systems. Its components providing computer-aided modelling and analysis of biological systems through simulation, verification, and optimization are described, and their usage illustrated with some case studies. JENA is a modular, configurable, and extendable platform conceived as a virtual laboratory and a virtual cell. Biological information processing is based on natural laws at a molecular level. Resulting principles make use of dedicated chemical reactions, mechanisms for transportation of biomolecules, and forces among molecules and their environment mainly induced by electric charges and by movement in local space. An introduction to JENA is presented, including its features and capabilities from the user’s perspective and from a technical point of view. Four illustrative case studies are described.

Tools supporting the automatic design of various types of MC models (cell-like P systems and spiking neural P systems), by using various classes of genetic algorithms, are described in Chap. 3. The performance of the tools is proved through a set of examples. In the same chapter are illustrated the capabilities of the MeCoSim tool for modelling a complex ecosystem and issues related to the parallelization of a robot motion problem when modelled with a special class of numerical P systems.

As mentioned above, the parallelization of various processes occurring in the simulation of certain classes of MC models is a challenging aspect in building efficient tools. In this respect, implementations relying on specific hardware, namely, GPU and FPGA, are investigated in Chaps. 6 and 7, respectively. Concepts related to GPU computing and its applications are introduced. Three types of simulators are identified and presented: those developed for very specific P systems or family of P systems (specific simulators), others developed for a wide range of P systems inside a variant (generic simulators), and a hybrid simulator that receives high-level information to be better adapted (adaptive simulators). Some guidelines on how to develop new simulators for P systems on GPUs are presented.

The other hardware option for implementing parallel computation, FPGA, is discussed in the context of implementing generalized numerical P systems by considering many advanced techniques. A discussion related to the challenges posed by FPGA implementations is presented. Enzymatic numerical P systems-based robot controllers and path planning algorithm are implemented in FPGA, achieving a speedup of 105 and 104 order of magnitude compared to software simulation.

Also, there are other software tools, such as kPWorkbench [18] or MetaPlab [6], dedicated to the simulation and analysis of two specific classes of P systems, kernel P systems and Metabolic P systems, respectively, which are not presented in this book as they target topics that are not within its scope.

The gain obtained by reading this book is twofold: On the one hand, the tools presented are introduced together with a thorough investigation of various algorithms, methods, and guidelines regarding the implementation strategies, and on the other hand, a consistent description of the usage of the tools and a set of illustrative examples are presented.

We hope that the readers will find this book interesting, useful, and helpful in their own investigations and research and will open the desire to make use of these tools in modelling, analyzing, and better understanding of complex systems modelled with different types of membrane systems.