Stepwise abstraction of high-level system specifications from source code

Abstract We are interested in specifications which provide a consistent high-level view of systems. They should abstract irrelevant details and provide a precise and complete description of the behaviour of the system. This view of software specification can naturally be expressed by means of Gurevich’s Abstract State Machines (ASMs). There are many known benefits of such an approach to system specifications for software engineering and testing. In practice however, such specifications are rarely generated and/or maintained during software development. Addressing this problem, we present an exploratory study on (semi-)automated extraction of high-level software specifications by means of ASMs. We devise a method consisting in two phases. In the first phase we propose fully automated transformations from source code to base-level ASM specifications with the same core functionality. We present a prototype of an implementation of this phase which transforms Java code into base-level ASM specifications. The second phase consists in incrementally applying sound semi-automated abstraction procedures for ASMs to derive higher-level specifications, starting from the base-level ASM specification obtained in the first phase. This is by no means a trivial task. It opens up new and interesting research questions. We discuss possible methodologies to approach this task and provide a proof of concept in the form of elaborated and detailed examples. We argue that this process can be done in a (semi-)automated way and thus result in a valuable tool to improve the current software engineering practices.

[1]  Wolfgang Reif,et al.  A Systematic Verification Approach for Mondex Electronic Purses Using ASMs , 2009, Rigorous Methods for Software Construction and Analysis.

[2]  Klaus-Dieter Schewe,et al.  A Behavioural Theory for Reflective Sequential Algorithms , 2017, Ershov Informatics Conference.

[3]  Roozbeh Farahbod,et al.  CoreASM: An Extensible ASM Execution Engine , 2007, Fundam. Informaticae.

[4]  Egon Börger,et al.  The WAM - Definition and Compiler Correctness , 1995, Logic Programming: Formal Methods and Practical Applications.

[5]  Dalal Alrajeh,et al.  Logic-Based Learning in Software Engineering , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[6]  Sebastián Uchitel,et al.  Using contexts to extract models from code , 2017, Software & Systems Modeling.

[7]  Klaus-Dieter Schewe,et al.  Distributed Adaptive Systems - Theory, Specification, Reasoning , 2018, ABZ.

[8]  Klaus-Dieter Schewe,et al.  A unifying logic for non-deterministic, parallel and concurrent abstract state machines , 2017, Annals of Mathematics and Artificial Intelligence.

[9]  Josef Pichler,et al.  Experience Report on Building ASTM Based Tools for Multi-language Reverse Engineering , 2016, 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER).

[10]  Yuri Gurevich,et al.  Sequential abstract-state machines capture sequential algorithms , 2000, TOCL.

[11]  Klaus-Dieter Schewe,et al.  BSP abstract state machines capture bulk synchronous parallel computations , 2019, Sci. Comput. Program..

[12]  Erich Gamma Design Patterns - Past, Present & Future , 2010, The Future of Software Engineering.

[13]  Gerhard Schellhorn Verification of ASM Refinements Using Generalized Forward Simulation , 2001, J. Univers. Comput. Sci..

[14]  Lucio Mauro Duarte,et al.  Behaviour Model Extraction Using Context Information , 2007 .

[15]  Leslie Lamport,et al.  Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers [Book Review] , 2002, Computer.

[16]  Peter T. Breuer,et al.  Reverse-engineering Cobol via formal methods , 1993, J. Softw. Maintenance Res. Pract..

[17]  Axel van Lamsweerde,et al.  Formal specification: a roadmap , 2000, ICSE '00.

[18]  Gidon Ernst,et al.  KIV: overview and VerifyThis competition , 2014, International Journal on Software Tools for Technology Transfer.

[19]  Klaus-Dieter Schewe,et al.  A new thesis concerning synchronised parallel computing - simplified parallel ASM thesis , 2015, Theor. Comput. Sci..

[20]  Angelo Gargantini,et al.  A Metamodel-based Language and a Simulation Engine for Abstract State Machines , 2008, J. Univers. Comput. Sci..

[21]  Egon Börger,et al.  Why Programming Must Be Supported by Modeling and How , 2018, ISoLA.

[22]  Robert F. Stärk,et al.  A Logic for Abstract State Machines , 2001, J. Univers. Comput. Sci..

[23]  Robertas Damasevicius,et al.  Automatic Extraction of Features and Generation of Feature Models from Java Programs , 2012, Inf. Technol. Control..

[24]  Egon Börger,et al.  Modeling Companion for Software Practitioners , 2018, Springer Berlin Heidelberg.

[25]  Klaus Havelund,et al.  Model checking JAVA programs using JAVA PathFinder , 2000, International Journal on Software Tools for Technology Transfer.

[26]  Tevfik Bultan,et al.  Symbolic Model Extraction for Web Application Verification , 2017, 2017 IEEE/ACM 39th International Conference on Software Engineering (ICSE).

[27]  Gerhard Schellhorn,et al.  Completeness of fair ASM refinement , 2011, Sci. Comput. Program..

[28]  Peter T. Breuer,et al.  Formal specifications in software maintenance: from code to Z++ and back again , 1993, Inf. Softw. Technol..

[29]  Erich Grädel,et al.  Quantum Computing and Abstract State Machines , 2003, Abstract State Machines.

[30]  Gerard J. Holzmann,et al.  From code to models , 2001, Proceedings Second International Conference on Application of Concurrency to System Design.

[31]  Thai Son Hoang,et al.  Rodin: an open toolset for modelling and reasoning in Event-B , 2010, International Journal on Software Tools for Technology Transfer.

[32]  Ralph-Johan Back,et al.  On Correct Refinement of Programs , 1981, J. Comput. Syst. Sci..

[33]  Klaus-Dieter Schewe,et al.  Concurrent abstract state machines , 2016, Acta Informatica.

[34]  Klaus-Dieter Schewe,et al.  Specification and Refinement of Databases and Transactions , 1993 .

[35]  Wolfgang Ahrendt,et al.  Reasoning about Abstract State Machines: The WAM Case Study , 1997, J. Univers. Comput. Sci..

[36]  Klaus-Dieter Schewe,et al.  A complete logic for Database Abstract State Machines1 , 2016, Log. J. IGPL.

[37]  Marc Frappier,et al.  Software Specification Methods , 2006, Formal Approaches to Computing and Information Technology FACIT.

[38]  Klaus-Dieter Schewe,et al.  Behavioural Theory of Reflective Algorithms I: Reflective Sequential Algorithms , 2020, ArXiv.

[39]  Margus Veanes,et al.  Using Abstract State Machines at Microsoft: A Case Study , 2000, Abstract State Machines.

[40]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[41]  Andreas Blass,et al.  Abstract state machines capture parallel algorithms: Correction and extension , 2006, TOCL.

[42]  Antonio Cisternino,et al.  Ambient Abstract State Machines with applications , 2012, J. Comput. Syst. Sci..

[43]  Corrado Böhm,et al.  Flow diagrams, turing machines and languages with only two formation rules , 1966, CACM.

[44]  Andreas Blass,et al.  Abstract state machines capture parallel algorithms , 2003, TOCL.

[45]  Joseph M. Morris,et al.  A Theoretical Basis for Stepwise Refinement and the Programming Calculus , 1987, Sci. Comput. Program..

[46]  Jean-Raymond Abrial,et al.  Modeling in event-b - system and software engineering by Jean-Raymond Abrial , 2010, SOEN.

[47]  Klaus-Dieter Schewe,et al.  Specification and Refinement in an Integrated Database Application Environment , 1991, VDM Europe.

[48]  Egon Börger,et al.  Composition and Submachine Concepts for Sequential ASMs , 2000, CSL.

[49]  Eerke Albert Boiten,et al.  Refinement in Z and Object-Z: Foundations and Advanced Applications , 2001 .

[50]  Egon Börger,et al.  The ASM Refinement Method , 2003, Formal Aspects of Computing.

[51]  Jesús García Molina,et al.  Extracting models from source code in software modernization , 2012, Software & Systems Modeling.

[52]  Egon Börger,et al.  Abstract State Machines , 2003 .

[53]  Josef Pichler,et al.  Extracting High-Level System Specifications from Source Code via Abstract State Machines , 2019, MEDI.

[54]  Egon Börger Abstract State Machines: a unifying view of models of computation and of system design frameworks , 2005, Ann. Pure Appl. Log..

[55]  James H. Cross,et al.  Reverse engineering and design recovery: a taxonomy , 1990, IEEE Software.

[56]  Paolo Arcaini,et al.  A model‐driven process for engineering a toolset for a formal method , 2011, Softw. Pract. Exp..

[57]  James C. Corbett,et al.  Bandera: a source-level interface for model checking Java programs , 2000, ICSE '00.

[58]  Flavio Ferrarotti,et al.  A Logic for Reflective ASMs , 2020, ABZ.

[59]  Egon Börger,et al.  The Origins and the Development of the ASM Method for High Level System Design and Analysis , 2002, J. Univers. Comput. Sci..

[60]  James C. Corbett,et al.  Bandera: extracting finite-state models from Java source code , 2000, ICSE.