{"title":"Normalization for Removing Code Variations in Modular Programs","authors":"Tiantian Wang, Xiaohong Su, Peijun Ma","doi":"10.1109/ISCSCT.2008.307","DOIUrl":null,"url":null,"abstract":"Code variations are widely believed to impede program analysis. This paper introduces an approach for removing code variations in programs with function calls. Non-recursive programs and recursive programs are handled with different strategies. An inlining algorithm based on system dependence graph is developed to remove the module structure variation in non-recursive programs. Recursive programs are not in lined, but also normalized by performing semantic-preserving transformations on system dependence graphs. As a result, semantically equivalent constructs are transformed to the same system dependence graph representation, so that code variations are removed. This approach has been applied to similar code detection and automatic grading of student programs. Test results show that it can efficiently remove code variations and improve program analysis.","PeriodicalId":228533,"journal":{"name":"2008 International Symposium on Computer Science and Computational Technology","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2008-12-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2008 International Symposium on Computer Science and Computational Technology","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISCSCT.2008.307","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Code variations are widely believed to impede program analysis. This paper introduces an approach for removing code variations in programs with function calls. Non-recursive programs and recursive programs are handled with different strategies. An inlining algorithm based on system dependence graph is developed to remove the module structure variation in non-recursive programs. Recursive programs are not in lined, but also normalized by performing semantic-preserving transformations on system dependence graphs. As a result, semantically equivalent constructs are transformed to the same system dependence graph representation, so that code variations are removed. This approach has been applied to similar code detection and automatic grading of student programs. Test results show that it can efficiently remove code variations and improve program analysis.