skip to main content
10.1145/1411732.1411742acmconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

Portable execution of legacy binaries on the Java virtual machine

Published: 09 September 2008 Publication History

Abstract

The move toward pure managed-code environments is held back by the vast amount of legacy software available only as statically compiled binaries for some legacy instruction set architecture (ISA). Catering to this legacy software requires all sorts of compromises, from the necessity of providing backward compatibility with dated instruction sets to the need for unsatisfactory mixed-mode environments, in which the legacy code runs "besides" (rather than on top of) the managed code platform. We have been investigating strategies for running legacy binaries on top of, rather than "besides", a managed code platform, by virtualizing the legacy ISA. Our system "upcompiles" low-level machine code to high-level Java code, which can then be executed on any Java Virtual Machine (JVM). On JVMs that have a just-in-time compiler, our generated JVM bytecode is subsequently "downcompiled" again into the native code of the host machine (which may be identical or different from the starting ISA). Despite executing on top of the Java Virtual Machine, our system delivers performance comparable to commercial-strength dynamic translators such as QEMU that directly generate platform-dependant machine code.

References

[1]
B. Alliet and A. Megacz. Complete Translation of Unsafe Native Code to Safe Bytecode. In Interpreters, Virtual Machines and Emulators (IVME '04), 2004.
[2]
V. Bala, E. Duesterwald, and S. Banerjia. Transparent Dynamic Optimization: The Design and Implementation of Dynamo. Technical Report HPL-1999-78, Hewlett Packard Laboratories, June 1999.
[3]
P. Barham, B. Dragovic, K. Fraser, S. Hand, T. Harris, A. Ho, N. Neugebauer, I. Pratt, and A. Warfleld. Xen and the art of virtualization. In Proceedings of the 19th ACM symposium on Operating Systems Principles, volume 37, 5 of Operating Systems Review, New York, Oct. 19--22 2003. ACM Press.
[4]
B. Barth, G. Butler, K. Czarnecki, and U. Eisenecker. Generative programming. Lecture Notes in Computer Science, 2323, 2002.
[5]
F. Bellard. Qemu---Generic and Open Source Processor Emulator. http://fabrice.bellard.free.fr/qemu, 2005.
[6]
F. Buddrus and J. Schödel. Cappuccino - A C++ to Java translator. In Proceedings of the 13th ACM Symposium on Applied Computing (SAC), pages 660--665, 1998.
[7]
A. Chernoff and R. Hookway. DIGITAL FX!32: Running 32-Bit x86 Applications on Alpha NT. In Proceedings of the USENIX Workshop on Windows NT, pages 9--16, Berkeley, Aug. 11--13 1997. USENIX Association.
[8]
U. W. Eisenecker and K. Czarnecki. Generative Programming: Methods, Tools, and Applications. Addison-Wesley, 2000.
[9]
The EM86 x86 emulator on Alpha-Linux. http://www.cs.rose-hulman.edu/~donaldlf/em86, 1999.
[10]
C. H. et al. A MIPS Computer Simulator Applet. http://community.vcsu.edu/facultypages/curt.hill/My_Webpage/mips.html, 2005.
[11]
I. Z. et al. J-MIPS---The Java MIPS simulator. http://www.csse.monash.edu.au/packages/jmips, 2005.
[12]
K. L. et. al. Bochs---The Cross-Platform IA-32 Emulator Project. http://bochs. sourceforge .net, 2004.
[13]
M. Franz, A. Gal, and C. W. Probst. Automatic generation of machine emulators: Efficient synthesis of robust virtual machines for legacy software migration. In Proceedings of Software Engineering 2007, pages 83--94, Hamburg, Germany, March 2007.
[14]
K. Fraser, S. Hand, I. Pratt, A. Warfield, R. Neugebauer, and M. Williamson. Safe hardware access with the xen virtual machine monitor. In Proceedings of the 1st Workshop on Operating System and Architectural Support for the on demand IT Infrastructure, 2004.
[15]
A. Gal, C. W. Probst, and M. Franz. Untyped memory in the Java virtual machine. In Proceedings of the 2nd ECOOP Workshop on Programming Languages and Operating Systems, Glasgow, Scotland, 2005.
[16]
Jazillian, Inc. Jazillian---A C to Java translator. http://www.Jazillian.com, 2005.
[17]
A. Klaiber. The Technology Behind Crusoe Processors. Technical report, Transmeta Corporation, 2000.
[18]
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 1996.
[19]
S. Malabarba, P. Devanbu, and S. Stearns. MoHCA-Java: A Tool for C++ to Java Conversion Support. In Proceedings of the 1999 International Conference on Software Engineering (ICSE'99), pages 650--653, New York, May 1999. Association for Computing Machinery.
[20]
J. Martin and H. A. Müller. Strategies for migration from c to Java. In Fifth Conference on Software Maintenance and Reengineering (CSMR), pages 200--209, 2001.
[21]
F. D. Mehta. MIPS2000 Simulator. http://www.digilante.net/, 2005.
[22]
E. Meijer and J. Gough. Technical Overview of the Common Language Runtime, http://research.microsoft.com/~emeijer/papers/clr.pdf, 2001.
[23]
Microsoft Corporation. Virtual PC. http://www.microsoft.com/virtualpc, 2004.
[24]
Motorola, Inc. PowerPC Microprocessor Family: The Programming Environments. 1997.
[25]
netsys Inc. TwoOSTwo. http://www.netsys.info, 2002.
[26]
R. Newman, C. Dennis, M. Moleschi, I. Preston, G. Kirsch, and J. Tseng. JPC---Computer Virtualization in Java.http: //http://www-jpc.physics.ox.ac.uk/, 2008.
[27]
NovoSoft. c2j: A C to Java Translator, 2001.
[28]
I. Piumarta and F. Riccardi. Optimizing Direct Threaded Code by Selective Inlining. In SIGPLAN '98 Conference on Programming Language Design and Implementation, pages 291--300, 1998.
[29]
The new Plex86 x86 Virtual Machine Project. http://www.plex86.org, 2003.
[30]
M. Probst. Fast Machine-Adaptable Dynamic Binary Translation. In Proceedings of the 3rd Workshop on Binay Translation, 2001.
[31]
M. Probst. Dynamic Binary Translation. In UKUUG Linux Developer's Conference 2002, 2002.
[32]
A. Rudys and D. S. Wallach. Enforcing java run-time properties using bytecode rewriting. In Proceedings of the International Symposium on Software Security, Tokyo, Japan, Nov. 2002.
[33]
Standard Performance Evaluation Corporation. SPEC CINT2000 Benchmarks. http://www.spec.org/cpu2000, 2000.
[34]
E. Tilevich. Translating C++ to Java. In First German Java Developers' Conference Journal, 1997.
[35]
B. Titzer, D. Lee, and J. Palsberg. Avrora: Scalable Sensor Network Simulation with Precise Timing. In IPSN'05, Fourth International Conference on Information Processing in Sensor Networks, 2005.
[36]
B. L. Titzer. Avrora---The AVR Simulation and Analysis Framework. Master's thesis, University of California, Los Angeles, 2004.
[37]
VMware Inc. Company web site. http://www.vmware.com, 2003.

Cited By

View all
  • (2021)A Study of Call Graph Construction for JVM-Hosted LanguagesIEEE Transactions on Software Engineering10.1109/TSE.2019.295692547:12(2644-2666)Online publication date: 1-Dec-2021
  • (2013)Superblock compilation and other optimization techniques for a Java-based DBT machine emulatorACM SIGPLAN Notices10.1145/2517326.245152148:7(33-40)Online publication date: 16-Mar-2013
  • (2013)Superblock compilation and other optimization techniques for a Java-based DBT machine emulatorProceedings of the 9th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments10.1145/2451512.2451521(33-40)Online publication date: 16-Mar-2013
  • Show More Cited By

Index Terms

  1. Portable execution of legacy binaries on the Java virtual machine

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PPPJ '08: Proceedings of the 6th international symposium on Principles and practice of programming in Java
    September 2008
    198 pages
    ISBN:9781605582238
    DOI:10.1145/1411732
    • Conference Chairs:
    • Luis Veiga,
    • Vasco Amaral
    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: 09 September 2008

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. legacy software
    2. system emulation

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    PPPJ08
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 29 of 58 submissions, 50%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)1
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 07 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2021)A Study of Call Graph Construction for JVM-Hosted LanguagesIEEE Transactions on Software Engineering10.1109/TSE.2019.295692547:12(2644-2666)Online publication date: 1-Dec-2021
    • (2013)Superblock compilation and other optimization techniques for a Java-based DBT machine emulatorACM SIGPLAN Notices10.1145/2517326.245152148:7(33-40)Online publication date: 16-Mar-2013
    • (2013)Superblock compilation and other optimization techniques for a Java-based DBT machine emulatorProceedings of the 9th ACM SIGPLAN/SIGOPS international conference on Virtual execution environments10.1145/2451512.2451521(33-40)Online publication date: 16-Mar-2013
    • (2011)The Java Virtual Machine in retargetable, high-performance instruction set simulationProceedings of the 9th International Conference on Principles and Practice of Programming in Java10.1145/2093157.2093161(21-30)Online publication date: 24-Aug-2011

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media