ABSTRACT
Java iterators are notoriously hard to specify. This paper applies a general typestate specification technique that supports several forms of aliasing to the iterator problem. The presented specification conservatively captures iterator protocols and consistency rules. Two limitations of the specification are discussed.
- M. Barnett, R. DeLine, M. Fähndrich, K. R. M. Leino, and W. Schulte. Verification of object-oriented programs with invariants. Journal of Object Technology, 3(6):27--56, June 2004.Google Scholar
Cross Ref
- K. Bierhoff and J. Aldrich. Lightweight object specification with typestates. In ACM Symposium on the Foundations of Software Engineering, pages 217--226, Sept. 2005. Google Scholar
Digital Library
- J. Boyland. Checking interference with fractional permissions. In R. Cousot, editor, Static Analysis: 10th International Symposium, volume 2694 of Lecture Notes in Computer Science, pages 55--72. Springer, 2003. Google Scholar
Digital Library
- R. DeLine and M. Fähndrich. Typestates for objects. In European Conference on Object-Oriented Programming. Springer, 2004.Google Scholar
Cross Ref
- J.-Y. Girard. Linear logic. Theoretical Computer Science, 50:1--102, 1987. Google Scholar
Digital Library
- G. T. Leavens, A. L. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. Technical Report 98-06-rev28, Iowa State University, Department of Computer Science, July 2005.Google Scholar
- R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Transactions on Software Engineering, 12:157--171, 1986. Google Scholar
Digital Library
Index Terms
- Iterator specification with typestates
Recommendations
Probabilistic, modular and scalable inference of typestate specifications
PLDI '11: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and ImplementationStatic analysis tools aim to find bugs in software that correspond to violations of specifications. Unfortunately, for large and complex software, these specifications are usually either unavailable or sophisticated, and hard to write.
This paper ...
Probabilistic, modular and scalable inference of typestate specifications
PLDI '11Static analysis tools aim to find bugs in software that correspond to violations of specifications. Unfortunately, for large and complex software, these specifications are usually either unavailable or sophisticated, and hard to write.
This paper ...
Specification, Refinement and Verification of Concurrent Systems—An Integration of Object-Z and CSP
This paper presents a method of formally specifying, refining and verifying concurrent systems which uses the object-oriented state-based specification language Object-Z together with the process algebra CSP. Object-Z provides a convenient way of ...




Comments