Abstract
Relational verification through dynamic logic is a promising approach for verifying object oriented programs. Recent advances from symbolic to abstract executions have enabled reasoning about incomplete/abstract versions of such programs. This has proven fruitful in the exploration of correctness of refactorings primarily related to code blocks in Java. In this paper we explore further types of equivalent transformations and refactorings and discuss the challenges that still need to be overcome for full round-trip correctness of refactorings in object-oriented languages.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Change history
17 October 2022
A correction has been published.
Notes
- 1.
We say “like” as JML does not deal with abstract Java programs.
- 2.
Available at https://github.com/selabhvl/REFINITY-abstractallocate.
- 3.
The counter is indeed implicit, as the order \(<_h\) cannot be accessed by the proof system.
- 4.
We deviate here from the original definition for example’s sake.
References
Ahrendt, W., Beckert, B., Bubel, R., Hähnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification - The KeY Book - From Theory to Practice, Lecture Notes in Computer Science, vol. 10001. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-319-49812-6
Baldoni, R., Coppa, E., D’Elia, D.C., Demetrescu, C., Finocchi, I.: A survey of symbolic execution techniques. ACM Comput. Surv. 51(3), 50:1–50:39 (2018). https://doi.org/10.1145/3182657
Barthe, G., Crespo, J.M., Kunz, C.: Relational verification using product programs. In: Butler, M., Schulte, W. (eds.) FM 2011. LNCS, vol. 6664, pp. 200–214. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21437-0_17
Barthe, G., D’Argenio, P.R., Rezk, T.: Secure information flow by self-composition. In: 17th IEEE Computer Security Foundations Workshop, (CSFW-17 2004), Pacific Grove, CA, USA, 28–30 June 2004, pp. 100–114. IEEE Computer Society (2004). https://doi.org/10.1109/CSFW.2004.17
Barthe, G., Eilers, R., Georgiou, P., Gleiss, B., Kovács, L., Maffei, M.: Verifying relational properties using trace logic. In: Barrett, C.W., Yang, J. (eds.) 2019 Formal Methods in Computer Aided Design, FMCAD 2019, San Jose, CA, USA, 22–25 October 2019, pp. 170–178. IEEE (2019). https://doi.org/10.23919/FMCAD.2019.8894277
Baumann, C., Beckert, B., Blasum, H., Bormer, T.: Lessons learned from microkernel verification - specification is the new bottleneck. In: SSV. EPTCS, vol. 102, pp. 18–32 (2012)
Beckert, B., Bruns, D., Klebanov, V., Scheben, C., Schmitt, P.H., Ulbrich, M.: Information flow in object-oriented software. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013. LNCS, vol. 8901, pp. 19–37. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-14125-1_2
Beckert, B., Ulbrich, M.: Trends in relational program verification. In: Principled Software Development, pp. 41–58. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-98047-8_3
Bubel, R., Din, C.C., Hähnle, R., Nakata, K.: A dynamic logic with traces and coinduction. In: De Nivelle, H. (ed.) TABLEAUX 2015. LNCS (LNAI), vol. 9323, pp. 307–322. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-24312-2_21
Darvas, Á., Hähnle, R., Sands, D.: A theorem proving approach to analysis of secure information flow. In: Hutter, D., Ullmann, M. (eds.) SPC 2005. LNCS, vol. 3450, pp. 193–209. Springer, Heidelberg (2005). https://doi.org/10.1007/978-3-540-32004-3_20
Din, C.C., Owe, O.: A sound and complete reasoning system for asynchronous communication with shared futures. J. Log. Algebraic Methods Program. 83(5–6), 360–383 (2014). https://doi.org/10.1016/j.jlamp.2014.03.003
Dovland, J., Johnsen, E.B., Owe, O., Yu, I.C.: A proof system for adaptable class hierarchies. J. Log. Algebraic Methods Program. 84(1), 37–53 (2015). https://doi.org/10.1016/j.jlamp.2014.09.001
Eilertsen, A.M., Bagge, A.H., Stolz, V.: Safer refactorings. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016. LNCS, vol. 9952, pp. 517–531. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47166-2_36
Fowler, M.: Refactoring - Improving the Design of Existing Code. Addison Wesley object technology series. Addison-Wesley (1999)
Fowler, M.: Refactoring: Improving the Design of Existing Code, 2nd edn. Addison-Wesley Signature Series (Fowler), Addison-Wesley (2018)
Garrido, A., Meseguer, J.: Formal specification and verification of java refactorings. In: 2006 Sixth IEEE International Workshop on Source Code Analysis and Manipulation, pp. 165–174. IEEE (2006)
Hähnle, R., Huisman, M.: Deductive software verification: from pen-and-paper proofs to industrial tools. In: Steffen, B., Woeginger, G. (eds.) Computing and Software Science. LNCS, vol. 10000, pp. 345–373. Springer, Cham (2019). https://doi.org/10.1007/978-3-319-91908-9_18
Huisman, M., Ahrendt, W., Bruns, D., Hentschel, M.: Formal specification with jml. Technical Report 10, Karlsruher Institut für Technologie (KIT) (2014). https://doi.org/10.5445/IR/1000041881
Kamburjan, E.: Behavioral program logic. In: Cerrito, S., Popescu, A. (eds.) TABLEAUX 2019. LNCS (LNAI), vol. 11714, pp. 391–408. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-29026-9_22
Kamburjan, E., Wasser, N.: Deductive verification of programs with underspecified semantics by model extraction. CoRR abs/2110.01964 (2021)
Kiefer, M., Klebanov, V., Ulbrich, M.: Relational program reasoning using compiler IR - combining static verification and dynamic analysis. J. Autom. Reason. 60(3), 337–363 (2018). https://doi.org/10.1007/s10817-017-9433-5
Myers, C.J.: Formal verification of genetic circuits. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 5–5. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31424-7_5
McCarthy, J.: Towards a mathematical science of computation. In: Information Processing, Proceedings of the 2nd IFIP Congress 1962, Munich, Germany, 27 August–1 September 1962, pp. 21–28. North-Holland (1962)
Müller, P., Schwerhoff, M., Summers, A.J.: Viper: a verification infrastructure for permission-based reasoning. In: Pretschner, A., Peled, D., Hutzelmann, T. (eds.) Dependable Software Systems Engineering, NATO Science for Peace and Security Series - D: Information and Communication Security, vol. 50, pp. 104–125. IOS Press (2017). https://doi.org/10.3233/978-1-61499-810-5-104
Quan, L., Zongyan, Q., Liu, Z.: Formal use of design patterns and refactoring. In: Margaria, T., Steffen, B. (eds.) ISoLA 2008. CCIS, vol. 17, pp. 323–338. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-88479-8_23
0 Schäfer, M., de Moor, O.: Specifying and implementing refactorings. In: Object-Oriented Programming, Systems, Languages, and Applications (2010)
Soares, G., Gheyi, R., Serey, D., Massoni, T.: Making program refactoring safer. IEEE Softw. 27(4), 52–57 (2010)
Steinhöfel, D.: Abstract Execution: Automatically Proving Infinitely Many Programs. Ph.D. thesis, TU Darmstadt, Dept. of Computer Science (2020). https://tuprints.ulb.tu-darmstadt.de/id/eprint/8540
Steinhöfel, D.: REFINITY to model and prove program transformation rules. In: Oliveira, B.C.S. (ed.) APLAS 2020. LNCS, vol. 12470, pp. 311–319. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-64437-6_16
Steinhöfel, D., Hähnle, R.: Abstract execution. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 319–336. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30942-8_20
Stolz, V., Pun, V.K.I., Gheyi, R.: Refactoring and active object languages. In: Margaria, T., Steffen, B. (eds.) ISoLA 2020. LNCS, vol. 12477, pp. 138–158. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61470-6_9
Weiß, B.: Deductive verification of object-oriented software: dynamic frames, dynamic logic and predicate abstraction. Ph.D. thesis, Karlsruhe Institute of Technology (2011). https://d-nb.info/1010034960
Yang, G., Filieri, A., Borges, M., Clun, D., Wen, J.: Chapter five - advances in symbolic execution. Adv. Comput. 113, 225–287 (2019). https://doi.org/10.1016/bs.adcom.2018.10.002
Acknowledgements
This work was partially supported by the Research Council of Norway via SIRIUS (237898), PeTWIN (294600) and CROFLOW (326249).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Abusdal, O.J., Kamburjan, E., Ka I. Pun, V., Stolz, V. (2022). A Notion of Equivalence for Refactorings with Abstract Execution. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Software Engineering. ISoLA 2022. Lecture Notes in Computer Science, vol 13702. Springer, Cham. https://doi.org/10.1007/978-3-031-19756-7_15
Download citation
DOI: https://doi.org/10.1007/978-3-031-19756-7_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-19755-0
Online ISBN: 978-3-031-19756-7
eBook Packages: Computer ScienceComputer Science (R0)