Abstract
We propose an approach for the modular specification and verification of total correctness properties of object-oriented programs. The core of our approach is a specification style that prescribes a way to assign a level expression to each method such that each callee’s level is below the caller’s, even in the presence of dynamic binding. The specification style yields specifications that properly hide implementation details. The main idea is to use multisets of method names as levels, and to associate with each object levels that abstractly reflect the way the object is built from other objects. A method’s level is then defined in terms of the method’s own name and the levels associated with the objects passed as arguments.
We first present the specification style in the context of programs that do not modify object fields. We then combine it with separation logic and abstract predicate families to obtain an approach for programs with heap mutation. In a third step, we address concurrency, by incorporating an existing approach for verifying deadlock freedom of channels and locks. Our main contribution here is to achieve information hiding by using the proposed termination levels for lock ordering as well. Also, we introduce call permissions to enable elegant verification of termination of programs where threads cause work in other threads, such as in thread pools or fine-grained concurrent algorithms involving compare-and-swap loops.
We explain how our approach can be used also to verify the liveness of nonterminating programs.
- Robert Atkey. 2011. Amortised resource analysis with separation logic. Logical Methods in Computer Science 7, 2 (2011), 1--33.Google Scholar
Cross Ref
- Richard Bornat, Cristiano Calcagno, Peter W. O’Hearn, and Matthew J. Parkinson. 2005. Permission accounting in separation logic. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. http://dblp.uni-trier.de/. Google Scholar
Digital Library
- Pontus Boström and Peter Müller. 2015. Modular verification of finite blocking in non-terminating programs. In 29th European Conference on Object-Oriented Programming.Google Scholar
- John Boyland. 2003. Checking interference with fractional permissions. In 10th International Symposium on Static Analysis. Google Scholar
Digital Library
- Arthur Charguéraud. 2011. Characteristic formulae for the verification of imperative programs. In Proceeding of the 16th ACM SIGPLAN International Conference on Functional Programming. Google Scholar
Digital Library
- Arthur Charguéraud and Fran cois Pottier. 2011. Machine-checked verification of the correctness and amortized complexity of an efficient union-find implementation. In Second International Conference on Interactive Theorem Proving .Google Scholar
- Pedro da Rocha Pinto, Thomas Dinsdale-Young, Philippa Gardner, and Julian Sutherland. 2016. Modular termination verification for non-blocking concurrency. In 25th European Symposium on Programming (ESOP).Google Scholar
Cross Ref
- Ádám Darvas and Peter Müller. 2006. Reasoning about method calls in interface specifications. J. Object Technol. 5, 5 (2006), 59--85.Google Scholar
Cross Ref
- Nachum Dershowitz and Zohar Manna. 1979. Proving termination with multiset orderings. Commun. ACM 22, 8 (Aug. 1979), 465--476. Google Scholar
Digital Library
- Jan Hoffmann, Michael Marmar, and Zhong Shao. 2013. Quantitative reasoning for proving lock-freedom. In 28th Annual ACM/IEEE Symposium on Logic in Computer Science. Google Scholar
Digital Library
- Atsushi Igarashi, Benjamin C. Pierce, and Philip Wadler. 2001. Featherweight Java: A minimal core calculus for Java and GJ. ACM TOPLAS 23, 3 (May 2001), 396--450. Google Scholar
Digital Library
- Bart Jacobs. 2015. Provably live exception handling. In Proceedings of the 17th Workshop on Formal Techniques for Java-like Programs. Google Scholar
Digital Library
- Bart Jacobs. 2018. Modular Termination Verification: Machine-Checked Proofs. Zenodo. Record 1248801.Google Scholar
- Bart Jacobs (Ed.). 2018. VeriFast 18.02. Zenodo. Record 1182724.Google Scholar
- Bart Jacobs, Dragan Bosnacki, and Ruurd Kuiper. 2015a. Modular termination verification. In 23rd European Conference on Object-Oriented Programming (ECOOP'09).Google Scholar
- Bart Jacobs, Dragan Bosnacki, and Ruurd Kuiper. 2015b. Modular Termination Verification: Extended Version. Technical Report CW 680. Dept. Comp. Sci., KU Leuven.Google Scholar
- Bart Jacobs and Frank Piessens. 2009. Failboxes: Provably safe exception handling. In 23rd European Conference on Object-Oriented Programming (ECOOP'09). Google Scholar
Digital Library
- Daan Leijen. 2014. Koka: Programming with row polymorphic effect types. In Proceedings 5th Workshop on Mathematically Structured Functional Programming.Google Scholar
Cross Ref
- K. Rustan M. Leino. 2010. Dafny: An automatic program verifier for functional correctness. In 17th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning. Google Scholar
Digital Library
- K. Rustan M. Leino Leino, and Middelkoop. 2009. Proving consistency of pure methods and model fields. In 12th International Conference on Fundamental Approaches to Software Engineering. Google Scholar
Digital Library
- K. Rustan M. Leino, Peter Müller, and Jan Smans. 2010. Deadlock-free channels and locks. In 19th European Symposium on Programming (ESPO). Google Scholar
Digital Library
- Keiko Nakata and Tarmo Uustalu. 2009. Trace-based coinductive operational semantics for while. In 22nd International Conference on Theorem Proving in Higher Order Logics. Google Scholar
Digital Library
- Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local reasoning about programs that alter data structures. In 15th International Workshop Computer Science Logic. Google Scholar
Digital Library
- Matthew J. Parkinson and Gavin M. Bierman. 2005. Separation logic and abstraction. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. Google Scholar
Digital Library
- Willem Penninckx, Bart Jacobs, and Frank Piessens. 2015. Sound, modular and compositional verification of the input/output behavior of programs. In 24th European Symposium on Programming (ESPO).Google Scholar
Cross Ref
- John C. Reynolds. 2002. Separation logic: A logic for shared mutable data structures. In 17th IEEE Symposium on Logic in Computer Science. Google Scholar
Digital Library
- Arsenii Rudich, Ádám Darvas, and Peter Müller. 2008. Checking well-formedness of pure-method specifications. In 15th International Symposium on Formal Methods (FM'08). Google Scholar
Digital Library
- Viktor Vafeiadis. 2011. Concurrent separation logic and operational semantics. In Twenty-seventh Conference on the Mathematical Foundations of Programming Semantics.Google Scholar
Digital Library
- Frédéric Vogels, Bart Jacobs, and Frank Piessens. 2015. Featherweight VeriFast. Logical Methods in Computer Science 11, 3 (2015), 1--57.Google Scholar
Index Terms
Modular Termination Verification of Single-Threaded and Multithreaded Programs
Recommendations
Modular verification of multithreaded programs
Multithreaded software systems are prone to errors due to the difficulty of reasoning about multiple interleaved threads operating on shared data. Static checkers that analyze a program's behavior over all execution paths and all thread interleavings ...
Specifying multithreaded Java semantics for program verification
ICSE '02: Proceedings of the 24th International Conference on Software EngineeringThe Java programming language supports multithreading where the threads interact among themselves via read/write of shared data. Most current work on multithreaded Java program verification assumes a model of execution that is based on interleaving of ...
Specifying I/O using abstract nested hoare triples in separation logic
FTfJP '19: Proceedings of the 21st Workshop on Formal Techniques for Java-like ProgramsWe propose a separation logic-based approach for modular specification and verification of the I/O behavior of a program. The approach uses higher-order separation logic predicates to express abstract nested Hoare triples that abstractly associate a ...






Comments