skip to main content
10.1145/2248418.2248421acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
research-article

Lightweight generics in embedded systems through static analysis

Published:12 June 2012Publication History

ABSTRACT

Low-end embedded systems are still programmed in C and assembly, and adopting high-level languages such as C# should reduce the length of their development cycles. For these systems, code size is a major concern, but run-time efficiency should also be reasonable --- programmers will not migrate to C# unless the overhead compared with C is insignificant. In this paper, we propose a static approach based on whole program optimization for implementing .Net generics in such systems. Indeed, the implementation of run-time generics involves a tradeoff between size and run-time efficiency. In this proposal, generic instances are detected through a generalization of RTA to parametric polymorphism. Also, we propose an implementation scheme which employs code sharing and more effective coercions than boxing. Unlike existing implementation schemes, it is scalable in the number of generic instances without involving boxing and unboxing in a systematic way.

References

  1. O. Agesen. Concrete Type Inference: Delivering Object-Oriented Applications. PhD thesis, Stanford University, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. C. S. Ananian and M. C. Rinard. Data size optimizations for Java programs. In LCTES '03, pages 59--68. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. W. Appel. Modern Compiler Implementation in ML. Cambridge University Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon. Fast and Effective Optimization of Statically Typed Object-Oriented Languages. PhD thesis, University of California, Berkeley, December 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. N. Benton, A. Kennedy, and G. Russell. Compiling standard ML to Java bytecodes. In ICFP '98, pages 129--140. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. Bracha, M. Odersky, D. Stoutamire, and P. Wadler. Making the future safe for the past: adding genericity to the Java programming language. In OOPSLA '98, pages 183--200. ACM, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Cartwright and G. L. Steele, Jr. Compatible genericity with run-time types for the Java programming language. In OOPSLA '98, pages 201--215. ACM, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. H. Cohen. Type-extension type tests can be performed in constant time. ACM Trans. Program. Lang. Syst., pages 626--629, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. C. H. Connor. Types and Polymorphism in Persistent Programming Systems. PhD thesis, University of St Andrews, 1990.Google ScholarGoogle Scholar
  10. R. Costa and E. Rohou. Comparing the size of .NET applications with native code. In CODES+ISSS '05, pages 99--104. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. I. Dragos and M. Odersky. Compiling generics through user-directed type specialization. In ICOOOLPS '09, pages 42--47. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. Ducournau. Coloring, a versatile technique for implementing object-oriented languages. Softw., Pract. Exper., pages 627--659, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Kennedy and D. Syme. Design and implementation of generics for the .NET Common Language Runtime. In PLDI '01, pages 1--12. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. A. Kennedy and D. Syme. Combining generics, pre-compilation and sharing between software-based processes, 2004.Google ScholarGoogle Scholar
  15. D. Kerr-Munslow. Advantages and pitfalls of moving from an 8 bit system to 32 bit architectures. In ERTS2 '10, 2010.Google ScholarGoogle Scholar
  16. J. S. Miller and S. Ragsdale. The Common Language Infrastructure annotated standard. Addison-Wesley, 2004. ISBN 0-321-15493-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Odersky and P. Wadler. Pizza into Java: Translating theory into practice. In POPL '97, pages 146--159. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. O. Sallenave and R. Ducournau. Efficient compilation of .NET programs for embedded systems. In ICOOOLPS '10, pages 3:1--3:8. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. B. Stroustrup. The C++ Programming Language. Addison-Wesley, 3rd edition, 2000. ISBN 0-201-88954-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Viroli and A. Natali. Parametric polymorphism in Java: an approach to translation based on reflective features. In OOPSLA '00, pages 146--165. ACM, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Vitek, R. N. Horspool, and A. Krall. Efficient type inclusion tests. In OOPSLA '97, pages 142--157. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Yu, A. Kennedy, and D. Syme. Formalization of generics for the .NET Common Language Runtime. In POPL '04, pages 39--51. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. O. Zendra, D. Colnet, and S. Collin. Efficient dynamic dispatch without virtual function tables: The SmallEiffel compiler. In OOPSLA '97, pages 125--141. ACM, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Lightweight generics in embedded systems through static analysis

                    Recommendations

                    Comments

                    Login options

                    Check if you have access through your login credentials or your institution to get full access on this article.

                    Sign in
                    • Published in

                      cover image ACM Conferences
                      LCTES '12: Proceedings of the 13th ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, Tools and Theory for Embedded Systems
                      June 2012
                      153 pages
                      ISBN:9781450312127
                      DOI:10.1145/2248418
                      • cover image ACM SIGPLAN Notices
                        ACM SIGPLAN Notices  Volume 47, Issue 5
                        LCTES '12
                        MAY 2012
                        152 pages
                        ISSN:0362-1340
                        EISSN:1558-1160
                        DOI:10.1145/2345141
                        Issue’s Table of Contents

                      Copyright © 2012 ACM

                      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]

                      Publisher

                      Association for Computing Machinery

                      New York, NY, United States

                      Publication History

                      • Published: 12 June 2012

                      Permissions

                      Request permissions about this article.

                      Request Permissions

                      Check for updates

                      Qualifiers

                      • research-article

                      Acceptance Rates

                      Overall Acceptance Rate116of438submissions,26%

                    PDF Format

                    View or Download as a PDF file.

                    PDF

                    eReader

                    View online with eReader.

                    eReader