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

Towards device emulation code generation

Published:19 June 2009Publication History

ABSTRACT

For non-embedded software, binary translation has shown to be a successful method for retargeting legacy software onto new platforms. To apply binary translation to embedded software, two issues must be considered. First of all, embedded software often involves real-time constraints that must still be met after translation. Secondly, embedded software contains a significant amount of code dedicated to peripheral device communication which necessitates device emulation. This paper focuses on the last aspect.

Usually, device emulation code is handcrafted which is tedious and error-prone. This paper presents a method to automatically generate device emulation code from a formal specification of source and target device operations. At the heart of the device operation semantics lie quantifier-free formulae in the theory of fixed width bit vector arithmetic which is a decidable fragment of first-order logic. To the best of our knowledge, this is the first attempt to generate device emulation code from a formal specification.

References

  1. Sorav Bansal and Alex Aiken. Binary translation using peephole superoptimizers. In ph8th USENIX Symposium on Operating System Design and Implementation (OSDI 2008), December 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Paul Barham, Boris Dragovic, Keir Fraser, Steven Hand, Tim Harris, Alex Ho, Rolf Neugebauer, Ian Pratt, and Andrew Warfield. Xen and the art of virtualization. phSIGOPS Oper. Syst. Rev., 37 (5): 164--177, 2003. ISSN 0163--5980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Clark Barrett and Cesare Tinelli. CVC3. In Werner Damm and Holger Hermanns, editors, phProceedings of the 19th International Conference on Computer Aided Verification (CAV'07), volume 4590 of phLecture Notes in Computer Science, pages 298--302. Springer-Verlag, July 2007. Berlin, Germany. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Clark Barrett, Roberto Sebastiani, Sanjit Seshia, and Cesare Tinelli. Satisfiability modulo theories. In Armin Biere, Hans van Maaren, and Toby Walsh, editors, phHandbook of Satisfiability, volume 4, chapter 8. IOS Press, February 2009. ISBN 978-1-58603-929-5.Google ScholarGoogle Scholar
  5. Fabrice Bellard. QEMU, a fast and portable dynamic translator. In phFREENIX Track: 2005 USENIX Annual Technical Conference, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Marco Benedetti and Hratch Mangassarian. QBF-based formal verification: Experience and perspectives. phJournal on Satisability, Boolean Modeling and Computation, 5: 133--191, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  7. Roberto Bruttomesso, Alessandro Cimatti, Anders Franzén, Alberto Griggio, and Roberto Sebastiani. The MathSAT 4 SMT solver. In CAV'08: Proceedings of the 20th International Conference on Computer Aided Verification, pages 299--303, Berlin, Heidelberg, 2008. Springer-Verlag. ISBN 978-3-540-70543-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Randal E. Bryant, Daniel Kroening, Joël Ouaknine, Sanjit A. Seshia, Ofer Strichman, and Bryan Brady. Deciding bit-vector arithmetic with abstraction. In phProc. TACAS 2007, March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cristina Cifuentes and Vishv Malhotra. Binary translation: Static, dynamic, retargetable. In Proceedings of the International Conference on Software Maintenance (ICSM), pages 340--349. IEEE, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Cristina Cifuentes, Mike Van Emmerik, and Norman Ramsey. The design of a resourceable and retargetable binary translator. In phWCRE '99: Proceedings of the Sixth Working Conference on Reverse Engineering, page 280, Washington, DC, USA, 1999. IEEE Computer Society. ISBN 0-7695-0303-9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Bryce Howard Cogswell. Timing insensitive binary-to-binary translation. PhD thesis, Carnegie Mellon University, Pittsburgh, Pennsylvania 15213, April 1995.Google ScholarGoogle Scholar
  12. Christopher L. Conway and Stephen A. Edwards. NDL: A domain-specific language for device drivers. In phLCTES'04: Proceedings of the 2004 ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, pages 30--36, New York, NY, USA, 2004. ACM. ISBN 1-58113-806-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Patrick Cousot and Radhia Cousot. Static determination of dynamic properties of programs. In phProceedings of the Second International Symposium on Programming, pages 106--130. Dunod, Paris, France, 1976.Google ScholarGoogle Scholar
  14. Leonardo de Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS), volume 4963 of Lecture Notes in Computer Science, pages 337--340. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Vijay Ganesh. Decision procedures for bit-vectors, arrays and integers. PhD thesis, Stanford University, Stanford, CA, USA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Vijay Ganesh and David L. Dill. A decision procedure for bit-vectors and arrays. In Computer Aided Verification (CAV'07), Berlin, Germany, July 2007. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Yeting Ge, Clark Barrett, and Cesare Tinelli. Solving quantified verification conditions using satisfiability modulo theories. In phCADE-21: Proceedings of the 21st International Conference on Automated Deduction, pages 167--182, Berlin, Heidelberg, 2007. Springer-Verlag. ISBN 978-3-540-73594-6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Peter S. Magnusson, Magnus Christensson, Jesper Eskilson, Daniel Forsgren, Gustav Hållberg, Johan Högberg, Fredrik Larsson, Andreas Moestedt, and Bengt Werner. Simics: A full system simulation platform. phIEEE Computer, 35 (2): 50--58, February 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Charles Gonsel, Renaud Marlet, and Gilles Muller. Devil: An IDL for hardware programming. In phProceedings of the Fourth Symposium on Operating Systems Design and Implementation, pages 17--30, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Leonardo Moura and Nikolaj Bjørner. Efficient E-matching for SMT solvers. In phCADE-21: Proceedings of the 21st International Conference on Automated Deduction, pages 183--198, Berlin, Heidelberg, 2007. Springer-Verlag. ISBN 978-3-540-73594-6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Manish Prasad and Tzi-cker Chiueh. A binary rewriting defense against stack-based buffer overflow attacks. In Proceedings of the USENIX Annual Technical Conference, pages 211--224, 2003.Google ScholarGoogle Scholar
  22. Alexander Schrijver. Theory of Linear and Integer Programming. John Wiley & Sons, New York, NY, USA, June 1998. ISBN 978-0-471-98232-6. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Richard L. Sites, Anton Chernoff, Matthew B. Kirk, Maurice P. Marks, and Scott G. Robinson. Binary translation. phCommun. ACM, 36 (2): 69--81, 1993. ISSN 0001-0782. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jun Sun, Wanghong Yuan, Mahesh Kallahalla, and Nayeem Islam. HAIL: a language for easy and correct device access. In EMSOFT'05: Proceedings of the 5th ACM International Conference on Embedded software, pages 1--9, New York, NY, USA, 2005. ACM. ISBN 1-59593-091-4. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Henrik Theiling. phControl Flow Graphs For Real-Time Systems Analysis. PhD thesis, Saarland University, 2002.Google ScholarGoogle Scholar
  26. er(2004)}troeger_bintransJens Tröger. Specification-Driven Dynamic Binary Translation. PhD thesis, Queensland University of Technology, Brisbane, Australia, December 2004.Google ScholarGoogle Scholar
  27. Reinhard Wilhelm. Determining bounds on execution times. In R. Zurawski, editor, phHandbook on Embedded Systems, pages 14--1, 14-23. CRC Press, 2005.Google ScholarGoogle Scholar
  28. Lea Wittie, Chris Hawblitzel, and Derrin Pierret. Generating a statically-checkable device driver I/O interface. In phProceedings of the Workshop on Automatic Program Generation for Embedded Systems (APGES), October 2007.Google ScholarGoogle Scholar

Index Terms

  1. Towards device emulation code generation

      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 '09: Proceedings of the 2009 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systems
        June 2009
        188 pages
        ISBN:9781605583563
        DOI:10.1145/1542452
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 7
          LCTES '09
          July 2009
          176 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543136
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 19 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        LCTES '09 Paper Acceptance Rate18of81submissions,22%Overall Acceptance Rate116of438submissions,26%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!