Advertisement

Temporary Read-Only Permissions for Separation Logic

  • Arthur Charguéraud
  • François Pottier
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10201)

Abstract

We present an extension of Separation Logic with a general mechanism for temporarily converting any assertion (or “permission”) to a read-only form. No accounting is required: our read-only permissions can be freely duplicated and discarded. We argue that, in circumstances where mutable data structures are temporarily accessed only for reading, our read-only permissions enable more concise specifications and proofs. The metatheory of our proposal is verified in Coq.

Keywords

Memory Location Hash Table Program Variable Proof Obligation Separation Logic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Appel, A.W.: Verified software toolchain. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 1–17. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-19718-5_1 CrossRefGoogle Scholar
  2. 2.
    Balabonski, T., Pottier, F., Protzenko, J.: The design and formalization of Mezzo, a permission-based programming language. ACM Trans. Program. Lang. Syst. 38(4), 14:1–14:94 (2016)CrossRefGoogle Scholar
  3. 3.
    Bengtson, J., Jensen, J.B., Birkedal, L.: Charge! A framework for higher-order separation logic in Coq. In: Interactive Theorem Proving (ITP), pp. 315–331 (2012)Google Scholar
  4. 4.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: modular automatic assertion checking with separation logic. In: Boer, F.S., Bonsangue, M.M., Graf, S., Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006). doi: 10.1007/11804192_6 CrossRefGoogle Scholar
  5. 5.
    Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: Principles of Programming Languages (POPL), pp. 259–270 (2005)Google Scholar
  6. 6.
    Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003). doi: 10.1007/3-540-44898-5_4 CrossRefGoogle Scholar
  7. 7.
    Boyland, J.T.: Semantics of fractional permissions with nesting. ACM Trans. Program. Lang. Syst. 32(6), 22:1–22:33 (2010)CrossRefGoogle Scholar
  8. 8.
    Boyland, J.T., Retert, W.: Connecting effects and uniqueness with adoption. In: Principles of Programming Languages (POPL), pp. 283–295 (2005)Google Scholar
  9. 9.
    Calcagno, C., Distefano, D.: Infer: an automatic program verifier for memory safety of C programs. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 459–465. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-20398-5_33 CrossRefGoogle Scholar
  10. 10.
    Charguéraud, A.: Characteristic formulae for mechanized program verification. Ph.D. thesis, Université Paris 7 (2010)Google Scholar
  11. 11.
    Charguéraud, A.: Characteristic formulae for the verification of imperative programs (2013, unpublished). http://www.chargueraud.org/research/2013/cf/cf.pdf
  12. 12.
    Charguéraud, A., Pottier, F.: Self-contained archive (2017). http://gallium.inria.fr/~fpottier/dev/seplogics/
  13. 13.
    Coblenz, M.J., Sunshine, J., Aldrich, J., Myers, B.A., Weber, S., Shull, F.: Exploring language support for immutability. In: International Conference on Software Engineering (ICSE), pp. 736–747 (2016)Google Scholar
  14. 14.
    Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M.J., Yang, H.: Views: compositional reasoning for concurrent programs. In: Principles of Programming Languages (POPL), pp. 287–300 (2013)Google Scholar
  15. 15.
    Distefano, D., Parkinson, M.J.: jStar: towards practical verification for Java. In: Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 213–226 (2008)Google Scholar
  16. 16.
    Dockins, R., Hobor, A., Appel, A.W.: A fresh look at separation algebras and share accounting. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 161–177. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-10672-9_13 CrossRefGoogle Scholar
  17. 17.
    Fähndrich, M., DeLine, R.: Adoption and focus: practical linear types for imperative programming. In: Programming Language Design and Implementation (PLDI), pp. 13–24 (2002)Google Scholar
  18. 18.
    Gordon, C.S., Parkinson, M.J., Parsons, J., Bromfield, A., Duffy, J.: Uniqueness and reference immutability for safe parallelism. In: Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp. 21–40 (2012)Google Scholar
  19. 19.
    Gotsman, A., Berdine, J., Cook, B., Rinetzky, N., Sagiv, M.: Local reasoning for storable locks and threads. Technical report MSR-TR-2007-39, Microsoft Research (2007)Google Scholar
  20. 20.
    Heule, S., Leino, K.R.M., Müller, P., Summers, A.J.: Abstract read permissions: fractional permissions without the fractions. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds.) VMCAI 2013. LNCS, vol. 7737, pp. 315–334. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-35873-9_20 CrossRefGoogle Scholar
  21. 21.
    Hobor, A., Appel, A.W., Nardelli, F.Z.: Oracle semantics for concurrent separation logic. In: Drossopoulou, S. (ed.) ESOP 2008. LNCS, vol. 4960, pp. 353–367. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-78739-6_27 CrossRefGoogle Scholar
  22. 22.
    Jacobs, B., Piessens, F.: The VeriFast program verifier. Technical report CW-520, Department of Computer Science, Katholieke Universiteit Leuven (2008)Google Scholar
  23. 23.
    Jensen, J.B., Benton, N., Kennedy, A.: High-level separation logic for low-level code. In: Principles of Programming Languages (POPL), pp. 301–314 (2013)Google Scholar
  24. 24.
    Leino, K.R.M., Müller, P.: A basis for verifying multi-threaded programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-00590-9_27 CrossRefGoogle Scholar
  25. 25.
    Naden, K., Bocchino, R., Aldrich, J., Bierhoff, K.: A type system for borrowing permissions. In: Principles of Programming Languages (POPL), pp. 557–570 (2012)Google Scholar
  26. 26.
    O’Hearn, P.W.: Resources, concurrency and local reasoning. Theor. Comput. Sci. 375(1–3), 271–307 (2007)MathSciNetCrossRefMATHGoogle Scholar
  27. 27.
    Potanin, A., Östlund, J., Zibin, Y., Ernst, M.D.: Immutability. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. Types, Analysis and Verification. LNCS, vol. 7850, pp. 233–269. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36946-9_9 CrossRefGoogle Scholar
  28. 28.
    Pottier, F.: Verifying a hash table and its iterators in higher-order separation logic. In: Certified Programs and Proofs (CPP), pp. 3–16 (2017)Google Scholar
  29. 29.
    Reed, E.: Patina: a formalization of the rust programming language. Technical report UW-CSE-15-03-02, University of Washington (2015)Google Scholar
  30. 30.
    Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Logic in Computer Science (LICS), pp. 55–74 (2002)Google Scholar
  31. 31.
    The Mozilla Foundation: The Rust programming language (2014)Google Scholar
  32. 32.
    Wadler, P.: Linear types can change the world! In: Broy, M., Jones, C. (eds.) Programming Concepts and Methods, North Holland (1990)Google Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  1. 1.InriaParisFrance
  2. 2.ICube – CNRS, Université de StrasbourgStrasbourgFrance

Personalised recommendations