Upload
willis-jennings
View
225
Download
3
Tags:
Embed Size (px)
Citation preview
Institute of Computer ScienceSilesian University in Opava
Czech Republic
Modularity in P Colonies with Checking Rules
Luděk Cienciala,Lucie Ciencialová,Miroslav Langer
Definition of P Colony
The P colony of a capacity 1 with checking rules is a construct
= ( A, e, f, VE, B1, ..., Bn ), where• A is an alphabet of the P colony• e is an environmental object• f is a final object • VE is an initial content of the environment • B1, ..., Bn are agents living in the P colony
Definition of P Colony
Agent Bi is a touple 1. An initial content of the agent (multiset of
only one object) 2. A set of programs (each program is
formed from onle rule) Three types of rules:
1. Rewriting2. Communication 3. Checking
Rewriting Rules
Every agent can change its content by evolving it
BA
The agent evolves its content by using rewriting rule A B
Communication Rules
Every agent can change its state and content of environment by communication
AB
Communication is done by using communication rule B A
Checking rules
Not really new type, it set “priority” between two rules.
AB
Checking rule is formed from two rules for example
A B/A C
Checking rules
Not really new type, it set “priority” between rules.
AB
Checking rule is formed from two rules for example
A B/A C
C
Computation
A computation is done in maximally parallel way
The maximal number of working agents
Computation ends by halting A result is the number of copies of
final object f placed in the environment at the end of computation
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
9 AGENTSwithout checking
? AGENTSwith checking
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
Duplication unit
input: object Di
output: objects i and i’ requires: one object d contents two agents
ed
e
B1 B2Di
ii’
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
2
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
2
1
Subtraction unit
input: object Sr
output: object y or object n requires: object ar (if there is any) contents one agent
e
B1
Sr
ar
Bry
Subtraction unit
input: object Sr
output: object y or object n requires: object ar (if there is any) contents one agent
e
B1
SrBrn
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
2
1
1
Balance-Wheel unit
input: object lh or object e output: object d contents one agent
e
B1
lhedd
e
d
e
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
2
1
1 1
Control unit
Controls computation 4 phases of simulation
1. Initialization2. Simulation of ADD-instruction3. Simulation of SUB-instruction4. Finalization of computation
Control unit - initialization
Generates starting label of computation of register machine
ed
e
B1 B2e
l0
Arl2
d
Control unit – ADD-instruction
l1:(ADD(r),l2,l3)
l1 e
B1 B21’D1
1
Addition unit
Duplication unit
y
l1:(SUB(r),l2,l3)
l1 el2d
Control unit – SUB-instruction
B1 B21’
D1
1
Subtraction unit
Duplication unit
SrL’1d
Generates halting label of computation of register machine
lh
Control unit - finalization
de
B1 B2e
Balance-Wheel unit
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
2
1
1
2
12+2+1+1+1=7
Modules in P Colony
Control unit
Watch balance
Duplication unit
Subtraction unit
Addition unit registers
? AGENTSwith checking
7 AGENTSwith checking
Results
NPCOLmparK(1,*,5) = NRE
NPCOLmpar K(1,3,*) = NRE
NPCOLmparK(1,*,7) = NRE
NPCOLmpar K(1,4,*) = NRE
NPCOLmpar (1,4,*) = NRE
NRMpb NPCOL
mpar(1,2,*)