Abstract
We present an effective method for the formal verification of skiplists, including skiplists with arbitrary length and unbounded size. The core of the method is a novel theory of skiplists with a decidable satisfiability problem, which up to now has been an open problem.
A skiplist is an imperative software data structure used to implement a set by maintaining several ordered singly-linked lists in memory.Skiplists are widely used in practice because they are simpler to implement than balanced trees and offer a comparable performance. To accomplish this efficiency most implementations dynamically increment the number of levels as more elements are inserted. Skiplists are difficult to reason about automatically because of the sharing between the different layers. Furthermore, dynamic height poses the extra challenge of dealing with arbitrarily many levels. Our theory allows to express the memory layout of a skiplist of arbitrary height, and has an efficient decision procedure. Using an implementation of our decision procedure, we formally verify shape preservation and a functional specification of two source code implementations of the skiplist datatype.
We also illustrate how our decision procedure can also improve the efficiency of the verification of skiplists with bounded levels. We show empirically that a decision procedure for bounded levels does not scale beyond 3 levels, while our decision procedure terminates quickly for any number of levels.
This work was funded in part by Spanish MINECO Project “TIN2012-39391-C04-01 STRONGSOFT”.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
The KDE Platform, http://kde.org/
KDE Skiplist implementation, http://api.kde.org/4.1-api/kdeedu-apidocs/kstars/html/SkipList_8cpp_source.html
Abdulla, P.A., Holík, L., Jonsson, B., Lengál, O., Trinh, C.Q., Vojnar, T.: Verification of heap manipulating programs with ordered data by extended forest automata. In: Van Hung, D., Ogawa, M. (eds.) ATVA 2013. LNCS, vol. 8172, pp. 224–239. Springer, Heidelberg (2013)
Bouajjani, A., Drăgoi, C., Enea, C., Sighireanu, M.: A logic-based framework for reasoning about composite data structures. In: Bravetti, M., Zavattaro, G. (eds.) CONCUR 2009. LNCS, vol. 5710, pp. 178–195. Springer, Heidelberg (2009)
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)
Gallier, J.H.: Logic for Computer Science: Foundations of Automatic Theorem Proving. Harper & Row (1986)
Holík, L., Lengál, O., Rogalewicz, A., Šimáček, J., Vojnar, T.: Fully automated shape analysis based on forest automata. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 740–755. Springer, Heidelberg (2013)
Kuncak, V., Nguyen, H.H., Rinard, M.C.: An algorithm for deciding BAPA: Boolean Algebra with Presburger Arithmetic. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 260–277. Springer, Heidelberg (2005)
Lahiri, S.K., Qadeer, S.: Back to the future: revisiting precise program verification using SMT solvers. In: Proc. of POPL 2008, pp. 171–182. ACM (2008)
Manna, Z., Pnueli, A.: Temporal Verif. of Reactive Systems. Springer (1995)
McCarthy, J.: Towards a mathematical science of computation. In: IFIP Congress, pp. 21–28 (1962)
Nelson, G., Oppen, D.C.: Simplification by cooperating decision procedures. ACM Trans. Program. Lang. Syst. 1(2), 245–257 (1979)
Pugh, W.: Skip lists: A probabilistic alternative to balanced trees. Commun. ACM 33(6), 668–676 (1990)
Ranise, S., Zarba, C.G.: A theory of singly-linked lists and its extensible decision procedure. In: Proc. of SEFM 2006. IEEE CS Press (2006)
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. of LICS 2002, pp. 55–74. IEEE CS Press (2002)
Sánchez, A., Sánchez, C.: Decision procedures for the temporal verification of concurrent lists. In: Dong, J.S., Zhu, H. (eds.) ICFEM 2010. LNCS, vol. 6447, pp. 74–89. Springer, Heidelberg (2010)
Sánchez, A., Sánchez, C.: A theory of skiplists with applications to the verification of concurrent datatypes. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 343–358. Springer, Heidelberg (2011)
Sánchez, A., Sánchez, C.: Parametrized invariance for infinite state processes. CoRR, abs/1312.4043 (2013)
Wies, T., Kuncak, V., Zee, K., Podelski, A., Rinard, M.: Verifying complex properties using symbolic shape analysis. In: Workshop on Heap Abstraction and Verification (collocated with ETAPS) (2007)
Yorsh, G., Rabinovich, A.M., Sagiv, M., Meyer, A., Bouajjani, A.: A logic of reachable patterns in linked data-structures. In: Aceto, L., Ingólfsdóttir, A. (eds.) FOSSACS 2006. LNCS, vol. 3921, pp. 94–110. Springer, Heidelberg (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Sánchez, A., Sánchez, C. (2014). Formal Verification of Skiplists with Arbitrary Many Levels. In: Cassez, F., Raskin, JF. (eds) Automated Technology for Verification and Analysis. ATVA 2014. Lecture Notes in Computer Science, vol 8837. Springer, Cham. https://doi.org/10.1007/978-3-319-11936-6_23
Download citation
DOI: https://doi.org/10.1007/978-3-319-11936-6_23
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-11935-9
Online ISBN: 978-3-319-11936-6
eBook Packages: Computer ScienceComputer Science (R0)