Tree-Like Grammars and Separation Logic

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9458)


Separation Logic with inductive predicate definitions (\(\texttt {SL}\)) and hyperedge replacement grammars (HRG) are established formalisms to describe the abstract shape of data structures maintained by heap-manipulating programs. Fragments of both formalisms are known to coincide, and neither the entailment problem for \(\texttt {SL}\) nor its counterpart for HRGs, the inclusion problem, are decidable in general.

We introduce tree-likegrammars (TLG), a fragment of HRGs with a decidable inclusion problem. By the correspondence between HRGs and \(\texttt {SL}\), we simultaneously obtain an equivalent \(\texttt {SL}\) fragment (\(\texttt {SL}_{\texttt {tl}}\)) featuring some remarkable properties including a decidable entailment problem.


Heap abstraction Hyperedge replacement grammars Separation logic Entailment checking 


  1. 1.
    Antonopoulos, T., Gorogiannis, N., Haase, C., Kanovich, M., Ouaknine, J.: Foundations for decision problems in separation logic with general inductive predicates. In: Muscholl, A. (ed.) FOSSACS 2014 (ETAPS). LNCS, vol. 8412, pp. 411–425. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  2. 2.
    Berdine, J., Calcagno, C., W.O’Hearn, P.: A decidable fragment of separation logic. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 97–109. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  3. 3.
    Berdine, J., Cook, B., Ishtiaq, S.: SLAyer: memory safety for systems-level code. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 178–183. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  4. 4.
    Brotherston, J., Distefano, D., Petersen, R.L.: Automated cyclic entailment proofs in separation logic. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS, vol. 6803, pp. 131–146. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  5. 5.
    Büchi, J.R.: Weak second-order arithmetic and finite automata. Math. Logic Quart. 6(1–6), 66–92 (1960)CrossRefzbMATHGoogle Scholar
  6. 6.
    Courcelle, B.: The monadic second-order logic of graphs I: Recognizable sets of finite graphs. Inf. Comput. 85(1), 12–75 (1990)CrossRefMathSciNetzbMATHGoogle Scholar
  7. 7.
    Courcelle, B., Engelfriet, J.: Graph Structure and Monadic Second-Order Logic: A Language-Theoretic Approach, vol. 138. Cambridge University Press, Cambridge (2012) CrossRefGoogle Scholar
  8. 8.
    Dodds, M.: From separation logic to hyperedge replacement and back. In: Ehrig, H., Heckel, R., Rozenberg, G., Taentzer, G. (eds.) ICGT 2008. LNCS, vol. 5214. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  9. 9.
    Drewes, F., Kreowski, H.J., Habel, A.: Hyperedge replacement graph grammars. In: Handbook of Graph Grammars and Computing by Graph Transformation, pp. 95–162 (1997)Google Scholar
  10. 10.
    Dudka, K., Peringer, P., Vojnar, T.: Predator: a practical tool for checking manipulation of dynamic data structures using separation logic. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 372–378. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  11. 11.
    Habel, A.: Hyperedge Replacement: Grammars and Languages. LNCS, vol. 643. Springer, Heidelberg (1992) zbMATHGoogle Scholar
  12. 12.
    Heinen, J., Noll, T., Rieger, S.: Juggrnaut: graph grammar abstraction for unbounded heap structures. ENTCS 266, 93–107 (2010)Google Scholar
  13. 13.
    Iosif, R., Rogalewicz, A., Simacek, J.: The tree width of separation logic with recursive definitions. In: Bonacina, M.P. (ed.) CADE 2013. LNCS, vol. 7898, pp. 21–38. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  14. 14.
    Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: Verifast: a powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011) CrossRefGoogle Scholar
  15. 15.
    Jansen, C., Göbe, F., Noll, T.: Generating inductive predicates for symbolic execution of pointer-manipulating programs. In: Giese, H., König, B. (eds.) ICGT 2014. LNCS, vol. 8571, pp. 65–80. Springer, Heidelberg (2014) Google Scholar
  16. 16.
    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
  17. 17.
    Matheja, C., Jansen, C., Noll, T.: Tree-like grammars and separation logic. Technical Report 2015–12, RWTH Aachen University (2015)Google Scholar
  18. 18.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS, pp. 55–74 (2002)Google Scholar
  19. 19.
    Salomaa, A., Rozenberg, G.: Beyond Words, vol. 3. Springer, Heidelberg (1997) zbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Software Modeling and Verification GroupRWTH Aachen UniversityAachenGermany

Personalised recommendations