Advertisement

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

  • Elvira Albert
  • Nikolaos Bezirgiannis
  • Frank de Boer
  • Enrique Martin-MartinEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

References

  1. 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)CrossRefGoogle Scholar
  2. 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 CrossRefGoogle Scholar
  3. 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 CrossRefGoogle Scholar
  4. 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 CrossRefGoogle Scholar
  5. 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 CrossRefGoogle Scholar
  6. 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. 7.
    Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Commun. ACM 51(1), 107–113 (2008)CrossRefGoogle Scholar
  8. 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. 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 CrossRefGoogle Scholar
  10. 10.
    Knuth, D.E.: The Art of Computer Programming. Fundamental Algorithms, 2nd edn, vol. 1. Addison-Wesley Professional, Massachusetts (1973)Google Scholar
  11. 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 CrossRefGoogle Scholar
  12. 12.
    Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL: A Proof Assistant for Higher-order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)zbMATHGoogle Scholar
  13. 13.
    Noll, T.: A rewriting logic implementation of erlang. ENTCS 44(2), 206–224 (2001). Proc. LDTA ’01Google Scholar
  14. 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. 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 CrossRefGoogle Scholar
  16. 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 CrossRefGoogle Scholar
  17. 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 CrossRefGoogle Scholar
  18. 18.
    Vidal, G.: Towards Erlang Verification by Term Rewriting. In: Proc. LOPSTR ’13. pp. 109–126. LNCS 8901, Springer (2013)Google Scholar
  19. 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)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Elvira Albert
    • 1
  • Nikolaos Bezirgiannis
    • 2
  • Frank de Boer
    • 2
  • Enrique Martin-Martin
    • 1
    Email author
  1. 1.Universidad Complutense de MadridMadridSpain
  2. 2.Centrum Wiskunde & Informatica (CWI)AmsterdamNetherlands

Personalised recommendations