Skip to main content

Combining Dynamic and Static Analysis to Help Develop Correct Graph Transformations

  • Conference paper
  • First Online:
Book cover Tests and Proofs (TAP 2016)

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

Included in the following conference series:

Abstract

Developing provably correct graph transformations is not a trivial task. Besides writing the code, a developer must as well specify the pre- and post-conditions. The objective of our work is to assist developers in producing such a Hoare triple in order to submit it to a formal verification tool. By combining static and dynamic analysis, we aim at providing more useful feedback to developers. Dynamic analysis helps identify inconsistencies between the code and its specifications. Static analysis facilitates extracting the pre- and post-conditions from the code. Based on this proposal, we implemented a prototype that allows running, testing and proving graph transformations written in small-\( \text{t}_{\mathcal{ALC}} \), our own transformation language.

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.

    The individual is not deleted from the graph because it can be still owned by other concepts.

  2. 2.

    We can strengthen the post-condition by adding the fact (a ¬r b) to insist that there is no edge between a and b. However, we intentionally keep it weak to illustrate that developers can write any post-condition, not exactly the strongest post condition wrt. the given pre-condition.

  3. 3.

    If the post-condition was strengthened by the fact (a ¬r b), the corresponding test assertNotExistEdge(a r b) will have been also generated.

References

  1. Baklanova, N., Brenas, J.H., Echahed, R., Percebois, C., Strecker, M., Tran, H.N.: Provably correct graph transformations with small-tALC. In: ICTERI 2015, pp. 78–93 (2015)

    Google Scholar 

  2. Schmidt-Schauß, M., Smolka, G.: Attributive concept descriptions with complements. Artif. Intell. 48(1), 1–26 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  3. Smaragdakis, Y., Csallner, C.: Combining static and dynamic reasoning for bug detection. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 1–16. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  4. Gordon, M., Collavizza, H.: Forward with Hoare. In: Roscoe, A.W., Jones, C.B., Wood, K.R. (eds.) Reflections on the Work of C.A.R. Hoare. History of Computing Series, pp. 101–121. Springer, London (2010)

    Google Scholar 

  5. Beckert, B., Gladisch, C.: White-box testing by combining deduction-based specification extraction and black-box testing. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 207–216. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  6. Habel, A., Pennemann, K.H.: Correctness of high-level transformation systems relative to nested conditions. Math. Struct. Comput. Sci. 19(2), 245–296 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  7. Poskitt, C.M., Plump, D.: Hoare-style verification of graph programs. Fundam. Inf. 118(1–2), 135–175 (2012)

    MathSciNet  MATH  Google Scholar 

  8. Liu, S., Nakajima, S.: Combining specification-based testing, correctness proof, and inspection for program verification in practice. In: Liu, S., Duan, Z. (eds.) SOFL + MSVL 2013. LNCS, vol. 8332, pp. 1–18. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  9. Owre, S., Rajan, S., Rushby, J.M., Shankar, N., Srivas, M.K.: PVS: combining specification, proof checking, and model checking. In: Alur, R., Henzinger, T.A. (eds.) CAV 1996. LNCS, vol. 1102, pp. 411–414. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  10. Engel, C., Hähnle, R.: Generating unit tests from formal proofs. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 169–188. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  11. Xie, T., Marinov, D., Schulte, W., Notkin, D.: Symstra: a framework for generating object-oriented unit tests using symbolic execution. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 365–381. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  12. Bak, C., Faulkner, G., Plump, D., Runciman, C.: A reference interpreter for the graph programming language GP 2. In: Rensink, A., Zambon E. (eds.) Graphs as Models 2015 (GaM 2015). EPTCS 2015, vol. 181, pp. 48–64 (2015)

    Google Scholar 

  13. Darabos, A., Pataricza, A., Varró, D.: Towards testing the implementation of graph transformations. Electron. Notes Theor. Comput. Sci. 211, 75–85 (2008)

    Article  Google Scholar 

  14. Geiger, L., Zündorf, A.: Transforming graph based scenarios into graph transformation based JUnit tests. In: Pfaltz, J.L., Nagl, M., Böhlen, B. (eds.) AGTIVE 2003. LNCS, vol. 3062, pp. 61–74. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  15. Molloy, M., Reed, B.: A critical point for random graphs with a given degree sequence. Random Struct. Algorithms 6(2–3), 161–180 (1995). Wiley

    Article  MathSciNet  MATH  Google Scholar 

  16. Molloy, M., Reed, B.: The size of the giant component of a random graph with a given degree sequence. Comb. Prob. Comput. 7(3), 295–305 (1998). Cambridge University Press

    Article  MathSciNet  MATH  Google Scholar 

  17. Zhai, J., Wang, H., Zhao, J.: Post-condition-directed invariant inference for loops over data structures. In: SERE-C 2014, pp. 204–212. IEEE (2014)

    Google Scholar 

Download references

Acknowledgment

Part of this research has been supported by the Climt (Categorical and Logical Methods in Model Transformation) project (ANR-11-BS02-016).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Amani Makhlouf .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Makhlouf, A., Tran, H.N., Percebois, C., Strecker, M. (2016). Combining Dynamic and Static Analysis to Help Develop Correct Graph Transformations. In: Aichernig, B., Furia, C. (eds) Tests and Proofs. TAP 2016. Lecture Notes in Computer Science(), vol 9762. Springer, Cham. https://doi.org/10.1007/978-3-319-41135-4_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-41135-4_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-41134-7

  • Online ISBN: 978-3-319-41135-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics