Automated Verification of the Deutsch-Schorr-Waite Tree-Traversal Algorithm

  • Alexey Loginov
  • Thomas Reps
  • Mooly Sagiv
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4134)


This paper reports on the automated verification of the total correctness (partial correctness and termination) of the Deutsch-Schorr-Waite (DSW) algorithm. DSW is an algorithm for traversing a binary tree without the use of a stack by means of destructive pointer manipulation. Prior approaches to the verification of the algorithm involved applications of theorem provers or hand-written proofs. TVLA’s abstract-interpretation approach made possible the automatic symbolic exploration of all memory configurations that can arise. With the introduction of a few simple core and instrumentation relations, TVLA was able to establish the partial correctness and termination of DSW.


Directed Acyclic Graph Tree Node Integrity Constraint Input Tree Partial Correctness 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bornat, R.: Proofs of pointer programs in Jape. available at:
  2. 2.
    Bornat, R.: Proving pointer programs in Hoare logic. In: Mathematics of Program Construction, pp. 102–126 (July 2000)Google Scholar
  3. 3.
    Bornat, R., Sufrin, B.: Animating formal proofs at the surface: The Jape proof calculator. The Computer Journal 43, 177–192 (1999)CrossRefGoogle Scholar
  4. 4.
    Hendren, L.: Parallelizing Programs with Recursive Data Structures. PhD thesis, Dept. of Computer Science, Cornell University (January 1990)Google Scholar
  5. 5.
    Ishtiaq, S., O’Hearn, P.: Bi as an assertion language for mutable data structures. In: Symp. on Principles of Programming Languages, pp. 14–26 (January 2001)Google Scholar
  6. 6.
    Knuth, D.: The Art of Computer Programming. Fundamental Algorithms, vol. 1. Addison-Wesley, Reading (1973)Google Scholar
  7. 7.
    Lee, O., Yang, H., Yi, K.: Automatic verification of pointer programs using grammar-based shape analysis. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 124–140. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  8. 8.
    Lev-Ami, T., Immerman, N., Sagiv, M.: Fast and precise abstraction for shape analysis. In: Proc. Computer-Aided Verification (August 2006) (to appear)Google Scholar
  9. 9.
    Lev-Ami, T., Reps, T., Sagiv, M., Wilhelm, R.: Putting static analysis to work for verification: A case study. In: Int. Symp. on Software Testing and Analysis, pp. 26–38 (August 2000)Google Scholar
  10. 10.
    Lindstrom, G.: Scanning list structures without stacks or tag bits. Information Processing Letters 2(2), 47–51 (1973)CrossRefMathSciNetGoogle Scholar
  11. 11.
    Loginov, A., Reps, T., Sagiv, M.: Abstraction refinement via inductive learning. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 519–533. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  12. 12.
    Manevich, R., Sagiv, M., Ramalingam, G., Field, J.: Partially disjunctive heap abstraction. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 265–279. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Mehta, F., Nipkow, T.: Proving pointer programs in higher-order logic. In: Baader, F. (ed.) CADE 2003. LNCS, vol. 2741, pp. 121–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  14. 14.
    Morris, J.: Verification-oriented language design. Tech. Report TR-7, Computer Science Div., University of California–Berkeley (December 1972)Google Scholar
  15. 15.
    Reps, T., Sagiv, M., Loginov, A.: Finite differencing of logical formulas for static analysis. In: Degano, P. (ed.) ESOP 2003. LNCS, vol. 2618, pp. 380–398. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    Reynolds, J.: Separation Logic: A logic for shared mutable data structures. In: Symp. on Logic in Computer Science, pp. 55–74 (July 2002)Google Scholar
  17. 17.
    Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. on Programming Languages and Systems (TOPLAS) 24(3), 217–298 (2002)CrossRefGoogle Scholar
  18. 18.
    Schorr, H., Waite, W.: An efficient machine independent procedure for garbage collection in various list structures. Communications of the ACM 10(8), 501–506 (1967)CrossRefMATHGoogle Scholar
  19. 19.
    Suzuki, N.: Automatic Verification of Programs with Complex Data Structures. PhD thesis, Dept. of Computer Science, Stanford University (February 1976)Google Scholar
  20. 20.
    Topor, R.: The correctness of the Schorr-Waite list marking algorithm. Tech. Report MIP-R-104, School of Artificial Intelligence, University of Edinburgh (July 1974)Google Scholar
  21. 21.
    Yang, H.: Local Reasoning for Stateful Programs. PhD thesis, Dept. of Computer Science, University of Illinois, Urbana-Champaign (June 2001)Google Scholar
  22. 22.
    Yelowitz, L., Duncan, A.: Abstractions, instantiations, and proofs of marking algorithms. In: Symp. on Artificial Intelligence and Programming Languages, pp. 13–21 (August 1977)Google Scholar
  23. 23.
    Yorsh, G., Reps, T., Sagiv, M., Wilhelm, R.: Logical characterizations of heap abstractions. ACM Transactions on Computational Logic (TOCL) (to appear)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Alexey Loginov
    • 1
  • Thomas Reps
    • 1
  • Mooly Sagiv
    • 2
  1. 1.Comp. Sci. Dept.University of Wisconsin 
  2. 2.School of Comp. Sci.Tel-Aviv University 

Personalised recommendations