Abstract:
Universal multilevel intermediate representations were introduced to perform static analysis. Universal class-level representation was developed for analyzing the projects architecture, universal control-flow representation – for analyzing the functional modules. Generators of these representations were developed. A list of analyses, which can extract information from the source code and give advice for refactoring, was made. These analyses are based on the approach of simultaneous usage of multiple representations. The math models of these analyses, which formalize their work, were made for their development. Some models help count metrics of the analyzing source code, which can show additional information about the project. For two analyses, the models were based on the threshold functions, also the models computing these threshold values were introduced. These analyses were developed using their math models as utility analyzers. Large open-source projects and own code were used for testing and practice checking of the analyzers. As the representations and the obtained analyzers are universal, the projects in Java and Python languages were used. For every projects the amount of metrics was calculated. It helped get the information about inheritance component average value and functional component average value. Some metrics clearly showed the differences between programming approaches in Java and Python languages. The optimal threshold values were modeled and computed for the analyzed projects using the threshold functions. These values can be used as default to start analyzing other projects. The developed analyzers, except practical value, also demonstrate efficiency of the invented intermediate representations.