Abstract
We present a simple parametric calculus of processes which exchange mobile code, where type safety is ensured by a combination of static and dynamic checks. That is, internal consistency of each process is locally verified before starting execution, by only relying on type assumptions on missing code; then, at execution time, when locally typechecked code is sent from a process to another, a run-time check based on a subtyping relation ensures that it can be successfully received, without requiring to inspect code again.
The calculus is defined in a parametric way, that is, we do not fix some ingredients which can vary depending on the specific language or system. Notably, we abstract away from the specific nature of the code to be exchanged, and of the static and dynamic checks. We formalize the notion of type safety in our general framework and provide sufficient conditions on the above ingredients which guarantee this property.
We illustrate our approach first on a simple lambda-calculus with records, and then on a calculus of mixin modules which generalizes the previous one.
Partially supported by APPSEM II - Thematic network IST-2001-38957, and MIUR EOS - Extensible Object Systems.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Abadi, M., Cardelli, L.: A Theory of Objects. Monographs in Computer Science. Springer, Heidelberg (1996)
Ancona, D., Zucca, E.: A calculus of module systems. Journ. of Functional Programming 12(2), 91–132 (2002)
Bettini, L.: A Java package for class and mixin mobility in a distributed setting. In: FIDJI 2003. LNCS, vol. 2952, pp. 12–22. Springer, Heidelberg (2003)
Bettini, L., Bono, V., Likavec, S.: Safe and flexible objects with subtyping. SAC 2005 10(4), 5–29 (2005) (Special Issue: OOPS Track at SAC 2005)
Bettini, L., Bono, V., Venneri, B.: O’Klaim: a coordination language with mobile mixins. In: De Nicola, R., Ferrari, G.L., Meredith, G. (eds.) COORDINATION 2004. LNCS, vol. 2949, pp. 20–37. Springer, Heidelberg (2004)
Bettini, L., Bono, V., Venneri, B.: Subtyping-inheritance conflicts: The mobile mixin case. In: Lévy, J.-J., Mayr, E.W., Mitchell, J.C. (eds.) TCS 2004 - IFIP Int. Conf. on Theoretical Computer Science, pp. 451–464. Kluwer Academic, Boston (2004)
Bettini, L., Venneri, B., Bono, V.: MOMI: a calculus for mobile mixins. Acta Informatica 42(2-3), 143–190 (2005)
Bierman, G., Hicks, M.W., Sewell, P., Stoyle, G.: Formalizing dynamic software updating (extended abstract). In: USE 2003 - the Second International Workshop on Unanticipated Software Evolution (2003)
Bierman, G., Hicks, M.W., Sewell, P., Stoyle, G., Wansbrough, K.: Dynamic rebinding for marshalling and update, with destruct-time λ. In: Runciman, C., Shivers, O. (eds.) Intl. Conf. on Functional Programming 2003, pp. 99–110. ACM Press, New York (2003)
Fagorzi, S., Zucca, E.: A calculus of components with dynamic type-checking. Electronic Notes in Theoretical Computer Science, Formal Aspects of Component Software (FACS 2006) (2006) (to appear)
Felleisen, M., Friedman, D.P.: Control operators, the SECD-machine, and the lambda-calculus. In: 3rd Working Conference on the Formal Description of Programming Concepts, Ebberup, Denmark, pp. 193–219 (August 1986)
Harper, R., Pierce, B.C.: A record calculus based on symmetric concatenation. In: ACM Symp. on Principles of Programming Languages 1991, pp. 131–142. ACM Press, New York (1991)
Kobayashi, N., Pierce, B.C., Turner, D.N.: Linearity and the pi-calculus. In: ACM Symp. on Principles of Programming Languages 1996, pp. 358–371. ACM Press, New York, USA (1996)
Makholm, H., Wells, J.B.: Type inference, principal typings, and let-polymorphism for first-class mixin modules. In: Danvy, O., Pierce, B.C. (eds.) Intl. Conf. on Functional Programming 2005, pp. 156–167. ACM Press, New York (2005)
Meijer, E., Drayton, P.: Static typing where possible, dynamic typing when needed: The end of the cold war between programming languages. In: OOPSLA 2004 Workshop on Revival of Dynamic Languages (2004)
Necula, G.C.: Proof-carrying code. In: George, C. (ed.) ACM Symp. on Principles of Programming Languages 1997, pp. 106–119. ACM Press, New York (1997)
Pierce, B.C., Sangiorgi, D.: Typing and subtyping for mobile processes. In: Proceedings 8th IEEE Logics in Computer Science, Montreal, Canada, pp. 376–385 (1993)
Riecke, J.G., Stone, C.A.: Privacy via subsumption. Information and Computation 172(1), 2–28 (2002)
Stoyle, G., Hicks, M.W., Bierman, G., Sewell, P., Neamtiu, I.: Mutatis mutandis: safe and predictable dynamic software updating. In: ACM Symp. on Principles of Programming Languages 2005, pp. 183–194. ACM Press, New York (2005)
Wand, M.: Complete type inference for simple objects. In: Proc. IEEE Symp. on Logic in Computer Science 1987, pp. 37–44, 1987. A corrigendum appeared at LICS (1988)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2007 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fagorzi, S., Zucca, E. (2007). A Framework for Type Safe Exchange of Mobile Code. In: Montanari, U., Sannella, D., Bruni, R. (eds) Trustworthy Global Computing. TGC 2006. Lecture Notes in Computer Science, vol 4661. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-75336-0_20
Download citation
DOI: https://doi.org/10.1007/978-3-540-75336-0_20
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-75333-9
Online ISBN: 978-3-540-75336-0
eBook Packages: Computer ScienceComputer Science (R0)