ACM Home Page
Please provide us with feedback. Feedback
Interruptible iterators
Full text PdfPdf (186 KB)
Source Annual Symposium on Principles of Programming Languages archive
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages table of contents
Charleston, South Carolina, USA
Pages: 283 - 294  
Year of Publication: 2006
ISBN:1-59593-027-2
Also published in ...
Authors
Jed Liu  Cornell University
Aaron Kimball  Cornell University
Andrew C. Myers  Cornell University
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 5,   Downloads (12 Months): 43,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1111037.1111063
What is a DOI?

ABSTRACT

This paper introduces interruptible iterators, a language feature that makes expressive iteration abstractions much easier to implement. Iteration abstractions are valuable for software design, as shown by their frequent use in well-designed data structure libraries such as the Java Collections Framework. While Java iterators support iteration abstraction well from the standpoint of client code, they are awkward to implement correctly and efficiently, especially if the iterator needs to support imperative update of the underlying collection, such as removing the current element. Some languages, such as CLU and C# 2.0, support iteration through a limited coroutine mechanism, but these mechanisms do not support imperative updates. Interruptible iterators are more powerful coroutines in which the loop body is able to interrupt the iterator with requests to perform updates. Interrupts are similar to exceptions, but propagate differently and have resumption semantics. Interruptible iterators have been implemented as part of the JMatch programming language, an extended version of Java. A JMatch reimplementation of the Java Collections Framework shows that implementations can be made substantially shorter and simpler; performance results show that this language mechanism can also be implemented efficiently.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
Chad Fowler Dave Thomas and Andy Hunt. Programming Ruby: The Pragmatic Programmers' Guide. The Pragmatic Programmers, 2nd edition, 2004. ISBN 0-974-51405-5.
2
 
3
4
 
5
 
6
Steven Gregory. Parallel Programming in PARLOG. Addison-Wesley, 1987.
 
7
 
8
Anders Hejlsberg, Scott Wiltamuth, and Peter Golde. The C# Programming Language. Addison-Wesley, 1st edition, October 2003. ISBN 0321154916.
9
 
10
 
11
 
12
Butler Lampson. A description of the Cedar language: A Cedar language reference manual. Technical Report CSL-83-15, Xerox PARC, December 1983.
13
 
14
Jed Liu and Andrew C. Myers. JMatch: Java plus pattern matching. Technical Report TR2002-1878, Computer Science Department, Cornell University, October 2002. Software release at http://www.cs.cornell.edu/projects/jmatch.
 
15
16
17
 
18
 
19
 
20
Andrew C. Myers, Barbara Liskov, and Nicholas Mathewson. PolyJ: Parameterized types for Java. Software release, at http://www.cs.cornell.edu/polyj, July 1998.
 
21
22
 
23
 
24
Nathaniel Nystrom, Michael Clarkson, and Andrew C. Myers. Polyglot: An extensible compiler framework for Java. In Görel Hedin, editor, Compiler Construction, 12th International Conference, CC 2003, number 2622 in Lecture Notes in Computer Science, pages 138--152, Warsaw, Poland, April 2003. Springer-Verlag.
 
25
The SML/NJ Fellowship. Standard ML of New Jersey. http://www.smlnj.org/.
 
26
 
27
Sun Microsystems. JDK 5 Java Language Documentation, 2004. http://java.sun.com/j2se/1.5.0/docs/guide/language.
28
 
29
Guido van Rossum. The Python Language Reference Manual. Network Theory, Ltd., September 2003.
 
30
31

Collaborative Colleagues:
Jed Liu: colleagues
Aaron Kimball: colleagues
Andrew C. Myers: colleagues