Skip to main content

Eliminating Data Race Warnings Using CSP

  • Conference paper
  • First Online:
Reliable Software Technologies – Ada-Europe 2016 (Ada-Europe 2016)

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

Included in the following conference series:

Abstract

Embedded systems commonly use state to synchronize concurrent programs. This state-based synchronization avoids serious errors like data races and can supersede other means of synchronization like locks and global disabling of interrupts. However, it makes reasoning difficult and static analysis tools struggle to comprehend it. In this paper we explain how we model C programs conservatively using static analysis and then use CSP refinement checkers to analyse synchronization. This paper demonstrates how this process aids program understanding and leads to the dismissal of data race warnings in industrial systems. We examine real-world synchronisation schemes and explain how and why they work.

This work was funded in part within the project ARAMiS by the German Federal Ministry for Education and Research with the funding ID 01IS11035. The responsibility for the content remains with the author.

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

Access this chapter

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 EPUB and 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

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    Actually, the analysis provides finer results with several grades in between those mentioned. We refer the reader to Keul [6] for more details.

  2. 2.

    The variable state could also have an ill-defined value, like the one it has before initialization. Our approach is aware of such other values.

References

  1. Degiorgi, S., Wittiger, M.: Rating the results of conservative static data race analyses (dt.: Ergebnisbewertung konservativer statischer Data-Race-Analysen). In: Workshop for Software-Reengineering WSR 2013 (2013)

    Google Scholar 

  2. Formal Systems (Europe), Oxford University: Failures-Divergence Refinement: FDR2 User Manual (2010)

    Google Scholar 

  3. Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: FDR3 — a modern refinement checker for CSP. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 187–201. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  4. Hoare, C.A.R.: Communicating Sequential Processes. Prentice Hall International, Englewood Cliffs (2004)

    MATH  Google Scholar 

  5. ISO/IEC: Standard for Programming Language C++ (2011)

    Google Scholar 

  6. Keul, S.: Tuning static data race analysis for automotive control software. In: 11th IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM), pp. 45–54 (2011). http://dx.doi.org/10.1109/SCAM.2011.16

  7. Koutsopoulos, N., Northover, M., Felden, T., Wittiger, M.: Advancing data race investigation and classification through visualization. In: 2015 IEEE 3rd Working Conference on Software Visualization (VISSOFT), pp. 200–204 (2015). http://dx.doi.org/10.1109/VISSOFT.2015.7332437

  8. Leuschel, M., Fontaine, M.: Probing the depths of CSP-M: a new FDR-compliant validation tool. In: Liu, S., Maibaum, T., Araki, K. (eds.) ICFEM 2008. LNCS, vol. 5256, pp. 278–297. Springer, Heidelberg (2008)

    Google Scholar 

  9. Raza, A., Vogel, G., Plödereder, E.: Bauhaus – a tool suite for program analysis and reverse engineering. In: Pinho, L.M., González Harbour, M. (eds.) Ada-Europe 2006. LNCS, vol. 4006, pp. 71–82. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  10. Savage, S., Burrows, M., Nelson, G., Sobalvarro, P., Anderson, T.: Eraser: a dynamic data race detector for multithreaded programs. ACM Trans. Comput. Syst. 15(4), 391–411 (1997). http://dx.doi.org/10.1145/265924.265927

    Article  Google Scholar 

  11. Schwarz, M.D., Seidl, H., Vojdani, V., Apinis, K.: Precise analysis of value-dependent synchronization in priority scheduled programs. In: McMillan, K.L., Rival, X. (eds.) VMCAI 2014. LNCS, vol. 8318, pp. 21–38. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  12. Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 334–345. ACM (2006). http://dx.doi.org/10.1145/1111037.1111067

  13. Wittiger, M., Felden, T.: Recognition of real-world state-based synchronization. In: Proceedings of the 17th Workshop Software-Reengineering and Evolution (WSRE), pp. 9–10 (2015)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Martin Wittiger .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Wittiger, M. (2016). Eliminating Data Race Warnings Using CSP. In: Bertogna, M., Pinho, L., Quiñones, E. (eds) Reliable Software Technologies – Ada-Europe 2016. Ada-Europe 2016. Lecture Notes in Computer Science(), vol 9695. Springer, Cham. https://doi.org/10.1007/978-3-319-39083-3_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-39083-3_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-39082-6

  • Online ISBN: 978-3-319-39083-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics