Skip to main content
Erschienen in: Automated Software Engineering 4/2018

05.07.2018

Inferring visual contracts from Java programs

verfasst von: Abdullah Alshanqiti, Reiko Heckel, Timo Kehrer

Erschienen in: Automated Software Engineering | Ausgabe 4/2018

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Visual contracts model the operation of components or services by pre- and post-conditions formalised as graph transformation rules. They provide a precise intuitive notation to support testing, understanding and analysis of software. Their detailed specification of internal data states and transformations, referred to as deep behavioural modelling, is an error-prone activity. In this paper we propose a dynamic approach to reverse engineering visual contracts from Java based on tracing the execution of Java operations. The resulting contracts give an accurate description of the observed object transformations, their effects and preconditions in terms of object structures, parameter and attribute values, and their generalised specification by universally quantified (multi) objects, patterns, and invariants. While this paper focusses on the fundamental technique rather than a particular application, we explore potential uses in our evaluation, including in program understanding, review of test reports and debugging.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
Zurück zum Zitat Alshanqiti, A., Heckel, R.: Extracting visual contracts from java programs. In: International Conference on Automated Software Engineering, pp. 104–114. ACM (2015) Alshanqiti, A., Heckel, R.: Extracting visual contracts from java programs. In: International Conference on Automated Software Engineering, pp. 104–114. ACM (2015)
Zurück zum Zitat Alshanqiti, A.M., Heckel, R., Khan, T.: Learning minimal and maximal rules from observations of graph transformations. Electronic Communications of the EASST, vol. 58 (2013) Alshanqiti, A.M., Heckel, R., Khan, T.: Learning minimal and maximal rules from observations of graph transformations. Electronic Communications of the EASST, vol. 58 (2013)
Zurück zum Zitat Alshanqiti, A.M., Heckel, R., Kehrer, T.: Visual contract extractor: a tool for reverse engineering visual contracts using dynamic analysis. In: Lo, D., Apel, S., Khurshid, S. (eds.) Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016, Singapore, September 3–7, 2016, pp. 816–821. ACM, London (2016). https://doi.org/10.1145/2970276.2970287 CrossRef Alshanqiti, A.M., Heckel, R., Kehrer, T.: Visual contract extractor: a tool for reverse engineering visual contracts using dynamic analysis. In: Lo, D., Apel, S., Khurshid, S. (eds.) Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering, ASE 2016, Singapore, September 3–7, 2016, pp. 816–821. ACM, London (2016). https://​doi.​org/​10.​1145/​2970276.​2970287 CrossRef
Zurück zum Zitat Arendt, T., Taentzer, G.: A tool environment for quality assurance based on the eclipse modeling framework. Autom. Softw. Eng. 20(2), 141–184 (2013)CrossRef Arendt, T., Taentzer, G.: A tool environment for quality assurance based on the eclipse modeling framework. Autom. Softw. Eng. 20(2), 141–184 (2013)CrossRef
Zurück zum Zitat Arendt, T., Biermann, E., Jurack, S., Krause, C., Taentzer, G.: Henshin: advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) Model Driven Engineering Languages and Systems—13th International Conference, MODELS 2010, Oslo, Norway, October 3–8, 2010, Proceedings, Part I, Lecture Notes in Computer Science, vol. 6394, pp. 121–135. Springer, Berlin (2010). https://doi.org/10.1007/978-3-642-16145-2_9 CrossRef Arendt, T., Biermann, E., Jurack, S., Krause, C., Taentzer, G.: Henshin: advanced concepts and tools for in-place EMF model transformations. In: Petriu, D.C., Rouquette, N., Haugen, Ø. (eds.) Model Driven Engineering Languages and Systems—13th International Conference, MODELS 2010, Oslo, Norway, October 3–8, 2010, Proceedings, Part I, Lecture Notes in Computer Science, vol. 6394, pp. 121–135. Springer, Berlin (2010). https://​doi.​org/​10.​1007/​978-3-642-16145-2_​9 CrossRef
Zurück zum Zitat Artzi, S., Ernst, M.D., Kieżun, A., Pacheco, C., Perkins, J.H.: Finding the needles in the haystack: generating legal test inputs for object-oriented programs. In: Proceedings of 1st Workshop on Model-Based Testing and Object-Oriented Systems (2006) Artzi, S., Ernst, M.D., Kieżun, A., Pacheco, C., Perkins, J.H.: Finding the needles in the haystack: generating legal test inputs for object-oriented programs. In: Proceedings of 1st Workshop on Model-Based Testing and Object-Oriented Systems (2006)
Zurück zum Zitat Balogh, Z., Varr, D.: Model transformation by example using inductive logic programming. Int. J. Softw. Syst. Model. 8(3), 347–364 (2009)CrossRef Balogh, Z., Varr, D.: Model transformation by example using inductive logic programming. Int. J. Softw. Syst. Model. 8(3), 347–364 (2009)CrossRef
Zurück zum Zitat Bisztray, D., Heckel, R., Ehrig, H.: Verification of architectural refactorings: rule extraction and tool support. In: ECEASST, vol. 16 (2009) Bisztray, D., Heckel, R., Ehrig, H.: Verification of architectural refactorings: rule extraction and tool support. In: ECEASST, vol. 16 (2009)
Zurück zum Zitat Brito, H., Marques-Neto, H., Terra, R., Rocha, H., Valente, M.: On-the-fly extraction of hierarchical object graphs. J. Braz. Comput. Soc. 19(1), 15–27 (2012)CrossRef Brito, H., Marques-Neto, H., Terra, R., Rocha, H., Valente, M.: On-the-fly extraction of hierarchical object graphs. J. Braz. Comput. Soc. 19(1), 15–27 (2012)CrossRef
Zurück zum Zitat Bürdek, J., Kehrer, T., Lochau, M., Reuling, D., Kelter, U., Schürr, A.: Reasoning about product-line evolution using complex feature model differences. Autom. Softw. Eng. 23(4), 687–733 (2015)CrossRef Bürdek, J., Kehrer, T., Lochau, M., Reuling, D., Kelter, U., Schürr, A.: Reasoning about product-line evolution using complex feature model differences. Autom. Softw. Eng. 23(4), 687–733 (2015)CrossRef
Zurück zum Zitat Dolques, X., Dogui, A., Falleri, J.R., Huchard, M., Nebut, C., Pfister, F.: Easing model transformation learning with automatically aligned examples. In: Proceedings of the 7th European Conference on Modelling Foundations and Applications, ECMFA’11, pp. 189–204. Springer, Berlin (2011)CrossRef Dolques, X., Dogui, A., Falleri, J.R., Huchard, M., Nebut, C., Pfister, F.: Easing model transformation learning with automatically aligned examples. In: Proceedings of the 7th European Conference on Modelling Foundations and Applications, ECMFA’11, pp. 189–204. Springer, Berlin (2011)CrossRef
Zurück zum Zitat Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, Berlin (2006)MATH Ehrig, H., Ehrig, K., Prange, U., Taentzer, G.: Fundamentals of Algebraic Graph Transformation. Springer, Berlin (2006)MATH
Zurück zum Zitat Engels, G., Lohmann, M., Sauer, S., Heckel, R.: Model-driven monitoring: an application of graph transformation for design by contract. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) Graph Transformations, Third International Conference, ICGT 2006, Natal, Rio Grande do Norte, Brazil, September 17–23, 2006, Proceedings, Lecture Notes in Computer Science, vol. 4178, pp. 336–350. Springer, Berlin (2006). https://doi.org/10.1007/11841883_24 CrossRef Engels, G., Lohmann, M., Sauer, S., Heckel, R.: Model-driven monitoring: an application of graph transformation for design by contract. In: Corradini, A., Ehrig, H., Montanari, U., Ribeiro, L., Rozenberg, G. (eds.) Graph Transformations, Third International Conference, ICGT 2006, Natal, Rio Grande do Norte, Brazil, September 17–23, 2006, Proceedings, Lecture Notes in Computer Science, vol. 4178, pp. 336–350. Springer, Berlin (2006). https://​doi.​org/​10.​1007/​11841883_​24 CrossRef
Zurück zum Zitat Faunes, M., Sahraoui, H., Boukadoum, M.: Generating model transformation rules from examples using an evolutionary algorithm. In: Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, pp. 250–253. ACM, London (2012) Faunes, M., Sahraoui, H., Boukadoum, M.: Generating model transformation rules from examples using an evolutionary algorithm. In: Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, pp. 250–253. ACM, London (2012)
Zurück zum Zitat Geiger, L., Zündorf, A.: eDOBS-graphical debugging for eclipse. In: Electronic Communications of the EASST, vol. 1 (2007) Geiger, L., Zündorf, A.: eDOBS-graphical debugging for eclipse. In: Electronic Communications of the EASST, vol. 1 (2007)
Zurück zum Zitat Kappel, G., Langer, P., Retschitzegger, W., Schwinger, W., Wimmer, M.: Model transformation by-example: a survey of the first wave. In: Düsterhöft, A., Klettke, M., Schewe, K.D. (eds.) Conceptual Modelling and Its Theoretical Foundations, pp. 197–215. Springer, Berlin (2012a)CrossRef Kappel, G., Langer, P., Retschitzegger, W., Schwinger, W., Wimmer, M.: Model transformation by-example: a survey of the first wave. In: Düsterhöft, A., Klettke, M., Schewe, K.D. (eds.) Conceptual Modelling and Its Theoretical Foundations, pp. 197–215. Springer, Berlin (2012a)CrossRef
Zurück zum Zitat Kehrer, T., Kelter, U., Taentzer, G.: A rule-based approach to the semantic lifting of model differences in the context of model versioning. In: 26th International Conference on Automated Software Engineering, pp. 163–172 (2011) Kehrer, T., Kelter, U., Taentzer, G.: A rule-based approach to the semantic lifting of model differences in the context of model versioning. In: 26th International Conference on Automated Software Engineering, pp. 163–172 (2011)
Zurück zum Zitat Kehrer, T., Rindt, M., Pietsch, P., Kelter, U.: Generating edit operations for profiled UML models. In: Proceedings of International Workshop on Models and Evolution, CEUR Workshop Proceedings, vol. 1090, pp. 30–39 (2013) Kehrer, T., Rindt, M., Pietsch, P., Kelter, U.: Generating edit operations for profiled UML models. In: Proceedings of International Workshop on Models and Evolution, CEUR Workshop Proceedings, vol. 1090, pp. 30–39 (2013)
Zurück zum Zitat Kehrer, T., Taentzer, G., Rindt, M., Kelter, U.: Automatically deriving the specification of model editing operations from meta-models. In: Proceedings of 9th International Conference on Model Transformations, pp. 173–188. Springer, Berlin (2016)CrossRef Kehrer, T., Taentzer, G., Rindt, M., Kelter, U.: Automatically deriving the specification of model editing operations from meta-models. In: Proceedings of 9th International Conference on Model Transformations, pp. 173–188. Springer, Berlin (2016)CrossRef
Zurück zum Zitat Kehrer, T., Alshanqiti, A.M., Heckel, R.: Automatic inference of rule-based specifications of complex in-place model transformations. In: Theory and Practice of Model Transformation—10th International Conference, ICMT 2017, Held as Part of STAF 2017, Marburg, Germany, July 17–18, 2017, Proceedings, pp. 92–107 (2017). https://doi.org/10.1007/978-3-319-61473-1_7 CrossRef Kehrer, T., Alshanqiti, A.M., Heckel, R.: Automatic inference of rule-based specifications of complex in-place model transformations. In: Theory and Practice of Model Transformation—10th International Conference, ICMT 2017, Held as Part of STAF 2017, Marburg, Germany, July 17–18, 2017, Proceedings, pp. 92–107 (2017). https://​doi.​org/​10.​1007/​978-3-319-61473-1_​7 CrossRef
Zurück zum Zitat Khan, T.A., Runge, O., Heckel, R.: Testing against visual contracts: model-based coverage. In: Proceedings of International Conference on Graph Transformation, pp. 279–293 (2012) Khan, T.A., Runge, O., Heckel, R.: Testing against visual contracts: model-based coverage. In: Proceedings of International Conference on Graph Transformation, pp. 279–293 (2012)
Zurück zum Zitat Langer, P., Wimmer, M., Kappel, G.: Model-to-model transformations by demonstration. In: Tratt, L., Gogolla, M. (eds.) Proceedings of the Third International Conference on Theory and Practice of Model Transformations, Lecture Notes in Computer Science, vol. 6142, pp. 153–167. Springer, Berlin (2010) Langer, P., Wimmer, M., Kappel, G.: Model-to-model transformations by demonstration. In: Tratt, L., Gogolla, M. (eds.) Proceedings of the Third International Conference on Theory and Practice of Model Transformations, Lecture Notes in Computer Science, vol. 6142, pp. 153–167. Springer, Berlin (2010)
Zurück zum Zitat Martinez, L., Pereira, C., Favre, L.: Recovering activity diagrams from object oriented code: an MDA-based approach. In: Proceedings of International Conference on Software Engineering Research and Practice, vol. 1, pp. 58–64 (2011) Martinez, L., Pereira, C., Favre, L.: Recovering activity diagrams from object oriented code: an MDA-based approach. In: Proceedings of International Conference on Software Engineering Research and Practice, vol. 1, pp. 58–64 (2011)
Zurück zum Zitat Mens, T., Van Gorp, P.: A taxonomy of model transformation. Electron. Notes Theor. Comput. Sci. 152, 125–142 (2006)CrossRef Mens, T., Van Gorp, P.: A taxonomy of model transformation. Electron. Notes Theor. Comput. Sci. 152, 125–142 (2006)CrossRef
Zurück zum Zitat Pavletic, D., Voelter, M., Raza, S.A., Kolb, B., Kehrer, T.: Extensible debugger framework for extensible languages. In: Reliable Software Technologies—Ada-Europe 2015, pp. 33–49. Springer, Berlin (2015) Pavletic, D., Voelter, M., Raza, S.A., Kolb, B., Kehrer, T.: Extensible debugger framework for extensible languages. In: Reliable Software Technologies—Ada-Europe 2015, pp. 33–49. Springer, Berlin (2015)
Zurück zum Zitat Rountev, A., Volgin, O., Reddoch, M.: Static control-flow analysis for reverse engineering of uml sequence diagrams. SIGSOFT Softw. Eng. Notes 31(1), 96–102 (2005)CrossRef Rountev, A., Volgin, O., Reddoch, M.: Static control-flow analysis for reverse engineering of uml sequence diagrams. SIGSOFT Softw. Eng. Notes 31(1), 96–102 (2005)CrossRef
Zurück zum Zitat Runge, O., Khan, T.A., Heckel, R.: Test case generation using visual contracts. In: ECEASST, vol. 58 (2013) Runge, O., Khan, T.A., Heckel, R.: Test case generation using visual contracts. In: ECEASST, vol. 58 (2013)
Zurück zum Zitat Sarkar, M.K., Chatterjee, T., Mukherjee, D.: Reverse engineering: an analysis of static behaviors of object oriented programs by extracting UML class diagram. Int. J. Adv. Comput. Res. 3(3), 135 (2013) Sarkar, M.K., Chatterjee, T., Mukherjee, D.: Reverse engineering: an analysis of static behaviors of object oriented programs by extracting UML class diagram. Int. J. Adv. Comput. Res. 3(3), 135 (2013)
Zurück zum Zitat Shamshiri, S., Just, R., Rojas, J.M., Fraser, G., McMinn, P., Arcuri, A.: Do automatically generated unit tests find real faults? An empirical study of effectiveness and challenges. In: Cohen, M.B., Grunske, L., Whalen, M. (eds.) 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015, Lincoln, NE, USA, November 9–13, 2015, pp. 201–211. IEEE Computer Society, Washington (2015). https://doi.org/10.1109/ASE.2015.86 CrossRef Shamshiri, S., Just, R., Rojas, J.M., Fraser, G., McMinn, P., Arcuri, A.: Do automatically generated unit tests find real faults? An empirical study of effectiveness and challenges. In: Cohen, M.B., Grunske, L., Whalen, M. (eds.) 30th IEEE/ACM International Conference on Automated Software Engineering, ASE 2015, Lincoln, NE, USA, November 9–13, 2015, pp. 201–211. IEEE Computer Society, Washington (2015). https://​doi.​org/​10.​1109/​ASE.​2015.​86 CrossRef
Zurück zum Zitat Strüber, D., Born, K., Gill, K.D., Groner, R., Kehrer, T., Ohrndorf, M., Tichy, M.: Henshin: A usability-focused framework for EMF model transformation development. In: ICGT (2017) Strüber, D., Born, K., Gill, K.D., Groner, R., Kehrer, T., Ohrndorf, M., Tichy, M.: Henshin: A usability-focused framework for EMF model transformation development. In: ICGT (2017)
Zurück zum Zitat Tonella, P., Potrich, A.: Reverse engineering of the interaction diagrams from C++ code. In: Software Maintenance, 2003. International Conference on ICSM 2003. Proceedings, pp. 159–168 (2003) Tonella, P., Potrich, A.: Reverse engineering of the interaction diagrams from C++ code. In: Software Maintenance, 2003. International Conference on ICSM 2003. Proceedings, pp. 159–168 (2003)
Zurück zum Zitat Varró, D.: Model transformation by example. In: International Conference on Model Driven Engineering Languages and Systems, pp. 410–424. Springer, Berlin (2006)CrossRef Varró, D.: Model transformation by example. In: International Conference on Model Driven Engineering Languages and Systems, pp. 410–424. Springer, Berlin (2006)CrossRef
Zurück zum Zitat You, C., Holder, L.B., Cook, D.J.: Learning patterns in the dynamics of biological networks. In: International Conference on Knowledge Discovery and Data Mining, pp. 977–986. ACM, London (2009) You, C., Holder, L.B., Cook, D.J.: Learning patterns in the dynamics of biological networks. In: International Conference on Knowledge Discovery and Data Mining, pp. 977–986. ACM, London (2009)
Zurück zum Zitat Zhao, C., Kong, J., Zhang, K.: Program behavior discovery and verification: a graph grammar approach. IEEE Trans. Softw. Eng. 36(3), 431–448 (2010)CrossRef Zhao, C., Kong, J., Zhang, K.: Program behavior discovery and verification: a graph grammar approach. IEEE Trans. Softw. Eng. 36(3), 431–448 (2010)CrossRef
Zurück zum Zitat Ziadi, T., Da Silva, M.A.A., Hillah, L.M., Ziane, M.: A fully dynamic approach to the reverse engineering of UML sequence diagrams. In: 16th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS), pp. 107–116. IEEE, Washington (2011) Ziadi, T., Da Silva, M.A.A., Hillah, L.M., Ziane, M.: A fully dynamic approach to the reverse engineering of UML sequence diagrams. In: 16th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS), pp. 107–116. IEEE, Washington (2011)
Metadaten
Titel
Inferring visual contracts from Java programs
verfasst von
Abdullah Alshanqiti
Reiko Heckel
Timo Kehrer
Publikationsdatum
05.07.2018
Verlag
Springer US
Erschienen in
Automated Software Engineering / Ausgabe 4/2018
Print ISSN: 0928-8910
Elektronische ISSN: 1573-7535
DOI
https://doi.org/10.1007/s10515-018-0242-9

Weitere Artikel der Ausgabe 4/2018

Automated Software Engineering 4/2018 Zur Ausgabe