Abstract
We propose a novel logic, called Frame Logic (FL), that extends first-order logic (with recursive definitions) using a construct \(\textit{Sp}(\cdot )\) that captures the implicit supports of formulas— the precise subset of the universe upon which their meaning depends. Using such supports, we formulate proof rules that facilitate frame reasoning elegantly when the underlying model undergoes change. We show that the logic is expressive by capturing several data-structures and also exhibit a translation from a precise fragment of separation logic to frame logic. Finally, we design a program logic based on frame logic for reasoning with programs that dynamically update heaps that facilitates local specifications and frame reasoning. This program logic consists of both localized proof rules as well as rules that derive the weakest tightest preconditions in FL.
Chapter PDF
Similar content being viewed by others
Keywords
References
Banerjee, A., Naumann, D.: Local reasoning for global invariants, Part II: Dynamic boundaries. Journal of the ACM (JACM) 60 (06 2013)
Banerjee, A., Naumann, D.A., Rosenberg, S.: Regional logic for local reasoning about global invariants. In: Vitek, J. (ed.) ECOOP 2008 – Object-Oriented Programming. pp. 387–411. Springer Berlin Heidelberg, Berlin, Heidelberg (2008)
Banerjee, A., Naumann, D.A., Rosenberg, S.: Local reasoning for global invariants, Part I: Region logic. J. ACM 60(3), 18:1–18:56 (Jun 2013), https://doi.org/10.1145/2485982
Berdine, J., Calcagno, C., O’Hearn, P.W.: A decidable fragment of separation logic. In: Proceedings of the 24th International Conference on Foundations of Software Technology and Theoretical Computer Science. pp. 97–109. FSTTCS’04 (2004)
Berdine, J., Calcagno, C., O’Hearn, P.W.: Symbolic execution with separation logic. In: Proceedings of the Third Asian Conference on Programming Languages and Systems. pp. 52–68. APLAS’05 (2005)
Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular automatic assertion checking with separation logic. In: Proceedings of the 4th International Conference on Formal Methods for Components and Objects. pp. 115–137. FMCO’05, Springer-Verlag, Berlin, Heidelberg (2006). https://doi.org/10.1007/11804192_6
Brinck, K., Foo, N.Y.: Analysis of algorithms on threaded trees. The Computer Journal 24(2), 148–155 (01 1981). https://doi.org/10.1093/comjnl/24.2.148
Brookes, S.: A semantics for concurrent separation logic. Theor. Comput. Sci. 375(1-3), 227–270 (Apr 2007). https://doi.org/10.1016/j.tcs.2006.12.034
Brotherston, J., Distefano, D., Petersen, R.L.: Automated cyclic entailment proofs in separation logic. In: Proceedings of the 23rd International Conference on Automated Deduction. pp. 131–146. CADE’11, Springer-Verlag, Berlin, Heidelberg (2011), http://dl.acm.org/citation.cfm?id=2032266.2032278
Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Automated verification of shape, size and bag properties. In: 12th IEEE International Conference on Engineering Complex Computer Systems (ICECCS 2007). pp. 307–320 (2007)
Cook, B., Haase, C., Ouaknine, J., Parkinson, M., Worrell, J.: Tractable reasoning in a fragment of separation logic. In: Proceedings of the 22nd International Conference on Concurrency Theory. pp. 235–249. CONCUR’11 (2011)
Demri, S., Deters, M.: Separation logics and modalities: a survey. Journal of Applied Non-Classical Logics 25, 50–99 (2015)
Hayes, P.J.: The frame problem and related problems in artificial intelligence. In: Webber, B.L., Nilsson, N.J. (eds.) Readings in Artificial Intelligence, pp. 223 – 230. Morgan Kaufmann (1981). https://doi.org/10.1016/B978-0-934613-03-3.50020-9
Itzhaky, S., Banerjee, A., Immerman, N., Lahav, O., Nanevski, A., Sagiv, M.: Modular reasoning about heap paths via effectively propositional formulas. In: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 385–396. POPL ’14, ACM, New York, NY, USA (2014). https://doi.org/10.1145/2535838.2535854
Itzhaky, S., Banerjee, A., Immerman, N., Nanevski, A., Sagiv, M.: Effectively-propositional reasoning about reachability in linked data structures. In: Proceedings of the 25th International Conference on Computer Aided Verification. pp. 756–772. CAV’13, Springer-Verlag, Berlin, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39799-8_53
Itzhaky, S., Bjørner, N., Reps, T., Sagiv, M., Thakur, A.: Property-directed shape analysis. In: Proceedings of the 16th International Conference on Computer Aided Verification. pp. 35–51. CAV’14, Springer-Verlag, Berlin, Heidelberg (2014). https://doi.org/10.1007/978-3-319-08867-9_3
Kassios, I.T.: The dynamic frames theory. Form. Asp. Comput. 23(3), 267–288 (May 2011). https://doi.org/10.1007/s00165-010-0152-5
Kassios, I.T.: Dynamic frames: Support for framing, dependencies and sharing without restrictions. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006: Formal Methods. pp. 268–283. Springer-Verlag, Berlin, Heidelberg (2006)
Kovács, L., Robillard, S., Voronkov, A.: Coming to terms with quantified reasoning. In: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages. pp. 260–270. POPL ’17, ACM, New York, NY, USA (2017). https://doi.org/10.1145/3009837.3009887
Kovács, L., Voronkov, A.: First-order theorem proving and Vampire. In: CAV ’13. pp. 1–35 (2013). https://doi.org/10.1007/978-3-642-39799-8_1
Leino, K.R.M.: Dafny: An automatic program verifier for functional correctness. In: Proceedings of the 16th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning. p. 348–370. LPAR’10, Springer-Verlag, Berlin, Heidelberg (2010). https://doi.org/10.5555/1939141.1939161
Leino, K.R.M., Müller, P.: A basis for verifying multi-threaded programs. In: Castagna, G. (ed.) Programming Languages and Systems. pp. 378–393. Springer Berlin Heidelberg, Berlin, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00590-9_27
Löding, C., Madhusudan, P., Peña, L.: Foundations for natural proofs and quantifier instantiation. PACMPL 2(POPL), 10:1–10:30 (2018). https://doi.org/10.1145/3158098
Madhusudan, P., Qiu, X., Ştefănescu, A.: Recursive proofs for inductive tree data-structures. In: Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 123–136. POPL ’12, ACM, New York, NY, USA (2012). https://doi.org/10.1145/2103656.2103673
Murali, A., Peña, L., Löding, C., Madhusudan, P.: A first order logic with frames. CoRR (2019), http://arxiv.org/abs/1901.09089
Navarro Pérez, J.A., Rybalchenko, A.: Separation logic + superposition calculus = heap theorem prover. In: Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation. pp. 556–566. PLDI ’11, ACM, New York, NY, USA (2011)
O’Hearn, P.W.: A primer on separation logic (and automatic program verification and analysis). In: Software Safety and Security (2012)
O’Hearn, P.W., Reynolds, J.C., Yang, H.: Local reasoning about programs that alter data structures. In: Proceedings of the 15th International Workshop on Computer Science Logic. pp. 1–19. CSL ’01, Springer-Verlag, London, UK, UK (2001), http://dl.acm.org/citation.cfm?id=647851.737404
O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. In: Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 268–280. POPL ’04, ACM, New York, NY, USA (2004). https://doi.org/10.1145/964001.964024
Parkinson, M., Bierman, G.: Separation logic and abstraction. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 247–258. POPL ’05, ACM, New York, NY, USA (2005). https://doi.org/10.1145/1040305.1040326
Parkinson, M.J., Summers, A.J.: The relationship between separation logic and implicit dynamic frames. In: Barthe, G. (ed.) Programming Languages and Systems. pp. 439–458. Springer Berlin Heidelberg, Berlin, Heidelberg (2011). https://doi.org/10.1007/978-3-642-19718-5_23
Pek, E., Qiu, X., Madhusudan, P.: Natural proofs for data structure manipulation in C using separation logic. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation. pp. 440–451. PLDI ’14, ACM, New York, NY, USA (2014). https://doi.org/10.1145/2594291.2594325
Pérez, J.A.N., Rybalchenko, A.: Separation logic modulo theories. In: Programming Languages and Systems (APLAS). pp. 90–106. Springer International Publishing, Cham (2013)
Piskac, R., Wies, T., Zufferey, D.: Automating separation logic using SMT. In: Proceedings of the 25th International Conference on Computer Aided Verification. pp. 773–789. CAV’13, Springer-Verlag, Berlin, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39799-8_54
Piskac, R., Wies, T., Zufferey, D.: Automating separation logic with trees and data. In: Proceedings of the 16th International Conference on Computer Aided Verification. pp. 711–728. CAV’14, Springer-Verlag, Berlin, Heidelberg (2014)
Piskac, R., Wies, T., Zufferey, D.: Grasshopper. In: Ábrahám, E., Havelund, K. (eds.) Tools and Algorithms for the Construction and Analysis of Systems. pp. 124–139. Springer Berlin Heidelberg, Berlin, Heidelberg (2014)
Qiu, X., Garg, P., Ştefănescu, A., Madhusudan, P.: Natural proofs for structure, data, and separation. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation. pp. 231–242. PLDI ’13, ACM, New York, NY, USA (2013). https://doi.org/10.1145/2491956.2462169
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science. pp. 55–74. LICS ’02 (2002)
Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames: Combining dynamic frames and separation logic. In: Drossopoulou, S. (ed.) ECOOP 2009 – Object-Oriented Programming. pp. 148–172. Springer Berlin Heidelberg, Berlin, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03013-0_8
Smans, J., Jacobs, B., Piessens, F.: Implicit dynamic frames. ACM Trans. Program. Lang. Syst. 34(1), 2:1–2:58 (May 2012). https://doi.org/10.1145/2160910.2160911
Suter, P., Dotta, M., Kunćak, V.: Decision procedures for algebraic data types with abstractions. In: Proceedings of the 37th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. pp. 199–210. POPL ’10, ACM, New York, NY, USA (2010). https://doi.org/10.1145/1706299.1706325
Ta, Q.T., Le, T.C., Khoo, S.C., Chin, W.N.: Automated mutual explicit induction proof in separation logic. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016: Formal Methods. pp. 659–676. Springer International Publishing, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_40
Author information
Authors and Affiliations
Contributions
Adithya Murali, Lucas Peña: Equal contribution
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2020 The Author(s)
About this paper
Cite this paper
Murali, A., Peña, L., Löding, C., Madhusudan, P. (2020). A First-Order Logic with Frames. In: Müller, P. (eds) Programming Languages and Systems. ESOP 2020. Lecture Notes in Computer Science(), vol 12075. Springer, Cham. https://doi.org/10.1007/978-3-030-44914-8_19
Download citation
DOI: https://doi.org/10.1007/978-3-030-44914-8_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-44913-1
Online ISBN: 978-3-030-44914-8
eBook Packages: Computer ScienceComputer Science (R0)