Abstract
In object-oriented programming, reentrant method invocations and shared references make it difficult to achieve adequate encapsulation for sound modular reasoning. This tutorial paper surveys recent progress using auxiliary state (ghost fields) to describe and achieve encapsulation. Encapsulation is assessed in terms of modular reasoning about invariants and simulations.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aldrich, J., Chambers, C.: Ownership domains: Separating aliasing policy from mechanism. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)
Banerjee, A., Naumann, D.A.: Ownership confinement ensures representation independence for object-oriented programs. Journal of the ACM (2002) (Accepted, revision pending. Extended version of [3])
Banerjee, A., Naumann, D.A.: Representation independence, confinement and access control. In: ACM Symp. on Princ. of Program. Lang (POPL), pp. 166–177 (2002)
Banerjee, A., Naumann, D.A.: State based ownership, reentrance, and encapsulation. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 387–411. Springer, Heidelberg (2005) (to appear)
Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology 3(6), 27–56 (2004) (Special issue: ECOOP 2003 workshop on Formal Techniques for Java-like Programs)
Barnett, M., Leino, K.R.M., Schulte, W.: The spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)
Barnett, M., Naumann, D.A.: Friends need a bit more: Maintaining invariants over shared state. In: Kozen, D. (ed.) Mathematics of Program Construction, pp. 54–84 (2004)
Bierman, G., Parkinson, M.: Separation logic and abstraction. In: ACM Symp. on Princ. of Program. Lang (POPL), pp. 247–258 (2005)
Birkedal, L., Torp-Smith, N.: Higher order separation logic and abstraction (Febraury 2005) (submitted)
Borba, P., Sampaio, A., Cavalcanti, A., Cornélio, M.: Algebraic reasoning for object-oriented programming. Sci. Comput. Programming 52(1-3), 53–100 (2004)
Borba, P.H.M., Sampaio, A.C.A., Cornélio, M.L.: A refinement algebra for object-oriented programming. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 457–482. Springer, Heidelberg (2003)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: OOPSLA (2002)
Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: ACM Symp. on Princ. of Program. Lang (POPL), pp. 213–223 (2003)
Calcagno, C., O’Hearn, P., Bornat, R.: Program logic and equivalence in the presence of garbage collection. Theoretical Comput. Sci. 298(3), 557–581 (2003)
Cavalcanti, A.L.C., Naumann, D.A.: Forward simulation for data refinement of classes. In: Eriksson, L.-H., Lindsay, P.A. (eds.) FME 2002. LNCS, vol. 2391, pp. 471–490. Springer, Heidelberg (2002)
Clarke, D.: Object ownership and containment. Dissertation, Computer Science and Engineering, University of New South Wales, Australia (2001)
Clarke, D.G., Noble, J., Potter, J.M.: Simple ownership types for object containment. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 53. Springer, Heidelberg (2001)
de Boer, F., Pierik, C.: Computer-aided specification and verification of annotated object-oriented programs. In: Jacobs, B., Rensink, A. (eds.) Formal Methods for Open Object-Based Distributed Systems, pp. 163–177 (2002)
de Roever, W.-P., Engelhardt, K.: Data Refinement: Model-Oriented Proof Methods and their Comparison. Cambridge University Press, Cambridge (1998)
DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In: ACM Conf. on Program. Lang. Design and Implementation (PLDI), pp. 59–69 (2001)
Detlefs, D.L., Leino, K.R.M., Nelson, G.: Wrestling with rep exposure. Research 156, DEC Systems Research Center (1998)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
Hoare, C.A.R.: Proofs of correctness of data representations. Acta Inf 1, 271–281 (1972)
Jacobs, B., Kiniry, J., Warnier, M.: Java program verification challenges. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 202–219. Springer, Heidelberg (2003)
Jacobs, B., Leino, K.R.M., Schulte, W.: Multithreaded object-oriented programs with invariants. In: SAVCBS (2004)
Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the design of JML accommodates both runtime assertion checking and formal verification. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 262–284. Springer, Heidelberg (2003)
Leino, K.R.M., Müller, P.: Object invariants in dynamic contexts. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 491–516. Springer, Heidelberg (2004)
Leino, K.R.M., Müller, P.: Modular verification of static class invariants. In: Formal Methods (2005)
Liskov, B., Guttag, J.: Abstraction and Specification in Program Development. MIT Press, Cambridge (1986)
Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Prog. Lang. Syst. 16(6) (1994)
Lynch, N., Vaandrager, F.: Forward and backward simulations part I: Untimed systems. Information and Computation 121(2) (1995)
Meyer, B.: Object-oriented Software Construction, 2nd edn. Prentice Hall, New York (1997)
Milner, R.: An algebraic definition of simulation between programs. In: Proceedings of Second Intl. Joint Conf. on Artificial Intelligence, pp. 481–489 (1971)
Mitchell, J.C.: Representation independence and data abstraction. In: ACM Symp. on Princ. of Program. Lang (POPL), pp. 263–276 (1986)
Müller, P.: Modular Specification and Verification of Object-Oriented Programs. LNCS, vol. 2262. Springer, Heidelberg (2002)
Müller, P., Poetzsch-Heffter, A., Leavens, G.T.: Modular invariants for layered object structures. Technical Report 424, Department of Computer Science, ETH Zurich (2004)
Naumann, D.A.: Ideal models for pointwise relational and state-free imperative programming. In: Sondergaard, H. (ed.) ACM International Conference on Principles and Practice of Declarative Programming, pp. 4–15 (2001)
Naumann, D.A.: Patterns and lax lambda laws for relational and imperative programming. Technical Report 2001-2, Computer Science, Stevens Institute of Technology (2001)
Naumann, D.A.: Soundness of data refinement for a higher order imperative language. Theoretical Comput. Sci. 278(1-2), 271–301 (2002)
Naumann, D.A., Barnett, M.: Towards imperative modules: Reasoning about invariants and sharing of mutable state (extended abstract). In: IEEE Symp. on Logic in Computer Science (LICS), pp. 313–323 (2004)
O’Hearn, P., Yang, H., Reynolds, J.: Separation and information hiding. In: ACM Symp. on Princ. of Program. Lang (POPL), pp. 268–280 (2004)
O’Hearn, P.W., Tennent, R.D.: Parametricity and local variables. Journal of the ACM 42(3), 658–709 (1995)
Pierik, C., Clarke, D., de Boer, F.S.: Controlling object allocation using creation guards. In: Formal Methods 2005 (2005)
Pierik, C., de Boer, F.: On behavioral subtyping and completeness. In: ECOOP Workshop on Formal Techniques for Java-like Programs (2005) (to appear)
Pierik, C., de Boer, F.S.: A proof outline logic for object-oriented programming. Theoretical Comput. Sci. (2005) (to appear)
Pitts, A.M.: Reasoning about local variables with operationally-based logical relations. In: O’Hearn, P.W., Tennent, R.D. (eds.) Algol-Like Languages, vol. 2, ch. 17, pp. 173–193. Birkhauser, Basel (1997); Reprinted from Proceedings Eleventh Annual IEEE Symposium on Logic in Computer Science, Brunswick, NJ (July 1996), pp. 152–163 (1996)
Pitts, A.M.: Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science 10, 321–359 (2000)
Plotkin, G.: Lambda definability and logical relations. Technical Report SAI-RM-4, University of Edinburgh, School of Artificial Intelligence (1973)
Rehof, Mogensen: Tractable constraints in finite semilattices. Sci. Comput. Programming (1996)
Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: LICS, pp. 55–74 (2002)
Skalka, C., Smith, S.: Static use-based object confinement. Springer International Journal of Information Security 4(1-2) (2005)
Szyperski, C., Gruntz, D., Murer, S.: Component Software: Beyond Object-Oriented Programming, 2nd edn. ACM Press and Addison-Wesley, New York (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Naumann, D.A. (2005). Assertion-Based Encapsulation, Object Invariants and Simulations. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, WP. (eds) Formal Methods for Components and Objects. FMCO 2004. Lecture Notes in Computer Science, vol 3657. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561163_11
Download citation
DOI: https://doi.org/10.1007/11561163_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29131-2
Online ISBN: 978-3-540-31939-9
eBook Packages: Computer ScienceComputer Science (R0)