A Separation Logic for Fictional Sequential Consistency

  • Filip SieczkowskiEmail author
  • Kasper Svendsen
  • Lars Birkedal
  • Jean Pichon-Pharabod
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9032)


To improve performance, modern multiprocessors and programming languages typically implement relaxed memory models that do not require all processors/threads to observe memory operations in the same order. To relieve programmers from having to reason directly about these relaxed behaviors, languages often provide efficient synchronization primitives and concurrent data structures with stronger high-level guarantees about memory reorderings. For instance, locks usually ensure that when a thread acquires a lock, it can observe all memory operations of the releasing thread, prior to the release. When used correctly, these synchronization primitives and data structures allow clients to recover a fiction of a sequentially consistent memory model.

In this paper we propose a new proof system, iCAP-TSO, that captures this fiction formally, for a language with a TSO memory model. The logic supports reasoning about libraries that directly exploit the relaxed memory model to achieve maximum efficiency. When these libraries provide sufficient guarantees, the logic hides the underlying complexity and admits standard separation logic rules for reasoning about their more high-level clients.


Main Memory Memory Model Operational Semantic Proof System Label Transition System 
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.


  1. 1.
    Intel threading building blocks documentation: Fenced data transfer, (accessed: June 25, 2014)
  2. 2.
  3. 3.
    Linux kernel mailing list, spin_unlock optimization(i386) (November 1999)Google Scholar
  4. 4.
    Alglave, J., Kroening, D., Tautschnig, M.: Partial orders for efficient bounded model checking of concurrent software. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 141–157. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  5. 5.
    Biering, B., Birkedal, L., Torp-Smith, N.: BI-Hyperdoctrines, Higher-order Separation Logic, and Abstraction. ACM TOPLAS (2007)Google Scholar
  6. 6.
    Birkedal, L., et al.: First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees. In: Proc. of LICS (2011)Google Scholar
  7. 7.
    Chlipala, A.: Mostly-automated Verification of Low-level Programs in Computational Separation Logic. In: Proc. of PLDI (2011)Google Scholar
  8. 8.
    Cohen, E., Schirmer, B.: From total store order to sequential consistency: A practical reduction theorem. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 403–418. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  9. 9.
    da Rocha Pinto, P., Dinsdale-Young, T., Gardner, P.: TaDA: A logic for time and data abstraction. In: Jones, R. (ed.) ECOOP 2014. LNCS, vol. 8586, pp. 207–231. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  10. 10.
    Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M., Yang, H.: Views: Compositional Reasoning for Concurrent Programs. In: Proc. of POPL (2013)Google Scholar
  11. 11.
    Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 504–528. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  12. 12.
    Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-modular Shape Analysis. In: Proc. of PLDI (2007)Google Scholar
  13. 13.
    Gotsman, A., Musuvathi, M., Yang, H.: Show No Weakness: Sequentially Consistent Specifications of TSO Libraries. In: Proc. of DISC (2012)Google Scholar
  14. 14.
    Howells, D., McKenney, P.E.: Circular buffers,
  15. 15.
    Jacobs, B.: Verifying TSO Programs. Technical report, Report CW660 (May 2014)Google Scholar
  16. 16.
    Mellor-Crummey, J.M., Scott, M.L.: Algorithms for scalable synchronization on shared-memory multiprocessors. ACM TOCS 9(1), 21–65 (1991)CrossRefGoogle Scholar
  17. 17.
    Owens, S.: Reasoning about the implementation of concurrency abstractions on x86-TSO. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 478–503. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  18. 18.
    Ridge, T.: A rely-guarantee proof system for x86-TSO. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 55–70. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  19. 19.
    Schmidt, D.C., Harrison, T.: Double-checked locking - an optimization pattern for efficiently initializing and accessing thread-safe objects (1997),
  20. 20.
    Sewell, P., Sarkar, S., Owens, S., Zappa Nardelli, F., Myreen, M.O.: x86-TSO: A Rigorous and Usable Programmers Model for x86 Multiprocessors. In: Comm. ACM (2010)Google Scholar
  21. 21.
    Sieczkowski, F., Svendsen, K., Birkedal, L., Pichon-Pharabod, J.: A Separation Logic for Fictional Sequential Consistency. Technical report, Aarhus University (2014),
  22. 22.
    Svendsen, K., Birkedal, L.: Impredicative concurrent abstract predicates. In: Shao, Z. (ed.) ESOP 2014 (ETAPS). LNCS, vol. 8410, pp. 149–168. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  23. 23.
    Turon, A., Vafeiadis, V., Dreyer, D.: GPS: Navigating Weak Memory with Ghosts, Protocols, and Separation. In: Proc. of OOPSLA (2014)Google Scholar
  24. 24.
    Wehrman, I.: Weak-Memory Local Reasoning. PhD thesis, University of Texas, Dissertation draft (2012)Google Scholar
  25. 25.
    Wickerson, J.: Concurrent verification for sequential programs. PhD thesis, University of Cambridge (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Filip Sieczkowski
    • 1
    Email author
  • Kasper Svendsen
    • 1
  • Lars Birkedal
    • 1
  • Jean Pichon-Pharabod
    • 2
  1. 1.Aarhus UniversityAarhusDenmark
  2. 2.University of CambridgeCambridgeUK

Personalised recommendations