Constructing programs in a calculus of lazy interpreters

R. Frost
{"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.
用惰性解释器的演算构造程序
人们对这样一种概念越来越感兴趣,即程序的构造和操作与表达式(比如算术中的微积分)的构造和操作非常相似。理想情况下,复杂的可执行规范将从更简单的规范中构造出来,使用一组具有“良好”代数属性的操作符,然后使用代数恒等式将其转换为更有效的可证明的等价形式。如果可执行规范是无变量的,很少有显式递归,并且用捕获公共计算模式的高阶函数表示,那么这些活动就会很容易。在本文中,我们展示了如何将这种方法用于计算作为属性语法的可执行规范构造的程序。我们用一种更高阶的、纯粹的、懒惰的函数式编程语言Miranda实现了一个“解释器演算”。由此产生的编程环境可以被认为是实现1971年Knuth[9]提出的建议的一步,即可执行属性语法可能提供一种可行的声明性编程语言。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信