9ab8d1f4cc52a039f687a4aa2dd1117f.ppt
- Количество слайдов: 20
CONSONA Constraint Networks for the Synthesis of Networked Applications Asuman Sünbül Matthias Anlauff Stephen Fitzpatrick http: //consona. kestrel. edu/ NEST PI Meeting, Bar Harbor, Maine, July 9 -12, 2002 Lambert Meertens & Cordell Green Kestrel Institute 1
Overview System-level specification interactive schema-based refinement Distributed specification interactive schema-based refinement High-level single-node code automated synthesis Low-level platform code what are the overall objectives e. g. , track fastest targets specification = quality metric what are a single node’s objectives e. g. , collaborate with nearby nodes to maintain coherent views of nearby targets; allocate actuators to fastest targets specification = myopic quality metric what are a single node’s actions e. g. , sense-fuse-disseminate code = e-Specs code = TOS/C 4
Scaling System-level specification interactive schema-based refinement metrics must be scalable e. g. , smoothing rather than averaging depth of spanning tree #nodes for bounded comm. range and fixed node density in 2 D example later Distributed specification interactive schema-based refinement High-level single-node code automated synthesis metrics must be local middleware = standard idioms e. g. , smoothing everywhere, anytime algorithms e. g. , distributed hill climbing constant per-node, per-second costs Low-level platform code 5
Refinement Schemas System-level specification interactive schema-based refinement Distributed specification interactive schema-based refinement Schema =
Example Schema: Field Consistency of Target Estimates • Each mote maintains an estimate of the target’s position • i: mote· Field Consistent(x) j: neighbors(i)· Edge Consistent(i. x, j. x) • neighbors(i, j) Edge Consistent(i. x, j. x) diffuse(x) • code diffuse(x) { on tick do broadcast(x); on receive(x’) do smooth(x, x’) } • Sense-fuse-disseminate idiom C S M 7
CONSONA: Constraint Networks for the Synthesis of Networked Applications New Ideas v Model NEST services and applications uniformly with constraint networks v Design applications out of components directly at the model level v Use constraint-propagation technology to generate highly optimized cross-cutting code Impact v Ultra-high scalability and unprecedented level of granularity Schedule Model of example NEST application Integrated modeler & generator for one or more NEST OEPs Prototype modeler v The technology enables flexible, manageable and adaptable application design at a mission-oriented level Design of modeler v Generated systems are robust (fault tolerant, self-stabilizing) with graceful degradation on task overload Jun ’ 01 Year One Prototype generator Jun ’ 02 Jun ’ 03 Year Three Jun ’ 04 Year Two Kestrel Institute: Lambert Meertens, Cordell Green 8
Status System-level specification interactive schema-based refinement examples design prototype due this year Distributed specification interactive schema-based refinement examples idiom library due this year examples design prototype due by spring High-level single-node code prototype graphical editor automated synthesis Tiny. OS/C code synthesis other platforms? Low-level platform code 9
Example: Graph Coloring • Assign a color from {0 … k-1} to each node in an undirected graph • Traditional problem: no adjacent nodes are to have the same color – not a scalable problem: single change by any node may reduce solution quality by 100% – no known scalable solutions 100000 properly colored nodes not a satisfactory solution! 10
Scalable, Approximate Graph Coloring • Approximate problem: minimize color conflicts – color conflict = edge connecting nodes of the same color • Scalable metric: #conflicts/#edges – single node can only have a small effect • Distributed problem: each node is to minimize its conflicts with its neighbors – myopic metric for node i: fraction of i’s edges that are conflicts – idiom: distributed constraint optimization • more later 11
Scalable, Anytime Algorithm • Each node continually changes its color to optimize its metric • And broadcasts changes – need to ensure stability by keeping rate of change low enough – idiom: distributed hillclimbing with stochastic activation – characterized by rapid improvement in quality and asymptotic convergence fraction of color conflicts vs. time step (y=1 equivalent to random coloring) fraction of nodes changing per step indicated in parentheses 12
Distributed Constraint Optimization • Important idiom for NEST systems • Set of vertices V – inherently distributed due to communication latency • Each vertex v is labeled with a value in domain D(v) • Set of hyper-edges E – e
e-Specs for Motes • Formalism for writing high-level code – combines axiomatic and operational semantics • Used to define TOS-like modules as state machines – highlights the structure of behavior usually hidden in C-level code • Automated synthesis into low-level code – e. g. , TOS/C module 14
Example: Ambient Light Calibration 16
e-Specs for Motes: Composition • Different aspects can be modeling independently • Interaction is currently expressed through shared state – semantics on states/transitions allows strong checking of properties at design time – goal is to express interface to a module as an e-Spec that formally captures the protocol for using the module • e-Specs composition operation can be used to synthesize the composed model espec Sensor. Mote espec Basic. Data. Transmission espec Sensor. Mote. With. Basic. Data. Transmission espec Reliable. Data. Transmission espec Sensor. Mote. With. Reliable. Data. Transmission 17
e-Specs for Motes: Refinement espec Target. Tracking • e-Specs can be used to model whole network • Network e-Spec refined into composition of single-mote e-Specs espec Sensor. Mote espec Target. Tracking. Refined espec Base. Station espec Computation. Mote 18
Integration with TOS Matlab Stateflow semantic integration e-Specs generator KI generator C C (for embedded systems) TOS/C Modules operational integration Other TOS/C Modules nes. C e-Specs as formal documentation • Both tool integration and module integration 19
Conclusion • Have gotten our feet with the motes • Have developed a formalism and tool for high -level coding of the motes – promises interesting compositional & refinement techniques • Have laid out basic framework for specification and refinement of NEST algorithms & services • Have applied the techniques from top-tobottom for non-trivial application with reasonable results 20
Project Schedule • Modeling using constraints: achieved • Toolset: preliminary design – done, informal • Prototype modeling toolset March 2003 Model of example NEST application Integrated modeler & generator installed on NEST OEP Code Prototype Synthesizer modeler Design of modeler Jun ’ 01 Jun ’ 02 Year One Prototype generator Jun ’ 03 Year Two Jun ’ 04 Year Three 21
Performance Goals • Measures of success: – – Flexibility of combining components Dynamic adaptivity Run-time efficiency Correctness & maintainability of generated applications • Metrics: – complexity of specification vs. code • experience: code has 2 to 5 times more interdependencies – number of critical errors (that cause failure) • experiment: manual code has ~10 times more critical errors than refined-synthesized code 22
Program Issues • Recurrent themes: – high-level coding paradigms for mote-like systems – approximate solution techniques • Would be worthwhile program achievement to draw out common ideas 23


