Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1167473.1167489acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Virgil: objects on the head of a pin

Published: 16 October 2006 Publication History

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%.

References

[1]
ECMA Standard 334. C# Language Specification. Available at: http://www.ecma-international.org/]]
[2]
Connected Limited Device Configuration (CLDC). http://java.sun.com/j2me]]
[3]
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.]]
[4]
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.]]
[5]
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.]]
[6]
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.]]
[7]
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.]]
[8]
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.]]
[9]
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.]]
[10]
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.]]
[11]
N. Cohen. Type Extension Type Tests can be Performed in Constant Time. ACM Transactions on Programming Languages and Systems, 13(4), 626--629. 1991.]]
[12]
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.]]
[13]
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.]]
[14]
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.]]
[15]
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.]]
[16]
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.]]
[17]
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.]]
[18]
J. Gosling, B. Joy, and G. Steele. The Java Language Specification. Addison-Wesley, 1996.]]
[19]
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.]]
[20]
T. Harbaum. NanoVM: Java for the AVR. Available at: http://www.harbaum.org/till/nanovm/]]
[21]
G. Hunt, et al. An Overview of the Singularity Project. Microsoft Technical Report MSR-TR-2005-135. October 2005.]]
[22]
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.]]
[23]
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.]]
[24]
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.]]
[25]
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.]]
[26]
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.]]
[27]
M. Sakkinen. The darker side of C++ revisited. Structured Programming, 13:155--177, 1992.]]
[28]
M. A. Schubert, L. K. Papalaskaris, and J. Taugher. Determining Type, Part, Colour, and Time Relationships. Computer, 16:53--60, October 1983.]]
[29]
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.]]
[30]
B. Steensgard. Points-to Analysis in Almost Linear Time. Microsoft Technical Report, MSR-TR-95-08. 1995.]]
[31]
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.]]
[32]
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.]]
[33]
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.]]
[34]
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.]]
[35]
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.]]
[36]
P. Tyma. Optimizing Transforms for Java and .NET Closed Systems. Phd Thesis, Syracuse University. 2004.]]
[37]
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.]]
[38]
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.]]
[39]
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.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
October 2006
514 pages
ISBN:1595933484
DOI:10.1145/1167473
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 10
    Proceedings of the 2006 OOPSLA Conference
    October 2006
    480 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1167515
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 October 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. data-sensitive optimization
  2. dead code elimination
  3. embedded systems
  4. heap compression
  5. microcontrollers
  6. multi-stage computation
  7. sensor networks
  8. standalone programs
  9. static analysis
  10. systems software
  11. whole-program compilation

Qualifiers

  • Article

Conference

OOPSLA06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)13
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Facial hair tracking for high fidelity performance captureACM Transactions on Graphics10.1145/3528223.353011641:4(1-12)Online publication date: 22-Jul-2022
  • (2022)Local anatomically-constrained facial performance retargetingACM Transactions on Graphics10.1145/3528223.353011441:4(1-14)Online publication date: 22-Jul-2022
  • (2022)1S-1R arrayMicroelectronic Engineering10.1016/j.mee.2021.111697254:COnline publication date: 1-Feb-2022
  • (2022)Inspecting and classifying physical failures in MEMS substrates during fabrication using computer visionMicroelectronic Engineering10.1016/j.mee.2021.111696254:COnline publication date: 1-Feb-2022
  • (2021)ARA: Static Initialization of Dynamically-Created System Objects2021 IEEE 27th Real-Time and Embedded Technology and Applications Symposium (RTAS)10.1109/RTAS52030.2021.00039(400-412)Online publication date: May-2021
  • (2019)ApproxHPVM: a portable compiler IR for accuracy-aware optimizationsProceedings of the ACM on Programming Languages10.1145/33606123:OOPSLA(1-30)Online publication date: 10-Oct-2019
  • (2019)Safer smart contract programming with ScillaProceedings of the ACM on Programming Languages10.1145/33606113:OOPSLA(1-30)Online publication date: 10-Oct-2019
  • (2019)Initialize once, start fast: application initialization at build timeProceedings of the ACM on Programming Languages10.1145/33606103:OOPSLA(1-29)Online publication date: 10-Oct-2019
  • (2018)CapeVMProceedings of the 16th ACM Conference on Embedded Networked Sensor Systems10.1145/3274783.3274842(250-263)Online publication date: 4-Nov-2018
  • (2018)Redundancy elimination in the presence of split class initializationProceedings of the 15th International Conference on Managed Languages & Runtimes10.1145/3237009.3237014(1-14)Online publication date: 12-Sep-2018
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media