Skip to main content
Top
Published in: International Journal of Parallel Programming 6/2018

26-09-2017

GPS\(+\): Reasoning About Fences and Relaxed Atomics

Authors: Mengda He, Viktor Vafeiadis, Shengchao Qin, João F. Ferreira

Published in: International Journal of Parallel Programming | Issue 6/2018

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

In order to support efficient compilation to modern architectures, mainstream programming languages, such as C/C\(++\) and Java, have adopted weak (or relaxed) memory models. According to these weak memory models, multithreaded programs are allowed to exhibit behaviours that would have been inconsistent under the traditional strong (i.e., sequentially consistent) memory model. This makes the task of reasoning about concurrent programs even more challenging. The GPS framework, developed by Turon et al. (ACM OOPSLA, pp 691–707, 2014), has made a step forward towards tackling this challenge for the release–acquire fragment of the C11 memory model. By integrating ghost states, per-location protocols and separation logic, GPS can successfully verify programs with release–acquire atomics. In this paper, we introduced GPS\(+\) to support a larger class of C11 programs, that is, programs with release–acquire atomics, relaxed atomics and release–acquire fences. Key elements of our proposed logic include two new types of assertions, a more expressive resource model and a set of new verification rules.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Footnotes
1
Here we explain these examples in an intuitive manner, leaving the formal introductions of syntax and semantics to the next section.
 
2
Or via release sequences, which we do not consider in this paper.
 
3
In GPS, \(|r|\) represents the duplicable part of \(r\): \(r=r\oplus |r|\). For duplicable items in \(r\), like atomic values and the known escrow set, stripping keeps them unchanged. That is, we have \(|r|.\varSigma =r.\varSigma \), and if \(\ell _\mathtt {at}\) is an atomic location in \(r\) we have \(|r|.\varPi (\ell _\mathtt {at})=r.\varPi (\ell _\mathtt {at})\). For non-duplicable items, like non-atomic values, stripping removes them. For example, if \(\ell _\mathtt {na}\) is a non-atomic location in \(r\) we have \(|r|.\varPi (\ell _\mathtt {na})=\bot \). The value \(\diamond \) of ghost type \(\mathsf {Tok}\) is also not duplicable, and all ghost locations of type \(\mathsf {Tok}\) will be set as empty after stripping: \(|r|.g(\mathsf {Tok})(-)=\xi \).
 
Literature
1.
go back to reference Batty, M., Owens, S., Sarkar, S., Sewell, P., Weber, T.: Mathematizing C++ concurrency. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’11, pp. 55–66. ACM, New York (2011) Batty, M., Owens, S., Sarkar, S., Sewell, P., Weber, T.: Mathematizing C++ concurrency. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’11, pp. 55–66. ACM, New York (2011)
2.
go back to reference Cohen, E., Dahlweid, M., Hillebrand, M., Leinenbach, D., Moskal, M., Santen, T., Schulte, W., Tobies, S.: VCC: a practical system for verifying concurrent C. In: International Conference on Theorem Proving in Higher Order Logics (TPHOLs ’09), pp. 23–42 (2009) Cohen, E., Dahlweid, M., Hillebrand, M., Leinenbach, D., Moskal, M., Santen, T., Schulte, W., Tobies, S.: VCC: a practical system for verifying concurrent C. In: International Conference on Theorem Proving in Higher Order Logics (TPHOLs ’09), pp. 23–42 (2009)
3.
go back to reference da Rocha Pinto, P., Dinsdale-Young, T., Gardner, P.: TaDA: a logic for time and data abstraction. In: ECOOP, pp. 207–231 (2014) da Rocha Pinto, P., Dinsdale-Young, T., Gardner, P.: TaDA: a logic for time and data abstraction. In: ECOOP, pp. 207–231 (2014)
4.
go back to reference Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: ECOOP, pp. 504–528 (2010) Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: ECOOP, pp. 504–528 (2010)
5.
go back to reference Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M.J., Yang, H.: Views: compositional reasoning for concurrent programs. In: ACM POPL, pp. 287–300 (2013)CrossRef Dinsdale-Young, T., Birkedal, L., Gardner, P., Parkinson, M.J., Yang, H.: Views: compositional reasoning for concurrent programs. In: ACM POPL, pp. 287–300 (2013)CrossRef
6.
go back to reference Dodds, M., Feng, X., Parkinson, M., Vafeiadis, V.: Deny-guarantee reasoning. In: ESOP, pp. 363–377 (2009) Dodds, M., Feng, X., Parkinson, M., Vafeiadis, V.: Deny-guarantee reasoning. In: ESOP, pp. 363–377 (2009)
7.
go back to reference Doko, M., Vafeiadis, V.: A Program Logic for C11 Memory Fences, pp. 413–430. Springer, Berlin (2016) Doko, M., Vafeiadis, V.: A Program Logic for C11 Memory Fences, pp. 413–430. Springer, Berlin (2016)
8.
go back to reference Feng, X.: Local rely-guarantee Reasoning. In: ACM POPL, pp. 315–327 (2009)CrossRef Feng, X.: Local rely-guarantee Reasoning. In: ACM POPL, pp. 315–327 (2009)CrossRef
10.
go back to reference ISO/IEC 9899:2011. Programming Language C (2011) ISO/IEC 9899:2011. Programming Language C (2011)
11.
go back to reference Jensen, J.B., Birkedal, L.: Fictional separation logic. In: ESOP, pp. 377–396 (2012)CrossRef Jensen, J.B., Birkedal, L.: Fictional separation logic. In: ESOP, pp. 377–396 (2012)CrossRef
12.
go back to reference Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM TOPLAS 5, 596–619 (1983)CrossRef Jones, C.B.: Tentative steps toward a development method for interfering programs. ACM TOPLAS 5, 596–619 (1983)CrossRef
13.
go back to reference Jung, R., Swasey, D., Sieczkowski, F., Svendsen, K., Turon, A., Birkedal, L., Dreyer, D.: Iris: monoids and invariants as an orthogonal basis for concurrent reasoning. In: ACM POPL, pp. 637–650 (2015)CrossRef Jung, R., Swasey, D., Sieczkowski, F., Svendsen, K., Turon, A., Birkedal, L., Dreyer, D.: Iris: monoids and invariants as an orthogonal basis for concurrent reasoning. In: ACM POPL, pp. 637–650 (2015)CrossRef
14.
go back to reference Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)CrossRef Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)CrossRef
15.
go back to reference Leino, K.R., Müller, P., Smans, J.: Verification of concurrent programs with Chalice. In: Foundations of Security Analysis and Design V, pp. 195–222 (2009)CrossRef Leino, K.R., Müller, P., Smans, J.: Verification of concurrent programs with Chalice. In: Foundations of Security Analysis and Design V, pp. 195–222 (2009)CrossRef
16.
go back to reference Ley-Wild, R., Nanevski, A.: Subjective auxiliary state for coarse-grained concurrency. In: ACM POPL, pp. 561–574 (2013)CrossRef Ley-Wild, R., Nanevski, A.: Subjective auxiliary state for coarse-grained concurrency. In: ACM POPL, pp. 561–574 (2013)CrossRef
17.
go back to reference Manson, J., Pugh, W., Adve, S.V.: The Java memory model. In: ACM POPL, pp. 378–391 (2005)CrossRef Manson, J., Pugh, W., Adve, S.V.: The Java memory model. In: ACM POPL, pp. 378–391 (2005)CrossRef
18.
go back to reference Nanevski, A., Ley-Wild, R., Sergey, I., Delbianco, G.: Communicating state transition systems for fine-grained concurrent resources. In: ESOP, pp. 290–310 (2014) Nanevski, A., Ley-Wild, R., Sergey, I., Delbianco, G.: Communicating state transition systems for fine-grained concurrent resources. In: ESOP, pp. 290–310 (2014)
19.
20.
go back to reference Svendsen, K., Birkedal, L.: Impredicative concurrent abstract predicates. In: ESOP, pp. 149–168 (2014)CrossRef Svendsen, K., Birkedal, L.: Impredicative concurrent abstract predicates. In: ESOP, pp. 149–168 (2014)CrossRef
21.
go back to reference Tassarotti, J., Dreyer, D., Vafeiadis, V.: Verifying read-copy-update in a logic for weak memory. In: ACM PLDI, Portland, OR, USA (2015) Tassarotti, J., Dreyer, D., Vafeiadis, V.: Verifying read-copy-update in a logic for weak memory. In: ACM PLDI, Portland, OR, USA (2015)
22.
go back to reference Turon, A., Dreyer, D., Birkedal, L.: Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency. In: ICFP, pp. 377–390 (2013) Turon, A., Dreyer, D., Birkedal, L.: Unifying refinement and hoare-style reasoning in a logic for higher-order concurrency. In: ICFP, pp. 377–390 (2013)
23.
go back to reference Turon, A., Vafeiadis, V., Dreyer, D.: GPS: Navigating weak memory with ghosts, protocols, and separation. In: ACM OOPSLA, pp. 691–707 (2014) Turon, A., Vafeiadis, V., Dreyer, D.: GPS: Navigating weak memory with ghosts, protocols, and separation. In: ACM OOPSLA, pp. 691–707 (2014)
24.
go back to reference Vafeiadis, V., Parkinson, M.J.: A marriage of rely/guarantee and separation logic. In: 18th International Conference on Concurrency Theory (CONCUR’07), volume 4703 of Lecture Notes in Computer Science, pp. 256–271 (2007) Vafeiadis, V., Parkinson, M.J.: A marriage of rely/guarantee and separation logic. In: 18th International Conference on Concurrency Theory (CONCUR’07), volume 4703 of Lecture Notes in Computer Science, pp. 256–271 (2007)
25.
go back to reference Vafeiadis, V., Narayan, C.: Relaxed separation logic: a program logic for C11 concurrency. In: ACM OOPSLA, pp. 867–884 (2013)CrossRef Vafeiadis, V., Narayan, C.: Relaxed separation logic: a program logic for C11 concurrency. In: ACM OOPSLA, pp. 867–884 (2013)CrossRef
Metadata
Title
GPS: Reasoning About Fences and Relaxed Atomics
Authors
Mengda He
Viktor Vafeiadis
Shengchao Qin
João F. Ferreira
Publication date
26-09-2017
Publisher
Springer US
Published in
International Journal of Parallel Programming / Issue 6/2018
Print ISSN: 0885-7458
Electronic ISSN: 1573-7640
DOI
https://doi.org/10.1007/s10766-017-0518-x

Other articles of this Issue 6/2018

International Journal of Parallel Programming 6/2018 Go to the issue

Premium Partner