Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/2816707.2816713acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Compiling for multi-language task migration

Published: 21 October 2015 Publication History

Abstract

Task migration allows a running program to continue its execution in a different destination environment. Increasingly, execution environments are defined by combinations of cultural and technological constraints, affecting the choice of host language, libraries and tools. A compiler supporting multiple target environments and task migration must be able to marshal continuations and then unmarshal and continue their execution, ideally, even if the language of the destination environment is different. In this paper, we propose a compilation approach based on a virtual machine that strikes a balance between implementation portability and efficiency. We explain its implementation within a Scheme compiler targeting JavaScript, PHP, Python, Ruby and Java -- some of the most popular host languages for web applications. As our experiments show, this approach compares well with other Scheme compilers targeting high-level languages in terms of execution speed, being sometimes up to 3 orders of magnitude faster.

References

[1]
J. Ashkenas. List of languages compiling to JavaScript, 2015. URL https:// github.com/jashkenas/coffee-script/wiki/ List-of-languages-that-compile-to-JS/.
[2]
H. G. Baker. Cons should not cons its arguments, part II: Cheney on the M.T.A. SIGPLAN Notices, 30(9):17–20, 1995.
[3]
E. Brady. Cross-platform compilers for functional languages. In Proceedings of the 2015 Trends in Functional Programming Symposium, June 2015.
[4]
H. Cejtin, S. Jagannathan, and R. Kelsey. Higher-order distributed objects. ACM Trans. Program. Lang. Syst., 17(5): 704–739, Sept. 1995. ISSN 0164-0925.
[5]
W. D. Clinger, A. H. Hartheimer, and E. M. Ost. Implementation strategies for first-class continuations. Higher Order and Symbolic Computation, 12(1):7–45, 1999.
[6]
M. Feeley. Polling efficiently on stock hardware. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture, FPCA ’93, pages 179– 187, New York, NY, USA, 1993.
[7]
M. Feeley. A better API for first-class continuations. In Scheme and Functional Programming Workshop, SFPW ’01, pages 1–3, 2001.
[8]
M. Feeley. Gambit-C version 4.7.8, 2015. URL http: //gambitscheme.org.
[9]
M. Feeley and J. S. Miller. A parallel virtual machine for efficient Scheme compilation. In Proceedings of the 1990 ACM Conference on LISP and Functional Programming, LFP ’90, pages 119–130, New York, NY, USA, 1990.
[10]
G. Germain, M. Feeley, and S. Monnier. Concurrency oriented programming in Termite Scheme. In Scheme and Functional Programming Workshop, SFPW’06, pages 125–135, 2006.
[11]
Haxe Foundation. Haxe 3 Manual, Apr. 2015. URL http: //haxe.org.
[12]
R. Hieb, R. K. Dybvig, and C. Bruggeman. Representing control in the presence of first-class continuations. In Proceedings of the ACM SIGPLAN 1990 Conference on Programming Language Design and Implementation, volume 25, pages 66–77, New York, NY, USA, 1990.
[13]
S. Jagannathan. Continuation-based transformations for coordination languages. Theoretical Computer Science, 240(1): 117 – 146, 2000. ISSN 0304-3975.
[14]
R. Kelsey, W. Clinger, and J. R. (Editors). Revised 5 report on the algorithmic language Scheme. ACM SIGPLAN Notices, 33(9):26–76, 1998.
[15]
F. Loitsch. JavaScript to Scheme compilation. In Proceedings of the Sixth Workshop on Scheme and Functional Programming, pages 101–116, 2005.
[16]
F. Loitsch. Exceptional continuations in JavaScript. In 2007 Workshop on Scheme and Functional Programming, 2007.
[17]
F. Loitsch. Scheme to JavaScript Compilation. PhD thesis, Université de Nice Sophia Antipolis, 2009.
[18]
M. Serrano and P. Weis. Bigloo: A portable and optimizing compiler for strict functional languages. In Proceedings of the Second International Symposium on Static Analysis, SAS ’95, pages 366–381, London, UK, 1995. Springer-Verlag.
[19]
M. Sperber, R. K. Dybvig, M. Flatt, A. Van Straaten, R. Findler, and J. Matthews. Revised 6 report on the algorithmic language scheme. Journal of Functional Programming, 19:1– 301, 2009. ISSN 1469-7653.
[20]
F. Winkelmann. Chicken-Spock, 2014. URL http://wiki. call-cc.org/eggref/4/spock.
[21]
F. Winkelmann. Chicken Scheme, 2015. URL http://www. call-cc.org/.
[22]
D. Yoo. Building Web Based Programming Environments for Functional Programming. PhD thesis, Worcester Polytechnic Institute, 2012.

Index Terms

  1. Compiling for multi-language task migration

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    DLS 2015: Proceedings of the 11th Symposium on Dynamic Languages
    October 2015
    176 pages
    ISBN:9781450336901
    DOI:10.1145/2816707
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 51, Issue 2
      DLS '15
      Feburary 2016
      176 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2936313
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
    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 the author(s) 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: 21 October 2015

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. JavaScript
    2. Scheme
    3. Task migration
    4. continuation
    5. marshalling
    6. tail call
    7. trampoline
    8. virtual machine

    Qualifiers

    • Research-article

    Funding Sources

    Conference

    SPLASH '15
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 32 of 77 submissions, 42%

    Upcoming Conference

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)2
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 30 Sep 2024

    Other Metrics

    Citations

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media