Skip to main content

A Rely-Guarantee Proof System for x86-TSO

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6217))

Abstract

Current multiprocessors provide weak or relaxed memory models. Existing program logics assume sequential consistency, and are therefore typically unsound for weak memory. We introduce a novel Rely-Guarantee style proof system for reasoning about x86 assembly programs running against the weak x86-TSO memory model. Interesting features of the logic include processor assertions which can refer to the local state of other processors (including their program counters), and a syntactic operation of closing an assertion under write buffer interference. We use the expressivity of the proof system to construct a new correctness proof for an x86-TSO version of Simpson’s four slot algorithm. Mechanization in the Hol theorem prover provides a flexible tool to support semi-automated verification.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Blazy, S., Leroy, X.: Mechanized semantics for the Clight subset of the C language. CoRR, abs/0901.3619 (2009)

    Google Scholar 

  2. Clint, M., Hoare, C.A.R.: Program proving: Jumps and functions. Acta Informatica 1, 214–224 (1972)

    Article  Google Scholar 

  3. Coleman, J.W.: Expression decomposition in a Rely/Guarantee context. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 146–160. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  4. Cohen, E., Schirmer, N.: A better reduction theorem for store buffers. Technical report (2009)

    Google Scholar 

  5. Floyd, R.W.: Assigning meanings to programs. In: Proc. American Mathematical Society Symposia in Applied Mathematics, vol. 19 (1967)

    Google Scholar 

  6. Henderson, N.: Proving the correctness of Simpson’s 4-slot ACM using an assertional Rely-Guarantee proof method. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 244–263. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  7. Hoare: An axiomatic basis for computer programming. CACM: Communications of the ACM 12 (1969)

    Google Scholar 

  8. Jones, C.B.: Development Methods for Computer Programmes Including a Notion of Interference. PhD thesis, Prgr. Res. Grp. 25, Oxford Univ., Comp. Lab., UK (June 1981)

    Google Scholar 

  9. Linux Kernel mailing list, thread “spin_unlock optimization(i386)”, 119 messages (November 20 - December 7, 1999), http://www.gossamer-threads.com/lists/engine?post=105365;list=linux (Accessed 2009/11/18)

  10. Myreen, M.O., Slind, K., Gordon, M.J.C.: Machine-code verification for multiple architectures: An application of decompilation into logic. In: Proc. FMCAD (2008)

    Google Scholar 

  11. Owens, S., Sarkar, S., Sewell, P.: A better x86 memory model: x86-TSO. In: Urban, C. (ed.) TPHOLs 2009. LNCS, vol. 5674, pp. 391–407. Springer, Heidelberg (2009)

    Google Scholar 

  12. 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)

    Google Scholar 

  13. Park, Dill: An executable specification, analyzer and verifier for RMO (relaxed memory order). In: SPAA: Annual ACM Symposium on Parallel Algorithms and Architectures (1995)

    Google Scholar 

  14. Ridge, T.: Operational reasoning for concurrent Caml programs and weak memory models. In: Schneider, K., Brandt, J. (eds.) TPHOLs 2007. LNCS, vol. 4732, pp. 278–293. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  15. Rushby, J.: Model checking Simpson’s four-slot fully asynchronous communication mechanism (2002)

    Google Scholar 

  16. Simpson, H.R.: Four-slot fully asynchronous communication mechanism. IEE Proceedings, Computers and Digital Techniques 137(1), 17–30 (1990)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ridge, T. (2010). A Rely-Guarantee Proof System for x86-TSO. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds) Verified Software: Theories, Tools, Experiments. VSTTE 2010. Lecture Notes in Computer Science, vol 6217. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15057-9_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-15057-9_4

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-15056-2

  • Online ISBN: 978-3-642-15057-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics