Skip to main content
Log in

Database Management System Verification with Separation Logics

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

Program verification consists in finding a formal proof that the program satisfies a given specification. This specification can be described as assertions about the input and output a correct program must satisfy. Assertions and programs are traditionally specified in terms of classical first order logic (FOL). FOL reasoners (inference systems) automatically find the correspondent program correctness proof, if any. However, verification of programs with mutable data structures, such as pointers, is currently a major challenge for the FOL assertion based approach. Mutable data structures are often written in terms of syntactically unrelated expressions, whose specification represents a significant defiance for FOL. Separation logics are a family of formal languages with specially-purposed constructors designed to model mutable data structures. In this paper, we formally verify a database management system using separation logics. We focused on the verification of libraries containing programs about heap manipulation. Several detected bugs are described in detail, respective solutions are also provided.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.

Similar content being viewed by others

REFERENCES

  1. Jetley, R.P., Jones, P.L., and Anderson, P., Static analysis of medical device software using CodeSonar, in Proc. Workshop on Static Analysis, Ser. SAW’08, New York: Association for Computing Machinery, 2008, pp. 22–29.

  2. Lopes, R., Vicente, D., and Silva, N., Static analysis tools, a practical approach for safety-critical software verification, in European Space Agency, (Special Publication) ESA SP, 2009, vol. 669 SP.

  3. O’Hearn, P., Separation logic, Commun. ACM, 2019, vol. 62, no. 2, pp. 86–95.

    Article  Google Scholar 

  4. Burstall, R.M., Some techniques for proving correctness of programs which alter data structures, Mach. Intell., 1972, vol. 7, no. 3, pp. 23–50.

    MATH  Google Scholar 

  5. O’Hearn, P. and Pym, D., The logic of bunched implications, Bull. Symbolic Logic, 1999, vol. 5, no. 2, pp. 215–244.

    Article  MathSciNet  Google Scholar 

  6. Reynolds, J.C., Intuitionistic reasoning about shared mutable data structure, Millennial Perspect. Comput. Sci., 2000, vol. 2, no. 1, pp. 303–321.

    Google Scholar 

  7. Ishtiaq, S.S. and O’Hearn, P.W., BI as an assertion language for mutable data structures, SIGPLAN Not., 2001, vol. 36, no. 3, pp. 14–26.

    Article  Google Scholar 

  8. Reynolds, J.C., Separation logic: a logic for shared mutable data structures, Proc. 17th Annu. IEEE Symp. on Logic in Computer Science, Copenhagen, 2002, pp. 55–74.

  9. Distefano, D., Fähndrich, M., Logozzo, F., and O’Hearn, P.W., Scaling static analyses at facebook, Commun. ACM, 2019, vol. 62, no. 8, pp. 62–70.

    Article  Google Scholar 

  10. Hinrichsen, J.K., Bengtson, J., and Krebbers, R., Actris: session-type based reasoning in separation logic, Proc. ACM Program. Lang., 2019, vol. 4, no. POPL.

  11. Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., and Rival, X., The astreé analyzer, in Programming Languages and Systems, Sagiv, M., Ed., Berlin, Heidelberg: Springer, 2005, pp. 21–30.

    MATH  Google Scholar 

  12. Wilson, C. and Osterweil, L.J., Omega – a data flow analysis tool for the C programming language, IEEE Trans. Software Eng., 1985, vol. SE-11, no. 9, pp. 832–838.

    Article  Google Scholar 

  13. Chen, T. and Poole, P., Dynamic dataflow analysis, Inf. Software Technol., 1988, vol. 30, no. 8, pp. 497–505.

    Article  Google Scholar 

  14. de Moura, L. and Bjorner, N., Z3: an efficient SMT solver, in Tools and Algorithms for the Construction and Analysis of Systems, Ramakrishnan, C.R. and Rehof, J., Eds., Berlin, Heidelberg: Springer, 2008, pp. 337–340.

    MATH  Google Scholar 

  15. Hoare, C.A.R., An axiomatic basis for computer programming, Commun. ACM, 1969, vol. 12, no. 10, pp. 576–580.

    Article  Google Scholar 

  16. O’Hearn, P., Reynolds, J., and Yang, H., Local Reasoning about Programs That Alter Data Structures, Springer Verlag, 2001, vol. 2142, pp. 1–19.

    Book  Google Scholar 

  17. Calcagno, C., Distefano, D., O’Hearn, P.W., and Yang, H., Compositional shape analysis by means of bi-abduction, J. ACM, 2011, vol. 58, no. 6.

  18. Demri, S., Lozes, É., and Mansutti, A., Internal calculi for separation logics, in Proc. 28th EACSL Annu. Conf. on Computer Science Logic, CSL 2020, Jan. 13–16, 2020, Barcelona, Spain, Fernández, M. and Muscholl, A., Eds., Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020, vol. 152, pp. 19:1–19:18.

  19. Demri, S. and Fervari, R., The power of modal separation logics, J. Log. Comput., 2019, vol. 29, no. 8, pp. 1139–1184.

    Article  MathSciNet  Google Scholar 

  20. Limón, Y., Bárcenas, E., Benítez-Guerrero, E., Molero-Castillo, G., and Velázquez-Mena, A., Mu-calculus satisfiability with arithmetic constraints, Program. Comput. Software, 2020, vol. 46, no. 8, pp. 503–510.

    Article  MathSciNet  Google Scholar 

  21. Riaño, D., Piñon, R., Molero-Castillo, G., Bárcenas, E., and Velázquez-Mena, A., Regular expressions for web advertising detection based on an automatic sliding algorithm, Program. Comput. Software, 2020, vol. 46, no. 8, pp. 652–660.

    Article  Google Scholar 

Download references

ACKNOWLEDGMENTS

This work was supported by project UNAM-PAPIIT IA105420.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Diego Medina-Martínez, Everardo Bárcenas, Guillermo Molero-Castillo, Alejandro Velázquez-Mena or Rocío Aldeco-Pérez.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Medina-Martínez, D., Bárcenas, E., Molero-Castillo, G. et al. Database Management System Verification with Separation Logics. Program Comput Soft 47, 654–672 (2021). https://doi.org/10.1134/S036176882108017X

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S036176882108017X

Keywords:

Navigation