{"title":"强非循环属性语法及其递归求值","authors":"M. Jourdan","doi":"10.1145/502874.502882","DOIUrl":null,"url":null,"abstract":"This paper is devoted to the construction of recursive evaluators for strongly non-circular attribute grammars. This class of attribute grammars is very large and includes every practical example ; testing strong non-circularity can be done in polynomial time. To each synthesized attribute, a function is associated, which takes as parameters a derivation tree and the values of some inherited attributes, and returns the value of that attribute at the root of the tree. These functions are mutually recursive according to the structure of the full parse tree. This method implements a dynamic \"evaluation by need\", reducing the number of attributes computed to those necessary to get the \"semantic value\" of the full tree. A Lisp implementation allowing automatic efficient storage management is also presented, together with some applications. Our work is closely related to those of Kennedy and Warren, Saarinen and Katamaya, but our method is more efficient and has a better theoretical basis.","PeriodicalId":414056,"journal":{"name":"SIGPLAN Conferences and Workshops","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1984-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"33","resultStr":"{\"title\":\"Strongly non-circular attribute grammars and their recursive evaluation\",\"authors\":\"M. Jourdan\",\"doi\":\"10.1145/502874.502882\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"This paper is devoted to the construction of recursive evaluators for strongly non-circular attribute grammars. This class of attribute grammars is very large and includes every practical example ; testing strong non-circularity can be done in polynomial time. To each synthesized attribute, a function is associated, which takes as parameters a derivation tree and the values of some inherited attributes, and returns the value of that attribute at the root of the tree. These functions are mutually recursive according to the structure of the full parse tree. This method implements a dynamic \\\"evaluation by need\\\", reducing the number of attributes computed to those necessary to get the \\\"semantic value\\\" of the full tree. A Lisp implementation allowing automatic efficient storage management is also presented, together with some applications. Our work is closely related to those of Kennedy and Warren, Saarinen and Katamaya, but our method is more efficient and has a better theoretical basis.\",\"PeriodicalId\":414056,\"journal\":{\"name\":\"SIGPLAN Conferences and Workshops\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1984-06-17\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"33\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"SIGPLAN Conferences and Workshops\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/502874.502882\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGPLAN Conferences and Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/502874.502882","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Strongly non-circular attribute grammars and their recursive evaluation
This paper is devoted to the construction of recursive evaluators for strongly non-circular attribute grammars. This class of attribute grammars is very large and includes every practical example ; testing strong non-circularity can be done in polynomial time. To each synthesized attribute, a function is associated, which takes as parameters a derivation tree and the values of some inherited attributes, and returns the value of that attribute at the root of the tree. These functions are mutually recursive according to the structure of the full parse tree. This method implements a dynamic "evaluation by need", reducing the number of attributes computed to those necessary to get the "semantic value" of the full tree. A Lisp implementation allowing automatic efficient storage management is also presented, together with some applications. Our work is closely related to those of Kennedy and Warren, Saarinen and Katamaya, but our method is more efficient and has a better theoretical basis.