{"title":"Constructing programs in a calculus of lazy interpreters","authors":"R. Frost","doi":"10.1145/99569.99810","DOIUrl":null,"url":null,"abstract":"There is a growing interest in the notion that programs can be constructed and manipulated in much the same way as are expressions in say the calculus of arithmetic. Ideally, complex executable specifications would be constructed from simpler specijications, using a small set of operators with ‘nice’ algebraic properties, and subsequently transformed to more efficient provably equivalent forms using algebraic identities. These activities are facilitated if the executable specifications are variable-free, have little explicit recursion and are expressed in terms of higher order functions that capture common patterns of computation. In this paper we show how this approach might be used in the calculation of programs constructed as executable specifications of attribute grammars. We have implemented a ‘calculus of interpreters’ in a higher order, pure, lazy functional programming language Miranda’. The resulting programming environment may be thought of as a step towards the realisation of a suggestion made in 1971 by Knuth [9] that executable attribute grammars might provide a viable declarative programming language.","PeriodicalId":429108,"journal":{"name":"Formal Methods in Software Development","volume":"144 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1990-04-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Formal Methods in Software Development","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/99569.99810","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
There is a growing interest in the notion that programs can be constructed and manipulated in much the same way as are expressions in say the calculus of arithmetic. Ideally, complex executable specifications would be constructed from simpler specijications, using a small set of operators with ‘nice’ algebraic properties, and subsequently transformed to more efficient provably equivalent forms using algebraic identities. These activities are facilitated if the executable specifications are variable-free, have little explicit recursion and are expressed in terms of higher order functions that capture common patterns of computation. In this paper we show how this approach might be used in the calculation of programs constructed as executable specifications of attribute grammars. We have implemented a ‘calculus of interpreters’ in a higher order, pure, lazy functional programming language Miranda’. The resulting programming environment may be thought of as a step towards the realisation of a suggestion made in 1971 by Knuth [9] that executable attribute grammars might provide a viable declarative programming language.