09.09.2014 Views

13th International Conference on Membrane Computing - MTA Sztaki

13th International Conference on Membrane Computing - MTA Sztaki

13th International Conference on Membrane Computing - MTA Sztaki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

F. Ipate, C. Dragomir, R. Lefticaru, L. Mierla, M.J. Pérez-Jiménez<br />

proctype M1Rules(int instIndex) {<br />

instM1[instIndex].is<strong>Computing</strong> = true;<br />

/* rewriting rules */<br />

/* n<strong>on</strong>-deterministic rules applicati<strong>on</strong> */<br />

do<br />

:: instM1[instIndex].A && instM1[instIndex].B &&<br />

instM1[instIndex].D >= 1 -> /* guard */<br />

instM1[instIndex].A--; instM1[instIndex].B--;<br />

instM1[instIndex].D++;<br />

:: c1Cells[cellIndex].A && c1Cells[cellIndex].C &&<br />

instM1[instIndex].D < 2 -> /* guard */<br />

instM1[instIndex].A--; instM1[instIndex].C--;<br />

:: else -> break;<br />

od;<br />

/* communicati<strong>on</strong> rules */<br />

if<br />

:: instM1[instIndex].A && instM1[instIndex].B -><br />

instM1[instIndex].A--; instM1[instIndex].B--;<br />

/* outgoing symbols are stored global buffers */<br />

/* until the end of the current step */<br />

goingToM2.S++;<br />

:: else -> skip;<br />

fi;<br />

/* membrane divisi<strong>on</strong> rules */<br />

if<br />

:: instM1[instIndex].D == 3 -> /* guard */<br />

d_step {<br />

/* copyCell(srcM1,destM1): inline macro defined in Promela */<br />

copyCell(instM1[instIndex], instM1[totalM1Count]);<br />

totalM1Count++;<br />

copyCell(instM1[instIndex], instM1[totalM1Count]);<br />

totalM1Count++;<br />

}<br />

instM1[instIndex].isDisolved = true;<br />

:: else -> skip;<br />

fi;<br />

}<br />

instM1[instIndex].is<strong>Computing</strong> = false;<br />

Fig. 4. Sample of Promela encoding for the following set of rules: AB → D{≥ D},<br />

AC → λ{< D 2 }, AB → (S, 2), [] 1 → [] 11[] 12{= D 3 }<br />

258

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!