Abstract
A contextual effect system generalizes standard type and effect systems: where a standard effect system computes the effect of an expression e, a contextual effect system additionally computes the prior and future effect of e, which characterize the behavior of computation prior to and following, respectively, the evaluation of e. This paper describes the formalization and proof of soundness of contextual effects, which we mechanized using the Coq proof assistant. Contextual effect soundness is an unusual property because the prior and future effect of a term e depends not on e itself (or its evaluation), but rather on the evaluation of the context in which e appears. Therefore, to state and prove soundness we must “match up” a subterm in the original typing derivation with the possibly-many evaluations of that subterm during the evaluation of the program, in a way that is robust under substitution. We do this using a novel typed operational semantics. We conjecture that our approach could prove useful for reasoning about other properties of derivations that rely on the context in which that derivation appears.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: POPL (2008)
The Coq proof assistant., http://coq.inria.fr
Hicks, M., Foster, J.S., Pratikakis, P.: Lock Inference for Atomic Sections. In: TRANSACT (2006)
Igarashi, A., Kobayashi, N.: Resource Usage Analysis. In: POPL (2002)
Lucassen, J.M.: Types and Effects: Towards the Integration of Functional and Imperative Programming. PhD thesis, MIT Laboratory for Computer Science, MIT/LCS/TR-408 (August 1987)
Neamtiu, I., Hicks, M., Foster, J.S., Pratikakis, P.: 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)
Neamtiu, I., Hicks, M., Foster, J.S., Pratikakis, P.: Contextual effects for version-consistent dynamic software updating and safe concurrent programming. In: POPL (2008)
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)
Skalka, C., Smith, S., Horn, D.V.: Types and trace effects of higher order programs. Journal of Functional Programming (July 2007)
Smith, F., Walker, D., Morrisett, G.: Alias types. In: Smolka, G. (ed.) ESOP 2000 and ETAPS 2000. LNCS, vol. 1782. Springer, Heidelberg (2000)
Talpin, J.-P., Jouvelot, P.: The type and effect discipline. Inf. Comput. 111(2), 245–296 (1994)
Walker, D., Crary, K., Morrisett, G.: Typed memory management in a calculus of capabilities. In: TOPLAS, July 2000, vol. 24(4), pp. 701–771 (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pratikakis, P., Foster, J.S., Hicks, M., Neamtiu, I. (2008). Formalizing Soundness of Contextual Effects. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds) Theorem Proving in Higher Order Logics. TPHOLs 2008. Lecture Notes in Computer Science, vol 5170. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71067-7_22
Download citation
DOI: https://doi.org/10.1007/978-3-540-71067-7_22
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-71065-3
Online ISBN: 978-3-540-71067-7
eBook Packages: Computer ScienceComputer Science (R0)