Virgil: Objects on the Head of a Pin

83
Опубликовано 6 сентября 2016, 16:24
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. This talk will present the design and implementation of Virgil, a lightweight object-oriented language for systems-level programming in domains with severe resource constraints. One key innovation is the explicit separation of initialization time from runtime which allows an application to build complex data structures during compilation which are persisted for use at runtime. This permits the application to run directly on the bare hardware without a virtual machine or any language runtime. Initialization time allows the entire program heap to be available to the compiler and enables three new data-sensitive optimizations: reachable members analysis, reference compression, and ROM-ization. Experimental 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. The Virgil compiler's new optimizations are shown to reduce code size between 20 and RAM size by as much as 75.
автотехномузыкадетское