Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
implement M
in Spin; (M
and M
5
Kripke structure associated with a P system (1)
Given a P system with rules R = {r
1
, r
m
}
states of M
diagram
q
0
q
2
q
3
r
3
r
4
8
Running
Halt Crash
Running (set of states) normal behaviour;
Crash abnormal behaviour
(upper bounds exceeded);
Halt halting configurations.
Transforming LTL formulae (1)
Transition between the states of M
is the alphabet;
is the membrane structure;
are the initial multisets;
and contains the code ;
Case study: Subset Sum problem (4)
14
( ) ( ){ } ( ) ( ) : , ,where n,k ,R,i ,w w , s , e , n,k n,k
s e
=
[
( ) { } {
} #
= I
+ +
+
, , , , , ,
, , , , , , , , , , , , , ,
0 2 2 2 0
, 1 2 0 0 1 0
0
1 0
No No Yes z z
q q q e e d a a a a x x x n,k
k n
k n n
0 0
] ] [ [
s e e s
=
k
e s
a e w z w
0 0
, = =
e k n i = ) , (
n
w
n
w
x x
1
1
Case study: Subset Sum problem (5)
15
The set of rules, R:
(1)
For each subset of A a membrane
is generated.
(2)
The code from the input membrane is built in such a way that the
multiplicity of x
j
represents the weight of a
j
e A. These three rules
calculate in
0
the weight of a subset.
(3)
The rules mark the beginning of the checking stage; the weight of the subset
is now coded by the multiplicity of a
0
.
(4)
The number of occurrences of a
0
and a are compared in a checking loop.
. 0 , ] [ ] [ ] [
; 0 , ] [ ] [ ] [
1
0
1
0
n i e e e
n i e q e
e i e i e i
e i e e i
s s
s s
+
+ +
+
+
. 1 , ] [ ; ] [ ; ] [
1 0
0
0
0
n i for x x x a x
e i i e e
s s
+
. ] [ ; ] [ ; ] [
0
0
0
+
e e e
a a a a q q
. [] ] [ ; [] ] [
0 0
0
# #
e e e e
a a
Case study: Subset Sum problem (6)
16
(5)
Objects q
i
are utilised as counters of the checking loop.
(6)
These rules provide an answer to the checking loop given that there are the
same number of a
0
and a, more a
0
objects, or more a objects, respectively.
(7)
Objects z
i
control the checking stage in all membranes. When the checking
stage is over d
1
and No
0
are released into the skin membrane.
(8)
In the final stage either Yes or No is sent out into the environment.
. 1 0 , ] [ ; 0 , ] [
0
2 2 1 2 1 2 2
s s s s
+ +
+
k j q q k j q q
e j j e j j
. 1 0 ; [] ] [ ; [] ] [ ; [] ] [
1 2
0 0
1 2
0
1 2
s s # #
+ +
+
k j q q Yes q
e e j e e k e e k
. ] [ ; 1 2 2 0 , ] [
0
0 1 2 2 2
0
1 s k n s i i
No d z k n i z z + + s s
+ + +
. [] ] [ ; [] ] [ ; ] [ ; [] ] [
0 0
0 1
0
1
No No Yes Yes No No d d
s s s s s s s
+ + + +
Experimental results (1)
17
We have considered a set A with 2 and 3 elements, weights
between 1 and 3, and k between 2 and 4.
Two examples reported
(1): n = 3; k = 4; w = [ 1; 2; 2 ]
(2): n = 3; k = 3; w = [ 2; 2; 2 ]
Experimental results (2)
18
Experimental results (3)
19
Experimental results (4)
20
Comparative simulations with both P-Lingua and the Promela
code: the translation from P-Lingua to Promela does not
introduce much overhead into the system.
The maximum number of membranes obtained during the P
system computation was 16 (for n = 3): Spin produced a
response in at most 10 seconds (less than 5 seconds for simple
queries).
Much slower responses (several minutes) for larger n and
complex queries.
Future experiments
21
Test the limit for which Spin can produce a response in a
reasonable time interval
Investigate how our implementation can be improved in order
to cope with the well-known state explosion
Address more complex properties
Identify invariants of various stages
Automate the process of transforming the P system
specification, given as a P-Lingua file, into a Promela model
Other challenging, real life examples
Conclusions
22
Significant advances in the area of model checking of P
systems
P systems with active membranes - P systems with cell
division rules, having a bounded number of produced
membranes
Limitations due to the underlying nature of model checking
Further work needed to improve performance and automate
the process
Questions?
23