The Community for Technology Leaders
RSS Icon
Subscribe
Issue No.08 - August (1994 vol.20)
pp: 631-643
ABSTRACT
<p>How should iterators be abstracted and encapsulated in modern imperative languages? We consider the combined impact of several factors on this question: the need for a common interface model for user defined iterator abstractions, the importance of formal methods in specifying such a model, and problems involved in modular correctness proofs of iterator implementations and clients. A series of iterator designs illustrates the advantages of the swapping paradigm over the traditional copying paradigm. Specifically, swapping based designs admit more efficient implementations while offering relatively straightforward formal specifications and the potential for modular reasoning about program behavior. The final proposed design schema is a common interface model for an iterator for any generic collection.</p>
INDEX TERMS
formal specification; program verification; data encapsulation; iterators; swapping paradigm; imperative languages; common interface model; user defined iterator abstractions; formal methods; modular correctness proofs; iterator designs; formal specification; modular reasoning; program verification; proof of correctness; swapping
CITATION
B.W. Weide, S.H. Edwards, D.E. Harms, D.A. Lamb, "Design and Specification of Iterators Using the Swapping Paradigm", IEEE Transactions on Software Engineering, vol.20, no. 8, pp. 631-643, August 1994, doi:10.1109/32.310672
20 ms
(Ver 2.0)

Marketing Automation Platform Marketing Automation Tool