首页> 外文OA文献 >Semantics-directed generation of compilers and abstract machines
【2h】

Semantics-directed generation of compilers and abstract machines

机译:语义指导的编译器和抽象机的生成

摘要

In traditional compiler design the work of a compiler is divided into several phases: lexical, syntactical and semantical analysis, optimizations and code generation. For several of these phases generators exist -- most prominently LEX and YACC for generating lexical and syntactical analyzers. A common feature of all generators is that the phase in the compiler is described using a meta-language (e.g. regular expressions or context-free grammars) and that the generator produces the related compiler module. There exist several good textbooks on compiler design. However, all of these books present ready made mappings from source language constructs to target language constructs, the so called translation schemes, instead of deriving them. Hence, the reader is expected to learn how to design code generators by analysing translation schemes as opposed to from first principles. The same is true for abstract machines. Abstract machines are virtual target architectures which support the concepts of the source language. Typically abstract machines are presented together with translation schemes from the source language to the abstract machine language. There is only little work on how translation schemes and abstract machines are designed. The aim of our work is to detect underlying principles that relate abstract machines to programming language semantics, and to automate part of the design process for abstract machines. Thus, we need to ensure that the behaviour of a source program will be maintained by translating it into the abstract machine language, and then applying the abstract machine. The behaviour of a program will depend on itu27s semantics. Often this aspect of a programming language is only described in natural language which is both ambiguous and vague. We shall use formal techniques to describe the meaning of programs in a particular language and to prove that our transformations are correct. In this thesis we concentrate on natural semantics, but we also address action semantics.
机译:在传统的编译器设计中,编译器的工作分为几个阶段:词法,句法和语义分析,优化和代码生成。对于其中的几个阶段,存在生成器-最主要的是LEX和YACC,用于生成词法和句法分析器。所有生成器的一个共同特征是,使用元语言(例如正则表达式或上下文无关的语法)描述编译器中的阶段,并且生成器生成相关的编译器模块。有几本关于编译器设计的好教科书。但是,所有这些书都提供了从源语言结构到目标语言结构(即所谓的翻译方案)的现成映射,而不是派生它们。因此,与第一原理相反,期望读者学习如何通过分析翻译方案来设计代码生成器。抽象机器也是如此。抽象机是支持源语言概念的虚拟目标体系结构。通常,将抽象机器与从源语言到抽象机器语言的翻译方案一起呈现。关于如何设计翻译方案和抽象机的工作很少。我们工作的目的是发现将抽象机与编程语言语义相关联的基本原理,并使抽象机的设计过程自动化。因此,我们需要通过将源程序的行为翻译成抽象机器语言,然后应用抽象机器来确保其行为得以维持。程序的行为将取决于其语义。通常,编程语言的这一方面只能用模棱两可和模糊的自然语言来描述。我们将使用形式化技术来描述特定语言中程序的含义,并证明我们的转换是正确的。在这篇论文中,我们专注于自然语义,但是我们也讨论动作语义。

著录项

  • 作者

    Diehl Stephan;

  • 作者单位
  • 年度 1996
  • 总页数
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号