{"title":"基于度量的上下文无关语法分析","authors":"James F. Power, B. Malloy","doi":"10.1109/WPC.2000.852491","DOIUrl":null,"url":null,"abstract":"Recent advances in software engineering have produced a variety of well-established approaches, formalisms and techniques to facilitate the construction of large-scale applications. Developers who are interested in the construction of robust, extensible software that is easy to maintain should expect to deploy a range of these techniques, as appropriate to the task. In this paper, we provide a foundation for the application of established software metrics to the measurement of context-free grammars. The usual application of software metrics is to program code; we provide a mapping that allows these metrics to be applied to grammars. This allows us to interpret six software engineering metrics in a grammatical context, including T.J. McCabe's (1976) complexity metric and N.E. Fenton et al.'s (1996) impurity metric. We have designed and implemented a tool to automatically compute the six metrics; as a case study, we use these six metrics to measure some of the properties of grammars for the Oberon, ISO C, ISO C++ and Java programming languages. We believe that the techniques that we have developed can be applied to estimating the difficulty of designing, implementing, testing and maintaining parsers for large grammars.","PeriodicalId":448149,"journal":{"name":"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2000-06-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"23","resultStr":"{\"title\":\"Metric-based analysis of context-free grammars\",\"authors\":\"James F. Power, B. Malloy\",\"doi\":\"10.1109/WPC.2000.852491\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Recent advances in software engineering have produced a variety of well-established approaches, formalisms and techniques to facilitate the construction of large-scale applications. Developers who are interested in the construction of robust, extensible software that is easy to maintain should expect to deploy a range of these techniques, as appropriate to the task. In this paper, we provide a foundation for the application of established software metrics to the measurement of context-free grammars. The usual application of software metrics is to program code; we provide a mapping that allows these metrics to be applied to grammars. This allows us to interpret six software engineering metrics in a grammatical context, including T.J. McCabe's (1976) complexity metric and N.E. Fenton et al.'s (1996) impurity metric. We have designed and implemented a tool to automatically compute the six metrics; as a case study, we use these six metrics to measure some of the properties of grammars for the Oberon, ISO C, ISO C++ and Java programming languages. We believe that the techniques that we have developed can be applied to estimating the difficulty of designing, implementing, testing and maintaining parsers for large grammars.\",\"PeriodicalId\":448149,\"journal\":{\"name\":\"Proceedings IWPC 2000. 8th International Workshop on Program Comprehension\",\"volume\":\"47 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2000-06-10\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"23\",\"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.852491\",\"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.852491","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Recent advances in software engineering have produced a variety of well-established approaches, formalisms and techniques to facilitate the construction of large-scale applications. Developers who are interested in the construction of robust, extensible software that is easy to maintain should expect to deploy a range of these techniques, as appropriate to the task. In this paper, we provide a foundation for the application of established software metrics to the measurement of context-free grammars. The usual application of software metrics is to program code; we provide a mapping that allows these metrics to be applied to grammars. This allows us to interpret six software engineering metrics in a grammatical context, including T.J. McCabe's (1976) complexity metric and N.E. Fenton et al.'s (1996) impurity metric. We have designed and implemented a tool to automatically compute the six metrics; as a case study, we use these six metrics to measure some of the properties of grammars for the Oberon, ISO C, ISO C++ and Java programming languages. We believe that the techniques that we have developed can be applied to estimating the difficulty of designing, implementing, testing and maintaining parsers for large grammars.