Hessamaldin Mohammadi, Wided Ghardallou, R. Linger, A. Mili
{"title":"计算程序功能","authors":"Hessamaldin Mohammadi, Wided Ghardallou, R. Linger, A. Mili","doi":"10.1145/3524482.3527655","DOIUrl":null,"url":null,"abstract":"Extracting the function of a program from a static analysis of its source code is a valuable capability in software engineering, but it has proved to be an elusive goal, due primarily to the difficulty of deriving the function of iterative statements. Several automated tools obviate this difficulty by unrolling the loops; but this is clearly an imperfect solution, especially in light of the fact that loops capture most of the computing power of a program, are the locus of most of its complexity, and the source of most of its faults. In this paper we discuss the design and ongoing implementation of an automated tool for deriving the function of a program in three steps: first, the source code is mapped onto an abstract syntax tree (AST), using standard parsing technology; then each node of the AST is mapped onto an equation between pre and post states; finally, these equations are submitted to a symbolic computation engine that extracts the final program state as a function of its initial state. Loop functions are derived by pattern matching against semantic recognizers, which capture the requisite programming knowledge and domain knowledge.","PeriodicalId":119264,"journal":{"name":"2022 IEEE/ACM 10th International Conference on Formal Methods in Software Engineering (FormaliSE)","volume":"10 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Computing Program Functions\",\"authors\":\"Hessamaldin Mohammadi, Wided Ghardallou, R. Linger, A. Mili\",\"doi\":\"10.1145/3524482.3527655\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Extracting the function of a program from a static analysis of its source code is a valuable capability in software engineering, but it has proved to be an elusive goal, due primarily to the difficulty of deriving the function of iterative statements. Several automated tools obviate this difficulty by unrolling the loops; but this is clearly an imperfect solution, especially in light of the fact that loops capture most of the computing power of a program, are the locus of most of its complexity, and the source of most of its faults. In this paper we discuss the design and ongoing implementation of an automated tool for deriving the function of a program in three steps: first, the source code is mapped onto an abstract syntax tree (AST), using standard parsing technology; then each node of the AST is mapped onto an equation between pre and post states; finally, these equations are submitted to a symbolic computation engine that extracts the final program state as a function of its initial state. Loop functions are derived by pattern matching against semantic recognizers, which capture the requisite programming knowledge and domain knowledge.\",\"PeriodicalId\":119264,\"journal\":{\"name\":\"2022 IEEE/ACM 10th International Conference on Formal Methods in Software Engineering (FormaliSE)\",\"volume\":\"10 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-05-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE/ACM 10th International Conference on Formal Methods in Software Engineering (FormaliSE)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3524482.3527655\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE/ACM 10th International Conference on Formal Methods in Software Engineering (FormaliSE)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3524482.3527655","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Extracting the function of a program from a static analysis of its source code is a valuable capability in software engineering, but it has proved to be an elusive goal, due primarily to the difficulty of deriving the function of iterative statements. Several automated tools obviate this difficulty by unrolling the loops; but this is clearly an imperfect solution, especially in light of the fact that loops capture most of the computing power of a program, are the locus of most of its complexity, and the source of most of its faults. In this paper we discuss the design and ongoing implementation of an automated tool for deriving the function of a program in three steps: first, the source code is mapped onto an abstract syntax tree (AST), using standard parsing technology; then each node of the AST is mapped onto an equation between pre and post states; finally, these equations are submitted to a symbolic computation engine that extracts the final program state as a function of its initial state. Loop functions are derived by pattern matching against semantic recognizers, which capture the requisite programming knowledge and domain knowledge.