Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

Verifying Custom Synchronization Constructs Using Higher-Order Separation Logic

Published: 04 January 2016 Publication History

Abstract

Synchronization constructs lie at the heart of any reliable concurrent program. Many such constructs are standard (e.g., locks, queues, stacks, and hash-tables). However, many concurrent applications require custom synchronization constructs with special-purpose behavior. These constructs present a significant challenge for verification. Like standard constructs, they rely on subtle racy behavior, but unlike standard constructs, they may not have well-understood abstract interfaces. As they are custom built, such constructs are also far more likely to be unreliable.
This article examines the formal specification and verification of custom synchronization constructs. Our target is a library of channels used in automated parallelization to enforce sequential behavior between program statements. Our high-level specification captures the conditions necessary for correct execution; these conditions reflect program dependencies necessary to ensure sequential behavior. We connect the high-level specification with the low-level library implementation to prove that a client’s requirements are satisfied. Significantly, we can reason about program and library correctness without breaking abstraction boundaries.
To achieve this, we use a program logic called iCAP (impredicative Concurrent Abstract Predicates) based on separation logic. iCAP supports both high-level abstraction and low-level reasoning about races. We use this to show that our high-level channel specification abstracts three different, increasingly complex low-level implementations of the library. iCAP’s support for higher-order reasoning lets us prove that sequential dependencies are respected, while iCAP’s next-generation semantic model lets us avoid ugly problems with cyclic dependencies.

References

[1]
C. J. Bell, A. Appel, and D. Walker. 2009. Concurrent separation logic for pipelined parallelization. In SAS.
[2]
E. D. Berger, T. Yang, T. Liu, and G. Novark. 2010. Grace: Safe multithreaded programming for C/C++. In OOPSLA.
[3]
L. Birkedal, R. E. Møgelberg, J. Schwinghammer, and K. Støvring. 2012. First steps in synthetic guarded domain theory: Step-indexing in the topos of trees. Logical Methods in Computer Science 8, 4 (2012).
[4]
R. L. Bocchino Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. 2009. A type and effect system for deterministic parallel Java. In OOPSLA.
[5]
R. Bornat, C. Calcagno, P. O’Hearn, and M. Parkinson. 2005. Permission accounting in separation logic. In POPL.
[6]
M. Botinčan, M. Dodds, and S. Jagannathan. 2013. Resource-sensitive synchronization inference by abduction. TOPLAS 32, 2 (2013).
[7]
P. da Rocha Pinto, T. Dinsdale-Young, M. Dodds, P. Gardner, and M. Wheelhouse. 2011. A simple abstraction for complex concurrent indexes. In OOPSLA.
[8]
P. da Rocha Pinto, T. Dinsdale-Young, and P. Gardner. 2014. TaDA: A logic for time and data abstraction. In ECOOP.
[9]
T. Dinsdale-Young, M. Dodds, P. Gardner, M. J. Parkinson, and V. Vafeiadis. 2010. Concurrent abstract predicates. In ECOOP.
[10]
M. Dodds, X. Feng, M. J. Parkinson, and V. Vafeiadis. 2009. Deny-guarantee reasoning. In ESOP.
[11]
M. Dodds, S. Jagannathan, and M. J. Parkinson. 2011. Modular reasoning for deterministic parallelism. In POPL.
[12]
X. Feng, R. Ferreira, and Z. Shao. 2007. On the relationship between concurrent separation logic and assume-guarantee reasoning. In ESOP.
[13]
A. Gotsman, J. Berdine, B. Cook, N. Rinetzky, and M. Sagiv. 2007. Local reasoning for storable locks and threads. In APLAS.
[14]
C. Haack, M. Huisman, and C. Hurlin. 2008. Reasoning about Java’s reentrant locks. In APLAS.
[15]
C. A. R. Hoare and P. W. O’Hearn. 2008. Separation logic semantics for communicating processes. ENTCS 212 (2008), 3--25.
[16]
A. Hobor, A. W. Appel, and F. Z. Nardelli. 2008. Oracle semantics for concurrent separation logic. In ESOP.
[17]
B. Jacobs and F. Piessens. 2009. Modular Full Functional Specification and Verification of Lock-Free Data Structures. Technical Report CW 551. Katholieke Universiteit Leuven, Dept. of Computer Science.
[18]
C. B. Jones. 1983. Tentative steps toward a development method for interfering programs. TOPLAS 5, 4 (1983).
[19]
N. R. Krishnaswami, L. Birkedal, and J. Aldrich. 2010. Verifying event-driven programs using ramified frame properties. In TLDI.
[20]
K. R. M. Leino, P. Müller, and J. Smans. 2010. Deadlock-free channels and locks. In ESOP.
[21]
A. Nanevski, R. Ley-Wild, I. Sergey, and G. A. Delbianco. 2014. Communicating state transition systems for fine-grained concurrent resources. In ESOP.
[22]
A. Navabi, X. Zhang, and S. Jagannathan. 2008. Quasi-static scheduling for safe futures. In PPoPP.
[23]
P. W. O’Hearn. 2007. Resources, concurrency and local reasoning. TCS 375, 1--3 (2007).
[24]
M. J. Parkinson and G. M. Bierman. 2005. Separation logic and abstraction. In POPL.
[25]
M. C. Rinard and M. S. Lam. 1992. Semantic foundations of Jade. In POPL.
[26]
K. Svendsen and L. Birkedal. 2014a. Impredicative concurrent abstract predicates. In ESOP.
[27]
K. Svendsen and L. Birkedal. 2014b. Impredicative Concurrent Abstract Predicates. Technical Report. Aarhus University. Retrieved from https://bitbucket.org/logsem/public/src/master/icap/esop2014-tr.pdf.
[28]
K. Svendsen, L. Birkedal, and M. J. Parkinson. 2013. Joins: A case study in modular specification of a concurrent reentrant higher-order library. In ECOOP.
[29]
A. Turon, D. Dreyer, and L. Birkedal. 2013. Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency. In ICFP.
[30]
V. Vafeiadis. 2007. Modular Fine-Grained Concurrency Verification. Ph.D. Dissertation. University of Cambridge.
[31]
V. Vafeiadis and M. J. Parkinson. 2007. A marriage of rely/guarantee and separation logic. In CONCUR.
[32]
J. Villard, É. Lozes, and C. Calcagno. 2010. Tracking heaps that hop with heap-hop. In TACAS.
[33]
A. Welc, S. Jagannathan, and A. Hosking. 2005. Safe futures for Java. In OOPSLA.
[34]
J. Wickerson, M. Dodds, and M. Parkinson. 2010. Explicit stabilisation for modular rely-guarantee reasoning. In ESOP.

Cited By

View all
  • (2022)Arbitrarily Parallelizable Code: A Model of Computation Evaluated on a Message-Passing Many-Core SystemComputers10.3390/computers1111016411:11(164)Online publication date: 18-Nov-2022
  • (2022)Automated Verification of Concurrent Search StructuresundefinedOnline publication date: 18-Mar-2022
  • (2021)Correct program parallelisationsInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-020-00601-z23:5(741-763)Online publication date: 1-Oct-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Programming Languages and Systems
ACM Transactions on Programming Languages and Systems  Volume 38, Issue 2
January 2016
212 pages
ISSN:0164-0925
EISSN:1558-4593
DOI:10.1145/2866613
Issue’s Table of Contents
Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for third-party components of this work must be honored. For all other uses, contact the Owner/Author.

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 04 January 2016
Accepted: 01 August 2015
Revised: 01 August 2015
Received: 01 August 2014
Published in TOPLAS Volume 38, Issue 2

Check for updates

Author Tags

  1. Separation logic
  2. concurrency
  3. concurrent abstract predicates

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

  • NSF

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)74
  • Downloads (Last 6 weeks)9
Reflects downloads up to 03 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Arbitrarily Parallelizable Code: A Model of Computation Evaluated on a Message-Passing Many-Core SystemComputers10.3390/computers1111016411:11(164)Online publication date: 18-Nov-2022
  • (2022)Automated Verification of Concurrent Search StructuresundefinedOnline publication date: 18-Mar-2022
  • (2021)Correct program parallelisationsInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-020-00601-z23:5(741-763)Online publication date: 1-Oct-2021
  • (2020)Verifying concurrent search structure templatesProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386029(181-196)Online publication date: 11-Jun-2020
  • (2020)Local Reasoning for Global Graph PropertiesProgramming Languages and Systems10.1007/978-3-030-44914-8_12(308-335)Online publication date: 27-Apr-2020
  • (2018)Iris from the ground up: A modular foundation for higher-order concurrent separation logicJournal of Functional Programming10.1017/S095679681800015128Online publication date: 22-Nov-2018
  • (2017)Go with the flow: compositional abstractions for concurrent data structuresProceedings of the ACM on Programming Languages10.1145/31581252:POPL(1-31)Online publication date: 27-Dec-2017
  • (2016)Transfinite Step-IndexingProceedings of the 25th European Symposium on Programming Languages and Systems - Volume 963210.5555/3089528.3089556(727-751)Online publication date: 2-Apr-2016
  • (2016)Higher-order ghost stateACM SIGPLAN Notices10.1145/3022670.295194351:9(256-269)Online publication date: 4-Sep-2016
  • (2016)Concurrent separation logicACM SIGLOG News10.1145/2984450.29844573:3(47-65)Online publication date: 8-Aug-2016
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media