This Is AuburnElectronic Theses and Dissertations

Static Program Analysis In Presence Of Multiple Configurations




Behrang, Farnaz

Type of Degree



Computer Science


C programs make heavy use of the C preprocessor, which makes them highly configurable. C programming IDEs ignore multiple configurations of C preprocessor because of its complexity. However, program analyses and transformations have to consider all possible macro configurations; otherwise, they will be incorrect. This problem is exacerbated in the context of program transformations: it is impossible to implement any non-trivial program transformation correctly without supporting sophisticated static analysis. We modified OpenRefactory/C, a framework for building correct and complex program transformations for C, to support configuration-aware static analysis and program transformations. We modified the program representation to include conditional directives and extended the static program analysis to be aware of multiple configurations. For evaluation, we used the Extract Function refactoring implemented in OpenRefactory/C.