Advertisement

Theory and Generality of Complete Traversals

  • David R. Musser
  • Arturo J. Sánchez-Ruíz
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1766)

Abstract

Standard iteration mechanisms, even ones of such generality as those in the C++ Standard Template Library (STL), do not allow insertions to be made in a container during a traversal of the container. Since ad hoc ways of handling such iterations are tedious to program and error-prone, programmers should ideally have at their command an efficient generic solution. In earlier work we formally characterized the complete traversal problem and presented generic solutions by means of two generic algorithms and a container adaptor, all defined within the STL framework. Here we develop additional theory for reasoning about complete traversals and address the question of how general the complete traversal problem is by showing that it subsumes well-known graph (or relation) problems such as reachability and transitive closure.

Keywords

Generic Programming Standard Template Library (STL) Iterators Containers Adaptors Iteration Mechanisms Closures 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    A. V. Aho, R. Sethi, and J. D. Ullman. Compilers—Principles, Techniques, and Tools. Addison-Wesley, 1986.Google Scholar
  2. 2.
    A. V. Aho and J. D. Ullman. The Theory of Parsing, Translation, and Compiling. Volume I: Parsing. Prentice-Hall, 1972.Google Scholar
  3. 3.
    M. H. Austern. Generic Programming and the STL-Using and Extending the C++ Standard Template Library. Addison-Wesley, 1999.Google Scholar
  4. 4.
    D. Bailey. Java Structures—Data Structures in Java for the Principled Programmer. WCB/McGraw-Hill, 1999.Google Scholar
  5. 5.
    A. Frick, W. Zimmer, and W. Zimmermann. Karla: An Extensible Library of Data Structures and Algorithms. Part I: Design Rationale. Karlsruhe University, Faculty of Computer Science, August 1994.Google Scholar
  6. 6.
    A. Frick and W. Zimmermann. Karla: An Extensible Library of Data Structures and Algorithms. Part II: Usage for Beginners. Karlsruhe University, Faculty of Computer Science, January 1995.Google Scholar
  7. 7.
    E. Gamess, D. R. Musser, and A. J. Sánchez-Ruíz. Complete traversals and their implementation using the standard template library. In Raúl Monge Anwandter, editor, Proceedings of the XXIII Latinamerican Conference on Informatics, volume I, pages 221–230, Valaparaíso, Chile, November 1997. CLEI.Google Scholar
  8. 8.
    G. Goos. Sather-K, the language. Technical report, Karlsruhe University, April 1996.Google Scholar
  9. 9.
    G. Huet and D. Oppen. Equations and rewrite rules: a survey. In R. Book, editor, Formal Languages: Perspectives and Open Problems. Academic Press, New York, 1980.Google Scholar
  10. 10.
    Y. Ioannidis, R. Ramakrishnan, and L. Winger. Transitive closure algorithms based on graph traversal. ACM Transactions on Database Systems, 18(3):512–576, Sept. 1993.CrossRefGoogle Scholar
  11. 11.
    H. R. Lewis and Ch. H. Papadimitriou. Elements of the Theory of Computation. Prentice-Hall, second edition, 1998.Google Scholar
  12. 12.
    S. Murer, S. Omohundro, D. Stoutamire, and C. Szyperski. Iteration abstraction in sather. ACM TOPLAS, 18(1):1–15, Jan. 1996. Available from http://www.icsi.berkeley.edu/~sather/.CrossRefGoogle Scholar
  13. 13.
    D. R. Musser and A. Saini. STL Tutorial and Reference Guide. Addison-Wesley, 1996.Google Scholar
  14. 14.
    David R. Musser. Automated theorem proving for analysis and synthesis of computations. In G. Birtwistle and P. Subrahmanyam, editors, Current Trends in Hardware Verification and Automated Theorem Proving. Springer-Verlag, New York, 1989.Google Scholar
  15. 15.
    ObjectSpace. Objectspace—JGL, the Generic Collection Library for Java. http://www.objectspace.com/jgl, 1997.
  16. 16.
    A. A. Stepanov and M. Lee. The standard template library. Technical Report HP-94-93, Hewlett-Packard, 1995.Google Scholar
  17. 17.
    Sun Microsystems. Java 2 Platform API Specification. http://java.sun.com/products/jdk/1.2/docs/api/index.html, 1999.

Copyright information

© Springer-Verlag Berlin Heidelberg 2000

Authors and Affiliations

  • David R. Musser
    • 1
  • Arturo J. Sánchez-Ruíz
    • 2
  1. 1.Computer Science DepartmentRensselaer Polytechnic InstituteTroyUSA
  2. 2.Centro ISYS, Escuela de Computación, Facultad de CienciasUniversidad Central de VenezuelaCaracasVenezuela

Personalised recommendations