Abstract
Many separation logics support fractional permissions to distinguish between read and write access to a heap location, for instance, to allow concurrent reads while enforcing exclusive writes. Fractional permissions extend to composite assertions such as (co)inductive predicates and magic wands by allowing those to be multiplied by a fraction. Typical separation logic proofs require that this multiplication has three key properties: it needs to distribute over assertions, it should permit fractions to be factored out from assertions, and two fractions of the same assertion should be combinable into one larger fraction.
Existing formal semantics incorporating fractional assertions into a separation logic define multiplication semantically (via models), resulting in a semantics in which distributivity and combinability do not hold for key resource assertions such as magic wands, and fractions cannot be factored out from a separating conjunction. By contrast, existing automatic separation logic verifiers define multiplication syntactically, resulting in a different semantics for which it is unknown whether distributivity and combinability hold for all assertions.
In this paper, we present a novel semantics for separation logic assertions that allows states to hold more than a full permission to a heap location during the evaluation of an assertion. By reimposing upper bounds on the permissions held per location at statement boundaries, we retain key properties of separation logic, in particular, the frame rule. Our assertion semantics unifies semantic and syntactic multiplication and thereby reconciles the discrepancy between separation logic theory and tools and enjoys distributivity, factorisability, and combinability. We have formalised our semantics and proved its properties in Isabelle/HOL.
- Amal Ahmed. 2006. Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types. In Proceedings of the 15th European Conference on Programming Languages and Systems (ESOP’06). Springer-Verlag, Berlin, Heidelberg. 69–83. isbn:354033095X https://doi.org/10.1007/11693024_6
Google Scholar
Digital Library
- Andrew W. Appel and David McAllester. 2001. An Indexed Model of Recursive Types for Foundational Proof-Carrying Code. ACM Trans. Program. Lang. Syst., 23, 5 (2001), sep, 657–683. issn:0164-0925 https://doi.org/10.1145/504709.504712
Google Scholar
Digital Library
- Vytautas Astrauskas, Peter Müller, Federico Poli, and Alexander J. Summers. 2019. Leveraging Rust Types for Modular Specification and Verification. In Object-Oriented Programming Systems, Languages, and Applications (OOPSLA). Proc. ACM Program. Lang., 3, OOPSLA, 147:1–147:30. https://doi.org/10.1145/3360573
Google Scholar
Digital Library
- Christian J. Bell, Andrew W. Appel, and David Walker. 2010. Concurrent Separation Logic for Pipelined Parallelization. In Static Analysis, Radhia Cousot and Matthieu Martel (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 151–166. isbn:978-3-642-15769-1
Google Scholar
- Stefan Blom and Marieke Huisman. 2014. The VerCors Tool for Verification of Concurrent Programs. In FM 2014: Formal Methods, Cliff Jones, Pekka Pihlajasaari, and Jun Sun (Eds.). Springer International Publishing, Cham. 127–131. isbn:978-3-319-06410-9
Google Scholar
- Stefan Blom and Marieke Huisman. 2015. Witnessing the elimination of magic wands. International Journal on Software Tools for Technology Transfer (STTT), 17, 6 (2015), 757–781. https://doi.org/10.1007/s10009-015-0372-3
Google Scholar
Digital Library
- Richard Bornat, Cristiano Calcagno, Peter W. O’Hearn, and Matthew J. Parkinson. 2005. Permission accounting in separation logic. In Principle of Programming Languages (POPL), Jens Palsberg and Martín Abadi (Eds.). ACM, 259–270.
Google Scholar
- John Boyland. 2003. Checking Interference with Fractional Permissions. In Static Analysis (SAS), Radhia Cousot (Ed.). 55–72.
Google Scholar
- John Tang Boyland. 2010. Semantics of fractional permissions with nesting. Transactions on Programming Languages and Systems (TOPLAS), 32, 6 (2010), 22:1–22:33. https://doi.org/10.1145/1749608.1749611
Google Scholar
Digital Library
- James Brotherston, Diana Costa, Aquinas Hobor, and John Wickerson. 2020. Reasoning over Permissions Regions in Concurrent Separation Logic. In Computer Aided Verification (CAV), Shuvendu K. Lahiri and Chao Wang (Eds.).
Google Scholar
- Cristiano Calcagno, Peter W. O’Hearn, and Hongseok Yang. 2007. Local action and abstract separation logic. In Logic in Computer Science (LICS). 366–375.
Google Scholar
- Qinxiang Cao, Shengyi Wang, Aquinas Hobor, and Andrew W. Appel. 2019. Proof Pearl: Magic Wand as Frame. arxiv:cs.PL/1909.08789.
Google Scholar
- Bor-Yuh Evan Chang and Xavier Rival. 2008. Relational inductive shape analysis. ACM SIGPLAN Notices, 43, 1 (2008), 247–260.
Google Scholar
Digital Library
- Patrick Cousot and Radhia Cousot. 1979. Constructive Versions of Tarski’s Fixed Point Theorems. Pacific J. Math., 81, 1 (1979), 43–57.
Google Scholar
Cross Ref
- Thibault Dardinier. 2022. Unbounded Separation Logic. Archive of Formal Proofs, September, issn:2150-914x https://isa-afp.org/entries/Separation_Logic_Unbounded.html
Google Scholar
- Thibault Dardinier, Peter Müller, and Alexander J. Summers. 2022. Fractional Resources in Unbounded Separation Logic (artifact). https://doi.org/10.5281/zenodo.7072457
Google Scholar
Digital Library
- Thibault Dardinier, Gaurav Parthasarathy, Noé Weeks, Peter Müller, and Alexander J. Summers. 2022. Sound Automation of Magic Wands. In Computer Aided Verification, Sharon Shoham and Yakir Vizel (Eds.). Springer International Publishing, Cham. 130–151. isbn:978-3-031-13188-2
Google Scholar
- Robert Dockins, Aquinas Hobor, and Andrew W. Appel. 2009. A Fresh Look at Separation Algebras and Share Accounting. In Programming Languages and Systems, Zhenjiang Hu (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 161–177. isbn:978-3-642-10672-9
Google Scholar
- C. Haack and C. Hurlin. 2009. Resource Usage Protocols for Iterators. Journal of Object Technology (JOT), 8, 4 (2009), June, 55–83.
Google Scholar
Cross Ref
- Aquinas Hobor and Cristian Gherghina. 2012. Barriers in Concurrent Separation Logic: Now With Tool Support!. Logical Methods in Computer Science, Volume 8, Issue 2 (2012), April, https://doi.org/10.2168/LMCS-8(2:2)2012
Google Scholar
Cross Ref
- Bart Jacobs and Frank Piessens. 2011. Expressive modular fine-grained concurrency specification. In Principles of Programming Languages (POPL). 271–282. https://doi.org/10.1145/1926385.1926417
Google Scholar
Digital Library
- Bart Jacobs, Jan Smans, Pieter Philippaerts, Frédéric Vogels, Willem Penninckx, and Frank Piessens. 2011. VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java. In NASA Formal Methods (NFM), Mihaela Gheorghiu Bobaru, Klaus Havelund, Gerard J. Holzmann, and Rajeev Joshi (Eds.) (Lecture Notes in Computer Science, Vol. 6617). Springer, 41–55.
Google Scholar
- Jonas Jensen, Lars Birkedal, and Peter Sestoft. 2011. Modular Verification of Linked Lists with Views via Separation Logic. Journal of Object Technology (JOT), 10 (2011), January, 2: 1–20. https://doi.org/10.1145/1924520.1924524
Google Scholar
Digital Library
- Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Ales Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. J. Funct. Program., 28 (2018), e20. https://doi.org/10.1017/S0956796818000151
Google Scholar
Cross Ref
- Neelakantan R. Krishnaswami. 2006. Reasoning about Iterators with Separation Logic. In Specification and Verification of Component-Based Systems (SAVCBS). https://doi.org/10.1145/1181195.1181213
Google Scholar
Digital Library
- Xuan-Bach Le and Aquinas Hobor. 2018. Logical Reasoning for Disjoint Permissions. In European Symposium on Programming (ESOP), Amal Ahmed (Ed.).
Google Scholar
- K. Rustan M. Leino, Peter Müller, and Jan Smans. 2009. Verification of Concurrent Programs with Chalice. In Foundations of Security Analysis and Design V (Lecture Notes in Computer Science, Vol. 5705). Springer, 195–222. http://www.springerlink.com
Google Scholar
Digital Library
- K. Rustan M. Leino, Peter Müller, and Jan Smans. 2010. Deadlock-free Channels and Locks. In European Symposium on Programming (ESOP), A. D. Gordon (Ed.) (Lecture Notes in Computer Science, Vol. 6012). Springer, 407–426. http://www.springerlink.com
Google Scholar
- Toshiyuki Maeda, Haruki Sato, and Akinori Yonezawa. 2011. Extended Alias Type System Using Separating Implication. Workshop on Types in Language Design and Implementation (TLDI). https://doi.org/10.1145/1929553.1929559
Google Scholar
Digital Library
- Peter Müller, Malte Schwerhoff, and Alexander J. Summers. 2016. Viper: A Verification Infrastructure for Permission-Based Reasoning. In Verification, Model Checking, and Abstract Interpretation (VMCAI), B. Jobstmann and K. R. M. Leino (Eds.) (Lecture Notes in Computer Science, Vol. 9583). Springer, 41–62.
Google Scholar
- Tobias Nipkow, Lawrence C Paulson, and Markus Wenzel. 2002. Isabelle/HOL: a proof assistant for higher-order logic. 2283, Springer Science & Business Media.
Google Scholar
- Peter W. O’Hearn, Hongseok Yang, and John C. Reynolds. 2004. Separation and Information Hiding. SIGPLAN Not., 39, 1 (2004), jan, 268–280. issn:0362-1340 https://doi.org/10.1145/982962.964024
Google Scholar
Digital Library
- Matthew Parkinson. 2005. Local Reasoning for Java. Ph.D. Dissertation. https://www.microsoft.com/en-us/research/publication/local-reasoning-for-java/ http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-654.html.
Google Scholar
- Matthew Parkinson and Gavin Bierman. 2005. Separation logic and abstraction. In Principle of Programming Languages (POPL), J. Palsberg and M. Abadi (Eds.). ACM, 247–258.
Google Scholar
- Willem Penninckx, Bart Jacobs, and Frank Piessens. 2015. Sound, Modular and Compositional Verification of the Input/Output Behavior of Programs. 9032, 158–182. https://doi.org/10.1007/978-3-662-46669-8_7
Google Scholar
Cross Ref
- John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In Logic in Computer Science (LICS). IEEE, 55–74.
Google Scholar
- Malte Schwerhoff and Alexander J. Summers. 2015. Lightweight Support for Magic Wands in an Automatic Verifier. In European Conference on Object-Oriented Programming (ECOOP), J. T. Boyland (Ed.) (LIPIcs, Vol. 37). Schloss Dagstuhl, 614–638.
Google Scholar
- Alexander J. Summers and Peter Müller. 2018. Automating Deductive Verification for Weak-Memory Programs. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS) (Lecture Notes in Computer Science). Springer, 190–209.
Google Scholar
- Kasper Svendsen and Lars Birkedal. 2014. Impredicative Concurrent Abstract Predicates. In Programming Languages and Systems, Zhong Shao (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg. 149–168. isbn:978-3-642-54833-8
Google Scholar
- Alfred Tarski. 1955. A lattice-theoretical fixpoint theorem and its applications.. Pacific J. Math., 5, 2 (1955), 285 – 309. https://doi.org/pjm/1103044538
Google Scholar
Cross Ref
- Thomas Tuerk. 2010. Local reasoning about while-loops. In Verified Software: Theories, Tools and Experiments - Theory Workshop (VS-Theory).
Google Scholar
- Viktor Vafeiadis. 2011. Concurrent Separation Logic and Operational Semantics. Electronic Notes in Theoretical Computer Science, 276 (2011), 335–351. issn:1571-0661 https://doi.org/10.1016/j.entcs.2011.09.029 Twenty-seventh Conference on the Mathematical Foundations of Programming Semantics (MFPS XXVII).
Google Scholar
Digital Library
- Jules Villard, Étienne Lozes, and Cristiano Calcagno. 2009. Proving Copyless Message Passing. In Proceedings of the 7th Asian Symposium on Programming Languages and Systems (APLAS ’09). Springer-Verlag, Berlin, Heidelberg. 194–209. isbn:9783642106712 https://doi.org/10.1007/978-3-642-10672-9_15
Google Scholar
Digital Library
Index Terms
Fractional resources in unbounded separation logic
Recommendations
A Decision Procedure for Guarded Separation Logic Complete Entailment Checking for Separation Logic with Inductive Definitions
We develop a doubly exponential decision procedure for the satisfiability problem of guarded separation logic—a novel fragment of separation logic featuring user-supplied inductive predicates, Boolean connectives, and separating connectives, including ...
Syntactic control of interference for separation logic
POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesSeparation Logic has witnessed tremendous success in recent years in reasoning about programs that deal with heap storage. Its success owes to the fundamental principle that one should keep separate areas of the heap storage separate in program ...
Syntactic control of interference for separation logic
POPL '12Separation Logic has witnessed tremendous success in recent years in reasoning about programs that deal with heap storage. Its success owes to the fundamental principle that one should keep separate areas of the heap storage separate in program ...






Comments