首页> 外文OA文献 >C, Lambda Calculus and Compiler Verification - a study in Haskell of purely-functional techniques for a formal specification of imperative programming languages and an epistemically-sound verification of their compilers
【2h】

C, Lambda Calculus and Compiler Verification - a study in Haskell of purely-functional techniques for a formal specification of imperative programming languages and an epistemically-sound verification of their compilers

机译:C,Lambda微积分和编译器验证-在Haskell中研究用于命令式编程语言的正式规范的纯功能技术及其编译器的认识论验证

摘要

Formal verification of a compiler is a long-standing problem in computer science and,although recent years have seen substantial achievements in the area, most of the proposedsolutions do not scale very well with the complexity of modern software developmentenvironments. In this thesis, I present a formal semantic model of the popularC programming language described in the ANSI/ISO/IEC Standard 9899:1990, in theform of a mapping of C programs to computable functions expressed in a suitable variantof lambda calculus. The specification is formulated in a highly readable functionalstyle and is accompanied by a complete Haskell implementation of the compiler, coveringall aspects of the translation from a parse tree of a C program down to the actualsequence of executable machine instructions, resolving issues of separate compilation,allowing for optimising program transformations and providing rigorous guarantees ofthe implementation's conformance to a formal definition of the language.In order to achieve these goals, I revisit the challenge of compiler verificationfrom its very philosophical foundations. Beginning with the basic epistemic notions ofknowledge, correctness and proof, I show that a fully rigorous solution of the problemrequires a constructive formulation of the correctness criteria in terms of the translationprocess itself, in contrast with the more popular extensional approaches to compilerverification, in which correctness is generally defined as commutativity of the systemwith respect to a formal semantics of the source and target languages, effectively formalisingvarious aspects of the compiler independently of each other and separatelyfrom its eventual implementation. I argue that a satisfactory judgement of correctnessshould always constitute a direct formal description of the job performed by the softwarebeing judged, instead of an axiomatic definition of some abstract property suchas commutativity of the translation system, since the later approach fails to establish acrucial causal connection between a judgement of correctness and a knowledge of it.The primary contribution of this thesis is the new notion of linear correctness,which strives to provide a constructive formulation of a compiler's validity criteria byderiving its judgement directly from a formal description of the language translationprocess itself. The approach relies crucially on a denotational semantic model of thesource and target languages, in which the domains of program meanings are unifiedwith the actual intermediate program representation of the underlying compiler implementation.By defining the concepts of a programming language, compiler and compilercorrectness in category theoretic terms, I show that every linearly correct compileris also valid in the more traditional sense of the word. Further, by presenting a completeverified translation of the standard C programming language within this framework, Idemonstrate that linear correctness is a highly effective approach to the problem ofcompiler verification and that it scales particularly well with the complexity of modernsoftware development environments.
机译:编译器的形式验证是计算机科学中一个长期存在的问题,尽管近年来在该领域取得了巨大成就,但大多数提议的解决方案都无法随着现代软件开发环境的复杂性很好地扩展。在本文中,我以ANSI / ISO / IEC标准9899:1990中描述的流行C编程语言的形式语义模型的形式,将C程序映射到以合适的lambda微积分形式表达的可计算函数。该规范以易于阅读的功能样式制定,并伴随着完整的Haskell编译器实现,涵盖了从C程序的语法树到可执行机器指令的实际顺序的转换的所有方面,解决了单独编译的问题,从而使为了优化程序转换,并为实现的实现严格遵守该语言的正式定义提供了保证。为了实现这些目标,我从其非常基础的哲学基础上重新审视了编译器验证的挑战。从知识,正确性和证明的基本认识论概念开始,我表明,对于问题的完全严格的解决方案需要根据翻译过程本身来对正确性标准进行建设性的表述,这与较流行的编译器验证扩展方法相反,在正确的方法中,正确性术语“语言”通常被定义为系统相对于源语言和目标语言的形式语义的可交换性,可有效地形式化编译器的各个方面,彼此独立且与最终实现无关。我认为,对正确性的令人满意的判断应始终构成对所判断软件执行的工作的直接形式描述,而不是对某些抽象属性(如翻译系统的可交换性)进行公理化的定义,因为后一种方法无法在两者之间建立精确的因果关系本文的主要贡献是线性正确性的新概念,它试图通过直接从语言翻译过程本身的形式描述中得出其判断力,从而为编译器的有效性标准提供建设性的表述。该方法至关重要地依赖于源语言和目标语言的指称语义模型,在该模型中,程序含义的域与基础编译器实现的实际中间程序表示形式统一。通过定义编程语言的概念,编译器和编译器在类别理论上的正确性术语,我证明每个线性正确的编译器在该词的更传统意义上也有效。此外,通过在此框架内提供标准C编程语言的完整验证翻译,可以证明线性正确性是解决编译器验证问题的一种非常有效的方法,并且随着现代软件开发环境的复杂性,它可以很好地扩展。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号