Abstract
Supporting read-only and side effect free execution has been the focus of a large body of work in the area of statically typed programming languages. Read-onlyness in dynamically typed languages is difficult to achieve because of the absence of a type checking phase and the support of an open-world assumption in which code can be constantly added and modified. To address this issue, we propose Dynamic Read-Only references (DRO) that provide a view on an object where this object and its object graph are protected from modification. The read-only view dynamically propagates to aggregated objects, without changing the object graph itself; it acts as a read-only view of complex data structures, without making them read-only globally. We implement dynamic read-only references by using smart object proxies that lazily propagate the read-only view, following the object graph and driven by control flow and applied them to realize side-effect free assertions.
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
Meyer, B.: Applying design by contract. IEEE Computer (Special Issue on Inheritance & Classification) 25(10), 40–52 (1992)
Finifter, M., Mettler, A., Sastry, N., Wagner, D.: Verifiable functional purity in java. In: Proceedings of CCS’08, pp. 27–31 (2008)
Donald, G., James, N.: Dynamic ownership in a dynamic language. In: Costanza, P., Hirschfeld, R. (eds.) Proceedings of the 2007 Symposium on Dynamic Languages, DLS 2007, pp. 41–52. ACM, New York (2007)
Hogg, J.: Islands: aliasing protection in object-oriented languages. In: Proceedings of the 6th Annual Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’91), pp. 271–285 (1991)
Almeida, P.S.: Balloon types: Controlling sharing of state in data types. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 32–59. Springer, Heidelberg (1997)
Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: Proceedings OOPSLA ’98, pp. 48–64. ACM Press, New York (1998)
Boyland, J., Noble, J., Retert, W.: Capabilities for sharing, a generalisation of uniqueness and read-only. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 2. Springer, Heidelberg (2001)
Noble, J., Vitek, J., Potter, J.: Flexible alias protection. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 158–185. Springer, Heidelberg (1998)
Noble, J., Clarke, D., Potter, J.: Object ownership for dynamic alias protection. In: Proceedings TOOLS ’99, November 1999, pp. 176–187 (1999)
Hakonen, H., Leppänen, V., Raita, T., Salakoski, T., Teuhola, J.: Improving object integrity and preventing side effects via deeply immutable references. In: Fenno-Ugric Symposium on Software Technology, pp. 139–150 (1999)
Miller, M.S., Shapiro, J.S.: Paradigm regained: Abstraction mechanisms for access control. In: Proceedings of the Eigth Asian Computing Science Conference, pp. 224–242 (2003)
Fong, P.W.L., Zhang, C.: Capabilities as alias control: Secure cooperation in dynamically extensible systems. Technical report, Department of Computer Science, University of Regina (2004)
Miller, M.S.: Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. PhD thesis, Johns Hopkins University, Baltimore, Maryland, USA (May 2006)
Birka, A., Ernst, M.D.: A practical type system and language for reference immutability. In: Proceedings of OOPSLA’2004, pp. 35–49 (2004)
Schärli, N., Ducasse, S., Nierstrasz, O., Wuyts, R.: Composable encapsulation policies. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 26–50. Springer, Heidelberg (2004)
Schärli, N., Black, A.P., Ducasse, S.: Object-oriented encapsulation for dynamically typed languages. In: Proceedings of 18th International Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’04), October 2004, pp. 130–149 (2004)
Bergel, A., Ducasse, S., Nierstrasz, O., Wuyts, R.: Stateful traits and their formalization. Journal of Computer Languages, Systems and Structures 34(2-3), 83–108 (2008)
Friedman, D.P., Wand, M.: Reification: Reflection without metaphysics. In: LFP ’84: Proceedings of the 1984 ACM Symposium on LISP and functional programming, pp. 348–355. ACM, New York (1984)
Lienhard, A.: Dynamic Object Flow Analysis. Phd thesis, University of Bern (2008)
Haupt, M., Schippers, H.: A machine model for aspect-oriented programming. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 501–524. Springer, Heidelberg (2007)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Reading (1995)
Pascoe, G.A.: Encapsulators: A new software paradigm in Smalltalk-80. In: Proceedings OOPSLA ’86, ACM SIGPLAN Notices, November 1986, vol. 21, pp. 341–346 (1986)
Flatt, M., Krishnamurthi, S., Felleisen, M.: A programmer’s reduction semantics for classes and mixins. Technical Report TR 97-293, Rice University (1999)
Denker, M., Ducasse, S., Tanter, É.: Runtime bytecode transformation for Smalltalk. Journal of Computer Languages, Systems and Structures 32(2-3), 125–139 (2006)
Ducasse, S.: Evaluating message passing control techniques in Smalltalk. Journal of Object-Oriented Programming (JOOP) 12(6), 39–44 (1999)
Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. Journal of Object Technology 7(3) (March 2008)
Denker, M., Suen, M., Ducasse, S.: The meta in meta-object architectures. In: Proceedings of TOOLS EUROPE 2008. LNBIP, vol. 11, pp. 218–237. Springer, Heidelberg (2008)
Ierusalimschy, R., de la Rocque Rodriguez, N.: Side-effect free functions in object-oriented languages. Computer Languages 3/4(21), 129–146 (1995)
Costanza, P., Hirschfeld, R.: Language constructs for context-oriented programming: An overview of ContextL. In: Proceedings of the Dynamic Languages Symposium (DLS) ’05, co-organized with OOPSLA’05, October 2005, pp. 1–10. ACM, New York (2005)
Warth, A., Kay, A.: Worlds: Controlling the scope of side effects. Technical Report RN-2008-001, Viewpoints Research (2008)
Tanter, É.: Contextual values. In: Proceedings of the 4th ACM Dynamic Languages Symposium (DLS 2008), Paphos, Cyprus, July 2008. ACM Press, New York (to appear, 2008)
Hanenberg, S., Hirschfeld, R., Unland, R.: Morphing aspects: incompletely woven aspects and continuous weaving. In: AOSD ’04: Proceedings of the 3rd international conference on Aspect-oriented software development, pp. 46–55. ACM, New York (2004)
Schippers, H., Janssens, D., Haupt, M., Hirschfeld, R.: Delegation-based semantics for modularizing crosscutting concerns. In: OOPSLA ’08: Proceedings of the 23rd ACM SIGPLAN conference on Object oriented programming systems languages and applications, pp. 525–542. ACM, New York (2008)
Flatt, M., Krishnamurthi, S., Felleisen, M.: Classes and mixins. In: Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 171–183. ACM Press, New York (1998)
Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci. 103(2), 235–271 (1992)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Arnaud, JB., Denker, M., Ducasse, S., Pollet, D., Bergel, A., Suen, M. (2010). Read-Only Execution for Dynamic Languages. In: Vitek, J. (eds) Objects, Models, Components, Patterns. TOOLS 2010. Lecture Notes in Computer Science, vol 6141. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-13953-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-13953-6_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-13952-9
Online ISBN: 978-3-642-13953-6
eBook Packages: Computer ScienceComputer Science (R0)