Computer and Modernization

Previous Articles     Next Articles

An Intermediate Representation Generation Based on Code Change Analysis

  

  1. 1. School of Software, Shanghai Jiao Tong University, Shanghai 200240, China; 
    2. Department of Computer Science and Engineering, Shanghai Jiao Tong University, Shanghai 200240, China
  • Received:2015-11-17 Online:2016-06-16 Published:2016-06-17

Abstract: Nowadays there exist many incremental program analysis and verification techniques, while working on intermediate representations. In order to make these techniques more practical, this paper proposes an approach to extract the program changes at the source code level, and then propagates these changes to the intermediate representations. We design a novel approach called IRChange, on the basis of LLVM and Clang, adding annotations indicating the changes to the source code, and then transferring the changes at the compiling time. Furthermore, new intermediate representations can be generated through synthesizing old intermediate representations and the annotations with change information. The experiment results show that new intermediate representations are correct. It also can be used for diff analysis at the intermediate representation level, so that the increments can be used for incremental program analysis and verification.

Key words:  source code change, generation of intermediate representations, annotation

CLC Number: