Skip to main content

Modular Indirect Push-Button Formal Verification of Multi-threaded Code Generators

  • Conference paper
  • First Online:
Software Engineering and Formal Methods (SEFM 2019)

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

Included in the following conference series:

Abstract

In model-driven development, the automated generation of a multi-threaded program based on a model specifying the intended system behaviour is an important step. Verifying that such a generation step semantically preserves the specified functionality is hard. In related work, code generators have been formally verified using theorem provers, but this is very time-consuming work, should be done by an expert in formal verification, and is not easily adaptable to changes applied in the generator. In this paper, we propose, as an alternative, a push-button approach, combining equivalence checking and code verification with previous results we obtained on the verification of generic code constructs. To illustrate the approach, we consider our Slco framework, which contains a multi-threaded Java code generator. Although the technique can still only be applied to verify individual applications of the generator, its push-button nature and efficiency in practice makes it very suitable for non-experts.

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

Notes

  1. 1.

    We omit a definition of bisimilarity for Kripke structures. For the details, see [36]. Also, in contrast to [29, 36], the translation as defined here does not treat transitions between equally labelled states as internal LTS steps, since no such transitions are present in our Kripke structures (see Sect. 4.2).

  2. 2.

    http://jinja.pocoo.org.

References

  1. Ab Rahim, L., Whittle, J.: Verifying semantic conformance of State Machine-to-Java code generators. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) MODELS 2010. LNCS, vol. 6394, pp. 166–180. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16145-2_12

    Chapter  Google Scholar 

  2. Ab Rahim, L., Whittle, J.: A survey of approaches for verifying model transformations. Softw. Syst. Model. 14, 1003–1028 (2013)

    Article  Google Scholar 

  3. Abrial, J.R.: Modeling in Event-B: System and Software Engineering. Cambridge University Press, Cambridge (2010)

    Book  Google Scholar 

  4. Amighi, A., Haack, C., Huisman, M., Hurlin, C.: Permission-based separation logic for multithreaded Java programs. Log. Methods Comput. Sci. 11(1–2), 1–66 (2015)

    MathSciNet  MATH  Google Scholar 

  5. Baldan, P., Corradini, A., Ehrig, H., Heckel, R., König, B.: Bisimilarity and behaviour-preserving reconfigurations of open Petri Nets. In: Mossakowski, T., Montanari, U., Haveraaen, M. (eds.) CALCO 2007. LNCS, vol. 4624, pp. 126–142. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73859-6_9

    Chapter  MATH  Google Scholar 

  6. Bertot, Y., CastĂ©ran, P.: Interactive Theorem Proving and Program Development: Coq’ Art: The Calculus of Inductive Constructions. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-662-07964-5

    Book  MATH  Google Scholar 

  7. Blech, J., Glesner, S., Leitner, J.: Formal verification of Java code generation from UML models. Fujaba Days 2005, 49–56 (2005)

    Google Scholar 

  8. Blom, S., Darabi, S., Huisman, M., Oortwijn, W.: The VerCors tool set: verification of parallel and concurrent software. In: Polikarpova, N., Schneider, S. (eds.) IFM 2017. LNCS, vol. 10510, pp. 102–110. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66845-1_7

    Chapter  Google Scholar 

  9. Bourke, T., Brun, L., Dagand, P.E., Leroy, X., Pouzet, M., Rieg, L.: A formally verified compiler for Lustre. In: PLDI, ACM SIGPLAN Notices, vol. 52, pp. 586–601. ACM (2017)

    Article  Google Scholar 

  10. Boơnački, D., et al.: Towards modular verification of threaded concurrent executable code generated from DSL models. In: Braga, C., Ölveczky, P.C. (eds.) FACS 2015. LNCS, vol. 9539, pp. 141–160. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-28934-2_8

    Chapter  Google Scholar 

  11. Bunte, O., et al.: The mCRL2 toolset for analysing concurrent systems. In: Vojnar, T., Zhang, L. (eds.) TACAS 2019. LNCS, vol. 11428, pp. 21–39. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-17465-1_2

    Chapter  Google Scholar 

  12. Chaki, S., Clarke, E., Groce, A., Jha, S., Veith, H.: Modular verification of software components in C. In: ICSE, pp. 385–395. IEEE (2003)

    Google Scholar 

  13. Dalvandi, M., Butler, M., Rezazadeh, A.: From Event-B models to Dafny code contracts. In: Dastani, M., Sirjani, M. (eds.) FSEN 2015. LNCS, vol. 9392, pp. 308–315. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-24644-4_21

    Chapter  Google Scholar 

  14. Dejanović, I., Vaderna, R., Milosavljević, G., Vuković, Ćœ.: TextX: a Python tool for domain-specific languages implementation. Knowl.-Based Syst. 115, 1–4 (2017). https://doi.org/10.1016/j.knosys.2016.10.023

    Article  Google Scholar 

  15. Ernst, D., PfĂ€hler, J., Schellhorn, G., Haneberg, D., Reif, W.: KIV: overview and verifythis competition. Int. J. Softw. Tools Technol. Transf. 17(6), 677–694 (2015)

    Article  Google Scholar 

  16. Groote, J., Jansen, D., Keiren, J., Wijs, A.: An O(m log n) algorithm for computing stuttering equivalence and branching bisimulation. ACM Trans. Comput. Log. 18(2), 13:1–13:34 (2017)

    Article  Google Scholar 

  17. Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The synchronous data flow programming language LUSTRE. Proc. IEEE 79(9), 1305–1320 (1991)

    Article  Google Scholar 

  18. Havender, J.: Avoiding deadlock in multitasking systems. IBM Syst. J. 7(2), 74–84 (1968)

    Article  Google Scholar 

  19. Holzmann, G.: The SPIN Model Checker: Primer and Reference Manual. Addison-Wesley Professional (2003)

    Google Scholar 

  20. HĂŒlsbusch, M., König, B., Rensink, A., Semenyak, M., Soltenborn, C., Wehrheim, H.: Showing full semantics preservation in model transformation - a comparison of techniques. In: MĂ©ry, D., Merz, S. (eds.) IFM 2010. LNCS, vol. 6396, pp. 183–198. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16265-7_14

    Chapter  Google Scholar 

  21. Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: a powerful, sound, predictable, fast verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-20398-5_4

    Chapter  Google Scholar 

  22. Jhala, R., Majumdar, R.: Software model checking. ACM Comput. Surv. 41(4), 21:1–21:54 (2009)

    Article  Google Scholar 

  23. Kleppe, A., Warmer, J., Bast, W.: MDA Explained: The Model Driven Architecture: Practice and Promise. Addison-Wesley Professional (2005)

    Google Scholar 

  24. Kumar, R., Myreen, M., Norrish, M., Owens, S.: CakeML: a verified implementation of ML. In: POPL, ACM SIGPLAN Notices, vol. 49, pp. 179–191. ACM (2014)

    Google Scholar 

  25. Leino, K.R.M.: Dafny: an automatic program verifier for functional correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS (LNAI), vol. 6355, pp. 348–370. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17511-4_20

    Chapter  MATH  Google Scholar 

  26. Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)

    Article  Google Scholar 

  27. Leroy, X.: Formal proofs of code generation and verification tools. In: Giannakopoulou, D., SalaĂŒn, G. (eds.) SEFM 2014. LNCS, vol. 8702, pp. 1–4. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-10431-7_1

    Chapter  Google Scholar 

  28. MĂŒller, P., Schwerhoff, M., Summers, A.J.: Viper: a verification infrastructure for permission-based reasoning. In: Jobstmann, B., Leino, K.R.M. (eds.) VMCAI 2016. LNCS, vol. 9583, pp. 41–62. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49122-5_2

    Chapter  MATH  Google Scholar 

  29. De Nicola, R., Vaandrager, F.: Action versus state based logics for transition systems. In: Guessarian, I. (ed.) LITP 1990. LNCS, vol. 469, pp. 407–419. Springer, Heidelberg (1990). https://doi.org/10.1007/3-540-53479-2_17

    Chapter  Google Scholar 

  30. Nipkow, T., Paulson, L., Wenzel, M.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-45949-9

    Book  MATH  Google Scholar 

  31. Paige, R., Tarjan, R.: Three partition refinement algorithms. SIAM J. Comput. 16(6), 973–989 (1987)

    Article  MathSciNet  Google Scholar 

  32. Pelánek, R.: BEEM: benchmarks for explicit model checkers. In: Boơnački, D., Edelkamp, S. (eds.) SPIN 2007. LNCS, vol. 4595, pp. 263–267. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73370-6_17

    Chapter  Google Scholar 

  33. Pnueli, A., Shtrichman, O., Siegel, M.: The code validation tool CVT: automatic verification of a compilation process. Int. J. Softw. Tools Technol. Transf. 2(2), 192–201 (1998)

    Article  Google Scholar 

  34. de Putter, S., Wijs, A.: A formal verification technique for behavioural model-to-model transformations. Formal Aspects Comput. 30(1), 3–43 (2018)

    Article  MathSciNet  Google Scholar 

  35. de Putter, S., Wijs, A., Zhang, D.: The SLCO framework for verified, model-driven construction of component software. In: Bae, K., Ölveczky, P.C. (eds.) FACS 2018. LNCS, vol. 11222, pp. 288–296. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02146-7_15

    Chapter  Google Scholar 

  36. Reniers, M., Schoren, R., Willemse, T.: Results on embeddings between state-based and event-based systems. Comput. J. 57(1), 73–92 (2014)

    Article  Google Scholar 

  37. Slind, K., Norrish, M.: A brief overview of HOL4. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 28–32. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-71067-7_6

    Chapter  Google Scholar 

  38. Staats, M., Heimdahl, M.P.E.: Partial translation verification for untrusted code-generators. In: Liu, S., Maibaum, T., Araki, K. (eds.) ICFEM 2008. LNCS, vol. 5256, pp. 226–237. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88194-0_15

    Chapter  Google Scholar 

  39. Stenzel, K., Moebius, N., Reif, W.: Formal verification of QVT transformations for code generation. In: Whittle, J., Clark, T., KĂŒhne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 533–547. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24485-8_39

    Chapter  Google Scholar 

  40. Sulzmann, M., Zechner, A.: Model checking DSL-generated C source code. In: Donaldson, A., Parker, D. (eds.) SPIN 2012. LNCS, vol. 7385, pp. 241–247. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31759-0_18

    Chapter  Google Scholar 

  41. Visser, W., Havelund, K., Brat, G., Park, S., Lerda, F.: Model checking programs. Autom. Softw. Eng. 10(2), 203–232 (2003)

    Article  Google Scholar 

  42. Wijs, A.: Achieving discrete relative timing with untimed process algebra. In: ICECCS, pp. 35–46. IEEE (2007)

    Google Scholar 

  43. Wijs, A.: What to do next?: Analysing and optimising system behaviour in time. Ph.D. thesis, VU University Amsterdam (2007)

    Google Scholar 

  44. Wijs, A., Engelen, L.: Efficient property preservation checking of model refinements. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 565–579. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36742-7_41

    Chapter  MATH  Google Scholar 

  45. Wijs, A., Fokkink, W.: From \(\chi _{\mathit{t}}\) to \(\mu \)CRL: combining performance and functional analysis. In: ICECCS, pp. 184–193. IEEE (2005)

    Google Scholar 

  46. Wijs, A., Neele, T., Boơnački, D.: GPUexplore 2.0: unleashing GPU explicit-state model checking. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 694–701. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_42

    Chapter  Google Scholar 

  47. Zhang, D., et al.: Verifying atomicity preservation and deadlock freedom of a generic shared variable mechanism used in model-to-code transformations. In: Hammoudi, S., Pires, L.F., Selic, B., Desfray, P. (eds.) MODELSWARD 2016. CCIS, vol. 692, pp. 249–273. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66302-9_13

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Anton Wijs .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wijs, A., WiƂkowski, M. (2019). Modular Indirect Push-Button Formal Verification of Multi-threaded Code Generators. In: Ölveczky, P., SalaĂŒn, G. (eds) Software Engineering and Formal Methods. SEFM 2019. Lecture Notes in Computer Science(), vol 11724. Springer, Cham. https://doi.org/10.1007/978-3-030-30446-1_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-30446-1_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-30445-4

  • Online ISBN: 978-3-030-30446-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics