An Intermediate Language for Compilation to Scripting Languages

Paola Giannini, Albert Shaqiri

Abstract

In this paper we introduce an intermediate language for translation of F#, a functional language polymorphically typed relying on the .Net platform, to different scripting languages, such as Python and JavaScript. This intermediate language (IL for short) is an imperative language, with constructs that make possible to move a code fragment outside its definition environment, during the translation. Definition of names (variables and functions) are done in blocks, like in Python (and JavaScript) and do not have to statically precede their use. We present a translation of a core F# (including mutable variables) into IL.

References

  1. Ahmed, A., Findler, R. B., Siek, J. G., and Wadler, P. (2011). Blame for all. In Proceedings of POPL 2011, Austin, TX, USA, ACM, pages 201-214.
  2. Ancona, D., Giannini, P., and Zucca, E. (2013). Reconciling positional and nominal binding. In ITRS 2012, EPTCS.
  3. Appel, A. W. (1998). Modern Compiler Implementation in ML. Cambridge University Press.
  4. Bray, Z. (2013). Funscript. http://tomasp.net/files/funscript/ tutorial.html.
  5. Fahad, M. S. (2012). Pit - F Sharp to JS compiler. http:// pitfw.org/.
  6. Fournet, C., Swamy, N., Chen, J., Dagand, P.- Ó., Strub, P.- Y., and Livshits, B. (2013). Fully abstract compilation to javascript. In POPL, pages 371-384. ACM.
  7. Giannini, P., Mantovani, D., and Shaqiri, A. (2012). Leveraging dynamic typing through static typing. ICTCS 2012. http://ictcs.di.unimi.it/papers/paper 4.pdf.
  8. Igarashi, A., Pierce, B., and Wadler, P. (2001). Featherweight Java: A minimal core calculus for Java and GJ. ACM TOPLAS, 23(3):396-450.
  9. Intellifactory (2012). Websharper 2010 platform. http:// websharper.com/.
  10. Matthews, J. and Findler, R. B. (2009). Operational semantics for multi-language programs. ACM Trans. Program. Lang. Syst., 31(3).
  11. Moors, A., Rompf, T., Haller, P., and Odersky, M. (2012). Scala-virtualized. In Kiselyov, O. and Thompson, S., editors, Proceedings of PEPM 2012, Philadelphia, Pennsylvania, USA, ACM, pages 117-120.
  12. Nanevski, A. (2003). From dynamic binding to state via modal possibility. In PPDP'03, pages 207-218. ACM.
  13. Pet?ríc?ek, T. and Syme, D. (2012). AFAX: Rich client/server web applications in F#. http://www.scribd.com/doc/ 54421045/Web-Apps-in-F-Sharp.
  14. Ranson, J. F., Hamilton, H. J., and Fong, P. W. L. (2008). A semantics of python in isabelle/hol. Technical Report CS-2008-04, CS Department, University of Regina,Saskatchewan.
  15. Vouillon, J. and Balat, V. (2011). From bytecode to javascript: the js of ocaml compiler. http:// www.pps.univ-paris-diderot.fr/~balat/publi.php.
Download


Paper Citation


in Harvard Style

Giannini P. and Shaqiri A. (2013). An Intermediate Language for Compilation to Scripting Languages . In Proceedings of the 8th International Joint Conference on Software Technologies - Volume 1: ICSOFT-EA, (ICSOFT 2013) ISBN 978-989-8565-68-6, pages 92-103. DOI: 10.5220/0004588600920103


in Bibtex Style

@conference{icsoft-ea13,
author={Paola Giannini and Albert Shaqiri},
title={An Intermediate Language for Compilation to Scripting Languages},
booktitle={Proceedings of the 8th International Joint Conference on Software Technologies - Volume 1: ICSOFT-EA, (ICSOFT 2013)},
year={2013},
pages={92-103},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0004588600920103},
isbn={978-989-8565-68-6},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 8th International Joint Conference on Software Technologies - Volume 1: ICSOFT-EA, (ICSOFT 2013)
TI - An Intermediate Language for Compilation to Scripting Languages
SN - 978-989-8565-68-6
AU - Giannini P.
AU - Shaqiri A.
PY - 2013
SP - 92
EP - 103
DO - 10.5220/0004588600920103