Hostname: page-component-7479d7b7d-c9gpj Total loading time: 0 Render date: 2024-07-10T23:53:16.289Z Has data issue: false hasContentIssue false

A step-indexed Kripke model of hidden state

Published online by Cambridge University Press:  31 August 2012

JAN SCHWINGHAMMER
Affiliation:
Saarland University, Saarbrücken, Germany
LARS BIRKEDAL
Affiliation:
IT University of Copenhagen, Copenhagen, Denmark
FRANÇOIS POTTIER
Affiliation:
INRIA Paris – Rocquencourt, Le Chesnay, France
BERNHARD REUS
Affiliation:
University of Sussex, Brighton, United Kingdom
KRISTIAN STØVRING
Affiliation:
University of Copenhagen, Copenhagen, Denmark
HONGSEOK YANG
Affiliation:
University of Oxford, Oxford, United Kingdom

Abstract

Frame and anti-frame rules have been proposed as proof rules for modular reasoning about programs. Frame rules allow the hiding of irrelevant parts of the state during verification, whereas the anti-frame rule allows the hiding of local state from the context.

We discuss the semantic foundations of frame and anti-frame rules, and present the first sound model for Charguéraud and Pottier's type and capability system including both of these rules. The model is a possible worlds model based on the operational semantics and step-indexed heap relations, and the worlds are given by a recursively defined metric space. We also extend the model to account for Pottier's generalised frame and anti-frame rules, where invariants are generalised to families of invariants indexed over preorders. This generalisation enables reasoning about some well-bracketed as well as (locally) monotone uses of local state.

Type
Paper
Copyright
Copyright © Cambridge University Press 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Ahmed, A., Dreyer, D. and Rossberg, A. (2009) State-dependent representation independence. In: Proceedings of POPL 340–353.CrossRefGoogle Scholar
America, P. and Rutten, J. J. M. M. (1989) Solving reflexive domain equations in a category of complete metric spaces. Journal of Computer and System Sciences 39 (3)343375.CrossRefGoogle Scholar
Appel, A. W. and McAllester, D. A. (2001) An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems 23 (5)657683.CrossRefGoogle Scholar
Benton, N., Birkedal, L., Kennedy, A. and Varming, C. (2010) Formalizing domains, ultrametric spaces and semantics of programming languages (draft).Google Scholar
Biering, B., Birkedal, L. and Torp-Smith, N. (2007) BI-hyperdoctrines, higher-order separation logic, and abstraction. ACM Transactions on Programming Languages and Systems 29 (5).CrossRefGoogle Scholar
Birkedal, L., Reus, B., Schwinghammer, J. and Yang, H. (2008) A simple model of separation logic for higher-order store. In: Proceedings of ICALP 348–360.CrossRefGoogle Scholar
Birkedal, L., Reus, B., Schwinghammer, J., Støvring, K., Thamsborg, J. and Yang, H. (2011) Step-indexed Kripke models over recursive worlds. In: Proceedings of POPL 119–132.CrossRefGoogle Scholar
Birkedal, L., Støvring, K. and Thamsborg, J. (2009) Realizability semantics of parametric polymorphism, general references, and recursive types. In: Proceedings of FOSSACS 456–470.CrossRefGoogle Scholar
Birkedal, L., Støvring, K. and Thamsborg, J. (2010) The category-theoretic solution of recursive metric-space equations. Theoretical Computer Science 411 (47)41024122.CrossRefGoogle Scholar
Birkedal, L., Torp-Smith, N. and Yang, H. (2006) Semantics of separation-logic typing and higher-order frame rules for Algol-like languages. Logical Methods in Computer Science 2 (5:1).Google Scholar
Charguéraud, A. and Pottier, F. (2008) Functional translation of a calculus of capabilities. In: Proceedings of ICFP 213–224.CrossRefGoogle Scholar
Dreyer, D., Neis, G. and Birkedal, L. (2010) The impact of higher-order state and control effects on local relational reasoning. In: Proceedings of ICFP.CrossRefGoogle Scholar
Gotsman, A., Berdine, J., Cook, B., Rinetzky, N. and Sagiv, M. (2007) Local reasoning for storable locks and threads. Technical Report MSR-TR-2007-39, Microsoft Research.Google Scholar
Hobor, A., Appel, A. W. and Zappa Nardelli, F. (2008) Oracle semantics for concurrent separation logic. In: Proceedings of ESOP. Springer-Verlag Lecture Notes in Computer Science 4960 353367.CrossRefGoogle Scholar
Levy, P. B. (2002) Possible world semantics for general storage in call-by-value. In: Proceedings of CSL 232–246.CrossRefGoogle Scholar
Nanevski, A., Ahmed, A., Morrisett, G. and Birkedal, L. (2007) Abstract predicates and mutable ADTs in Hoare type theory. In: Proceedings of ESOP 189–204.CrossRefGoogle Scholar
O'Hearn, P. W. (2007) Resources, concurrency and local reasoning. Theoretical Computer Science 375 (1-3)271307.CrossRefGoogle Scholar
O'Hearn, P. W., Yang, H. and Reynolds, J. C. (2004) Separation and information hiding. In: Proceedings of POPL 268–280.Google Scholar
Parkinson, M. and Bierman, G. (2005) Separation logic and abstraction. In: Proceedings of POPL 247–258.CrossRefGoogle Scholar
Parkinson, M. and Bierman, G. (2008) Separation logic, abstraction and inheritance. In: Proceedings of POPL 75–86.CrossRefGoogle Scholar
Pierce, B. C. (2002) Types and Programming Languages, MIT Press.Google Scholar
Pilkiewicz, A. and Pottier, F. (2011) The essence of monotonic state. In: Proceedings of TLDI 73–86.CrossRefGoogle Scholar
Pitts, A. M. (1996) Relational properties of domains. Information and Computation 127 (2)6690.CrossRefGoogle Scholar
Pottier, F. (2008) Hiding local state in direct style: a higher-order anti-frame rule. In: Proceedings of LICS 331–340.CrossRefGoogle Scholar
Pottier, F. (2009a) Generalizing the higher-order frame and anti-frame rules. Unpublished note, available at http://gallium.inria.fr/~fpottier.Google Scholar
Pottier, F. (2009b) Three comments on the anti-frame rule. Unpublished note, available at http://gallium.inria.fr/~fpottier.Google Scholar
Pottier, F. (2011) Syntactic soundness proof of a type-and-capability system with hidden state (submitted for publication).CrossRefGoogle Scholar
Pym, D. J., O'Hearn, P. W. and Yang, H. (2004) Possible worlds and resources: the semantics of BI. Theoretical Computer Science 315 (1)257305.CrossRefGoogle Scholar
Reynolds, J. C. (2002) Separation logic: A logic for shared mutable data structures. In: Proceedings of LICS 55–74.CrossRefGoogle Scholar
Schwinghammer, J., Birkedal, L., Reus, B. and Yang, H. (2009) Nested Hoare triples and frame rules for higher-order store. In: Proceedings of CSL 440–454.CrossRefGoogle Scholar
Schwinghammer, J., Birkedal, L. and Støvring, K. (2011) A step-indexed Kripke model of hidden state via recursive properties on recursively defined metric spaces. In: Proceedings of FOSSACS 305–319.CrossRefGoogle Scholar
Schwinghammer, J., Yang, H., Birkedal, L., Pottier, F. and Reus, B. (2010) A semantic foundation for hidden state. In: Proceedings of FOSSACS 2–16.CrossRefGoogle Scholar
Smith, F., Walker, D. and Morrisett, G. (2000) Alias types. In: Proceedings of ESOP. Springer-Verlag Lecture Notes in Computer Science 1782 366381.CrossRefGoogle Scholar
Smyth, M. B. (1992) Topology. In: Handbook of Logic in Computer Science, volume 1, Oxford University Press.Google Scholar
Wright, A. K. (1995) Simple imperative polymorphism. Lisp and Symbolic Computation 8 (4)343356.CrossRefGoogle Scholar