Validity invariants and effects

作者: John Potter , Jingling Xue , Yi Lu

DOI: 10.5555/2394758.2394775

关键词: Object modelValidity checkingCorrectnessEncapsulation (computer programming)MethodProof obligationComputer scienceInvariant (mathematics)Theoretical computer science

摘要: Object invariants describe the consistency of object states, and are crucial for reasoning about correctness object-oriented programs. However, in presence abstraction encapsulation, arbitrary aliasing re-entrant method calls, is difficult.We present a framework based on behavioural contract that specifies two sets: validity invariant-- objects must be valid before after behaviour; effect--objects may invalidated during behaviour. The overlap these sets critical because it captures precisely those need to re-validated at end When there no overlap, further checking required.We also type system this using ownership types confine dependencies invariants. In order track invariant, restricts updates permissible contexts, even calls. referencing read access unrestricted, unlike earlier systems.

参考文章(35)
Greg Morrisett, Alex Aiken, Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages symposium on principles of programming languages. ,(2003)
Bjorn Freeman-Benson, Craig Chambers, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications conference on object oriented programming systems languages and applications. ,(1998)
Paulo Sérgio Almeida, Balloon types : Controlling sharing of state in data types european conference on object-oriented programming. pp. 32- 59 ,(1997) , 10.1007/BFB0053373
Mike Barnett, David A. Naumann, Friends Need a Bit More: Maintaining Invariants Over Shared State mathematics of program construction. pp. 54- 84 ,(2004) , 10.1007/978-3-540-27764-4_5
Jonathan Aldrich, Craig Chambers, Ownership Domains: Separating Aliasing Policy from Mechanism european conference on object-oriented programming. pp. 1- 25 ,(2004) , 10.1007/978-3-540-24851-4_1
David G Clarke, James Noble, John M Potter, None, Simple Ownership Types for Object Containment ECOOP 2001 — Object-Oriented Programming. pp. 53- 76 ,(2001) , 10.1007/3-540-45337-7_4
Bertrand Meyer, Eiffel: The Language ,(1991)
K. Rustan M. Leino, Peter Müller, Object Invariants in Dynamic Contexts european conference on object-oriented programming. ,vol. 3086, pp. 491- 515 ,(2004) , 10.1007/978-3-540-24851-4_22
Bertrand Meyer, Object-Oriented Software Construction, 2nd Edition Prentice-Hall. ,(1997)
Yi Lu, John Potter, On Ownership and Accessibility ECOOP 2006 – Object-Oriented Programming. pp. 99- 123 ,(2006) , 10.1007/11785477_6