Abstract.
While dynamic linking has become an integral part of the run-time execution of modern programming languages, there is increasing recognition of the need for support for hot swapping of running modules, particularly in long-lived server applications. The interesting challenge for such a facility is to allow the new module to change the types exported by the original module, while preserving type safety. This paper describes a type-based approach to hot swapping running modules. The approach is based on a reflective mechanism for dynamically adding type sharing constraints to the type system, realized by programmer-defined version adapters in the run-time.
Similar content being viewed by others
References
Abadi, M., Cardeli, L., Pierce, B., Remy, D. (1992) Dynamic typing in polymorphic languages. In: Lee, P. (ed.) Proceedings of the ACM SIGPLAN Workshop on ML and its Applications. San Francisco, California, June 1992. Carnegie-Mellon University Technical Report CMU-CS-93-105
Abadi, M., Cardelli, L. (1994) A theory of objects. Springer, Berlin Heidelberg New York
Abadi, M., Cardelli, L., Pierce, B., Plotkin, G. (1991) Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems 13(2): 237-268
Agrawal, R., Buroff, S., Gehani, N.H., Shasha, D. (1991) Object versioning in Ode. In: Proceedings of the IEEE 7th International Conference on Data Engineering. , Kobe, Japan, pp. 446-455
Andersson, J. (2000) A deployment system for pervasive computing. In: International Conference on System Maintenance (ICSM)
Beech, D., Mahbod, B. (1988) Generalized version control in an object oriented database. In: Proceedings of the 4th IEEE Conference on Data Engineering, pp. 14-22
Bloom, T. (1983) Dynamic module replacement in a distributed programming system. PhD thesis, MIT
Bloom, T., Day, M. (1993) Reconfiguration and module replacement in Argus: Theory and practice. Software Engineering Journal 8(2): 102-108
Boyapati, C., Liskov, B., Shrira, L., Moh, C.-H., Richman, S. (2003) Lazy modular upgrades in persistent object stores. In: Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press
Bracha, G., Odersky, M., Stoutamire, D., Wadler, P. (1998) Making the future safe for the past: Adding genericity to the Java programming language. In: Chambers, C. (ed.) Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press, Vancouver, British Columbia, pp. 183-200
Breazu-Tannen, V., Coquand, T., Gunter, C., Scedrov, A. (1991) Inheritance as implicit coercion. Information and Computation 93(1): 172-221
Bruce, K. (1994) A paradigmatic object-oriented programming language: Design, static typing and semantics. Journal of Functional Programming 4: 127-206
Cardelli, L. (1997) Program fragments, linking and modularization. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, pp. 266-277
Cardelli, L., Abadi, M. (1996) On subtyping and matching. ACM Transactions on Programming Languages and Systems, 8(4): 401-423
Cartwright, R., Steele, G. (1998) Compatible genericity with run-time types for the Java programming language. In: Chambers, C. (ed.) Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press, Vancouver, British Columbia, pp. 201-215
Cook, W. (1989) A proposal for making eiffel type-safe. In: European Conference on Object-Oriented Programming, pp. 57-70
Cook, W., Hill, W., Canning, P. (1994) Inheritance is not subtyping. In: Gunter, C.A., Mitchell, J.C. (eds.) Theoretical aspects of object-oriented programming. The MIT Press
Microsoft Corporation (1996) DCOM technical overview. Technical report, Microsoft Corporation
Cowan, C., Autrey, T., Krasic, C., Pu, C., Walpole, J. (1996) Fast concurrent dynamic linking for an adaptive operating system. In: International Conference on Configurable Distributed Systems (ICCDS’96), Annapolis, MD
Crary, K., Hicks, M., Weirich, S. (2000) Safe and flexible dynamic linking of native code. In: Workshop on Types in Compilation, Lecture Notes in Computer Science. Springer, Montreal, Quebec, Canada
Dmitriev, M. (2002) Hotswap technology application for advanced profiling. In: First Workshop on Unanticipated Software Evolution (USE), Malaga, Spain
Duggan, D. (1999) Dynamic typing for distributed programming in polymorphic languages. ACM Transactions on Programming Languages and Systems 21(1): 11-45
Duggan, D. (2000) Sharing in typed module assembly language. In: Workshop on Types in Compilation, Lecture Notes in Computer Science, Springer, Montreal, Quebec, Canada
Duggan, D. (1999) Type-safe dynamic linking with recursive DLLs and shared libraries. ACM Transactions on Programming Languages and Systems, November 2002
Duggan, D., Sourelis, C. (1996) Mixin modules. In: Proceedings of ACM International Conference on Functional Programming, pp. 262-273
Evans, H., Dickman, P. (1999) Zones, contracts and absorbing change: An approach to software evolution. In: Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press, Denver, CO, pp. 415-434
Flatt, M., Felleisen, M. (1998) Units: Cool modules for HOT languages. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation
Franz, M. (1997) Dynamic linking of software components. IEEE Computer 18(9162): 74-81
Gilmore, S., Kirli, D., Walton, C. (1997) Dynamic ML without dynamic types. Technical report, Department of Computer Science, University of Edinburgh
Glew, N. (1999) Type dispatch for named hierarchical types. In: Proceedings of ACM International Conference on Functional Programming. ACM Press, Paris, France
Glew, N., Morrisett, G. (1999) Type-safe linking and modular assembly languages. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, San Antonio, Texas
Hamilton, G. (1997) JavaBeans API Specification v1.01. Technical report, Sun Microsystems
Harper, R., Lillibridge, M. (1994) A type-theoretic approach to higher-order modules with sharing. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, Portland, Oregon, pp. 123-137
Harper, R., Mitchell, J., Moggi, E. (1990) Higher-order modules and the phase distinction. In: Hudak, P. (ed.) Proceedings of ACM Symposium on Principles of Programming Languages. Association for Computing Machinery, pp. 341-354
Harper, R., Morrisett, G. (1995) Compiling polymorphism using intensional type analysis. In: Lee, P. (ed.) Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, San Francisco, California
Hicks, M., Moore, J., Nettles, S. (2001) Dynamic software updating. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation
Hicks, M., Weirich, S. (2000) A calculus for dynamic loading. Technical Report MS-CIS-00-07, University of Pennsylvania
Hjalmtysson, G., Gray, R. (1998) Dynamic C++ classes: A lightweight mechanism to update code in a running program. In: USENIX Technical Conference
Intermetrics, Cambridge, Mass. (1995) Ada-95 Reference Manual. International standard ISO/IEC 8652:1995(E)
Kim, W., Bertino, E., Garza, J. (1989) Composite objects revisited. In Clifford, J., Lindsay, B.G., Maier, D. (eds.) Proc. of the ACM SIGMOD Int. Conf. on Management of Data, SIGMOD’89. Portland, Oregon, pp. 337-347
Klahold, P., Schlageter, G., Wilkes, W. (1986) A general model for version management in databases. In: Proceedings of the 12th VLDB Conference. Kyoto, Japan, pp. 319-327
League, C., Shao, Z., Trifonov, V. (1999) Representing java classes in a typed intermediate language. In: Proceedings of ACM International Conference on Functional Programming, ACM Press, Paris, France
Leroy, X. (1992) Unboxed objects and polymorphic typing. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, pp. 177-188
Leroy, X. (1994) Manifest types, modules, and separate compilation. In: Proceedings of ACM Symposium on Principles of Programming Languages. acmp, Portland, Oregon, pp. 109-122
Leroy, X. (1995) Applicative functors and fully transparent higher-order modules. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, San Francisco, California, pp. 154-163
Leroy, X., Mauny, M. (1993) Dynamics in ML. Journal of Functional Programming 3(4): 431-463
Liang, S., Bracha, G. (1998) Dynamic class loading in the Java virtual machine. In: Proceedings of ACM Symposium on Object-Oriented Programming: Systems, Languages and Applications. ACM Press
Liskov, B. (1988) Distributed programming in Argus. Communications of the ACM 31(3): 300-312
Malabarba, S., Pandey, R., Gragg, J., Barr, E., Barnes, J.F. (2000) Runtime support for type-safe dynamic java classes. In; European Conference on Object-Oriented Programming
Milner, R., Tofte, M. (1991) Commentary on the Standard ML Definition. The MIT Press
Milner, R., Tofte, M., Harper, R. (1990) The Definition of Standard ML. The MIT Press
Milner, R., Tofte, M., Harper, R., MacQueen, D. (1997) The Revised Definition of Standard ML. The MIT Press
Morrisett, G., Walker, D., Crary, K., Glew, N. (1998) From System F to typed assembly language. ACM Transactions on Programming Languages and Systems 21(3): 528-569
Morrisett, J.G. (1995) Compiling with types. PhD thesis, Carnegie-Mellon University
Sewell, P. (2001) Modules, abstract types and distributed versioning. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, London, England
Shao, Z. (1997) Flexible representation analysis. In: Proceedings of ACM International Conference on Functional Programming, ACM Press, pp. 85-98
Shao, Z. (1999) Transparent modules with fully syntactic signatures. In: Proceedings of ACM International Conference on Functional Programming. Paris, France
Shields, M., Sheard, T., Peyton-Jones, S. (1998) Dynamic typing as staged type inference. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, San Diego, California, pp. 289-302
Siegel, J., Frantz, D., Mirsky, H., Hudli, R., deJong, P., Thomas, A., Coles, W., Baker, S., Balick. M. (1996) CORBA Fundamentals and Programming. John Wiley and Sons
Soules, C.A.N., Appavoo, J., Hui, K., Wisniewski, R.W., Da Silva, D., Ganger, G.R., Krieger, O., Stumm, M., Auslander, M., Ostrowski, M., Rosenburg, B., Xenidis, J. (2003) System support for online reconfiguration. In: Proceedings of Usenix Technical Conference, pp. 141-154
Stone C., Harper, R. (2000) Decidable type equivalence with singleton kinds. In: Reps, T. (ed.) Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, Boston, MA
Thatté, S. (1994) Automated synthesis of interface adapters for reusable classes. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, pp. 174-187
Author information
Authors and Affiliations
Corresponding author
Additional information
Received: 19 September 2002, Accepted: 21 September 2004, Published online: 16 February 2005
An extended abstract of this work appeared in International Conference on Functional Programming (ICFP), Florence, Italy, September 2001.
Rights and permissions
About this article
Cite this article
Duggan, D. Type-based hot swapping of running modules. Acta Informatica 41, 181–220 (2005). https://doi.org/10.1007/s00236-004-0151-1
Issue Date:
DOI: https://doi.org/10.1007/s00236-004-0151-1