Download Analysis and Transformation of Configurable Systems PDF

TitleAnalysis and Transformation of Configurable Systems
File Size936.9 KB
Total Pages160
Document Text Contents
Page 80

4 Analyzing C Code with Preprocessor Annotations

4.1.2 Variability-aware Analysis

Traditional analysis techniques do not incorporate configuration-knowledge in the form of

#ifdef directives, so they are only suitable for the analysis of single system variants. Ana-

lyzing system variants separately, the analysis techniques do not exploit similarities between

system variants, and in a worst-case scenario, parts of a configurable system (with n configura-
tion options) have to be analyzed 2n times. In contrast, variability-aware analysis (also known
as family-based analysis [Thüm et al., 2014]) takes advantage of the similarities between the

variants of a system in order to speed up the analysis process. Although individual variability-

aware analyses differ in many details [Thüm et al., 2014], an idea all have in common is to

analyze code that is shared by multiple variants only once. To this end, variability-aware

analyses do not operate on generated variants, but on the raw code artifacts that still contain

configuration knowledge.

There are many proposals for variability-aware analysis in literature, including data-flow

analysis [Brabrand et al., 2013; Bodden et al., 2013], deductive verification [Thüm et al., 2012],

model checking [Apel et al., 2013d; Classen et al., 2010, 2011; Apel et al., 2011; Lauenroth

et al., 2009], parsing [Kästner et al., 2011], and type checking [Apel et al., 2010a; Kästner and

Apel, 2008; Kästner et al., 2012b; Thaker et al., 2007]. However, while this work is promising,

variability-aware analyses (beyond parsing) have not been applied to large-scale, real-world

systems so far. Previous work either concentrated mostly on formal foundations or is of limited

practicality (evaluated with academic case studies only). Despite the foundational previous

work, it is unclear whether variability-aware analysis scales to large systems, as it considers all

variations of a system simultaneously.

It is important to note that the development of a variability-aware analysis requires an upfront

investment. Existing analysis techniques and tools have to be made variability-aware. That

is, underlying data structures and algorithms need to be modified to incorporate configuration

knowledge. Next we describe the data structures for type checking and liveness analysis that

we use throughout our comparison of sampling-based analysis and variability-aware analysis.

Specifically, we describe their generation and how they are processed by variability-aware


All data structures and algorithms described in this section come with corresponding im-

plementations as part of the TYPECHEF project (variability-aware parsing and analysis infras-

tructure).4 While variability-aware ASTs and variability-aware type checking were developed

by others (Kästner et al. [2011] and Kästner et al. [2012b]), variability-aware CFGs and

variability-aware liveness analysis are contributions of our own.

Variability-aware Abstract Syntax Tree

Many static analyses are performed on ASTs (cf. Section 2.2). As we want to analyze an entire

configurable software system, we have to construct an AST that covers all variants of a system,



Similer Documents