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.
- Martin Abadi and Cedric Fournet. Access control based on execution history. In NDSS, 2003.Google Scholar
- Andrew Baumann, Gernot Heiser, Jonathan Appavoo, et al. Providing dynamic update in an operating system. In USENIX, 2005. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Chandrasekhar Boyapati, Barbara Liskov, Liuba Shrira, Chuang-Hue Moh, and Steven Richman. Lazy modular upgrades in persistent object stores. In OOPSLA, 2003. Google Scholar
Digital Library
- Haibo Chen, Rong Chen, Fengzhe Zhang, Binyu Zang, and Pen-Chung Yew. Live updating operating systems using virtualization. In VEE, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Dawson Engler and Ken Ashcraft. RacerX: effective, static detection of race conditions and deadlocks. In SOSP, 2003. Google Scholar
Digital Library
- Cormac Flanagan and Stephen N. Freund. Type-based race detection for Java. In PLDI, 2000. Google Scholar
Digital Library
- Jeffrey S. Foster, Robert Johnson, John Kodumal, and Alex Aiken. Flow-Insensitive Type Qualifiers. TOPLAS, 28(6):1035--1087, November 2006. Google Scholar
Digital Library
- Stephen Gilmore, Dilsun Kirli, and Chris Walton. Dynamic ML without dynamic types. Technical Report ECS-LFCS-97-378, LFCS, University of Edinburgh, 1997.Google Scholar
- Tim Harris and Keir Fraser. Language support for lightweight transactions. In OOPSLA, 2003. Google Scholar
Digital Library
- M. Herlihy and J. E. B. Moss. Transactional memory: Architectural support for lock-free data structures. In ISCA, 1993. Google Scholar
Digital Library
- Michael Hicks, Jeffrey S. Foster, and Polyvios Pratikakis. Lock Inference for Atomic Sections. In TRANSACT, 2006.Google Scholar
- Atsushi Igarashi and Naoki Kobayashi. Resource Usage Analysis. In POPL, Portland, Oregon, 2002. Google Scholar
Digital Library
- John Kodumal and Alexander Aiken. Banshee: A scalable constraint-based analysis toolkit. In SAS, 2005. Google Scholar
Digital Library
- Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. CACM, 21(7):558--565, 1978. Google Scholar
Digital Library
- Insup Lee. DYMOS: A Dynamic Modification System. PhD thesis, Dept. of Computer Science, University of Wisconsin, Madison, April 1983. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Jeremy Manson, William Pugh, and Sarita V. Adve. The Java Memory Model. In POPL, 2005. Google Scholar
Digital Library
- John C. Mitchell. Type inference with simple subtypes. JFP, 1(3):245--285, July 1991.Google Scholar
Cross Ref
- Mayur Naik and Alex Aiken. Conditional must not aliasing for static race detection. In POPL, 2007. Google Scholar
Digital Library
- Mayur Naik, Alex Aiken, and John Whaley. Effective static race detection for java. In PLDI, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Iulian Neamtiu, Michael Hicks, Gareth Stoyle, and Manuel Oriol. Practical dynamic software updating for C. In PLDI, 2006. Google Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- Yang Ni, Vijay S. Menon, Ali-Reza Adl-Tabatabai, et al. Open nesting in software transactional memory. In PPoPP, 2007. Google Scholar
Digital Library
- Flemming Nielson, Hanne R. Nielson, and Chris Hankin. Principles of Program Analysis. Springer-Verlag, 1999. ISBN 3540654100. Google Scholar
Digital Library
- Polyvios Pratikakis, Jeffrey S. Foster, and Michael Hicks. Context-sensitive correlation analysis for detecting races. In PLDI, 2006. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Fred Smith, David Walker, and Greg Morrisett. Alias types. In ESOP, 2000. Google Scholar
Digital Library
- Craig AN. Soules, Jonathan Appavoo, Kevin Hui, et al. System support for online reconfiguration. In USENIX, 2003.Google Scholar
- 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 Scholar
Digital Library
- Christoph von Praun and Thomas R. Gross. Static conflict analysis for multi-threaded object-oriented programs. In PLDI '03, 2003. Google Scholar
Digital Library
- David Walker, Karl Crary, and Greg Morrisett. Typed memory management in a calculus of capabilities. TOPLAS, 24(4):701--771, July 2000. Google Scholar
Digital Library
Index Terms
Contextual effects for version-consistent dynamic software updating and safe concurrent programming
Recommendations
Contextual effects for version-consistent dynamic software updating and safe concurrent programming
POPL '08: Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesThis 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 ...
Algebraic foundations for effect-dependent optimisations
POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe present a general theory of Gifford-style type and effect annotations, where effect annotations are sets of effects. Generality is achieved by recourse to the theory of algebraic effects, a development of Moggi's monadic theory of computational ...
Contextual effects in the visual cortex area 1 (v1) and camouflage perception
PerMIn'12: Proceedings of the First Indo-Japan conference on Perception and Machine IntelligenceThe cells in the visual cortex area 1 (V1) and area 2 (V2) show context dependent modulation in their responses. Suppressive as well as modulatory effects from stimuli well outside the classical receptive field are observed. This is attributed to the ...







Comments