SlideServe
Menu
Préférences
© SlideServe · v2026

Implementing Library Support for the Virgil Programming Language

priestley avatar
15 diapositives · 271 Views · Jan 03, 2020

Optimizing memory usage on sensor motes by introducing object-oriented principles and a strong type system through the Virgil programming language.

Implementing Library Support for the Virgil Programming Language - slide 1
01 / 15Implementing Library Support for the Virgil Programming Language
1 / 17

Télécharger la présentation

Implementing Library Support for the Virgil Programming Language
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Project Proposal Implementing library support for the Virgil programming language Ryan Hall Advisor: Jens Palsberg January 23, 2007

  2. The Problem • Sensor motes have very limited memory space on board (~few kb) • Want to optimize memory space usage • Want to ease this dilemma off the programmer • Possible solution – place optimization in the programming language and compiler • Why not wait for Moore’s Law?

  3. Current Solution nesC - Language designed at UC Berkeley to embody structure of TinyOs nesC compiler C - C programming language avr-gcc compiler AVR - Machine language that runs on motes Downloaded to mote Sensor Mote

  4. Problems with nesC • Major Problem • Lack of space optimization when nesC is compiled into C • Minor Problems • not an Object Oriented language • not a type safe language

  5. Proposed Solution • Design a language and compiler that optimize memory usage on the motes • Introduce object oriented principles into the language • Classes, methods, delegates, etc… • Introduce a strong type system • Problems? • Introduce all these abstractions, but still keep low-level interaction with hardware

  6. Virgil • Designed by Ben Titzer (grad student at UCLA) • The Virgil compiler uses sophisticated memory optimization techniques • Uses several OO principles from Java and C# to make programming easier and cleaner • Strong type system to reduce common programming errors • Runs without OS, scheduler or garbage collector – runs on bare hardware

  7. nesC Revisited nesC C AVR Sensor Mote

  8. Now With Virgil Virgil nesC Memory Space Optimization! C AVR Sensor Mote

  9. Current State of Virgil • Library support for the LEDs and timer of the motes has been written and tested on the AVRORA simulator • Still need support for the other three peripherals (Serial Port, Sensor and Radio) • Other language implementations still need to be completed

  10. My Tasks on Virgil • First test the current library support on the actual motes • Become familiar with downloading code to the motes and running it • Expect to complete in a week (might not be the first task though)

  11. My Tasks on Virgil • Next implement library support for the Serial Port, Sensor and Radio • All of these are already implemented in nesC • Plan to study these implementations and possibly reverse engineer those solutions • Become familiar with Virgil – probably will begin writing simple programs like BLINK • Spend a considerable time debugging the programs in AVRORA • Hopefully run on applications on the motes

  12. Future of Virgil • The main goal behind Virgil is to make programming sensor networks easier and cleaner • Must maintain a sense of modularity when writing the libraries • Hopefully still maintain OO abstractions with the device drivers

  13. Possible Problems • It is uncertain whether the design features of Virgil will allow a simple interaction with the devices on the mote • The language was designed before implementing any drivers • Possibly could have overlooked key problems when making design decisions • Only time will tell…

  14. References • http://compilers.cs.ucla.edu/virgil • http://compilers.cs.ucla.edu/avrora

  15. Questions?