290 likes | 424 Views
Modularity in P Colonies with Checking Rules. Luděk Cienciala, Lucie Ciencialová, Miroslav Langer. Institute of Computer Science Silesian University in Opava Czech Republic. Outline. P colonies with capacity one Modularity New results Conclusion. Definition of P Colony.
E N D
Modularity in P ColonieswithCheckingRules Luděk Cienciala,Lucie Ciencialová,Miroslav Langer • Institute of Computer Science • Silesian University in Opava • CzechRepublic
Outline P colonieswithcapacityone Modularity New results Conclusion
Definition of P Colony • The P colony of a capacity 1withcheckingrulesisa construct = ( A, e, f, VE, B1, ..., Bn), where • A is an alphabet ofthe P colony • e is an environmental object • f is a final object • VEis an initial content of the environment • B1, ..., Bnare agents living in the P colony
Definitionof P Colony • Agent Bi is a touple • Aninitialcontentofthe agent (multiset ofonlyoneobject) • A set ofprograms (each program isformedfromonle rule) • Three types ofrules: • Rewriting • Communication • Checking
RewritingRules B A The agent evolves its content by usingrewriting ruleA B Every agent can change its content by evolving it
CommunicationRules B A Communication is done by usingcommunication ruleBA Every agent can change its state and content of environment by communication
Checkingrules A B Checking ruleis formed from two rules for example A B/A C Not really new type, it set “priority” between two rules.
Checkingrules A C B Checking ruleis formed from two rules for example A B/A C Not really new type, it set “priority” between rules.
Computation A computation is done in maximally parallel way The maximal number of working agents Computationends 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 9 AGENTS without checking ? AGENTS with checking Control unit Duplication unit Watch balance Subtraction unit Addition unit registers
Modules in P Colony Control unit Duplication unit Watch balance Subtraction unit Addition unit registers
Duplication unit Di B1 B2 i’ i e e d input: object Di output: objects i and i’ requires: one object d contents two agents
Modules in P Colony Control unit 2 Duplication unit Watch balance Subtraction unit Addition unit registers
Addition unit B1 Ar ar e input: object Ar output: objectar requires: nothing contents one agent
Modules in P Colony Control unit 2 Duplication unit Watch balance Subtraction unit Addition unit registers 1
Subtraction unit ar B1 Sr y Br e input: object Sr output: objectyorobjectn requires: objectar (ifthereisany) contents one agent
Subtraction unit B1 Sr n Br e input: object Sr output: objectyorobjectn requires: objectar (ifthereisany) contents one agent
Modules in P Colony Control unit 2 Duplication unit Watch balance Subtraction unit 1 Addition unit registers 1
Balance-Wheel unit e e B1 e lh d e d d input: object lhorobjecte output: objectd contents one agent
Modules in P Colony Control unit 2 Duplication unit Watch balance 1 Subtraction unit 1 Addition unit registers 1
Control unit • Controlscomputation • 4 phasesofsimulation • Initialization • Simulationof ADD-instruction • Simulationof SUB-instruction • Finalizationofcomputation
Control unit - initialization e B1 B2 e l0 e d Generatesstartinglabelofcomputationofregistermachine
Control unit – ADD-instruction Addition unit 1’ 1 B1 B2 Ar D1 l1 l2 e d Duplication unit l1:(ADD(r),l2,l3)
Control unit – SUB-instruction Subtraction unit 1 B1 B2 1’ y l1 Sr D1 L’1 d e l2 d Duplication unit l1:(SUB(r),l2,l3)
Control unit - finalization e B1 B2 lh e d Balance-Wheel unit Generateshaltinglabelofcomputationofregistermachine
Modules in P Colony 2 Control unit 2 Duplication unit 2+2+1+1+1=7 Watch balance 1 Subtraction unit 1 Addition unit registers 1
Modules in P Colony 7 AGENTS with checking ? AGENTS with checking Control unit Duplication unit Watch balance Subtraction unit Addition unit registers
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,*)