We present a first-order theory of (finite) sequences with integer elements, Presburger arithmetic, and regularity constraints, which can model significant properties of data structures such as lists and queues. We give a decision procedure for the quantifier-free fragment, based on an encoding into the first-order theory of concatenation; the procedure has PSPACE complexity. The quantifier-free fragment of the theory of sequences can express properties such as sortedness and injectivity, as well as Boolean combinations of periodic and arithmetic facts relating the elements of the sequence and their positions (e.g., “for all even i ’s, the element at position i has value i + 3 or 2i”). The resulting expressive power is orthogonal to that of the most expressive decidable logics for arrays. Some examples demonstrate that the fragment is also suitable to reason about sequence-manipulating programs within the standard framework of axiomatic semantics.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abdulrab, H., Pécuchet, J.P.: Solving word equations. Journal of Symbolic Computation 8(5), 499–521 (1989)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Bozga, M., Habermehl, P., Iosif, R., Konecný, F., Vojnar, T.: Automatic verification of integer array programs. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 157–172. Springer, Heidelberg (2009)Google Scholar
  3. 3.
    Bradley, A.R., Manna, Z.: The Calculus of Computation. Springer, Heidelberg (2007)MATHGoogle Scholar
  4. 4.
    Bradley, A.R., Manna, Z., Sipma, H.B.: What’s decidable about arrays? In: Emerson, E.A., Namjoshi, K.S. (eds.) VMCAI 2006. LNCS, vol. 3855, pp. 427–442. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  5. 5.
    Büchi, J.R., Senger, S.: Definability in the existential theory of concatenation and undecidable extensions of this theory. Zeitschrift fur Mathematische Logik und Grundlagen der Mathematik 34, 337–342 (1988)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    de Moura, L., Bjørner, N.: Generalized, efficient array decision procedures. In: Proceedings of 9th Conference on Formal Methods in Computer Aided Design (FMCAD 2009), pp. 45–52 (2009)Google Scholar
  7. 7.
    Diekert, V.: Makanin’s algorithm. In: Lothaire, M. (ed.) Algebraic Combinatorics on Words. Cambridge University Press, Cambridge (2002)Google Scholar
  8. 8.
    Durnev, V.G.: Unsolvability of the positive ∀ ∃ 3-theory of a free semi-group. Sibirskiĭ Matematicheskiĭ Zhurnal 36(5), 1067–1080 (1995)Google Scholar
  9. 9.
    Furia, C.A.: What’s decidable about sequences? (January 2010), http://arxiv.org/abs/1001.2100
  10. 10.
    Ghilardi, S., Nicolini, E., Ranise, S., Zucchelli, D.: Decision procedures for extensions of the theory of arrays. Annals of Mathematics and Artificial Intelligence 50(3-4), 231–254 (2007)MathSciNetCrossRefMATHGoogle Scholar
  11. 11.
    Habermehl, P., Iosif, R., Vojnar, T.: A logic of singly indexed arrays. In: Cervesato, I., Veith, H., Voronkov, A. (eds.) LPAR 2008. LNCS (LNAI), vol. 5330, pp. 558–573. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Habermehl, P., Iosif, R., Vojnar, T.: What else is decidable about integer arrays? In: Amadio, R.M. (ed.) FOSSACS 2008. LNCS, vol. 4962, pp. 474–489. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  13. 13.
    Kuncak, V., Piskac, R., Suter, P., Wies, T.: Building a calculus of data structures. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 26–44. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  14. 14.
    Makanin, G.S.: The problem of solvability of equations in a free semigroup. Rossiĭskaya Akademiya Nauk. Matematicheskiĭ Sbornik (Translated in Sbornik Mathematics) 103(2), 147–236 (1977)Google Scholar
  15. 15.
    Meyer, B.: Object-oriented software construction, 2nd edn. Prentice-Hall, Englewood Cliffs (1997)MATHGoogle Scholar
  16. 16.
    Piskac, R., Kuncak, V.: Decision procedures for multisets with cardinality constraints. In: Logozzo, F., Peled, D.A., Zuck, L.D. (eds.) VMCAI 2008. LNCS, vol. 4905, pp. 218–232. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  17. 17.
    Plandowski, W.: Satisfiability of word equations with constants is in PSPACE. Journal of the ACM 51(3), 483–496 (2004)MathSciNetCrossRefMATHGoogle Scholar
  18. 18.
    Seibert, S.: Quantifier hierarchies over word relations. In: Kleine Büning, H., Jäger, G., Börger, E., Richter, M.M. (eds.) CSL 1991. LNCS, vol. 626, pp. 329–352. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  19. 19.
    Zee, K., Kuncak, V., Rinard, M.C.: Full functional verification of linked data structures. In: Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation (PLDI 2008), pp. 349–361. ACM, New York (2008)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Carlo A. Furia
    • 1
  1. 1.Chair of Software EngineeringETH ZurichSwitzerland

Personalised recommendations