Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of...
-
Upload
deven-penwell -
Category
Documents
-
view
219 -
download
2
Transcript of Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of...
![Page 1: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/1.jpg)
Writing Programs that Work
Nupur KothariUniversity of Southern
California
Roy SheaUniversity of California,
Los Angeles
![Page 2: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/2.jpg)
Introduction
• Sensor network deployments are getting more advanced and complicated– Images, video feeds from cameras in sensor
networks
• Writing programs for these deployments also getting more complicated
• Need for new technologies that simplify programming for distributed sensing
![Page 3: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/3.jpg)
Studying lizards at the James Reserve
![Page 4: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/4.jpg)
Deployment at James Reserve
![Page 5: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/5.jpg)
Programming Challenges
• Resource efficiency– Energy efficient communication
– Memory efficiency
• Reliability– Data should be consistently handled
– Coordination among nodes needed
• Failure recovery– Detect and deal with unexpected failures
![Page 6: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/6.jpg)
The Consequence of Failure
Most programmer errors ultimately result in node failures or unexpected application behavior
Data may be lost, and application may crash
![Page 7: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/7.jpg)
How to avoid these errors
Current Technique
• Perform extensive pre-deployment testing (trial and error) and fix the errors caught
• Onus is on the programmer to catch all possible errors
Our Proposals
• Use static program analysis techniques to generate warnings for code that may cause errors during execution
• Develop new languages to avoid some of the programmer generated errors
Lighthouse
Pleiades
![Page 8: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/8.jpg)
Lighthouse: Static Analysis
LighthouseSensor Network Program Display Potential Program
Errors to Developer
![Page 9: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/9.jpg)
Lighthouse: Static Analysis
LighthouseSensor Network Program Display Potential Program
Errors to Developer
![Page 10: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/10.jpg)
Lighthouse: Static Analysis
LighthouseSensor Network Program Display Potential Program
Errors to Developer
![Page 11: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/11.jpg)
Lighthouse: Static Analysis
Lighthouse
• Analysed program is not executed
• Analysis is independent of execution path – Not biased by developer expectations
– Find all possible errors
Sensor Network Program Display Potential ProgramErrors to Developer
![Page 12: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/12.jpg)
Lighthouse: Programming Challenges Addressed
• Resource efficiency– Energy efficient communication
– Memory efficiency
• Reliability– Data should be consistently handled
– Coordination among nodes needed
• Failure recovery– Detect and deal with unexpected failures
![Page 13: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/13.jpg)
Pleiades: A new way to write programs
Conventional sensor net programming
Node-level program written in nesC
Compiled to executable
![Page 14: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/14.jpg)
Pleiades: A new way to write programs
Central program that specifies application behavior
Node-level program written in nesC
Compiled to executable
Compiler
Runtime+
Programming using Pleiades
Lets the programmer focus on application semantics
![Page 15: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/15.jpg)
Pleiades: Programming Challenges Addressed
• Resource efficiency– Energy efficient communication
– Memory efficiency
• Reliability– Data should be consistently handled
– Coordination among nodes needed
• Failure recovery– Detect and deal with unexpected failures
![Page 16: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/16.jpg)
Conclusions
• Programming sensor networks is inherently hard
• Employing techniques developed in the Programming Languages/Compilers community to sensor network programs can significantly reduce the burden of the programmer
• Lighthouse:https://projects.nesl.ucla.edu/public/lighthouse/
• Pleiades:http://kairos.usc.edu
![Page 17: Writing Programs that Work Nupur Kothari University of Southern California Roy Shea University of California, Los Angeles.](https://reader036.fdocuments.net/reader036/viewer/2022062417/551be1cf550346c3588b5e0a/html5/thumbnails/17.jpg)
Thank You!