Compiler prototyping using formal semantics

U. F. Pleban
{"title":"Compiler prototyping using formal semantics","authors":"U. F. Pleban","doi":"10.1145/502874.502883","DOIUrl":null,"url":null,"abstract":"The descriptive techniques of formal semantics can be used for the generation of complete prototype compilers. First, we review the essential characteristics of such semantics implementation systems, and discuss our experience with two existing experimental systems. Then, we show how to derive a complete conventional compiler for a small language from its denotational semantics. The compiler is specified in three phases consisting of a front-end (parser, tree builder, and semantic checker), a translator from syntax trees to prefix code, and a code generator which converts the prefix code into IBM/370 style assembly code. The translator component is obtained by modifying the standard semantics of the language in two steps: first, the semantic domains and the equations are rewritten in a straight forward way to achieve a normal form, and then the auxiliary semantic functions are interpreted as instructions for a prefix code machine. The entire three part specification has been implemented with the help of Paulson's semantics processing system.","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":"26","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"SIGPLAN Conferences and Workshops","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/502874.502883","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 26

Abstract

The descriptive techniques of formal semantics can be used for the generation of complete prototype compilers. First, we review the essential characteristics of such semantics implementation systems, and discuss our experience with two existing experimental systems. Then, we show how to derive a complete conventional compiler for a small language from its denotational semantics. The compiler is specified in three phases consisting of a front-end (parser, tree builder, and semantic checker), a translator from syntax trees to prefix code, and a code generator which converts the prefix code into IBM/370 style assembly code. The translator component is obtained by modifying the standard semantics of the language in two steps: first, the semantic domains and the equations are rewritten in a straight forward way to achieve a normal form, and then the auxiliary semantic functions are interpreted as instructions for a prefix code machine. The entire three part specification has been implemented with the help of Paulson's semantics processing system.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
使用形式语义的编译器原型
形式语义的描述技术可用于生成完整的原型编译器。首先,我们回顾了这种语义实现系统的基本特征,并讨论了我们在两个现有实验系统中的经验。然后,我们将展示如何从小型语言的指称语义派生出一个完整的常规编译器。编译器分为三个阶段,包括前端(解析器、树构建器和语义检查器)、从语法树到前缀代码的转换器,以及将前缀代码转换为IBM/370风格的汇编代码的代码生成器。译者组件是通过对语言的标准语义进行修改,分两步获得的:首先,对语义域和方程进行直接改写,使其达到标准形式,然后将辅助语义函数解释为前缀码机的指令。整个三部分的规范是在Paulson的语义处理系统的帮助下实现的。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
A practical method for syntactic error diagnosis and recovery The CIMS PL/I compiler A Fortran 77 interpreter for mutation analysis Cint: a RISC interpreter for the C programming language The Illinois functional programming interpreter
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1