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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 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.
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
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)
Formal Systems (Europe), Oxford University: Failures-Divergence Refinement: FDR2 User Manual (2010)
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)
Hoare, C.A.R.: Communicating Sequential Processes. Prentice Hall International, Englewood Cliffs (2004)
ISO/IEC: Standard for Programming Language C++ (2011)
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
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
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)
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)
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
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)
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
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)