Skip to main content
Log in

Type-based hot swapping of running modules

  • Published:
Acta Informatica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. 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

  2. Abadi, M., Cardelli, L. (1994) A theory of objects. Springer, Berlin Heidelberg New York

  3. 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

    Google Scholar 

  4. 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

  5. Andersson, J. (2000) A deployment system for pervasive computing. In: International Conference on System Maintenance (ICSM)

  6. 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

  7. Bloom, T. (1983) Dynamic module replacement in a distributed programming system. PhD thesis, MIT

  8. Bloom, T., Day, M. (1993) Reconfiguration and module replacement in Argus: Theory and practice. Software Engineering Journal 8(2): 102-108

    Google Scholar 

  9. 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

  10. 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

  11. Breazu-Tannen, V., Coquand, T., Gunter, C., Scedrov, A. (1991) Inheritance as implicit coercion. Information and Computation 93(1): 172-221

    Google Scholar 

  12. Bruce, K. (1994) A paradigmatic object-oriented programming language: Design, static typing and semantics. Journal of Functional Programming 4: 127-206

    Google Scholar 

  13. Cardelli, L. (1997) Program fragments, linking and modularization. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, pp. 266-277

  14. Cardelli, L., Abadi, M. (1996) On subtyping and matching. ACM Transactions on Programming Languages and Systems, 8(4): 401-423

    Google Scholar 

  15. 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

  16. Cook, W. (1989) A proposal for making eiffel type-safe. In: European Conference on Object-Oriented Programming, pp. 57-70

  17. 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

  18. Microsoft Corporation (1996) DCOM technical overview. Technical report, Microsoft Corporation

  19. 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

  20. 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

  21. Dmitriev, M. (2002) Hotswap technology application for advanced profiling. In: First Workshop on Unanticipated Software Evolution (USE), Malaga, Spain

  22. Duggan, D. (1999) Dynamic typing for distributed programming in polymorphic languages. ACM Transactions on Programming Languages and Systems 21(1): 11-45

    Google Scholar 

  23. Duggan, D. (2000) Sharing in typed module assembly language. In: Workshop on Types in Compilation, Lecture Notes in Computer Science, Springer, Montreal, Quebec, Canada

  24. Duggan, D. (1999) Type-safe dynamic linking with recursive DLLs and shared libraries. ACM Transactions on Programming Languages and Systems, November 2002

  25. Duggan, D., Sourelis, C. (1996) Mixin modules. In: Proceedings of ACM International Conference on Functional Programming, pp. 262-273

  26. 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

  27. Flatt, M., Felleisen, M. (1998) Units: Cool modules for HOT languages. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation

  28. Franz, M. (1997) Dynamic linking of software components. IEEE Computer 18(9162): 74-81

    Google Scholar 

  29. Gilmore, S., Kirli, D., Walton, C. (1997) Dynamic ML without dynamic types. Technical report, Department of Computer Science, University of Edinburgh

  30. Glew, N. (1999) Type dispatch for named hierarchical types. In: Proceedings of ACM International Conference on Functional Programming. ACM Press, Paris, France

  31. 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

  32. Hamilton, G. (1997) JavaBeans API Specification v1.01. Technical report, Sun Microsystems

  33. 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

  34. 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

  35. 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

  36. Hicks, M., Moore, J., Nettles, S. (2001) Dynamic software updating. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation

  37. Hicks, M., Weirich, S. (2000) A calculus for dynamic loading. Technical Report MS-CIS-00-07, University of Pennsylvania

  38. Hjalmtysson, G., Gray, R. (1998) Dynamic C++ classes: A lightweight mechanism to update code in a running program. In: USENIX Technical Conference

  39. Intermetrics, Cambridge, Mass. (1995) Ada-95 Reference Manual. International standard ISO/IEC 8652:1995(E)

  40. 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

  41. 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

  42. 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

  43. Leroy, X. (1992) Unboxed objects and polymorphic typing. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, pp. 177-188

  44. 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

  45. 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

  46. Leroy, X., Mauny, M. (1993) Dynamics in ML. Journal of Functional Programming 3(4): 431-463

    Google Scholar 

  47. 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

  48. Liskov, B. (1988) Distributed programming in Argus. Communications of the ACM 31(3): 300-312

    Google Scholar 

  49. 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

  50. Milner, R., Tofte, M. (1991) Commentary on the Standard ML Definition. The MIT Press

  51. Milner, R., Tofte, M., Harper, R. (1990) The Definition of Standard ML. The MIT Press

  52. Milner, R., Tofte, M., Harper, R., MacQueen, D. (1997) The Revised Definition of Standard ML. The MIT Press

  53. 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

    Google Scholar 

  54. Morrisett, J.G. (1995) Compiling with types. PhD thesis, Carnegie-Mellon University

  55. Sewell, P. (2001) Modules, abstract types and distributed versioning. In: Proceedings of ACM Symposium on Principles of Programming Languages. ACM Press, London, England

  56. Shao, Z. (1997) Flexible representation analysis. In: Proceedings of ACM International Conference on Functional Programming, ACM Press, pp. 85-98

  57. Shao, Z. (1999) Transparent modules with fully syntactic signatures. In: Proceedings of ACM International Conference on Functional Programming. Paris, France

  58. 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

  59. 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

  60. 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

  61. 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

  62. 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

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dominic Duggan.

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

Reprints 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

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-004-0151-1

Keywords

Navigation