首页> 外文学位 >From syntactic theories to interpreters: Specifying and proving properties.
【24h】

From syntactic theories to interpreters: Specifying and proving properties.

机译:从句法理论到解释器:指定和证明属性。

获取原文
获取原文并翻译 | 示例

摘要

Syntactic theories have been developed to reason about many aspects of modern programming languages [AB97, AFM+95, LS97, SS99, FLS99]. Having roots in the lambda-calculus, these theories rely on transforming source programs to other source programs. Only the syntax of the programming language is relevant.; Experience shows that the development of such theories is error-prone. In order to ensure that the theories are sensible, many properties need to be checked. For example, we need to know if there is always a rule to rewrite a valid program and if a unique value can be obtained (which is described by a unique-decomposition lemma) and if the type of a program is preserved during evaluation (which is described by a subject reduction lemma). In many situations, the proofs of these properties do not require deep insight. However, many purported proofs suffer from being incomplete and often the missed case is the most problematic one. Thus, we think that in order to rely on syntactic theories, it is of mandatory importance to design tools that support their development. The work described in this thesis offers a first step in that direction.; We introduce the specification language SL which can directly reflect primitive notions of syntactic theories such as evaluation contexts and dynamic constraints. An experimental system has been implemented that generates interpreters from SL specifications. Currently the generated interpreters are programs in CAML[Cam], a dialect in the ML family. Various examples have been tested, including the operational semantics of core-ML and a syntactic theory for Verilog[FLS99].; We experiment with the SL system to automatically check whether the unique-decomposition and subject reduction properties hold for the specified syntactic theories.; We map the unique-decomposition lemma to the problems of checking equivalence and ambiguity of syntactic definitions. Because checking these properties of context-free grammars is undecidable, we work with regular tree grammars and use algorithms on finite tree automata to perform the checking. To make up for the insufficient expressiveness of regular tree grammars, we enhance the basic framework with built-in types, constants, contexts, and polymorphic types.; In order to specify type systems, we extend the SL system to allow rules written in natural semantics. We also introduce a meta-level of the SL system with utilities to handle substitution and equivalence, and to simulate pattern matching and type reasoning. A subject reduction lemma can be represented as a meta-theorem. The proof is performed automatically by induction on the rewriting rules, the type checking rules, as well as the structure of the object-terms. The induction step consists of instantiating the meta-theorem into simpler forms which are also a meta-theorems. The base case corresponds to the meta-theorems that can be easily proved, for example, a logical tautology. The induction framework for automatically proving subject reduction can be easily extended to other properties.
机译:已经开发了句法理论来推理现代编程语言的许多方面[AB97,AFM + 95,LS97,SS99,FLS99]。这些理论源于lambda演算,它们依赖于将源程序转换为其他源程序。仅编程语言的语法相关。经验表明,此类理论的发展容易出错。为了确保理论合理,需要检查许多属性。例如,我们需要知道是否始终存在重写有效程序的规则,是否可以获得唯一值(由唯一分解引理描述),以及在评估过程中是否保留了程序的类型(由主题归约引理描述)。在许多情况下,这些属性的证明不需要深入了解。但是,许多声称的证据不完整,通常遗漏的案件是最成问题的。因此,我们认为,为了依赖句法理论,设计支持其发展的工具至关重要。本文所描述的工作为该方向迈出了第一步。我们介绍了规范语言SL,它可以直接反映语法理论的原始概念,例如评估上下文和动态约束。已经实施了一个实验系统,该系统可以根据SL规范生成口译员。当前生成的解释器是ML系列的方言CAML [Cam]中的程序。测试了各种示例,包括core-ML的操作语义和Verilog的句法理论[FLS99]。我们使用SL系统进行实验,以自动检查特定语法理论的唯一分解和主题约简属性是否成立。我们将唯一分解引理映射到检查句法定义的等价性和歧义性的问题。由于无法确定上下文无关文法的这些属性,因此我们使用常规树文法,并在有限树自动机上使用算法来执行检查。为了弥补常规树语法的不足,我们使用内置类型,常量,上下文和多态类型来增强基本框架。为了指定类型系统,我们扩展了SL系统以允许使用自然语义编写的规则。我们还介绍了带有实用程序的SL系统的元级别,该实用程序可以处理替换和对等以及模拟模式匹配和类型推理。主题归约引理可以表示为一个元定理。通过对重写规则,类型检查规则以及对象术语的结构进行归纳自动执行证明。归纳步骤包括将元定理实例化为更简单的形式,这也是一个元定理。基本情况对应于可以轻松证明的元定理,例如逻辑重言式。用于自动证明主题还原的归纳框架可以轻松扩展到其他属性。

著录项

  • 作者

    Xiao, Yong.;

  • 作者单位

    University of Oregon.;

  • 授予单位 University of Oregon.;
  • 学科 Computer Science.
  • 学位 Ph.D.
  • 年度 2004
  • 页码 155 p.
  • 总页数 155
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类 自动化技术、计算机技术;
  • 关键词

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号