Change Pattern Detection for Optimising Incremental Static Analysis

Research output: Chapter in Book/Report/Conference proceedingConference paper

2 Citations (Scopus)

Abstract

Static analyses can be used by developers to compute properties of a program, enabling e.g., bug detection and program verification. However, reanalysing a program from scratch upon every change is time-consuming, especially in settings where code changes often, such as within IDEs. To avoid such full reanalyses, incremental analyses instead reuse parts of the previous analysis result, and reanalyse the changed code as necessary.

While incrementality improves the analysis time, we introduce a complementary approach that further reduces the analysis time. A traditional incremental analysis updates previous analysis results without domain-specific knowledge. However, the effect of particular source code changes on analysis results can be predicted. Performing a traditional incremental analysis of the changed code might therefore be unnecessary. Instead, we propose to detect code change patterns of which the effect on analysis results can be predicted and to update these results accordingly, saving potentially expensive computations.

In this paper, we explore the idea of adapting the analysis results for behaviour-preserving change patterns. In particular, we consider consistent renamings, inverted conditionals, and moved function definitions within Scheme programs. We implemented our approach and evaluated it on 30 programs. We show decreases in incremental analysis time between 3% and 99% on 25 programs that contain at least one behaviour-preserving change pattern.
Original languageEnglish
Title of host publicationSCAM 23rd IEEE International Working Conference on Source Code Analysis and Manipulation
EditorsLeon Moonen, Christian Newman, Alessandra Gorla
PublisherIEEE
Pages49-60
Number of pages12
ISBN (Electronic)979-8-3503-0506-7
DOIs
Publication statusPublished - Oct 2023
Event23rd IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2023) - Bogotá, Colombia
Duration: 2 Oct 20233 Oct 2023
Conference number: 23
https://www.ieee-scam.org/2023/

Publication series

NameProceedings - 2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation, SCAM 2023

Conference

Conference23rd IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM 2023)
Abbreviated titleSCAM
Country/TerritoryColombia
CityBogotá
Period2/10/233/10/23
Internet address

Bibliographical note

Funding Information:
ACKNOWLEDGEMENTS This work was partially supported by Research Foundation - Flanders (FWO) (grant number 11F4822N), by CS ICON project APAX, and by "Cybersecurity Initiative Flanders".

Publisher Copyright:
© 2023 IEEE.

Keywords

  • Static Program Analysis
  • Incremental analysis
  • Refactoring
  • modular analysis

Fingerprint

Dive into the research topics of 'Change Pattern Detection for Optimising Incremental Static Analysis'. Together they form a unique fingerprint.

Cite this