ABSTRACT
Embedded microcontrollers are becoming increasingly prolific, serving as the primary or auxiliary processor in products and research systems from microwaves to sensor networks. Microcontrollers represent perhaps the most severely resource-constrained embedded processors, often with as little as a few bytes of memory and a few kilobytes of code space. Language and compiler technology has so far been unable to bring the benefits of modern object-oriented languages to such processors. In this paper, I will present the design and implementation of Virgil, a lightweight object-oriented language designed with careful consideration for resource-limited domains. Virgil explicitly separates initialization time from runtime, allowing an application to build complex data structures during compilation and then run directly on the bare hardware without a virtual machine or any language runtime. This separation allows the entire program heap to be available at compile time and enables three new data-sensitive optimizations: reachable members analysis, reference compression, and ROM-ization. Experi-mental results demonstrate that Virgil is well suited for writing microcontroller programs, with five demonstrative applications fitting in less than 256 bytes of RAM with fewer than 50 bytes of metadata. Further results show that the optimizations presented in this paper reduced code size between 20% and 80% and RAM size by as much as 75%.
- ECMA Standard 334. C# Language Specification. Available at: http://www.ecma-international.org/]]Google Scholar
- Connected Limited Device Configuration (CLDC). http://java.sun.com/j2me]]Google Scholar
- B. Alpern, A. Cocchi, S. Fink, D. Grove, and D. Lieber. Efficient Implementation of Java Interfaces: Invokeinterface Considered Harmless. In Proceedings of the 16th Annual Conference on Object-Oriented Systems, Languages, and Applications (OOPSLA '01). Tampa, FL. Oct. 2001.]] Google Scholar
Digital Library
- C. Ananian and M. Rinard. Data Size Optimizations for Java Programs. In 2003 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES '03). San Diego, CA. June 2003.]] Google Scholar
Digital Library
- D. Bacon. Kava: a Java Dialect with a Uniform Object Model for Lightweight Classes. Concurrency and Computation: Practice and Experience 15(3-5): 185--206. 2003.]]Google Scholar
Cross Ref
- D. Bacon, S. Fink, and D. Grove. Space- and Time-efficient Implementation of the Java Object Model. In the 16th European Conference on Object-Oriented Programming (ECOOP '02), University of Malaga, Spain, June 2002.]] Google Scholar
Digital Library
- D. Bacon and P. Sweeney. Fast Static Analysis of C++ Virtual Calls. In Proceedings of the 11th Annual Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '96). San Jose, CA. Oct. 1996.]] Google Scholar
Digital Library
- G. Bracha, N. Cohen, C. Kemper, M. Odersky, D. Stoutamire, K. Thorup, and P. Wadler. Adding Generics to the Java Programming Language. Java Community Process JSR-000014, September 2004.]]Google Scholar
- M. Budiu, S. Goldstein, M. Sakr, and K. Walker. BitValue Inference: Detecting and Exploiting Narrow Bitwidth Computations. In Proceedings of the EuroPar 2000 European Conference on Parallel Computing. Munich, Germany. August 2000.]] Google Scholar
Digital Library
- G. Chen, M. Kandemir, N. Vijaykrishnan, M. Irwin, B. Mathiske, and M. Wolczko. Heap Compression for Memory-constrained Java Environments. In Proceedings of the 18th Annual Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '03). Anaheim, CA. Oct 2003.]] Google Scholar
Digital Library
- N. Cohen. Type Extension Type Tests can be Performed in Constant Time. ACM Transactions on Programming Languages and Systems, 13(4), 626--629. 1991.]] Google Scholar
Digital Library
- J. Dean, D. Grove, and C. Chambers. Optimization of Object-Oriented Programs using Static Class Hierarchy Analysis. In the 9th European Conference on Object-Oriented Programming (ECOOP '95). Aarhus, Denmark. Aug. 1995.]] Google Scholar
Digital Library
- A. Diwan, K. McKinley, and J. E. Moss. Using Types to Analyze and Optimize Object-Oriented Programs. In ACM Transactions on Programming Languages and Systems, 23(1), 30--72. 2001.]] Google Scholar
Digital Library
- N. Eckel and J. Gil. Empirical Study of Object-layout Strategies and Optimization Techniques. In the 14th European Conference on Object-Oriented Programming (ECOOP '00). Sophia Antipolis and Cannes, France. June 2000.]] Google Scholar
Digital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.]] Google Scholar
Digital Library
- D. Gay, P. Levis, R. von Behren, M. Welsh, E. Brewer, and D. Culler. The nesC Language: A Holistic Approach to Networked Embedded Systems. In Proceedings of the ACM Conference on Programming Language Design and Implementation (PLDI '03). San Diego, CA. June 2003.]] Google Scholar
Digital Library
- M. Golm, M. Felser, C. Wawersich, and J. Kleinöder. The JX Operating System. In Proceedings of the 2002 USENIX Annual Technical Conference. Monterey, CA. June, 2002.]] Google Scholar
Digital Library
- J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.]] Google Scholar
Digital Library
- C. Han, R. Kumar, R. Shea, E. Kohler, and M. Srivastava. A Dynamic Operating System for Sensor Nodes. In Proceedings of the International Conference on Mobile Systems, Applications, and Services (MOBISYS '05). Seattle, WA. June 2005.]] Google Scholar
Digital Library
- T. Harbaum. NanoVM: Java for the AVR. Available at: http://www.harbaum.org/till/nanovm/]]Google Scholar
- G. Hunt, et al. An Overview of the Singularity Project. Microsoft Technical Report MSR-TR-2005-135. October 2005.]]Google Scholar
- K. Ishizaki, M. Kawahito, T. Yasue, H. Komatsu, T. Nakatani. A Study of Devirtualization Techniques for a Java Just-in-time Compiler. In Proceedings of the 15th Annual Conference on Object-Oriented Systems, Languages, and Applications (OOPSLA '00). Minneapolis, MN. Oct. 2000.]] Google Scholar
Digital Library
- P. Jain, and D. Schmidt. Service Configurator: A Pattern for Dynamic Configuration of Services. In Proceedings of the 3rd USENIX Conference on Object-Oriented Technologies and Systems. June 1997.]] Google Scholar
Digital Library
- J. Koshy and R. Pandey. VM*: A Scalable Runtime Environment for Sensor Networks. In The 3rd annual conference on Embedded Network Sensor Systems (SENSYS '05). San Diego, CA. Nov. 2005.]] Google Scholar
Digital Library
- R. Newton, Arvind, and M. Welsh. Building up to Macroprogramming: An Intermediate Language for Sensor Networks. In Proceedings of the Fourth International Conference on Information Processing in Sensor Networks (IPSN'05), April 2005.]] Google Scholar
Digital Library
- J. Palsberg. Type-based Analysis and Applications. In Proceedings of the ACM SIGPLAN/SIGSOFT Workshop on Program Analysis for Software Tools (PASTE '01). Snowbird, UT. June 2001.]] Google Scholar
Digital Library
- M. Sakkinen. The darker side of C++ revisited. Structured Programming, 13:155--177, 1992.]]Google Scholar
- M. A. Schubert, L. K. Papalaskaris, and J. Taugher. Determining Type, Part, Colour, and Time Relationships. Computer, 16:53--60, October 1983.]]Google Scholar
Digital Library
- D. Spoonhower, J. Auerbach, D. Bacon, P. Cheng, and D. Grove. Eventrons: A Safe Programming Construct for High-Frequency Hard Real-Time Applications. In Proceedings of the ACM Conference on Programming Language Design and Implementation (PLDI '06) Ottawa, CN. June 2006.]] Google Scholar
Digital Library
- B. Steensgard. Points-to Analysis in Almost Linear Time. Microsoft Technical Report, MSR-TR-95-08. 1995.]]Google Scholar
- V. Sundaresan, L. Hendren, C. Razafimahefa, R. Vallee-Rai, P. Lam, E. Gagnon, and C. Godin. Practical virtual method call resolution for Java. In the 15th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '00). Minneapolis, MN. Oct. 2000.]] Google Scholar
Digital Library
- P. Sweeney and F. Tip. A Study of Dead Data Members in C++ Applications. In Proceedings of the ACM Conference on Programming Language Design and Implementation (PLDI '98). Montreal, Canada. 1998.]] Google Scholar
Digital Library
- W. Taha, S. Ellner, and H. Xi. Generating Imperative, Heap-Bounded Programs in a Functional Setting. In Proceedings of the 3rd Annual International Conference on Embedded Software (EMSOFT '03). Philadelphia, PA. October 2003.]]Google Scholar
- F. Tip and J. Palsberg. Scalable Propagation-based Call Graph Construction Algorithms. In the 15th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '00). Minneapolis, MN. Oct. 2000.]] Google Scholar
Digital Library
- F. Tip, P. Sweeney, C. Laffra, A. Eisma, and D. Streeter. Practical Extraction Techniques for Java. ACM Transactions on Programming Languages and Systems, 24(6): 625--666, 2002.]] Google Scholar
Digital Library
- P. Tyma. Optimizing Transforms for Java and .NET Closed Systems. Phd Thesis, Syracuse University. 2004.]] Google Scholar
Digital Library
- J. Vitek, B. Bokowski. Confined Types. In the 14th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '99). Denver, CO. Oct. 1999.]] Google Scholar
Digital Library
- J. Vitek, R. N. Horspool, and A. Krall. Efficient Type Inclusion Tests. In Proceedings of the 12th Annual Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '97). Atlanta, GA. Oct. 1997.]] Google Scholar
Digital Library
- T. Zhao, J. Palsberg, and J. Vitek. Lightweight Confinement for Featherweight Java. In the 18th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '03). Anaheim, CA. Oct 2003.]] Google Scholar
Digital Library
Index Terms
Virgil: objects on the head of a pin
Recommendations
Virgil: objects on the head of a pin
Proceedings of the 2006 OOPSLA ConferenceEmbedded microcontrollers are becoming increasingly prolific, serving as the primary or auxiliary processor in products and research systems from microwaves to sensor networks. Microcontrollers represent perhaps the most severely resource-constrained ...
em-SPADE: a compiler extension for checking rules extracted from processor specifications
LCTES '14Traditional compilers ignore processor specifications, thousands of pages of which are available for modern processors. To bridge this gap, em-SPADE analyzes processor specifications and creates processor-specific rules to reduce low-level programming ...
High precision automatic scheduling of periodic task sets for microcontrollers
ACM-SE 46: Proceedings of the 46th Annual Southeast Regional Conference on XXIn low-end microcontroller systems task scheduling is often not done, or using very ad-hoc methods, or using a high-overhead RTOS. In this paper we offer an alternative: the design-time generation of high-precision schedules which are then executed ...







Comments