Semi-persistent Data Structures

  • Sylvain Conchon
  • Jean-Christophe Filliâtre
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4960)


A data structure is said to be persistent when any update operation returns a new structure without altering the old version. This paper introduces a new notion of persistence, called semi-persistence, where only ancestors of the most recent version can be accessed or updated. Making a data structure semi-persistent may improve its time and space complexity. This is of particular interest in backtracking algorithms manipulating persistent data structures, where this property is usually satisfied. We propose a proof system to statically check the valid use of semi-persistent data structures. It requires a few annotations from the user and then generates proof obligations that are automatically discharged by a dedicated decision procedure.


Decision Procedure Operational Semantic Proof System Proof Obligation Typing Rule 
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.


  1. 1.
    Baker, H.G.: Shallow binding makes functional arrays fast. SIGPLAN Not. 26(8), 145–147 (1991)CrossRefGoogle Scholar
  2. 2.
    Mike Barnett, K., Leino, R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, Springer, Heidelberg (2005)Google Scholar
  3. 3.
    Benedikt, M., Reps, T.W., Sagiv, S.: A decidable logic for describing linked data structures. In: European Symposium on Programming, pp. 2–19 (1999)Google Scholar
  4. 4.
    Blanchet, B.: Escape analysis: Correctness proof, implementation and experimental results. In: Symposium on Principles of Programming Languages, pp. 25–37 (1998)Google Scholar
  5. 5.
    Conchon, S., Contejean, E.: Ergo: A Decision Procedure for Program Verification,
  6. 6.
    Conchon, S., Filliâtre, J.-C.: A Persistent Union-Find Data Structure. In: ACM SIGPLAN Workshop on ML, Freiburg, Germany (October 2007)Google Scholar
  7. 7.
    Conchon, S., Filliâtre, J.-C.: Semi-Persistent Data Structures. Research Report 1474, LRI, Université Paris Sud (September 2007),
  8. 8.
    Dijkstra, E.W.: A discipline of programming. Series in Automatic Computation. Prentice Hall Int., Englewood Cliffs (1976)zbMATHGoogle Scholar
  9. 9.
    Driscoll, J.R., Sarnak, N., Sleator, D.D., Tarjan, R.E.: Making Data Structures Persistent. Journal of Computer and System Sciences 38(1), 86–124 (1989)zbMATHCrossRefMathSciNetGoogle Scholar
  10. 10.
    Filliâtre, J.-C.: The Why verification tool,
  11. 11.
    Filliâtre, J.-C., Marché, C.: The Why/Krakatoa/Caduceus Platform for Deductive Program Verification (Tool presentation). In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, Springer, Heidelberg (to appear, 2007)CrossRefGoogle Scholar
  12. 12.
    Hannan, J.: A type-based analysis for stack allocation in functional languages. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 172–188. Springer, Heidelberg (1995)Google Scholar
  13. 13.
    Knuth, D.E.: Dancing links. In: Davies, B.R.J., Woodcock, J. (eds.) Millennial Perspectives in Computer Science, Palgrave, pp. 187–214 (2000)Google Scholar
  14. 14.
    Morrisett, J.G., Crary, K., Glew, N., Walker, D.: Stack-based typed assembly language. In: Types in Compilation, pp. 28–52 (1998)Google Scholar
  15. 15.
    Nelson, G.: Verifying reachability invariants of linked structures. In: POPL 1983: Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pp. 38–47. ACM Press, New York (1983)CrossRefGoogle Scholar
  16. 16.
    Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1998)Google Scholar
  17. 17.
    Ranise, S., Zarba, C.: A theory of singly-linked lists and its extensible decision procedure. In: SEFM 2006: Proceedings of the Fourth IEEE International Conference on Software Engineering and Formal Methods, Washington, DC, USA, pp. 206–215. IEEE Computer Society, Los Alamitos (2006)CrossRefGoogle Scholar
  18. 18.
    Spalding, F., Walker, D.: Certifying compilation for a language with stack allocation. In: Proceedings of the 20th Annual IEEE Symposium on Logic in Computer Science (LICS 2005), Washington, DC, USA, pp. 407–416. IEEE Computer Society, Los Alamitos (2005)Google Scholar
  19. 19.
    Tofte, M., Talpin, J.-P.: Implementation of the typed call-by-value lambda-calculus using a stack of regions. In: Symposium on Principles of Programming Languages, pp. 188–201 (1994)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Sylvain Conchon
    • 1
  • Jean-Christophe Filliâtre
    • 1
  1. 1.LRIUniv Paris-Sud, CNRS, Orsay F-91405, INRIA Futurs, ProValOrsay 

Personalised recommendations