Skip to main content

Modeling Asynchronous Message Passing for C Programs

  • Conference paper
Verification, Model Checking, and Abstract Interpretation (VMCAI 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7148))

Abstract

This paper presents a formal modeling paradigm that is callable from C, the dominant language for embedded systems programming, for message passing APIs that provides reasonable assurance that the model correctly captures intended behavior. The model is a suitable reference solution for the API, and it supports putative what-if queries over API scenarios for behavior exploration, reproducibility for test and debug, full exhaustive search, and other advanced model checking analysis methods for C programs that use the API. This paper illustrates the modeling paradigm on the MCAPI interface, a growing industry standard message passing library, showing how the model exposes errors hidden by the C reference solution provided by the Multicore Association.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. The 4M modeling language, https://github.com/ericmercer/4M

  2. Abrial, J.R.: The B-book: assigning programs to meanings. Cambridge University Press (1996)

    Google Scholar 

  3. Dijkstra, E.W.: Self-stabilizing systems in spite of distributed control. Communications of the ACM 17, 643–644 (1974)

    Article  MATH  Google Scholar 

  4. Dill, D.L., Drexler, A.J., Hu, A.J., Yang, C.H.: Protocol verification as a hardware design aid. In: IEEE International Conference on Computer Design: VLSI in Computers and Processors, pp. 522–525 (1992)

    Google Scholar 

  5. Elwakil, M., Yang, Z.: CRI: Symbolic Debugger for MCAPI Applications. In: Bouajjani, A., Chin, W.-N. (eds.) ATVA 2010. LNCS, vol. 6252, pp. 353–358. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Elwakil, M., Yang, Z.: Debugging support tool for MCAPI applications. In: Parallel and Distributed Systems (2010)

    Google Scholar 

  7. Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. The MIT Press (2009)

    Google Scholar 

  8. Flatt, M.: PLT: Reference: Racket. Tech. Rep. PLT-TR-2010-1, PLT Inc. (2010), http://racket-lang.org/tr1/

  9. Georgelin, P., Pierre, L., Nguyen, T.: A formal specification of the MPI primitives and communication mechanisms. Tech. rep., LIM (1999)

    Google Scholar 

  10. Godefroid, P.: Model checking for programming languages using Verisoft. In: Principles of Programming Languages, pp. 174–186 (1997)

    Google Scholar 

  11. Holzmann, G.J.: The model checker SPIN. IEEE Transactions on Software Engineering 23, 279–295 (1997)

    Article  Google Scholar 

  12. Jackson, D.: Software Abstractions: Logic, Language, and Analysis. The MIT Press (April 2006)

    Google Scholar 

  13. Jongmans, S.-S.T.Q., Hindriks, K.V., van Riemsdijk, M.B.: Model Checking Agent Programs by Using the Program Interpreter. In: Dix, J., Leite, J., Governatori, G., Jamroga, W. (eds.) CLIMA XI. LNCS, vol. 6245, pp. 219–237. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  14. Lamport, L.: TLA - the temporal logic of actions, http://research.microsoft.com/users/lamport/tla/tla.html

  15. Li, G., DeLisi, M., Gopalakrishnan, G., Kirby, R.M.: Formal specification of the MPI-2.0 standard in TLA+. In: Principles and Practices of Parallel Programming, pp. 283–284 (2008)

    Google Scholar 

  16. Li, G., Gopalakrishnan, G., Kirby, R.M., Quinlan, D.: A symbolic verifier for CUDA programs. In: Principles and Practice of Parallel Programming, pp. 357–358 (2010)

    Google Scholar 

  17. McMillan, K.L.: Symbolic Model Checking: An approach to the state explosion problem. Ph.D. thesis, Carnegie Mellon University (1992)

    Google Scholar 

  18. Mercer, E.G., Jones, M.: Model Checking Machine Code with the GNU Debugger. In: Godefroid, P. (ed.) SPIN 2005. LNCS, vol. 3639, pp. 251–265. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  19. Musuvathi, M., Qadeer, S.: Iterative context bounding for systematic testing of multithreaded programs. In: Programming Language Design and Implementation (2007)

    Google Scholar 

  20. Palmer, R., DeLisi, M., Gopalakrishnan, G., Kirby, R.M.: An Approach to Formalization and Analysis of Message Passing Libraries. In: Leue, S., Merino, P. (eds.) FMICS 2007. LNCS, vol. 4916, pp. 164–181. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  21. Pǎsǎreanu, C.S., Mehlitz, P.C., Bushnell, D.H., Gundy-Burlet, K., Lowry, M., Person, S., Pape, M.: Combining unit-level symbolic execution and system-level concrete execution for testing NASA software. In: International Symposium on Software Testing and Analysis, pp. 15–26 (2008)

    Google Scholar 

  22. Roscoe, A.W.: Model-checking CSP, pp. 353–378. Prentice Hall International (UK) Ltd., Hertfordshire (1994)

    Google Scholar 

  23. Sharma, S., Gopalakrishnan, G., Mercer, E., Holt, J.: MCC: A runtime verification tool for MCAPI user applications. In: Formal Methods in Computer-Aided Design, pp. 41–44 (2009)

    Google Scholar 

  24. Siegel, S.F., Avrunin, G.: Analysis of mpi programs. Tech. Rep. UM-CS-2003-036, Department of Computer Science, University of Massachusetts Amherst (2003)

    Google Scholar 

  25. Spivey, J.M.: The Z notation: a reference manual. Prentice-Hall International Series In Computer Science, p. 155 (1989)

    Google Scholar 

  26. The Multicore Association, http://www.multicore-association.org

  27. Vakkalanka, S., Gopalakrishnan, G., Kirby, R.M.: Dynamic Verification of MPI Programs with Reductions in Presence of Split Operations and Relaxed Orderings. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 66–79. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  28. Šimša, J., Bryant, R., Gibson, G.: dBug: Systematic Testing of Unmodified Distributed and Multi-threaded Systems. In: Groce, A., Musuvathi, M. (eds.) SPIN Workshops 2011. LNCS, vol. 6823, pp. 188–193. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  29. Wang, C., Chaudhuri, S., Gupta, A., Yang, Y.: Symbolic pruning of concurrent program executions. In: The Foundations of Software Engineering, pp. 23–32 (2009)

    Google Scholar 

  30. Wang, C., Yang, Y., Gupta, A., Gopalakrishnan, G.: Dynamic Model Checking with Property Driven Pruning to Detect Race Conditions. In: Cha, S., Choi, J.-Y., Kim, M., Lee, I., Viswanathan, M. (eds.) ATVA 2008. LNCS, vol. 5311, pp. 126–140. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  31. Yang, J., Chen, T., Wu, M., Xu, Z., Liu, X., Lin, H., Yang, M., Long, F., Zhang, L., Zhou, L.: MODIST: transparent model checking of unmodified distributed systems. In: Networked Systems Design and Implementation, pp. 213–228 (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Morse, E., Vrvilo, N., Mercer, E., McCarthy, J. (2012). Modeling Asynchronous Message Passing for C Programs. In: Kuncak, V., Rybalchenko, A. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2012. Lecture Notes in Computer Science, vol 7148. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-27940-9_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-27940-9_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-27939-3

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics