skip to main content
research-article

Contextual effects for version-consistent dynamic software updating and safe concurrent programming

Published:07 January 2008Publication History
Skip Abstract Section

Abstract

This paper presents a generalization of standard effect systems that we call contextual effects. A traditional effect system computes the effect of an expression e. Our system additionally computes the effects of the computational context in which e occurs. More specifically, we computethe effect of the computation that has already occurred(the prior effect) and the effect of the computation yet to take place (the future effect).

Contextual effects are useful when the past or future computation of the program is relevant at various program points. We present two substantial examples. First, we show how prior and future effects can be used to enforce transactional version consistency(TVC), a novel correctness property for dynamic software updates. TV Censures that programmer-designated transactional code blocks appear to execute entirely at the same code version, even if a dynamic update occurs in the middle of the block. Second, we show how future effects can be used in the analysis of multi-threaded programs to find thread-shared locations. This is an essential step in applications such as data race detection.

References

  1. Martin Abadi and Cedric Fournet. Access control based on execution history. In NDSS, 2003.Google ScholarGoogle Scholar
  2. Andrew Baumann, Gernot Heiser, Jonathan Appavoo, et al. Providing dynamic update in an operating system. In USENIX, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Andrew Baumann, Jonathan Appavoo, Robert W. Wisniewski, et al. Reboots are for hardware: Challenges and solutions to updating an operating system on the fly. In USENIX, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Chandrasekhar Boyapati, Barbara Liskov, Liuba Shrira, Chuang-Hue Moh, and Steven Richman. Lazy modular upgrades in persistent object stores. In OOPSLA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Haibo Chen, Rong Chen, Fengzhe Zhang, Binyu Zang, and Pen-Chung Yew. Live updating operating systems using virtualization. In VEE, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Haibo Chen, Jie Yu, Rong Chen, Binyu Zang, and Pen-Chung Yew. POLUS: A POwerful Live Updating System. In ICSE, pages 271--281, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Dawson Engler and Ken Ashcraft. RacerX: effective, static detection of race conditions and deadlocks. In SOSP, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cormac Flanagan and Stephen N. Freund. Type-based race detection for Java. In PLDI, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jeffrey S. Foster, Robert Johnson, John Kodumal, and Alex Aiken. Flow-Insensitive Type Qualifiers. TOPLAS, 28(6):1035--1087, November 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Stephen Gilmore, Dilsun Kirli, and Chris Walton. Dynamic ML without dynamic types. Technical Report ECS-LFCS-97-378, LFCS, University of Edinburgh, 1997.Google ScholarGoogle Scholar
  11. Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In ISCA, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Michael Hicks, Jeffrey S. Foster, and Polyvios Pratikakis. Lock Inference for Atomic Sections. In TRANSACT, 2006.Google ScholarGoogle Scholar
  14. Atsushi Igarashi and Naoki Kobayashi. Resource Usage Analysis. In POPL, Portland, Oregon, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. John Kodumal and Alexander Aiken. Banshee: A scalable constraint-based analysis toolkit. In SAS, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. CACM, 21(7):558--565, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Insup Lee. DYMOS: A Dynamic Modification System. PhD thesis, Dept. of Computer Science, University of Wisconsin, Madison, April 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. John M. Lucassen. Types and Effects: Towards the Integration of Functional and Imperative Programming. PhD thesis, MIT Laboratory for Computer Science, August 1987. MIT/LCS/TR-408.Google ScholarGoogle Scholar
  19. Kristis Makris and Kyung Dong Ryu. Dynamic and adaptive updates of non-quiescent subsystems in commodity operating system kernels. In Proc. EuroSys, March 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Jeremy Manson, William Pugh, and Sarita V. Adve. The Java Memory Model. In POPL, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. John C. Mitchell. Type inference with simple subtypes. JFP, 1(3):245--285, July 1991.Google ScholarGoogle ScholarCross RefCross Ref
  22. Mayur Naik and Alex Aiken. Conditional must not aliasing for static race detection. In POPL, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Mayur Naik, Alex Aiken, and John Whaley. Effective static race detection for java. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Iulian Neamtiu, Jeffrey S. Foster, and Michael Hicks. Understanding Source Code Evolution Using Abstract Syntax Tree Matching. In MSR'05, 2005. URL http://www.cs.umd.edu/~mwh/papers/evolution.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Iulian Neamtiu, Michael Hicks, Gareth Stoyle, and Manuel Oriol. Practical dynamic software updating for C. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Iulian Neamtiu, Michael Hicks, Jeffrey S. Foster, and Polyvios Pratikakis. Contextual Effects for Version-Consistent Dynamic Software Updating and Safe Concurrent Programming. Technical Report CS-TR-4920, Dept. of Computer Science, University of Maryland, November 2007.Google ScholarGoogle Scholar
  27. George C. Necula, Scott McPeak, Shree P. Rahul, and Westley Weimer. CIL: Intermediate language and tools for analysis and transformation of C programs. LNCS, 2304:213--228, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Yang Ni, Vijay S. Menon, Ali-Reza Adl-Tabatabai, et al. Open nesting in software transactional memory. In PPoPP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Flemming Nielson, Hanne R. Nielson, and Chris Hankin. Principles of Program Analysis. Springer-Verlag, 1999. ISBN 3540654100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. Context-sensitive correlation analysis for detecting races. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Stefan Savage, Michael Burrows, Greg Nelson, Patrick Sobalvarro, and Thomas Anderson. Eraser: A Dynamic Data Race Detector for Multi--Threaded Programs. In SOSP, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Christian Skalka, Scott Smith, and David Van Horn. Types and trace effects of higher order programs. JFP, July 2007. Forthcoming; available on-line at http://www.journals.cambridge.org. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Fred Smith, David Walker, and Greg Morrisett. Alias types. In ESOP, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Craig AN. Soules, Jonathan Appavoo, Kevin Hui, et al. System support for online reconfiguration. In USENIX, 2003.Google ScholarGoogle Scholar
  35. Gareth Stoyle, Michael Hicks, Gavin Bierman, Peter Sewell, and Iulian Neamtiu. Mutatis Mutandis: Safe and flexible dynamic software updating (full version). TOPLAS, 29(4):22, August 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Christoph von Praun and Thomas R. Gross. Static conflict analysis for multi-threaded object-oriented programs. In PLDI '03, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. David Walker, Karl Crary, and Greg Morrisett. Typed memory management in a calculus of capabilities. TOPLAS, 24(4):701--771, July 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Contextual effects for version-consistent dynamic software updating and safe concurrent programming

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader
                  About Cookies On This Site

                  We use cookies to ensure that we give you the best experience on our website.

                  Learn more

                  Got it!