Generating Customised Control-Flow Graphs for Legacy Languages with Semi-Parsing

Deknop, Céline;Fabry, Johan;Mens, Kim;Zaytsev, Vadim
(2022) International Conference on Software Maintenance and Evolution (ICSME 2022) — Location: Limassol, Cyprus (3.October.2022)

Files

preprint.pdf
  • Open Access
  • Adobe PDF
  • 389.62 KB

Details

Authors
  • Deknop, CélineUCLouvain
    Author
  • Fabry, Johan
    Author
  • Mens, Kimorcid-logoUCLouvain
    Author
  • Zaytsev, Vadim
    Author
Abstract
We propose a tool and underlying technique that uses semi-parsing to extract control flow graphs from legacy source code (written in COBOL). Obtaining such control flow graphs can be useful in the industrial setting of legacy modernisation, to quickly demonstrate to code owners that modernisation engineers did not break their business logic. They need to be convinced that a migration did not affect the flow around critical parts of their code such as database accesses. Focusing on the control flow around embedded SQL queries and confirming that the code logic has indeed been preserved improves customers’ trust and satisfaction in the modernisation. Our proposed algorithm and approach uses fuzzy parsing as opposed to full parsing to parse mainly the control flow constructs, while delegating the full parsing of embedded languages like SQL to an external parser, and produces a control flow graph directly while skipping over most of the input in linear time. Such a fuzzy parser is easier to construct and adapt to particular languages and needs than a full parser with a visitor to elicit control flow. Comparisons are made of the fuzzy parser to an industrial-strength full parser.
Affiliations

Citations

Deknop, C., Fabry, J., Mens, K., & Zaytsev, V. (2022). Generating Customised Control-Flow Graphs for Legacy Languages with Semi-Parsing. International Conference on Software Maintenance and Evolution (ICSME 2022), Limassol, Cyprus. https://hdl.handle.net/2078.5/256566