...
首页> 外文期刊>Information and computation >A family of syntactic logical relations for the semantics of Haskell-like languages
【24h】

A family of syntactic logical relations for the semantics of Haskell-like languages

机译:类似于Haskell语言语义的句法逻辑关系族

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

摘要

Logical relations are a fundamental and powerful tool for reasoning about programs in languages with parametric polymorphism. Logical relations suitable for reasoning about observational behavior in polymorphic calculi supporting various programming language features have been introduced in recent years. Unfortunately, the calculi studied are typically idealized, and the results obtained for them offer only partial insight into the impact of such features on observational behavior in implemented languages. In this paper, we show how to bring reasoning via logical relations closer to bear on real languages by deriving results that are more pertinent to an intermediate language for the (mostly) lazy functional language Haskell like GHC Core. To provide a more fine-grained analysis of program behavior than is possible by reasoning about program equivalence alone, we work with an abstract notion of relating observational behavior of computations which has among its specializations both observational equivalence and observational approximation. We take selective strictness into account, and we consider the impact of different kinds of computational failure, e.g., divergence versus failed pattern matching, because such distinctions are significant in practice. Once distinguished, the relative definedness of different failure causes needs to be considered, because different orders here induce different observational relations on programs (including the choice between equivalence and approximation). Our main contribution is the construction of an entire family of logical relations, parameterized over a definedness order on failure causes, each member of which characterizes the corresponding observational relation. Although we deal with properties very much tied to types, we base our results on a type-erasing semantics since this is more faithful to actual implementations.
机译:逻辑关系是用于推理具有参数多态性的语言中的程序的基本而强大的工具。近年来,已经引入了适用于推理多态结石中观察行为的逻辑关系,从而支持各种编程语言功能。不幸的是,所研究的结石通常是理想化的,因此获得的结果仅部分了解了这些功能对已实现语言中的观察行为的影响。在本文中,我们展示了如何通过得出与(主要是)惰性函数语言Haskell(如GHC Core)的中间语言更相关的结果,通过逻辑关系使推理更接近实际语言。为了提供对程序行为的更细粒度的分析,而不是仅仅通过对程序等效性的推理,我们就采用了与计算的观察行为相关的抽象概念,该概念在其专门领域中既具有观察等效性又具有观察近似性。我们考虑了选择性严格性,并考虑了各种计算失败的影响,例如发散与失败模式匹配,因为这种区别在实践中很重要。一旦区别开来,就需要考虑不同失败原因的相对定义,因为这里不同的阶次会引起程序上不同的观察关系(包括在等效和近似之间的选择)。我们的主要贡献是构建了一系列完整的逻辑关系,这些参数根据故障原因的定义顺序进行了参数化,每个原因都表征了相应的观察关系。尽管我们处理与类型密切相关的属性,但是我们的结果基于类型擦除的语义,因为这更忠实于实际实现。

著录项

  • 来源
    《Information and computation 》 |2009年第2期| 341-368| 共28页
  • 作者单位

    Department of Computer and Information Sciences, University of Strathclyde, Glasgow, G1 1XQ, UK;

    Institut fuer Theoretische Informatik, Technische Universitaet Dresden, 01062 Dresden, Germany;

  • 收录信息 美国《科学引文索引》(SCI);美国《工程索引》(EI);
  • 原文格式 PDF
  • 正文语种 eng
  • 中图分类
  • 关键词

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号