Hello world¶
Description¶
This example intends to be a starting point to understand the functioning of P-Lingua and MeCoSim (custom apps, models, scenarios), along with a first approach to the modelling of transition P systems in P-Lingua.
Model in P-Lingua¶
The corresponding P-Lingua code is the following:
@model<transition>
/* Transition P system model. */
def main()
{
/* Membrane structure. */
@mu = []'1;
/* Initial multiset in membrane labelled by 1. */
@ms(1) = a*1;
/* Rules in membrane labelled by 1. */
[a --> c]'1;
[a --> b]'1;
}
Files¶
- The example does not need input data from any user nor speficic interesting outputs, so it can be run from the general app 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.