{"title":"一种将程序特性自动映射到代码的形式化方法","authors":"J. Deprez, Arun Lakhotia","doi":"10.1109/WPC.2000.852481","DOIUrl":null,"url":null,"abstract":"How does one locate the segments of code that implement a particular feature? N. Wilde and M.C. Scully (WS) (1995) pioneered the use of execution traces to map program features to code. Using their technique to locate the implementation of a particular feature, a program is executed with two sets of inputs; one set invokes the feature of interest and the other set does not. Operations such as set-difference and set-intersection, amongst others, are then applied on the execution traces to obtain answers for various questions related to a feature and its implementation. Previous researchers have automated the tasks of computing the execution traces and performing operations on the execution traces. We present a formalism to automate the most time-consuming aspect of this approach for locating code, namely, the partitioning of the input sets into invoking and non-invoking sets. A collection of input sets is partitioned using feature syntax, a grammar of the program's input annotated with feature names. An input set is placed in the invoking set if and only if its parse tree is annotated with that feature. WS' technique solely applies set operations on the execution traces of inputs. In our technique, we also apply the set operations among the set of features used by these inputs. By doing so, we can precisely determine the features whose implementation is identified when applying the operations on the execution traces.","PeriodicalId":448149,"journal":{"name":"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension","volume":"198200 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2000-06-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"28","resultStr":"{\"title\":\"A formalism to automate mapping from program features to code\",\"authors\":\"J. Deprez, Arun Lakhotia\",\"doi\":\"10.1109/WPC.2000.852481\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"How does one locate the segments of code that implement a particular feature? N. Wilde and M.C. Scully (WS) (1995) pioneered the use of execution traces to map program features to code. Using their technique to locate the implementation of a particular feature, a program is executed with two sets of inputs; one set invokes the feature of interest and the other set does not. Operations such as set-difference and set-intersection, amongst others, are then applied on the execution traces to obtain answers for various questions related to a feature and its implementation. Previous researchers have automated the tasks of computing the execution traces and performing operations on the execution traces. We present a formalism to automate the most time-consuming aspect of this approach for locating code, namely, the partitioning of the input sets into invoking and non-invoking sets. A collection of input sets is partitioned using feature syntax, a grammar of the program's input annotated with feature names. An input set is placed in the invoking set if and only if its parse tree is annotated with that feature. WS' technique solely applies set operations on the execution traces of inputs. In our technique, we also apply the set operations among the set of features used by these inputs. By doing so, we can precisely determine the features whose implementation is identified when applying the operations on the execution traces.\",\"PeriodicalId\":448149,\"journal\":{\"name\":\"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension\",\"volume\":\"198200 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2000-06-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"28\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/WPC.2000.852481\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/WPC.2000.852481","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A formalism to automate mapping from program features to code
How does one locate the segments of code that implement a particular feature? N. Wilde and M.C. Scully (WS) (1995) pioneered the use of execution traces to map program features to code. Using their technique to locate the implementation of a particular feature, a program is executed with two sets of inputs; one set invokes the feature of interest and the other set does not. Operations such as set-difference and set-intersection, amongst others, are then applied on the execution traces to obtain answers for various questions related to a feature and its implementation. Previous researchers have automated the tasks of computing the execution traces and performing operations on the execution traces. We present a formalism to automate the most time-consuming aspect of this approach for locating code, namely, the partitioning of the input sets into invoking and non-invoking sets. A collection of input sets is partitioned using feature syntax, a grammar of the program's input annotated with feature names. An input set is placed in the invoking set if and only if its parse tree is annotated with that feature. WS' technique solely applies set operations on the execution traces of inputs. In our technique, we also apply the set operations among the set of features used by these inputs. By doing so, we can precisely determine the features whose implementation is identified when applying the operations on the execution traces.