arrow
Return

Mining understandable state machine models from embedded code

delete2020-09-08
delete2
PRE
AI
W
Wasim Said *
J
Jochen Quante
R
Rainer Koschke
DOI:10.1007/s10664-020-09865-0delete
deleteOriginal
deleteShare
deleteSave
Abstract

Abstract

En 中文
Program understanding is a time-consuming and tedious activity for software developers. Manually building abstractions from source code requires in-depth analysis of the code. Automatic extraction of such models is possible, but cannot derive meaningful abstractions that are not already contained in the code. The automated extraction even has problems to decide which aspects of the code are important and which are not. Therefore, interactive semi-automatic approaches are the compromise of choice. In this article, we describe how state machines that describe the behaviour of a function can be extracted from code. The approach includes interaction - the user decides which aspects of the identified potentially relevant information is really relevant and which is not. This helps to reduce the resulting state machines to an understandable degree. However, these state machines in their raw form have transition conditions that are very complex and thus not understandable for humans. Therefore, we also introduce a technique to reduce these guards to an understandable form. The technique is a combination of heuristic logic minimization, exploitation of infeasible paths, and using transition priorities. We evaluate the approach on industrial embedded C code, first in a case study with hundreds of extracted state machines, and then in two experiments with professional developers. The results show that the approach is highly effective in making the guards understandable, and that guards reduced by our approach and presented with priorities are easier to understand than guards without priorities. We also show that the overall approach is beneficial for program comprehension. The guard reduction approach itself is quite generic and can also be applied to other problems. We demonstrate that for the simplification of mode switch logic.
Keywords:
Software reengineering
Program understanding
Static analysis
Model mining
State machines
Boolean minimization
Embedded software
Legacy code
errShare
errSave
An empirical evaluation of the ?Cognitive Complexity?measure as a predictor of code understandability
err2023-03-01
err6
errOAAI
errLavazza, Luigi; Abualkishik, Abedallah Zaid; Liu, Geng; Morasca, Sandro
errShare
errSave
Learning a Metric for Code Readability
err2010-07-01
err256
PREAI
errBuse, Raymond P. L.; Weimer, Westley R.
errShare
errSave
Software system comparison with semantic source code embeddings
err2022-03-17
err6
PREAI
errKarakatic, Saso; Milosevic, Aleksej; Hericko, Tjasa
errShare
errSave
SEAL: Integrating Program Analysis and Repository Mining
err2023-07-24
err3
errOAAI
errSattler, Florian; Bohm, Sebastian; Schubert, Philipp Dominik; Siegmund, Norbert; Apel, Sven
errShare
errSave
Understanding Code Understandability Improvements in Code Reviews
err2025-01-01
err0
errOAAI
errOliveira, Delano; Santos, Reydne; de Oliveira, Benedito; Monperrus, Martin; Castor, Fernando; Madeiral, Fernanda
errShare
errSave

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
6.4K

Organization

B
bosch
Scholars:
2.4K
Papers: 1.7K
Citations: 2.2K
U
university of bremen
Scholars:
479
Papers: 234
Citations: 5.4K
Cited Papers

Cited Papers

Phosphoproteomics and Proteomics Reveal Metabolism as a Key Node in LPS-Induced Acute Inflammation in RAW264.7
err2020-06-02
err0
PREAI
errYu Luo; Qing Jiang; Zhengwen Zhu; Haseeb Sattar; Jiasi Wu; Wenge Huang; Siyu Su; Yusheng Liang; Ping Wang; Xianli Meng
errShare
errSave
Forest cover lessens the impact of drought on streamflow in Puerto Rico
err2022-05-01
err0
PREAI
errJazlynn Hall; Martha Scholl; Yuri Gorokhovich; María Uriarte
errShare
errSave
errShare
errSave
Effect of Thapsigargin on the Contractile Response of the Normal and Obstructed Rabbit Urinary Bladder
err1996-01-01
err0
PREAI
errDorothea Rohrmann; Stephen A. Zderic; Alan J. Wein; Robert M. Levin
errShare
errSave
Real-time observation of slipping and rolling events in DLC wear nanoparticles
err2018-06-07
err0
PREAI
errTakaaki Sato; Shinsuke Nabeya; Vivek Menon; Tadashi Ishida; Reo Kometani; Hiroyuki Fujita
errShare
errSave
On the impact of state-based model-driven development on maintainability: a family of experiments using UniMod
err2017-11-16
err16
errOAAI
errRicca, Filippo; Torchiano, Marco; Leotta, Maurizio; Tiso, Alessandro; Guerrini, Giovanna; Reggio, Gianna
errShare
errSave
researcher View more