Skip to main content

OCaml-Java: From OCaml Sources to Java Bytecodes

  • Conference paper
  • First Online:
Implementation and Application of Functional Languages (IFL 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8241))

Included in the following conference series:

Abstract

This article presents the code generation scheme of the OCaml-Java compiler. The goal of the OCaml-Java project is to allow execution of OCaml programs on a Java Virtual Machine. In order to achieve decent performance, it is necessary to build a compiler producing optimized bytecode that will rely on an efficient support library at runtime.

The OCaml-Java project thus provides \((i)\) an efficient runtime written in pure Java, and \((ii)\) an optimizing compiler based on the original OCaml compilers for the front-end and on the Barista library for the back-end.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 54.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 72.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Already present in previous version, but not production-ready.

  2. 2.

    Despite their name, some constants may in fact be modified, hence the impossibility to share them between programs running in the very same Java Virtual Machine.

  3. 3.

    The Hotspot compiler can remove such tests if it can prove that no illegal access will happen, but the developer can not request to remove such tests.

  4. 4.

    See http://www.graphviz.org/.

  5. 5.

    See http://benchmarksgame.alioth.debian.org.

References

  1. Clerc, X.: OCaml-Java: OCaml on the JVM. In: Loidl, H.-W., Peña, R. (eds.) TFP 2012. LNCS, vol. 7829, pp. 167–181. Springer, Heidelberg (2013)

    Google Scholar 

  2. Danelutto, M., Di Cosmo, R.: Parmap: minimalistic library for multicore programming. https://gitorious.org/parmap

  3. Stolpmann, G.: Plama: Map/Reduce and distributed filesystem. http://plasma.camlcity.org/

  4. Chailloux, E., Canou, B., Wang, P.: OCaml for Multicore Architectures. http://www.algo-prog.info/ocmc/web/

  5. Hickey, R.: The clojure programming language. In: Proceedings of the 2008 Symposium on Dynamic Languages. DLS ’08, pp. 1:1–1:1. ACM, New York (2008)

    Google Scholar 

  6. Odersky, M., et al.: The Scala Language. http://www.scala-lang.org/

  7. Nutter, C.O., et al.: JRuby. http://jruby.org

  8. Clerc, X.: The Barista library. http://barista.x9c.fr

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xavier Clerc .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Clerc, X. (2013). OCaml-Java: From OCaml Sources to Java Bytecodes. In: Hinze, R. (eds) Implementation and Application of Functional Languages. IFL 2012. Lecture Notes in Computer Science(), vol 8241. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-41582-1_5

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-41582-1_5

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-41581-4

  • Online ISBN: 978-3-642-41582-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics