Olga Brukman Shlomi Dolev Computer Science Department BenGurion
Olga Brukman, Shlomi Dolev Computer Science Department Ben-Gurion University Israel {brukman, dolev}@cs. bgu. ac. il SASO 2008 - Poster Self-* Programming: Run-Time Parallel Control Search for Reflection Box Framework and Algorithm Introduction • Ideally Control Search Algorithms • Systems should anticipate every possible scenario • Reality • Engineers fail to create such systems despite the effort • The number of possibilities of different interactions with dynamic environment is enormous • Relying on accumulated knowledge of human operator to deal with unexpected situations System Environment out’ 1, ……, out’n Contro l Goals= Behaviors bhv={io 1, …, ioj} • Airplane crossing the speed of sound –Airplane control handles behave opposite to the expected behavior –Pilots increase the plane speed so it becomes higher than speed of sound, plane control is back to normal Plant out 1, …, outl |AP|=N ≤Nmax Recording plant-environment interaction Control Search Observer Control Generator Engine I: black box x x II: set box x x III: reflection-box v x IV: reflection-set box v v Probabilistic Environment plantenvironment interaction V: reflection-set box v v VI: set box v x Algorithm IV: reflection-set box Algorithm I: black-box Our Contribution C 1 x∙P … s 1 σ1 C 2 s s scurr sstart CM s s. P_1 s. P_2 σΣ s. N 1 σ2. . . σΣ Ap s. P_3 … P P 0<i≤Nmax s. P_N_max+1 Complexity Total number steps in experiments: Longest experiment: O(PNmax) • Observing system state (e. g. , with Java reflection) • Setting system state to a certain state σ2. . . …. σ P(Nmax +1) scurr –Parallelization –Exposing system state Plant State Set Control Search Algorithms for Deterministic Environment s • No assumptions on possible environment changes • Experimentation on replicas • Parallelization of experiments • Polynomial search time in 1, . . , ink Plant State Reflection Deterministic Environment in’ 1…. . , in’m Motivation • Airplane flying into ash cloud –Engines stopped –Pilots managed to fly the plane out of the cloud, waited till the engines cooled down, and were able to restart them Algorithm • Off line search of the constructed plant automaton • Try all controls of form from every state • Complexity • Total number of steps in experiments: • Longest experiment: O(1) Control Search Algorithms for Probabilistic Environment System Settings Probabilistic Plant Automaton Probabilistic Environment Plant is unaware of the entire state of the environment Environment Non-deterministic infinite automaton t Environment DA/PA(F 1) DA/PA(F 2) DA/PA(F 3) Environment can be considered to be probabilistic automaton Plant transition function is probabilistic Control search algorithm executes all the time t Due to probabilistic transition function of plant automaton si Monitoring Environment is large, sophisticated, dynamic Recognize changes in the plant probabilistic transition function Non deterministic infinite automaton At every given time slot environment is Environment in’ 1…. . , in’m System in’’ 1. . , in’’m out’ 1, ……, out’n out’’ 1, ……, out’’n in’ 1. . , in’m out’ 1, ……, out’n Plant Control 1 Control 2 Control 1 • Our program (control) interacts with some machinery in environment – plant • Environment is –Reentrant : no mutual replicas interference –History oblivious: deterministic repetition of behavior for the plants in the same initial state and with the same control Computing Probabilistic Plant Automata Graph (PPAG) si σ io? sj ? [1] M. Abadi, L. Lamport, P. Wolper. “Realizable and Unrealizable Specifications of Reactive Systems”. Proceedings of the 16 th International Colloquium on Automata, Languages and Programming (ICALP’ 89), pp. 1 -17, Stresa, Italy, July 1989. [2] O. Brukman, S. Dolev. “Self-* Programming Run-Time Reflection&Set&Replication-Box Control Synthesis”. Technical Report #08 -08, Ben-Gurion University of the Negev, Beer-Sheva, Israel, February, 2008. [3] A. Pnueli, R. Rosner. “On the Synthesis of a Reactive Module”. Proceedings of the 16 th ACM Symposium on Principles of Programming Languages (POPL’ 89), pp. 179 -190, Austin, Texas, USA, January 1989. sj Behavior Suffix Probability (BSP) Table σ, io s 1 s 2 … si-1 si+1 … s. N s 1 0. 02 0. 08 … 0. 06 0. 05 … 0. 25 s 2 0. 04 0. 07 … 0. 6 0. 02 … 0. 2 0. 5 0. 01 … 0. 02 0. 1 … 0. 4 … s. N SF times BSP[si , j] = [prmax, σ] prmax si σ prmax is the maximal probability to obtain suffix (bhv, j) starting from plant in state si with σ as first entry in the control pr 2 pr 3 j • BSP computed from PPAG SF=1 -(1/prmin): number of experiments required to discover the edges with the smallest probability Algorithm V: reflection-set box Algorithm VI: set box BSP[sstart, k]. σ sstart=max{BSP[s, |bhv|]. pr} BSP[snext, k-1]>BSP[sstart, k] pr=0. 4 • For every state s and j=1, …, |bhv|: pr 1 PPAG[si, sj, σ, io]=pr sbest=max{BSP[s, k]. pr} BSP[sstart, k]. σ BSP[snext, k-1]>BSP[sstart, k] pr=0. 7 snext sbest snext sstart pr=0. 6 References • 0≤pr(s, s’, σ, io) ≤ 1 • prmin – minimal probability Pre-processing deterministic automaton probabilistic automaton with a transition function Fi Environment and plant σ1, io 1, 1, pr 1, 1 σ1, io 1, 2 , pr 1, 2 … σm, iom, 1 , prm, 1 σm, iom, 2 , prm, 2 sstart snext BSP[snext, k-1]<BSP[sstart, k] pr=0. 3 snext BSP[snext, k-1]<BSP[sstart, k] s’best=max{BSP[s, k]. p r} Conclusions • Framework for automatic control search • Control, plant, environment • Deterministic plant • Probabilistic plant • Polynomial time • Parallelization • Exposing plant state
- Slides: 1