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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
See http://abs-models.org/documentation/manual/#-abs-backends for more information about ABS backends.
- 2.
Object whose active process is not waiting for a future variable in a statement.
- 3.
The ABS-subset experimental programs and measurements together with the target language & runtime reside at http://github.com/abstools/abs-haskell-formal.
- 4.
http://abstools.github.io/abs-bench keeps an up-to-date benchmark of all ABS backends.
References
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)
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
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
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
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
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)
Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Commun. ACM 51(1), 107–113 (2008)
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)
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
Knuth, D.E.: The Art of Computer Programming. Fundamental Algorithms, 2nd edn, vol. 1. Addison-Wesley Professional, Massachusetts (1973)
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
Nipkow, T., Wenzel, M., Paulson, L.C. (eds.): Isabelle/HOL: A Proof Assistant for Higher-order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)
Noll, T.: A rewriting logic implementation of erlang. ENTCS 44(2), 206–224 (2001). Proc. LDTA ’01
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)
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
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
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
Vidal, G.: Towards Erlang Verification by Term Rewriting. In: Proc. LOPSTR ’13. pp. 109–126. LNCS 8901, Springer (2013)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)