Skip to main content

A Formal, Resource Consumption-Preserving Translation of Actors to Haskell

  • Conference paper
  • First Online:
Book cover Logic-Based Program Synthesis and Transformation (LOPSTR 2016)

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

Abstract

We present a formal translation of an actor-based language with cooperative scheduling to the functional language Haskell. The translation is proven correct with respect to a formal semantics of the source language and a high-level operational semantics of the target, i.e. a subset of Haskell. The main correctness theorem is expressed in terms of a simulation relation between the operational semantics of actor programs and their translation. This allows us to then prove that the resource consumption is preserved over this translation, as we establish an equivalence of the cost of the original and Haskell-translated execution traces.

This work was funded partially by the EU project FP7-ICT-610582 ENVISAGE: Engineering Virtualized Services (http://www.envisage-project.eu), by the Spanish MINECO projects TIN2012-38137 and TIN2015-69175-C4-2-R, and by the CM project S2013/ICE-3006.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
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.

    See http://abs-models.org/documentation/manual/#-abs-backends for more information about ABS backends.

  2. 2.

    Object whose active process is not waiting for a future variable in a statement.

  3. 3.

    The ABS-subset experimental programs and measurements together with the target language & runtime reside at http://github.com/abstools/abs-haskell-formal.

  4. 4.

    http://abstools.github.io/abs-bench keeps an up-to-date benchmark of all ABS backends.

References

  1. Albert, E., Arenas, P., Correas, J., Genaim, S., Gómez-Zamalloa, M., Puebla, G., Román-Díez, G.: Object-sensitive cost analysis for concurrent objects. Softw. Test. Verif. Reliab. 25(3), 218–271 (2015)

    Article  Google Scholar 

  2. Albert, E., Arenas, P., Flores-Montoya, A., Genaim, S., Gómez-Zamalloa, M., Martin-Martin, E., Puebla, G., Román-Díez, G.: SACO: static analyzer for concurrent objects. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 562–567. Springer, Heidelberg (2014). doi:10.1007/978-3-642-54862-8_46

    Chapter  Google Scholar 

  3. Albert, E., Arenas, P., Gómez-Zamalloa, M.: Symbolic execution of concurrent objects in CLP. In: Russo, C., Zhou, N.-F. (eds.) PADL 2012. LNCS, vol. 7149, pp. 123–137. Springer, Heidelberg (2012). doi:10.1007/978-3-642-27694-1_10

    Chapter  Google Scholar 

  4. Bezirgiannis, N., Boer, F.: ABS: a high-level modeling language for cloud-aware programming. In: Freivalds, R.M., Engels, G., Catania, B. (eds.) SOFSEM 2016. LNCS, vol. 9587, pp. 433–444. Springer, Heidelberg (2016). doi:10.1007/978-3-662-49192-8_35

    Chapter  Google Scholar 

  5. Boer, F.S., Clarke, D., Johnsen, E.B.: A complete guide to the future. In: Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007). doi:10.1007/978-3-540-71316-6_22

    Chapter  Google Scholar 

  6. Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of haskell programs. In: Proceedings of the ICFP 2000, pp. 268–279. ACM (2000)

    Google Scholar 

  7. Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Commun. ACM 51(1), 107–113 (2008)

    Article  Google Scholar 

  8. Flanagan, C., Felleisen, M.: The semantics of future and its use in program optimization. In: Proceedings of the POPL 1995, pp. 209–220. ACM (1995)

    Google Scholar 

  9. Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011). doi:10.1007/978-3-642-25271-6_8

    Chapter  Google Scholar 

  10. Knuth, D.E.: The Art of Computer Programming. Fundamental Algorithms, 2nd edn, vol. 1. Addison-Wesley Professional, Massachusetts (1973)

    Google Scholar 

  11. Nakata, K., Saar, A.: Compiling cooperative task management to continuations. In: Arbab, F., Sirjani, M. (eds.) FSEN 2013. LNCS, vol. 8161, pp. 95–110. Springer, Heidelberg (2013). doi:10.1007/978-3-642-40213-5_7

    Chapter  Google Scholar 

  12. Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL: A Proof Assistant for Higher-order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  13. Noll, T.: A rewriting logic implementation of erlang. ENTCS 44(2), 206–224 (2001). Proc. LDTA ’01

    Google Scholar 

  14. Palacios, A., Vidal, G.: Towards modelling actor-based concurrency in term rewriting. In: Proceedings of the WPTE 2015. OASICS, vol. 46, pp. 19–29. Dagstuhl Pub. (2015)

    Google Scholar 

  15. Schäfer, J., Poetzsch-Heffter, A.: JCoBox: generalizing active objects to concurrent components. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 275–299. Springer, Heidelberg (2010). doi:10.1007/978-3-642-14107-2_13

    Chapter  Google Scholar 

  16. Srinivasan, S., Mycroft, A.: Kilim: isolation-typed actors for Java. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 104–128. Springer, Heidelberg (2008). doi:10.1007/978-3-540-70592-5_6

    Chapter  Google Scholar 

  17. Tarau, P.: Coordination and concurrency in multi-engine prolog. In: Meuter, W., Roman, G.-C. (eds.) COORDINATION 2011. LNCS, vol. 6721, pp. 157–171. Springer, Heidelberg (2011). doi:10.1007/978-3-642-21464-6_11

    Chapter  Google Scholar 

  18. Vidal, G.: Towards Erlang Verification by Term Rewriting. In: Proc. LOPSTR ’13. pp. 109–126. LNCS 8901, Springer (2013)

    Google Scholar 

  19. Wong, P.Y., Albert, E., Muschevici, R., Proena, J., Schfer, J., Schlatte, R.: The ABS tool suite: modelling, executing and analysing distributed adaptable object-oriented systems. STTT 14(5), 567–588 (2012)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Enrique Martin-Martin .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Albert, E., Bezirgiannis, N., de Boer, F., Martin-Martin, E. (2017). A Formal, Resource Consumption-Preserving Translation of Actors to Haskell. In: Hermenegildo, M., Lopez-Garcia, P. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2016. Lecture Notes in Computer Science(), vol 10184. Springer, Cham. https://doi.org/10.1007/978-3-319-63139-4_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-63139-4_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-63138-7

  • Online ISBN: 978-3-319-63139-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics